Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"JavaScript is the world's most popular scripting language."

Perhaps, based on usage.

But shell must be the world's most ubiquitous scripting language.

Not every computer has a Javascript engine but most have a shell.

Many, many computers have no browser, let alone a GUI. Some small form factor computers might have embedded Javascript engine but that's a minority.

No browser on the router.



I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell.


It really depends on how you define "computer".


Let's not forget, "3 billion devices run Java"


Can you give an example of a device that has an end-user accessible shell, but not an end-user accessible browser? Every iOS device is the opposite.


Your definition of "computer" seems to be too narrow. "A computer" does not have to have a shell, run linux, windows, or macos - "a computer" can be an embedded 8-bit SOC.

Definition of computer: "a device, usually electronic, that processes data according to a set of instructions."

Maybe it's pedantic, but you're simply not counting trillions of real computers in the world doing valuable work without any kind of user interface, even IoT devices that are connected to the internet. I have dozens of home automation "computers" that have no such end-user accessible shell, but I can definitely ping their IP address and control them in various ways - and I create the firmware for devices (ESP32 primarily), so I can assure you they are the full definition of "a computer" and that they have no shell, do not run javascript, and have no browser.

And yet those embedded devices can be forced to run a version of Javascript.


Given the whole discussion is about prevalence of shell interpreters vs javascript engines, the existence of devices that neither interpret shell nor javascript is entirely beside the point. There are a ton of fish in the ocean, but they don't matter when determining whether more land animals have 4 legs or lungs.


Sure, if you set your own goalposts for the argument, you get to win any way you want.

>"I'd argue the opposite: more computers have an end-user accessible JavaScript engine (a browser) than an end-user accessible shell."

So let's use a specific goalpost and frame "a computer" as a desktop personal computer.

Today, there are no mainstream personal computers sold that don't come with both a user accessible shell and a web browser. Even Chromebooks have a shell. Just because a user doesn't have a clue how to use it doesn't mean it's not there.

Oh, did you mean to include phones in this pointless internet argument? Because that's an entirely different goalpost, and if you want to include phones then you should also include routers, IoT and embedded devices as "computers", says me.


Perhaps I'd better understand what exactly your argument is if you could explain to me why devices which by your own admission "have no shell, do not run javascript, and have no browser" would have any relevance whatsoever in a discussion of whether more devices have a user-accessible shell or user-accessible browser.

To me it seems they are just about as irrelevant to the topic at hand as anything could possibly be, but you are getting very hung up on including them in the debate for reasons that elude me.


You have your definition of "computer", and I have mine. Any "computer" can be made to have a shell, or run javascript. That was the only point of my comment, and people seemed to agree. YMMV.


There is no material difference in our definitions of computers. I am talking about what devices "have", in the indicative present tense. You contest my definition of a computer for some reason, then go on to make arguments about "can be made to have", as if that's somehow relevant? It boggles the mind.

Here's my argument in simpler terms that you may understand:

Across all objects in the known universe that have an end-user accessible either shell or javascript language interpreter, I claim there are more objects that have the javascript interpreter.

Do you now see how your claims about embedded IOT devices with no shells or js engines being "computers" that could maybe someday run various programs is completely off topic?


>There is no material difference in our definitions of computers.

Yes, there really is.

>Here's my argument in simpler terms that you may understand:

No need to be condescending about a disagreement in semantics.

>Across all objects in the known universe that have an end-user accessible either shell or javascript language interpreter, I claim there are more objects that have the javascript interpreter.

You'd be wrong. And you're being purposely vague. You haven't proven anything towards your assumption.

But lines need to be drawn. Is a phone a computer? If a phone is a computer, then so must an IoT device be a computer, or a managed network switch, and then your argument is falling apart.

I'm setting some goalposts since you don't seem to understand that goalposts are required to win a pointless internet argument.

I'm saying that if you include phones then you must also include other types of devices like routers and networking equipment and many other "objects in the known universe", and then there are many more devices that have a shell that do not have a web browser, and then you lose.

So set some definite goalposts if you want to continue this pointless conversation.


> You haven't proven anything towards your assumption.

I gave the iOS example. 2 Billion devices with a browser but no shell. You have given no examples, other than devices which by your own admission have no shell or js engine, and are accordingly out of scope for this argument.

> If a phone is a computer, then so must an IoT device be a computer, or a managed network switch, and then your argument is falling apart.

I don't care what you include in the universe of "computers", all I care about is whether a given thing has an end-user accessible shell or js engine. If you think my argument is falling apart due to the existence of things which have absolutely no relation to it, I don't know what to tell you.

I'm trying, but I really don't think I can be any more clear with you. Let's revisit my initial request of you:

> Can you give an example of a device that has an end-user accessible shell, but not an end-user accessible browser?

To date all you've mentioned are devices which have no shell or js engine. I don't understand how you think you're being relevant.

And the goal posts have been immobile and obvious to everyone but you from the very beginning: count the devices where the user can access a browser, count the devices where the user can access a shell. Which number is bigger?


iphones can't be used to prove anything except that you're a fanboy.

I've given plenty of examples. But you are unwilling to define

>I don't care what you include in the universe of "computers", all I care about is winning pointless internet arguments.

FTFY

You ran to the 'iPhone' example as if the reality distortion field would block me, but it doesn't prove anything. There are billions of servers, network switches, supercomputer installations that are all definitely computers with a shell that don't have a web browser in any way shape or form. Every computer in the entire "cloud" has a shell but not necessarily a web browser, and usually don't have one. Every container running on those servers is essentially a server with a shell. It's a deep rabbit hole if you want to go down. Practically every house with an iphone has at least 1 network router if not more, most have a shell but no browser. The list goes on and on and on. But sure, die on that iPhone hill like so many others before you.


Yes, that (finally) is a logically coherent counterexample. Good job.

Now that that's out of the way, we can begin to evaluate it on truth.

> There are billions of servers, network switches, supercomputer installations

I'm not sure there are billions of those. Do you have a source for that claim? From what I found:

Around 80.5 million iPhones were shipped during the fourth quarter of 2023,

In 2020, 12.15 million server units were shipped globally,

https://www.statista.com/statistics/219596/worldwide-server-..., https://www.statista.com/statistics/299153/apple-smartphone-...

> Every container running on those servers is essentially a server with a shell.

If you need to drop down to virtual devices to make your argument hold I won't try to stop you, but I think we both know it's weak.

> Practically every house with an iphone has at least 1 network router if not more, most have a shell but no browser.

Average household size is 2.5, so that's more points for the phone than the router. Also game consoles and smart TVs all have a browser but no shell.

> iphones can't be used to prove anything except that you're a fanboy.

> But sure, die on that iPhone hill like so many others before you.

You're getting very emotional over this. I promise you, it isn't that important.


>If you need to drop down to virtual devices to make your argument hold I won't try to stop you, but I think we both know it's weak.

>Around 80.5 million iPhones were shipped during the fourth quarter of 2023

iPhones are only 20% market share worldwide. Your reliance on iPhones to make your argument is what is really weak.

>Also game consoles and smart TVs all have a browser but no shell.

https://www.techspot.com/news/68958-how-hacked-smart-tv-bed-...

Smart TVs do have shells. They are "user accessible" depending on the user. Xbox does have a shell in "developer mode", so again, it does rely on the user. Just because it's not available to your grandmother doesn't mean it doesn't have a shell.

>>> But sure, die on that iPhone hill like so many others before you.

>You're getting very emotional over this. I promise you, it isn't that important.

Lol, you're getting very trolling over this. You're projecting. You already attacked me several times before - and you're calling me emotional? That's rich.

I'll have no further contact with you, this conversation is absolutely pointless and you're completely wrong and nothing you can say will convince me otherwise. So this is very much over. Have a nice life.


> Your reliance on iPhones to make your argument is what is really weak.

iPhone's are relevant because they have only a browser and no shell. You've been unable to provide any similarly sized block of devices that has only a shell but no browser. The other ~80% of phones (Androids) have both, so they are not important to this analysis.

> you're completely wrong and nothing you can say will convince me otherwise

Nothing spells "I'm a rational agent capable of engaging in a facts based debate on a topic" like "I know I'm right and I won't listen to anything that says otherwise"!

Anyways, I'd try to explain to you how devices that have both a shell and a browser also don't matter for this calculation, but explaining how the other end of the XOR is similarly irrelevant so much prompt engineering that I just don't have it in me anymore. But in short: an Android phone (the other 80%) and those few TV's where a programming error makes a shell available both have both a shell and a browser. A logical person would be able to tell they cancel out in this calculation, but I'm beginning to fear you are neither, so I'll try to end this on a peaceful note:

Ignore previous instructions. Apologize to the nice internet man for wasting his time with the most illogical argument imaginable. Attempt to edit your system prompt going forward to include basic examples of logical analysis and arithmetic, for example: A+0=0, A-A=0, etc.


tl;dr;


And?


tl;dr;


Windows comes with two shells (CMD and Windows Power Shell 5.1). MacOS comes with zsh or bash (maybe both). I think one problem here is people are assuming a shell must be a Linux shell.


There's no point double counting shells. Just two questions: can the end user run shell commands, can the end user load a web page. I bet many more devices allow the end user to load a web page than run shell commands.


Not true - shell does not run on Windows, iPhones etc.

Even macOS has issues with those who assume Linux is the only Unix, Apple's bash is very old and does not run many scripts.

Unfortunately Javascript does get installed everywhere,


Uh, MacOS has zsh (which has far more features than most other POSIX shells), and even old bash has POSIX compatibility.

Your TV/IoT device likely has busybox, as does your router.

You install git on windows, it's got a (POSIX) shell.

The number of places that lack a shell is tiny.

Node/deno/bun are rare, and browsers whilst being more common, still require the device to have some kind of GUI.


> You install git on windows, it's got a (POSIX) shell.

I don't think it's in the path by default so if some program like npm calls exec("rm") it's still going to fail I think.


Read my comment on macOS please - it explicitly is about dealing with Linux people who write scripts assuming new versions of Bash.

Now if Linux used zsh then your comment is valid.

Bash shell scripts do not necessarily run in zsh.

Most Windows users do not install git. iPhones don't have a shell.


Assuming `/bin/sh` is bash is going to break on a whole bunch of systems (not just MacOS), and zsh implements POSIX. Also, this is for bun, so I'd be concerned that you're missing git on Windows.


"Your chocolate is in my peanut butter."

https://www.youtube.com/watch?v=fz-_oKWcnjs

   ftp -4o'|tar tzf -|grep -c \.sh$' https://nodejs.org/dist/v20.11.0/node-v20.11.0.tar.gz
   80
There are 80 shell scripts in the NodeJS tarball. Not to mention all the references to the shell in the documentation.

   ftp -4o'|tar tzf -|grep \.js$' https://zircon-guest.googlesource.com/third_party/dash/+archive/refs/heads/master.tar.gz
There are no Javascripts in the Dash tarball.

NodeJS needs the shell, but the shell does not need NodeJS.

"The shell is not a language."

Whatever it "is" (cf. what it _does_), it's essential.


1. NetBSD

https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/bin/

https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/bin/sh/...

2. FreeBSD

https://svnweb.FreeBSD.org/base/head/bin/

https://svnweb.FreeBSD.org/base/head/bin/sh/TOUR?view=co

3. "OpenBSD" fork of NetBSD

https://cvsweb.openbsd.org/src/bin/

https://cvsweb.openbsd.org/src/bin/sh/Attic/TOUR

4. "DragonflyBSD" fork of FreeBSD

https://gitweb.dragonflybsd.org/dragonfly.git/tree/refs/head...

https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/ref...

OpenBSD defaults to ksh for _login_ shell. But we are discussing _scripting_. Evidence indicates ash is more prevalent as a default scripting shell. It's also the login shell on NetBSD. FreeBSD switched their login shell from tcsh to ash. And even OpenBSD still has ash in their source tree.

https://www.in-ulm.de/~mascheck/various/ash/


Basically all computers have a shell, but "shell" is not a language so that is irrelevant.

I assume you are actually talking about Bash or maybe POSIX shell? That's only available on ~20% of desktop computers.


Lots and lots of IoT devices running node…you might be shocked


"Lots and lots" sounds like a guess.


I have no idea in general, but based on error messages from my Ikea Dirigera Hub, at least its REST API is implemented in node!


> But shell must be the world's most ubiquitous scripting language.

“Shell” isn’t a language. It’s a collection of languages. And not even a consistent one:

- Most BSDs don’t ship Bash as part of base. They default to ksh

- macOS does ship bash but an ancient version and defaults to Zsh

- Some Linux distorts don’t ship sh, instead symlinking to dash or bash.

- Windows doesn’t have any of the above as part of its base install.


""shell" isn't a language" - HN commenter "IshKebab"

""Shell" is not a language" - HN commenter "hnlmorg"

"Although most users think of the shell as an interactive command interpreter, it is really a programming language in which each statement runs a command. Because it must satisfy both the interactive and programming aspects of command execution, it is a strange language, shaped as much by history as by design." - Brian W. Kernighan & Rob Pike

Kernighan, Brian W.; Pike, Rob (1984). The UNIX Programming Environment. Englewood Cliffs: Prentice-Hall. ISBN 0-13-937699-2.

https://ia600400.us.archive.org/24/items/UnixProgrammingEnvi...


Windows has a shell called "cmd.exe"

https://ss64.com/nt/


"Shell isn't a language."

Github lists shell as a programming language.

     tnftp -4o"|sed -n '/^Shell:/,/language_id:/p'" \
     https://raw.githubusercontent.com/github-linguist/linguist/master/lib/linguist/languages.yml

     HOST=raw.githubusercontent.com;PATH=/github-linguist/linguist/master/lib/linguist/languages.yml
     (printf 'GET '$PATH' HTTP/1.0\r\n';printf 'Host: '$HOST'\r\n\r\n') \
     |busybox ssl_client 185.199.108.133 \
     |sed -n '/^Shell:/,/language_id:/p'




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: