Live data from Hacker News

JavaScript right on the hardware

technical.io

201–210 of 320 posts

Re: JavaScript right on the hardware

#201
Did anyone find details (or have an idea) on power consumption?

I'm the maintainer of nitrogen (http://github.com/nitrogenjs/service), which is a node.js based project to provide web services and client libraries for devices like this. Check it out if you are interested in devices like this!

Re: JavaScript right on the hardware

#202
post #71

Earlier quoted context omitted.

I would have thought this was obvious, but orders of magnitude more developers know Javascript than Lua[1], thanks largely to the popularity of browsers as a programming environment. According to some recent research[2], the three primary factors affecting the adoption of a programming language by developers are, in this order: 1. Libraries available 2. Familiarity 3. Performance And per the paper, this order of pref…

I think JavaScript might be most successful on Arduino for the same reason - it's a platform with which most tinkerers are familiar. http://blog.safaribooksonline.com/2013/07/16/javascript-powe...

Anyone with a tinkerer's mind would not have a moment's trouble picking up Lua particularly if they already knew Javascript (or any other scripting language for that matter).

Re: JavaScript right on the hardware

#203
post #46
post #30

Earlier quoted context omitted.

Why? I really would like to understand, because I see JS as a necessary evil, and would rather use something else if given the option.

As someone who has come around to Javascript after many years avoiding it, I think I can answer you: people like Javascript for a similar reason to why people like Python. As long as you stick to a strict set of conventions, Javascript is a very compact and manageable language, with a bit of extra flexibility to spice things up due to its prototypal nature. With Python, you don't have to worry about the conventions p…

Any chance you could point out a couple of good resources that cover the "strict set of conventions" you mention for Javascript? I've been dabbling in Javascript projects for a while now, and one of my biggest frustrations has been that I haven't been able to find any great resources that cover best-practice code design (above the level of style guides that cover mainly syntax issues). It would be great to have a couple of resources that cover the "right way" of doing things.

Re: JavaScript right on the hardware

#204

I'll take "most terrifying things you could tell an electrical engineer in 2005" for $2000, Alex.

I had this thought was well. As as physics major and an EE major, it's a (somewhat humorously) terrifying concept, at some level.

Now this has more or less been discussed to death in the threads above and below, but while I don't necessarily think running JS on a uC is a great idea, I don't see a problem with letting non-hardware-versed folk write low level code. People who know hardware will probably not use it for anything critical, and if it makes someone's life easier without endangering others or utterly diluting the community (knock on wood...) then so be it. There's no reason to be elitist about low level programming.

At this moment my workspace consists of a bit of code for an 8bit microcontroller, a FPGA layout + VHDL, and a mixed signal high speed PCB layout I've been laboring over for the better part of two weeks. Take that, "low level" C! Now I could go off about how superior and/or necessary my low level methods are, but my friend who's working on an ASIC design might say something similar to me. There's always a lower level. As always it's a little bit about preference, and a lot about using the appropriate tool for the job.

I might have a problem if web developers started cramming JS onto arduinos and calling themselves competent hardware engineers, but (and I think most people in the field would agree with me) I suspect the likelihood of that happening is negligible. It becomes apparent very, very quickly when someone is pretending to know how to hardware.

Re: JavaScript right on the hardware

#205

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?

I like it. It was the first language I learned because edu materials were more accessible (to me) than Perl/python/Ruby

Re: JavaScript right on the hardware

#206

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?

I like it. It was the first language I learned because edu materials were more accessible (to me) than Perl/python/Ruby

Re: JavaScript right on the hardware

#207
post #137

Earlier quoted context omitted.

Many people do enjoy writing JavaScript and view it as just as good as Python and others.

I've dealt with these kind of programmers on numerous occasions. While they may claim to know other programming languages, they usually don't know much about them at all, in reality. If they do know another language, it's PHP, which is just about as bad as JavaScript in most respects. Any programmer who has real experience with a variety of different programming languages will become very aware of how inferior JavaSc…

What a bunch of pompous bullshit. From what you've said it seems you've never met a talented JS programmer.

Re: JavaScript right on the hardware

#208
Great idea and marketing, but I just wish they'd chosen Go - I would have bought one in a second. Correct me if I'm wrong, but the lack of sane, static typing in JS just seems crazy to me when you come to writing low level code.

Re: JavaScript right on the hardware

#210
post #71

Earlier quoted context omitted.

I would have thought this was obvious, but orders of magnitude more developers know Javascript than Lua[1], thanks largely to the popularity of browsers as a programming environment. According to some recent research[2], the three primary factors affecting the adoption of a programming language by developers are, in this order: 1. Libraries available 2. Familiarity 3. Performance And per the paper, this order of pref…

Language popularity is a pretty fickle thing. It was not too long ago that you'd be laughed out of the room if you suggested using Javascript for any kind of serious work. Perl, once the king of scripting languages by orders of magnitude, is now viewed as being something close to COBOL: a few old guys know it, but none of the cool kids will touch it.

The more things change, the more things change. Javascript isn't Perl and isn't being used like Perl. For example, people aren't turning it into an hardware embedded language.
Post reply on HN