Live data from Hacker News

JavaScript right on the hardware

technical.io

31–40 of 320 posts

Re: JavaScript right on the hardware

#33

Earlier quoted context omitted.

Because JavaScript runtimes are the best dynamic language VMs by a long shot.

The JVM would like to have a word with you.

Nitpicking: while JVM implementations can run, they're not particularly tailored for dynamically typed languages.

Re: JavaScript right on the hardware

#34
post #21

Nifty! I presume this is running on a Linux kernel? How much memory does node use? I would think that kernel + JS VM would chew up quite a bit of your 32 MB of RAM.

> I presume this is running on a Linux kernel? I doubt that. It has M-series ARM microcontroller, Linux is usually used with A-series ARM CPUs.

I assumed it was run using uClinux to deal with the lack of MMU.

Re: JavaScript right on the hardware

#35
post #16

So much negativity in this thread & on HN in general. Not everyone has hardware experience, and this looks great for newcomers.

To add to this, abstracting away from hardware is exactly what C (which most people consider low-level) was built for. No one wants to write assembly, and even less people want to write 0s and 1s or punchcards.

Successfully-executed abstraction is a wonderful thing, people have been trying to abstract away (but retain performance) of C for decades. I welcome newcomers, maybe someone will get it right

Re: JavaScript right on the hardware

#36
post #24
post #12

Earlier quoted context omitted.

Why? Because it uses JavaScript? I'd rather stick with my Arduino and use C. I don't get the whole "JavaScript Everywhere" meme, I'd rather use almost any other modern language (note the almost).

You prefer C over JavaScript? Header files? Pointer arithmetic hell? Precompiler Macros? Manual Memory Management? Seriously? To each their own, though.

No. I prefer C over JavaScript for embedded devices. And actually in most places, too.

I know I'm weird, but I really like pointers, because I really like being able to manually setup data structures, and enjoy the power provided by pointers.

Manual memory management isn't horribly fun, but for embedded devices I would rather be in charge of that over the chip having to do it for me. It means that if there's ever a memory overflow, it's my own damn fault, and I have the ability to fix it.

JavaScript is an acceptable scripting language. It's not my favorite, but it works. I just don't think scripting languages should really be used on embedded devices.

Re: JavaScript right on the hardware

#37
post #14

Forgive me for not being hip but why try so hard to put JS in new places? It seems to be just an unfortunate historical accident that JS is one of the most popular languages in the world - does anyone actually like it compared to other modern scripting languages? Could we invest in CoffeeScript instead, at the very least?

JavaScript is my favorite programming language. It's not perfect, but still. (Other languages I know: Ruby, Python, Java, Go, Scheme, C, Erlang).

[deleted]

Re: JavaScript right on the hardware

#38

This is very cool, but I don't see how it can compete with boards like the BeagleBone Black. The BleagleBone Black is $45 for a 1GHz CPU and 512 MB of memory, yet the access to low-level hardware is just as good.

Looks like the JavaScript bindings for Tessel are better. Comparing the demo for blinking an LED:

  var b = require('bonescript');
  var state = 0;

  b.pinMode("USR3", 'out');
  setInterval(function() {
    state = state ? 0 : 1;
    b.digitalWrite("USR3", state);
  }, 100);
vs

  var tessel = require('tessel')
  tessel.led(1).blink()
If they can give human-friendly names to stuff like "USR3" and "P9_40" and "P9_36" out of the box, then I'd say they've added some value.

Re: JavaScript right on the hardware

#39

Forgive me for not being hip but why try so hard to put JS in new places? It seems to be just an unfortunate historical accident that JS is one of the most popular languages in the world - does anyone actually like it compared to other modern scripting languages? Could we invest in CoffeeScript instead, at the very least?

Because everyone* knows JavaScript. I'd wager that the vast majority of professional software engineers work on the web, or very close to the web, and JavaScript is the lingua franca of the web. I mean just look at the front page of Hacker News on any given week. It's full of talk of JavaScript and new JavaScript libraries and new things to do in JavaScript. When you think about how many more people this can reach without them having to learn yet another language for a very specific thing, it makes sense.

*hyperbole, please forgive me for being not being completely literal.

Post reply on HN