How does this compare to duktape (http://duktape.org)? I really like duktape's API and documentation (stack-based interface similar to Lua and the doc perfectly describes how each function call affects the stack state).
The API isn't stack-based. It's more like the Python C API, complete with reference counting (but note that actual memory reclamation is done through mark-and-sweep GC), except that instead of everything being a pointer to an object, numbers and booleans are represented directly, so a union is used to represent values.
Because 'scripting' hardware (coding in a fairly high-level language) is a lot of fun and coding the same sorts of things in C is pretty painful & requires up-front knowledge of a lot of stuff you don't really need to know til later (memory management, types etc).
Sure there's Lua et al but JS is just a more relevant language nowadays.
It would probably be OK if all programs have a simple, predictable sequence of malloc and free that they call in a loop, with similar-ish sizes each time.
It's extremely unpleasant to program something with just a few KB of RAM and not know exactly what memory goes where. However, a lot of IoT-related gadgets just gather a buffer of data from an ADC or something, average it and send it over some wireless protocol every 1 minute. The allocation pattern is predictable enough that you don't run into strange cornercases.
I see no reason why anyone would want to use this commercially, but for the enthusiast market (and maybe even for some rapid prototyping) this looks interesting enough.
had the same thought, why do I have to do everything with JS, sometimes I think it's only to satisfy "Atwoods Law" again and again :) would do it in Go lang, not as raw as C but good and up to date enough for this purpose.
IIRC, I believe the Tessel guys are abandoning the transpiler approach in favor of slightly more powerful hardware for the next generation that can just run node directly... We're really at a point where for the types of projects people want to run for under $100 of hardware, it's fast enough to do a lot more.
Power is a bit of a concern, and it all depends on the environment... being able to get every web monkey coding in more environments is a big win for enthusiasts and commercial applications for limited scope projects... Hell, without a screen or antenna powered on all the time, you can get a lot of processing done on even a smart phone from two generations ago.
This has been around for a lot longer than Samsung's (as far as I know) and has a lot of great support. If you're looking for a small, embedded JS processor built specifically for this kind of thing, I'd recommend Espruino.
My first thought was "jerry-rigged". Rather than starting the almost inevitable conversation here ("jerry" vs. "jury"), I'll point out the following SE answer[1]...
[+] [-] inglor|10 years ago|reply
It looks very constrained in what it supports so far though.
Update: They're at ECMAScript 5.1 https://github.com/Samsung/jerryscript/issues/205 but not all tests are running https://github.com/Samsung/jerryscript/issues/158
Ok, it doesn't yet JSON.stringify https://github.com/Samsung/jerryscript/issues/432 so not sure if ready yet.
[+] [-] daurnimator|10 years ago|reply
[+] [-] rawdisk|10 years ago|reply
Opinion: Lua is a better choice for IoT but alas the programming "market" has (again) chosen the worse alternative.
[+] [-] bsder|10 years ago|reply
[+] [-] robmccoll|10 years ago|reply
[+] [-] mwcampbell|10 years ago|reply
[+] [-] unknown|10 years ago|reply
[deleted]
[+] [-] tomphoolery|10 years ago|reply
[+] [-] the-dude|10 years ago|reply
You have slipped up.
[+] [-] sklogic|10 years ago|reply
[+] [-] nilliams|10 years ago|reply
Sure there's Lua et al but JS is just a more relevant language nowadays.
[+] [-] dragonwriter|10 years ago|reply
The point, I would suspect, is lots of people already know JavaScript, so it lowers the barrier to entry to embedded programming.
[+] [-] kzhahou|10 years ago|reply
Here, just say "resource-constrained devices" or something with ANY amount of meaning.
[+] [-] tomphoolery|10 years ago|reply
[+] [-] orf|10 years ago|reply
[+] [-] Animats|10 years ago|reply
[+] [-] weland|10 years ago|reply
It's extremely unpleasant to program something with just a few KB of RAM and not know exactly what memory goes where. However, a lot of IoT-related gadgets just gather a buffer of data from an ADC or something, average it and send it over some wireless protocol every 1 minute. The allocation pattern is predictable enough that you don't run into strange cornercases.
I see no reason why anyone would want to use this commercially, but for the enthusiast market (and maybe even for some rapid prototyping) this looks interesting enough.
[+] [-] arez|10 years ago|reply
[+] [-] cfstras|10 years ago|reply
[1]: https://github.com/espruino/Espruino
[+] [-] bitmapbrother|10 years ago|reply
[+] [-] tmrmn|10 years ago|reply
[+] [-] hmottestad|10 years ago|reply
It is a tiny chip with included wifi. It was 2 digital IO ports, and also a serial connection if you want to connect it to an arduino.
And at the moment it costs 2.6 USD on ebay!!!
And someone made a plugin so you can program it from the Arduino IDE: https://github.com/esp8266/Arduino
[+] [-] vegancap|10 years ago|reply
[+] [-] tracker1|10 years ago|reply
Power is a bit of a concern, and it all depends on the environment... being able to get every web monkey coding in more environments is a big win for enthusiasts and commercial applications for limited scope projects... Hell, without a screen or antenna powered on all the time, you can get a lot of processing done on even a smart phone from two generations ago.
[+] [-] BFatts|10 years ago|reply
This has been around for a lot longer than Samsung's (as far as I know) and has a lot of great support. If you're looking for a small, embedded JS processor built specifically for this kind of thing, I'd recommend Espruino.
[+] [-] volaski|10 years ago|reply
[+] [-] jbottigliero|10 years ago|reply
[1] http://english.stackexchange.com/questions/132868/jury-rigge...
[+] [-] sanxiyn|10 years ago|reply
[+] [-] cfontes|10 years ago|reply
But I just hate this "Internet of Things" name... There must be a better suited name for it.
[+] [-] personjerry|10 years ago|reply
[+] [-] Raed667|10 years ago|reply
[+] [-] Raed667|10 years ago|reply
[+] [-] forgotmypassw|10 years ago|reply
[deleted]