98 points · by mpweiher · 8y ago · 49 comments
With the 26KB RAM Duktape needs for "Hello world" we can run apps like the Sensor hub described in this blog post (run on a Thunderboard that only has 32KB of RAM total): http://blog.moddable.tech/blog/moddable-tech-presentation-to...
Sciter is an implementation of HTML(~5)/CSS(~3) and DOM/layout/rendering. As for now it has its own JS alike script and VM and is contained in single DLL < 5mb all together.
So "yes", mini-electron is feasible and exists already I would say.
I found it too hard to start writing something with TIScript, maybe if there was some step-by-step tutorial it could be easier.
> So "yes", mini-electron is feasible and exists already I would say.
I believe you could became big player in "web to desktop" market if only sciter had JS & DOM support. That would give you access to existing code and make sciter almost drop in replacement for nw.js or electron.
//edit: formatting mistake
Yet, I am not that good in "legaleze" language, GPL vs BSD vs paid options, etc.
> security contexts and everything else which would be irrelevant for desktop apps
I hope that was dark sarcasm, or that you do not write software. Security is never irrelevant! Never!GP is likely overestimating how much "bloat" could actually be dropped but your comment is uninformed.
Any technical barriers to this ?
The Gnome folks tried anointing JS as the de jure development language across the Gnome project (i.e., for apps, too) a few years back, but there was a minor backlash. Unfortunately, Electron came along within the next year or so has since snagged most of the mindshare that was up for grabs after they backpeddled a bit. You can write JS apps, but it's not a prominent park of the environment outside of Gnome Shell and extensions, AFAIK. The documentation is pretty lacking.
GJS is SpiderMonkey under the hood—the same JS engine used in Firefox. It would be interesting to see if XS were an improvement for Gnome. Web browsers are subject to constraints that aren't necessarily a relevant factor for static packages downloaded from your distro vendor. For example, it looks like XS/Kinoma/Moddable supports AOT compilation, which could be a win.
Metrics here look like they focus on RAM and not on speed of computation.
On the softer side, GTK folks do favor C, and the explicit endorsement of (L)GPLv3 is worth brownie points in that circle. (SpiderMonkey is written in C++, and MPL2 is compatible with (L)GPL, but its copyleft is weaker and allows more permissive use.)
In any case, this project is really neat. I only wish I'd heard about it back in 2015.
In case you're interested, here's the doc that describes the C interface to the runtime of the XS JavaScript engine: https://github.com/Moddable-OpenSource/moddable/blob/public/...
- XS7 can run in as little as 32K RAM :)
- Espruino follows the ES5 standard (released in 2009), whereas XS7 follows the ECMAScript 2017 standard.
- The Espruino debugger is more like gdb, the XS7 debugger has a GUI.
We have a couple of posts on our website with more information about XS7: http://blog.moddable.tech/blog/moddable-tech-presentation-to... http://www.moddable.com/XS7-TC-39
Would be very interesting to play with in that context.
It looks like there's nothing out-of-the-box but they do recommend ESP8266 based boards[1] on their site. Which is interesting as I thought that was just a wifi chip...
edit - It does look like they're producing their own board[2] as a demo/hacking platform which is pretty great!
1. https://www.amazon.com/HiLetgo-Internet-Development-Wireless...