JavaScript right on the hardware
131–140 of 320 posts
Re: JavaScript right on the hardware
#132Earlier quoted context omitted.
I don't have much problem with programming an embedded device in a high-level language, but why JS specifically? Why not Lua, which just as fast, and is better than javascript in many respects?
Slightly off topic, but is it just me or has Lua gotten a lot of attention on HN in the past weekish? I haven't heard much of Lua before but recently it seems to have come up a lot more. And even more off topic (sorry), what makes Lua better/different than other scripting languages? EDIT: On jacobwcarlson suggestion, I Googled Lua vs Python, and found this Wiki, http://lua-users.org/wiki/LuaVersusPython Not a speed c…
Re: JavaScript right on the hardware
#133So don't worry, js will not take over...completely.
Re: JavaScript right on the hardware
#134So much negativity in this thread & on HN in general. Not everyone has hardware experience, and this looks great for newcomers.
Seems like a lot of that energy would be better spent making an equivalent device that runs . Want it to run coffeescript? go make a product designed around coffeescript. Want it to run Lua? Go make a product designed around Lua. etc.
The market has room for diversity. Just because it's not the diversity you prefer, doesn't make it any less valid.
Re: JavaScript right on the hardware
#135Javascript doesn't support integers, so it doesn't seem like a good language for programming low level hardware. What about bit manipulation (XOR, AND, Shifting, etc)? This is critical for a lot of serial data communications and I/O controls.
Anyway, for this I'm sure there will be a lot of libraries that handle that for you and expose a fairly high level api; like the blinking led in the example.
Re: JavaScript right on the hardware
#136Earlier quoted context omitted.
CoffeeScript is JS. And to be more honest and judgemental, CoffeeScript is the sweeter-but-poorly-documented Javascript. The reason people are attempting to put javascript everywhere is because they can and because others enjoy it. And those who do enjoy JS, know what parts of JS are to be avoided at all costs. And I actually like it compared to other modern scripting languages for two reasons:(1) I don't have to wor…
> poorly-documented what?
JavaScript, TypeScript, and Dart have one.
Re: JavaScript right on the hardware
#137Earlier 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
#138Earlier 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.
It's extremely simple - basically everything is a hash. It has full lambda, not just crippled lambda like Python. It's very fast (I think it is the fastest scripting language except for Lua, and getting faster because of the browser wars). It usually doesn't require a lot of boilerplate code. What is not to like? The one thing I worry about is the limited range of integers.
Re: JavaScript right on the hardware
#139Earlier quoted context omitted.
I suspect Arduino (at least the ones I've used, Uno?) are a bit underpowered for higher level managed languages like JavaScript.
Absolutely. On AVRs, `new` and `malloc` work, but just barely. RAII/stack-only programming is basically a necessity. That is simply not possible with languages like Python or Javascript.
Re: JavaScript right on the hardware
#140This 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.
The BBB and the Raspberry Pi are designed to be relatively high-power (both computational, and power draw from DC) devices running a true multiuser OS.
This thing is more akin to an Arduino Micro or a Teensy - a low-power controller that could run a very long time on a tiny battery, no OS to speak of, just a single loop of essentially real-time code.
I just made a hardware clock for my PC (7-segment LED display mounted in a CD-ROM bay slot). I used an Arduino Micro to drive the display.
I may build a dedicated media server at home. A RasPi or BBB would be perfect.
I'm thinking to launch a stratospheric balloon. I need something to hold together and drive a GPS sensor, temperature sensor, VGA camera, SD card, and radio transmitter. Total weight and power consumption are severely limited. An Arduino or Teensy would be great.
Do a wall-mount big LCD screen at the office, showing the vital stats of our website in real time, for all to see? A RasPi or BBB.
Or you could go even more bare-metal and do everything with an AVR that costs $1 and a few components that you recover from the last floor sweep, like this:
http://florin.myip.org/blog/how-make-halloween-creepy-blinki...
See the differences? Horses for courses.