12 ms·
I can understand the motivation. But not sure if I want to be surrounded by hardware powered by software written by people who think that Javascript is actually
by auggierose 13y ago
I can understand the motivation. But not sure if I want to be surrounded by hardware powered by software written by people who think that Javascript is actually a good programming language.
- striker44 13y agoand what is a 'good' programming language, sir.
- auggierose 13y agoHere are a few languages you could choose from (my favourite currently would be Scala): Scala (http://www.scala-lang.org/ http://www.scala-lang.org/) Clojure (http://clojure.org/ http://clojure.org/) Haskell (http://www.haskell.org/ http://www.haskell.org/) OCaml (http://caml.inria.fr/ http://caml.inria.fr/)
- bigiain 13y agoHave you tried to employ experienced developers to support a codebase in any of those languages? As much as I dislike it, sometimes PHP is "the right language".
- freyrs3 13y agoTypically if they are the type of programmer inclined to learn Clojure, Haskell, and/or Scala the experience part isn't a problem.
- tdfx 13y agoYes, for those types of programmers, finding them is the problem.
- mietek 13y agoThis has been demonstrated to be false over and over again. There is a surplus of functional programmers, and a deficit of functional jobs.
- bigiain 13y agoOn the other hand, a quick straw-poll through my contact list - out of all my friends/colleagues who I'd guess have used (or even heard of) those languages, I don't think a single one of them has been "on the job market" in the last 4 or 5 years (they're all either comfortably long-term employed at their present gig, or they've been successfully running or partnering small consulting firms of their own).
- rdtsc 13y agoThat is where good headhunters come in. I don't have a linked in account, Facebook or google+, and am quite happy at my current job, yet get calls from google or other companies periodically. Still don't know how they find me out, I do go to conferences so maybe they buy lists of attendees...?
- bigiain 13y agoTwo comments: 1) I'm guessing (by reading between the lines) that you also haven't "been on the job market", and haven't been plausibly tempted to "jump ship" to any language-purist position? 2) <cynical mode> Just because you haven't set up LinkedIn/FaceBook/Google+ profiles yourself, that doesn't mean they don't all have "shadow profiles" for you based of the social-graphs they've got where your colleagues/friends have "leaked" information about your existence to them and enabled them to infer skills/abilities from them… I don't _know_ that they sell data from "shadow profiles" to recruiters, but I do suspect there's enough money in tech recruitment to make it likely…
- rdtsc 13y agoActually knowledge of of any those is a proxy for the general quality of those developers. They could end up writing C++ but the fact that they went out and sought to learn language they thought was beautiful or had a different paradigm tells something about them.
- solnyshok 13y agoI am sure those high caliber gurus will have no problem learning javascript overnight. That wll be excellent addition to their toolbx for that rare case when their internet enabled fridge gets hijacked
- hrjet 13y agoConsider that they might be avoiding Javascript knowingly.
- Apocryphon 13y agoI get that it is possible to generalize public opinions and say that something is "objectively" beautiful, or ugly. But I don't get why people familiar with those three languages always praise their functional purity, as if imperative languages are barbaric. How come there aren't ugly functional languages?
- rdtsc 13y agoI'll talk about Erlang for example. Functional purity is objectively beautiful because it solves or minimizes a large number of typical problems. These problems such as large mutable states, large mutable state modifications during high levels of concurrency. A good functional language, using closures can mimic other patterns while having a very small core set of rules. Purity doesn't mean moral superiority (although it sounds like) purity means referential purity for example, where the function when called no matter how many times with the same argument returns the same result. That is beautiful because it allows for interesting compiler optimizations, good for testing. Other looser explanations of purity are -- confinement of mutable state (this could mean monads in Haskell modifications to shared global state), immutable data structures in Erlang or Clojure. Now that said these are all tools. As I mentioned, in practice, a lot of these people in their day job will end up using Java or C++. But the fact that they decided and managed to learn a new paradigm is what is the key. Heck it could have been data-flow programming or logic programming (Prolog is awesome too, especially when mixed with constraint satisfaction). Yet another way of putting it, familiarity with these things point to a level of passion and sets someone apart, that is quite desirable. Now, yes, there is a self-referential quality to it all, the more we think functional programming is a proxy for developer quality, the more people will do tutorials just to put it on their resume. Well, then the next fashion will be something else -- quantum algorithms perhaps, who knows.
- joshlegs 13y agoanything but javascript!
- krapp 13y agoooh, how about PHP? It's practically C and everybody likes C!
- _sabe_ 13y agoLet grandpa tell you a story... Once upon a time Javascript was this fragmented language, mostly associated with blinking effects, pop-ups and lame attempts to protect a web page from being viewed as pure HTML. After years of misery the community was tired of how things was and said, "No more"! And so html-tables and javascript was sent to a zip-drive (you probably won't remember those, think of it like a SD-card) to never be seen on the web again. But evil people who sold out to the dark forces was destined to bring javascript back. By making frameworks they masked the incompatibilities of the language, making it seem like a friend. And the young people who never fought the war, they welcomed this new technology with open arms. But seriously, we took a typesetting language made for writing documents (just like word) and turn it into a technology for making software. It turned out into a total mess, and now you wonder why taking a language made for manipulating the DOM and using it for manipulating the stack is a bad idea? "When all you have is a hammer..."?
- Apocryphon 13y agoWhere were you to warn us when HN was going Node-crazy in the last 2-3 years?
- davidpardo 13y agoTwenty years ago I read exactly the same about using the abomination that was perl/CGI instead of the so called correct C. And history tells us that the prototypes that were made to test the concept where, most of the times, good enough to stop further development in the academic way. This product (or a similar one) can empower lots of people in ways that we cannot imagine yet. Not all hardware has to be made by hundreds of thousands and be able to tinker with real world devices will be a bigger asset than we think right now. The web we know now hasn't been developed from tall towers but from the trenches. New ideas will flourish and then great developers will be needed to optimize, refine and scale projects that will change our view. At least that's what I hope.
- camus 13y agoPerl is still horrible... and more people write C than Perl i can guarantee you.
- w1ntermute 13y agoHow about Ruby or Python?
- shmerl 13y agoOr Rust for example.
- TinyBig 13y agoThere is already a strong effort in Ruby land - check out http://artoo.io/ http://artoo.io/. Artoo was developed with robotics in mind but it is not limited to that domain.
- ssafejava 13y agoYou could - but V8 is actually much faster than Ruby or Python, and JS syntax is quite good for I/O. Better than that, a ton of people know JS and the more developers find this accessible, the better.
- w1ntermute 13y ago> V8 is actually much faster than Ruby or Python Actually, they are compiling to Lua bytecode in this case. > JS syntax is quite good for I/O And you can pass around blocks in Ruby.
- aaronem 13y agoAnd you can't in Javascript? Sure, the syntax is a little clunky, but the semantics are precisely the same.
- shmerl 13y agoSafe, concurrent and efficient.
- jeswin 13y agoAs funny as it might sound, you should try Node then. Single threaded. Concurrency via processes, impossible to share state. And, among the more efficient dynamic languages out there now due to the browser performance race.
- shmerl 13y agoI prefer properly compiled languages in general. And especially for server side software.
- regularfry 13y ago> properly There's a slippery word if ever I saw one. Does Java count? Python? C? You could make arguments for all, or none, of these depending on what "proper" is.
- shmerl 13y agoI said "properly" to avoid confusion, but it probably only increased it. Java is not a strictly compiled language, since it still uses JVM. Most modern dynamic languages aren't purely interpretive and they use various techniques (like JIT) which make them closer to compiled, but they are still not "properly" compiled in a sense. That's what I meant above.
- mietek 13y agoAlso featuring: non-preemptive multitasking! Yes, in 2013!
- freyrs3 13y ago> Single threaded. Concurrency via processes, impossible to share state. Which language doesn't have these options? This could be a description of Bash.
- woah 13y agoNyess nyess these foolish sahvages
- frozenport 13y agoI would like to second this opinion. I am concerned that many of these products will not hit practical state until issues like power consumption and cost can be addressed. I don't want to have my device wired and I don't want my $1 dollar light bulb to cost $40. If these guys insist on using JS they should compile it to 8bit code, so that we can better address to cost and power issues. Right now they have something that is larger than an Arduino. My gut reaction is that python might be a better fit.
- deleted 13y ago[deleted]
- 6ren 13y agoWell, they compile to Lua and then use a JIT on the device. Using JS for hardware is an audacious, repulsive, brilliant, horrifying idea - maybe people don't want to call it web assembly language, but it's certainly web lingua franca. If you want to execute in the client, you have to use it. If you don't like it, everybody is writing frontends that compile to it (e.g. coffeescript), asm.js to compile it to, and writing books about the "good parts". So... every web developer knows javascript... and assuming it's they who will make the "web of things"... it makes sense to harness all that work and future work around JS (though I'd think the "internet of things" would be made by more hardcore folk, like the TCP/IP designers). I don't know if this will pay off for them, but kudos for the chutzpah to actually do it (and for even considering it!) But it really could work out - whoa dude, awesome leap of faith!
- davidpardo 13y agoMaybe they're not competing with Phillips or GE, but with Lego mindstorms.
- dror 13y agoJavascript sucks as a language but there's a huge numbers of developers that know javascript, and of the ones that don't many use C derived languages which would make it easy for them to pick it up. Another major advantage of Javascript is that it is continuously optimized in the ongoing race for performance in the browser. The node engine has been shown multiple time to be significantly faster than other interpreted languages. Finally, while young, node has a quite nice eco system.
- DannyBee 13y ago"Javascript sucks as a language but there's a huge numbers of developers that know javascript" The same could be said of Visual Basic. I still wouldn't want my thermostat running VB. "Another major advantage of Javascript is that it is continuously optimized in the ongoing race for performance in the browser" In an embedded system like this, what you want is something continuously optimized to be bug free and work without fail, not something optimized to be mostly ephemeral and need to work in an environment where if you leak memory for 45 days, people rarely notice. Browser performance is also not optimized for anything that matches the application workload of this kind of device.
- randomdata 13y agoGiven that this is realistically a tool for hobbyists or people rapidly prototyping a concept, does it matter if you choose to build a thermostat in VB (assuming you liked VB enough to consider it) or hand tuned assembly? Anyone who tries to bring a product to market with this will presumably be crushed by those who can use less expensive components from better optimized code. At scale, even a few pennies per unit can make a huge difference in your profitability. It seems quite unlikely, for at least the foreseeable future, where you will buy an off-the-shelf thermostat with one of these inside - or anything else running Javascript for that matter - simply due to component costs, if nothing else. But if you are a web developer who wants to hook up a light that flashes when someone visits your web page, something like this might be a reasonable choice. Being able to build something that works reasonably well with minimal effort is appealing. Who cares if it adds $30 to your BOM and maybe doesn't work every single time? Personally, this is probably not a device I would be interested in. Playing with embedded systems at a low level is what makes it fun for me, but not everyone wants to learn C and assembly just to throw together a project in their spare time. I think this could be a pretty great product for that certain niche.
- sockgrant 13y agoShut up. Really. Someone has spent a lot of time trying to innovate. This is all you have to contribute?
- Wilya 13y agoTime invested doesn't even remotely imply greatness.
- sockgrant 13y agoWhether or not something achieves your lofty expectations for "greatness" on HN doesn't make it any less immature and disrespectful to make pithy, destructive, flamewar comments that are unrelated and unhelpful to the discussion and the innovators.
- angersock 13y agoThere are no "good" programming languages (excepting, perhaps, Prolog, Lisp, Smalltalk, or APL). There are merely many languages that are less bad. Javascript only has so much room for the bad to hide in--it's a little quirky, but isn't half as open to WTFs as, say, C++ (any generation thereof). Don't be hating just because these new kids don't have to bang their faces into machine code or shitty C macros--it's great to have a way of trying different programming techniques for embedded systems.
- cbsmith 13y ago> Javascript only has so much room for the bad to hide in--it's a little quirky, but isn't half as open to WTFs as, say, C++ (any generation thereof). You know, I only know JavaScript about a fraction as well as I know C++, and I can say with a great deal of confidence here... no. C++ has lots of WTF's in strange little corner cases (mostly around the C compatibility issue). C++11 has done a good job of cutting down WTF's. In JavaScript you needn't go to the corner cases... it's right there in the normal cases. We're talking about a language that still doesn't have a standard way of reading and writing bytes... for talking to hardware. Think about that for a moment. > Don't be hating just because these new kids don't have to bang their faces into machine code or shitty C macros--it's great to have a way of trying different programming techniques for embedded systems. Honestly, I'd not have blinked if the idea was to use Java (even with its lack of unsigned arithmetic), C#, Objective-C, Lua, or even say Go to do the job. I mean, you need to use some kind of a language and you want it to be something that a lot of programmers will find accessible. But picking JavaScript for this job is kind of like picking Forth to build the new, more accessible database query language...
- TheZenPsycho 13y ago"We're talking about a language that still doesn't have a standard way of reading and writing bytes... for talking to hardware. Think about that for a moment." Wrong. Javascript has typed arrays. When's the last time you actually looked at Javascript? 1998? "Honestly, I'd not have blinked if the idea was to use Java (even with its lack of unsigned arithmetic), C#, Objective-C, Lua, or even say Go to do the job." They are using lua. They just have a front end to lua that uses javascript syntax, it would seem. Because languages without curly braces are scary, and the goal is to make this stuff accessible. To the expert, making your niche accessible to plebes is scary. I understand.
- ChikkaChiChi 13y ago'good' and 'good enough' are two different things.
- jeswin 13y agoI would rather be surrounded by these guys, than those who think Scala, Haskell, Clojure etc would have been commercially more viable for this project. Basically, common sense. I shouldn't have said this, but it's not a very inappropriate response to your comment.
- auggierose 13y agoOh, don't get me wrong. I have no problem with the people who wrote Tessel programming my oven. Even in Javascript. I also have no problem with a Javascript Kiddie programming my oven in Javascript. AS LONG AS HE/SHE COULD HAVE ALSO DONE IT IN SCALA/OCAML/CLOJURE/HASKELL.
- lowboy 13y ago> I also have no problem with a Javascript Kiddie programming my oven in Javascript. AS LONG AS HE/SHE COULD HAVE ALSO DONE IT IN SCALA/OCAML/CLOJURE/HASKELL. What are you getting at with that?
- FrankBro 13y agoYour point is moot. You switched it from commercially viable to good or bad. Javascript really is not a good language, no matter how you put it. He wasn't arguing whether it was a good business decision.
- jeswin 13y agoIn the context of building things, a good language is one that gives the best bang for time; and improves our chances of success. JS sure has its warts. But it isn't really that hard to know what to avoid. Once you do that, it is expressive enough to write apps without sacrificing productivity. It has all the basics you'd need; higher-order functions, closures, decent performance etc. The big win though, is that it is the only truly cross-platform language available today. The major difficulty today (on the server-side) is that JS has no language support for handling callback interspersed code. This will be mostly resolved in ES6, due next year. We use ES6 features today, via flags.
- gfodor 13y agoworse is better.
- TheZenPsycho 13y agoOH YEAY! HN found a new excuse to wail on its least favourite language! I don't want to come off as a spoil sport, but can you please edit your comment into something insightful and/or constructive? As for myself, I will spin this into a question: What existing javascript library or program would most likely benefit from being able to run on this device? Is it just appealing to web devs? the presentation doesn't really get into what compelling use cases this device enables.
- ilaksh 13y agoYou can use CoffeeScript or ToffeeScript which are both fairly superior languages in general.
- auggierose 13y agoI prefer Scala.js for my web coding :-)
- ssafejava 13y agoThat's ridiculous and contributes nothing to the discussion. Javascript is a good programming language, in that it's expressive, fast (much faster than Python), and more importantly it runs everywhere. No ecosystem can grow without developers, and the success of Node.JS clearly shows that developers like a system they can dive into without much prior effort, using skills they already have. Tessel allows web developers to use skills they already have to do new things. How could that possibly be a bad thing? Just because Javascript has '==' and '===' and both 'null' and 'undefined' and {} + [] !== [] + {}? I swear, everybody seems to have seen the 'Wat' talk and thinks they're now experts on Javascript development. Javascript, like many languages (even PHP!) can be written in a 'good' way and a 'bad' way. Thankfully, it's not very hard to write in a good way and it lends itself very well to I/O bound applications like webservers. Embedded devices, depending on the application, could also be very I/O bound, waiting on sensors, cameras, wifi, etc. Javascript is actually one of the fastest interpreted languages in existence and thousands of new programs are being written in it daily. It's easy enough for a total beginner to use yet powerful enough to port Unreal Engine 3 to it. Get over your biases and recognize that JS brings with it something that Haskell, Scala, etc., will never be able to match: large numbers of ready developers.
- est 13y agoJavascript is fundamentally not suitable with embedded systems. Its string is basically UCS2 literals. To deal with byte streams you have to use this beast http://nodejs.org/api/buffer.html http://nodejs.org/api/buffer.html
- ssafejava 13y agoYes, you can use Node Buffers (which are not that bad), or JS native Typed Arrays (which are also not that bad but a little clumsy). Yes, in embedded systems, that might be really important so it can get clumsy. It's not the best tool for the job. It's also not the worst tool for the job, and it's an extremely popular language. If it brings more people into the hardware space (which is its expressed goal), it will be a success.
- cbsmith 13y ago
- d0m 13y agoYou would be surprised if you saw what kind of code powers the hardware surrounding you. Javascript is actually beautiful compared to some of those atrocities.
- auggierose 13y agoI've formally verified hardware for a living. All of us doing the verification had PhDs. Average hardware has much higher quality than the average code that runs in your browser tab.
- deleted 13y ago[deleted]
- LordHumungous 13y agoWhen I'm creating the flight control system for my moon rocket I'll use some more advanced hardware. For 99% of the things I might use this for, Javascript will be fine.
- kybernetyk 13y ago"Oh, the left thruster fired 4ms too late because an interrupt stopped the control.js program. Now our rocket is lost." It's not about bandwidth. It's about latency.
- aaronem 13y ago"Oh, my room lights lit up 4ms too late because an interrupt &c., &c." No one is even suggesting that Node is a suitable substrate on which to build, for example, a flight control system, and reduction to absurdity does nothing to improve your argument.
- kybernetyk 13y ago> No one is even suggesting No one except parent.
- boomlinde 13y agoread again
- nl 13y agoI'm one of those who think Javascript is a good programming language (or at least I'd prefer it to any functional language). Javascript is basically Scheme/Self with a C-based syntax[1][2], and both Scheme and Self are well regarded. It has a bad reputation because of the terrible code people write using it in web browsers, but as languages go, it's pretty nice. Browser/DOM APIs OTOH are historically pretty awful. I suspect many of those who think it is terrible do so based n language snobbery, or they cannot separate the language from what it has been used for. I may well be wrong, though - what actually makes it a bad language in your opinion? [1] http://en.wikipedia.org/wiki/JavaScript http://en.wikipedia.org/wiki/JavaScript [2] http://www.ecmascript.org/es4/spec/overview.pdf http://www.ecmascript.org/es4/spec/overview.pdf
- laichzeit0 13y agoI think the problem is that the syntax looks too much like C and most people assumed they already "knew" Javascript without bothering to learn it from scratch. "Javascript - The Good Parts" should be mandatory reading before touching the language. At the same time it's a double edged sword - because it looked so similar to C, it most likely was so successful. I'm talking historically as someone who was the typical C / Perl programmer back in the 90s when the web took off and made this exact mistake.
- Derbasti 13y agoThat meme "Javascript is basically Scheme with a C based syntax" has been refuted so many times it's not even funny. Does it have a metacircular evaluator? Is it homoiconic? Does it have macros? Seriously, read SICP or some other Lisp book. You have no idea what you are talking about.
- TheZenPsycho 13y agoAnd yet you haven't cited even one refutation. Javascript has first class functions. It has closures. it has nice object/literal syntax. If you don't consider it cheating to use a library, it does have macros if you use sweet.js. It has a metacircular evaluator, from the very beginning called "narcissus", and if it had homoiconicity, it would be even more direly hated than it is now. Having syntax, for better or worse, is a strength that means that people actually use the language. For reals. Not just that one time at college. The real question is how are any of those features actually useful from anywhere but a theoretical purity standpoint? We're not exactly writing AI systems here. At the end of the day the language is there to write programs. And the sophistication of the programs you need to write in javascript doesn't really need those things most of the time.
- ceronman 13y agoI think Javascript is an acquired taste. People usually start hating it, but then they end up loving it. At least that's my case. Seriously, is not such a bad language. A lot of people are building awesome things with it. JS haters used to say that it was because it was the only choice for the web browser, but now we see more awesome stuff outside the browser: on the server with node.js, for windows apps, and now on embedded devices. Seriously, a language that allows you to write awesome things could not be such a bad language. Ranting about people using a language that's not your favourite is a waste of energy.
- viraptor 13y agoMay be a Stockholm syndrome... ;) If you're forced to do things one way, you will get very used to it.
- dccoolgai 13y ago"People who pigeonhole JavaScript as a 'bad' language are typically just too close- or feeble-minded to grasp or command things like Prototyped objects, functional scoping, closures, etc... they are better left in the insular, strongly-typed environments they came from and leave the real problem-solving of the web to JS devs." ... See how ridiculous you sound when you make these kinds of statements...
- smrtinsert 13y agoHell no. These are the same people who didn't want to be bothered to write syntactically correct html. They view specs as nuisance and standards as cruft. I code Javascript only because I have to, but its a miserable language.