All this makes me wonder is how much better the performance or battery life would be if they used a compiled language instead. JavaScript makes sense when you want to target many platforms with...
All this makes me wonder is how much better the performance or battery life would be if they used a compiled language instead.
JavaScript makes sense when you want to target many platforms with one codebase. I don't understand the appeal in a niche embedded device like this, where your code is unlikely to have any utility anywhere else.
I bet we will see some really cool stuff made with this though, so I'm interested to see what the community comes up with.
https://www.kickstarter.com/projects/gfw/banglejs-2-the-open-smart-watch Don't totally buy it, I don't think any of this is unique to Javascript. However the Espruino site is more convincing:...
Why JavaScript?
Developing software for embedded devices can be a real pain. Code can take a minute or more to compile and upload to the chip, which has to happen for every change you make. Many tools don’t even allow for debugging, and on a device that stays on for weeks, even a tiny memory leak can make it unusable.
Bangle.js doesn’t have those problems. The Espruino JavaScript interpreter allows you to upload code and debug wirelessly out of the box using just a Web Browser, with no need to install software on your computer. You can even try it out in an emulator!
Don't totally buy it, I don't think any of this is unique to Javascript. However the Espruino site is more convincing:
Why JavaScript?
We wanted to use a language that:
Has the same basic form as C, so simple code appears similar to Arduino code
Encourages event-based programming (for lower power consumption)
Is widely used, with lots of learning material online
Is interpreted, and allows functions to be modified while the interpreter is running (unlike some other languages, JavaScript treats functions as variables)
How power efficient is Espruino?
Very. Because it is event based, the Espruino interpreter can put itself to sleep when it knows no action is required.
This means that code written for Espruino will be substantially more power efficient than the same code written in C, unless the C programmer has explicitly added code to enter low power sleep modes.
Power Consumption depends on the board you're using, but for a device like Puck.js power consumption when idle can be as little as 3uA (0.000003 Amps).
I mean any language without explicit memory management has to be run in an environment with garbage collection. Espruino has a GC, but I don't know enough to say what algorithm it uses or how safe...
I mean any language without explicit memory management has to be run in an environment with garbage collection. Espruino has a GC, but I don't know enough to say what algorithm it uses or how safe and efficient it is.
It just seems to me, a dummy who’s run Python/C bindings thru Valgrind on occasion, that a high level scripting language like JS might not meet that requirement. But maybe I just didn’t have the...
on a device that stays on for weeks, even a tiny memory leak can make it unusable.
It just seems to me, a dummy who’s run Python/C bindings thru Valgrind on occasion, that a high level scripting language like JS might not meet that requirement. But maybe I just didn’t have the right Valgrind filters…
Anyone able to explain how they can claim 4 weeks of battery life and hundreds of meters range for the Bluetooth? I'm not familiar with Bangle and their hardware, but those values sound a bit too...
Anyone able to explain how they can claim 4 weeks of battery life and hundreds of meters range for the Bluetooth? I'm not familiar with Bangle and their hardware, but those values sound a bit too optimistic. Anyone who's deeper into this ecosystem or even has some of their hardware who cares to explain?
Here is information about the nRF52840 SoC they are using: https://www.nordicsemi.com/Products/nRF52840 https://blog.nordicsemi.com/getconnected/tested-by-nordic-bluetooth-long-range...
Here is information about the nRF52840 SoC they are using:
It’s doable with the Nordic SoC, the main battery draw is the display and you can certainly optimize for low power. 4 weeks is a lot tho, that’s likely a theoretical maximum
It’s doable with the Nordic SoC, the main battery draw is the display and you can certainly optimize for low power. 4 weeks is a lot tho, that’s likely a theoretical maximum
All this makes me wonder is how much better the performance or battery life would be if they used a compiled language instead.
JavaScript makes sense when you want to target many platforms with one codebase. I don't understand the appeal in a niche embedded device like this, where your code is unlikely to have any utility anywhere else.
I bet we will see some really cool stuff made with this though, so I'm interested to see what the community comes up with.
https://www.kickstarter.com/projects/gfw/banglejs-2-the-open-smart-watch
Don't totally buy it, I don't think any of this is unique to Javascript. However the Espruino site is more convincing:
https://www.espruino.com/FAQ
I hate Javascript but this seems like a pretty mature and well-thought-out project.
I actually like Javascript these days because you can use it as a compilation target for better languages.
How good is JS about memory leaks though? Does it run a GC?
I mean any language without explicit memory management has to be run in an environment with garbage collection. Espruino has a GC, but I don't know enough to say what algorithm it uses or how safe and efficient it is.
It just seems to me, a dummy who’s run Python/C bindings thru Valgrind on occasion, that a high level scripting language like JS might not meet that requirement. But maybe I just didn’t have the right Valgrind filters…
Similar: the $25 PineTime
Anyone able to explain how they can claim 4 weeks of battery life and hundreds of meters range for the Bluetooth? I'm not familiar with Bangle and their hardware, but those values sound a bit too optimistic. Anyone who's deeper into this ecosystem or even has some of their hardware who cares to explain?
Here is information about the nRF52840 SoC they are using:
It’s doable with the Nordic SoC, the main battery draw is the display and you can certainly optimize for low power. 4 weeks is a lot tho, that’s likely a theoretical maximum