| Does Javascript run outside the browser and outside of a platform like Node.js? I want stuff that can run on bare metal as well as on top of other code (software platform). Personally, I don't care about browsers. One application of a gazillion possible applications. They are an afterthought. I care about sockets and the ability to connect a machine to other machines over a network. I care about code that can boot a computer, code that can be used to write drivers to control hardware (maybe some new hardware that just hits the market), and code that let's us build on top of that. With this code we should be able to build a kernel and userspace utilities and thereby manage to operate the hardware. Once everything is up and running, then we can install any scripting language we want. We don't have to use the same language we used to build the system to do any work after that, but we could. Indeed many higher level things are written in C, e.g., the interpreters for languages like JavaScript and the web browsers they are a part of. Maybe there's a reason for that? If the best code for building from the ground up on any given piece of hardware is Javascript, it's news to me. Any examples? I have a new piece of hardware. Can I boot it using JavaScript? Can I control the hardware with JavaScript? I believe the OP just wanted to do parsing in userspace. Personally I use C for that (generated from flex), but there are countless languages that can do parsing. Why he chose to attack C I have no idea. Like I said, once the computer is up and running (thanks to C), we can use any language we like. We can run "web browsers", and software platforms. And JavaScript. So, have fun with your JavaScript. But I'm pretty sure C isn't going away anytime soon. |
Interpreters and kernels are written in C because C is a great, and probably the best language for the job. That doesn't mean, and this was my only point, that it's the only possible language that can ever do that; it isn't.
If the best code for building from the ground up on any given piece of hardware is Javascript
Where did anyone say that? I didn't say that. The author didn't say that.
As far as I'm concerned, JavaScript is not the best code for anything except pushing code to the browser.
The only thing I said was that technically, you can write JS to do it. That's all.
Can I boot it using JavaScript? Can I control the hardware with JavaScript?
The only thing that can control the hardware is machine code. You can control the hardware with anything that can generate that. JavaScript can, therefore in theory you can control the hardware with it. Doesn't mean it's a good idea. Doesn't mean it's better than C. Nobody ever claimed that.
But I'm pretty sure C isn't going away anytime soon.
No, it must certainly won't, and thank $DEITY for that.