Wow. what a title! Ideal for trapping the passing innocent (but sharp and progressive) programmer.
If you are here reading this, I assume you are not a botanist, and you obviously know what is ELM and a bit more about it. So, how do we achieve this master-level ELM magic? How do we make ELM “executable” run “locally” and on Windows (any Windows since 1999) on top of that?
One just has to rename the resulting index.html into index.hta and voila! We have bog-standard-vanilla-good-old Windows HTA , circa 1999!
// index.html as produced by ELM compiler
// has/had a bug around a line 10123.
// consumed and "Put under the carpet"
// by so called "modern browsers"
keys: keys, // A hash of key name to index
free: free, // An array of unkeyed item indices
That comma after free is ok in most of the latest browsers, circa 2020 Q1, but not for venerable HTA., runing Internet Explorer Web View Control. So, I removed the offending coma.
free: free // COMMA REMOVED
Perhaps the syntax error in ELM compiler output, might delay your “let’s do it all in ELM!” plans, but it is still early days for a prog-lang. Or not?
Anyway, I did this in index.hta and all was fine. I had the eponymous “Hello World!” courtesy of dbj.org.
Repository is here
This is where I will be progressing with ELM+HTA attempts and a such. Any forks are welcome, but not pitchforks :)
For “heads up” … Feel free to play with HTA:APPLICATION and a such, but remember to include FireBug Lite, as ELM JS code is using console. In case browser does not support console, it is provided by FBL inclusion. But then again non-existence of console allowed me to spot a syntax error and remove it.
For further playing with this there are still plenty of serious helpful people and pages on the net.
One thought on “ELM , running locally on Windows 10”
Pointer to the REDDIT entry of mine.