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?
When I see a device like this I like to think that people familiar with JS can now tinker with hardware devices. I know some people who are comfortable with JS but aren't engineers and they may not be willing to learn Arduino C. Whatever language it is I'm glad prototyping devices are coming out at a cost that basically makes them an impulse purchase.
JavaScript right on the hardware
221–230 of 320 posts
Re: JavaScript right on the hardware
#222Earlier quoted context omitted.
I completely agree. I'm a front end developer recently out of college and I decided recently that I wanted to expand my knowledge and learn hardware. This seems like a good place to start given my knowledge of JavaScript
If your college education for becoming a developer didn't teach you a lower level language it failed you. Even at my small liberal arts school we use multiple languages (they may all be really, really similar, but they're different languages), and work on low-level things. I'm aghast that a CS education wouldn't include at least Java, especially considering that a large number of schools switched exclusively to Java…
Re: JavaScript right on the hardware
#223Earlier quoted context omitted.
Non-string values are not valid hash keys. Operations that should be type errors fail silently and return nonsense. The prototype system is less powerful than the OO system of basically every other scripting language. The language will never have continuations, so people who want real control flow are stuck using preprocessors to generate callback spaghetti. Encoding a particularly rigid mix of dynamic and lexical sc…
Non-string values are not valid hash keys. - ES6 Maps The prototype system is less powerful .. - No. Just different. The language will never have continuations.. - Generators help here. We use them with node --harmony Scoping. - Fat arrows and block scoping coming in ES6. These features can be used today in node, by enabling the harmony flag. Otherwise wait until next year.
Yes, this is a good thing :)
> The prototype system is less powerful .. - No. Just different
Javascript let you use prototypes to cause map lookups for absent keys to fall back to a different map. Lua lets you use prototypes to override every operator, make the object callable, override map lookups for absent keys, and override assignment of new keys. All of these operations can be made to call into arbitrary functions the user provides. Python, an OO scripting language, provides all of the same features.
It seems to me that among these three languages there is a greater difference between the more powerful systems and the less powerful system than between the prototypal systems and the OO system.
> The language will never have continuations.. - Generators help here. We use them with node --harmony
Python also has generators, but you still need greenlet or stackless if you want to use coroutines. The inability to suspend from a subroutine is a deal breaker. Generators are probably nice for writing generators. For writing control flow, Continuation.js seems like a better choice.
> Scoping. - Fat arrows and block scoping coming in ES6.
=> lets you use a lexically scoped this, which is likely a dynamically scoped this from an enclosing lexical scope. This sounds useful, but it doesn't really make things less messy.
Re: JavaScript right on the hardware
#224Earlier quoted context omitted.
Not sure what you mean by that. I meant exactly what I said: I feel sorry for anyone whose linguistic toolbox is so limited that Javascript is their best option for writing low-level code for manipulating electronic devices. It is hard to imagine a more profound mismatch between the tool and the problem it is supposed to solve.
I feel sorry you lack basic understanding of linguistics. Any major programming platform today is too complex for a single individual to understand completely. One can spend his time learning several languages (and the platform they run on) or concentrate on a single language. I'd say it's obvious the second choice leads to higher productivity. You don't see professional musicians trying to play 10 different instrume…
Yeah, but a violinist wanting to learn how to play the piano doesn't try to rub the keys with a bow. If you are a Javascript Web Developer, picking up a microcontroller is already going pretty far out of your domain. You might as well learn how to use the tools that were already suited for that task.
Re: JavaScript right on the hardware
#225Forgive 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?
My thoughts exactly, instead of killing it off or at least limiting it to the browser, we're trying to shove that abomination everywhere. This is sad.
Re: JavaScript right on the hardware
#226Earlier quoted context omitted.
When I see a device like this I like to think that people familiar with JS can now tinker with hardware devices. I know some people who are comfortable with JS but aren't engineers and they may not be willing to learn Arduino C. Whatever language it is I'm glad prototyping devices are coming out at a cost that basically makes them an impulse purchase.
So, I don't really buy arguments like this. Would your friends who are comfortable with JS but aren't engineers actually be interested in learning microcontroller programming because they can do it in JS? When you move from scripting a web page to programming on a very limited embedded system, you're changing to a completely different paradigm. Instead of worrying about the DOM and AJAX, you're worrying about GPIO an…
Re: JavaScript right on the hardware
#227Earlier quoted context omitted.
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 wi…
I may know javascript, but my god I wish I didn't have to.
Re: JavaScript right on the hardware
#228Earlier quoted context omitted.
JavaScript certainly has it's quirks, but if you get to know it it's not a bad language. And since CoffeeScript compiles to JavaScript you can use it anywhere JS runs...
It's not a bad language as long as you know it well enough to know which parts of it are the bad parts so you can avoid them. ...and that's what makes it a bad language.
That's why there's a book called "JavaScript: The good parts" :)
Re: JavaScript right on the hardware
#229Earlier quoted context omitted.
Can I ask why it worries you? Honestly just curious. Is it the performance hits of more levels of abstraction? Or fear of all data being in the "cloud"?
Personally it worries me because people can build whatever they want and call themselves "programmers". It encourages a state in the industry when knowing about data structures, hardware, turing machines or the other fundamentals of computer science are considered unecessary. Perhaps they are, from a business standpoint. However, it will eventually inhibit growth of the discipline as a whole. A common rebuttal to tha…
As a self taught developer, I find it offensive that you think I would go through all the trouble of teaching myself how to code, and then rest on my laurels, like I wasn't inherently curious and thoughtful.
Since learning Javascript front to back, I've developed a curiosity with strictly typed languages, assembly, computer science, Big O notation and other (what I consider) hardcore disciplines in computing.
Javascript was my gateway, and I love it to death, but I'm not a javascript developer any more than a C developer is simply a C developer.
Re: JavaScript right on the hardware
#230Forgive 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 wi…
Yes, a majority of prof. software engineers who work for internet companies work on the web. But then there's also stuff like embedded, systems, databases (not the ones you hook up to some scripting language to generate html), medical, aerospace, industrial processes, etc.
The software industry is huge and only a small part of it is web related.
> I mean just look at the front page of Hacker News
It's like assuming San Francisco was a model for all other cities on this planet. It's all about your local bubble. For you maybe really it looks like everyone (including your local coffeeshop owner) could win a JS hackathon. But for me I barely know an engineer who's fluent in JavaScript. Everything is C++ here.