ELM prog. lang., compilation target running locally on Windows 10

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 ?

It turns out to be very simple. ELM compiler targets JavaScript. And the result pops-up in one large-ish index.html.

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!

There was a “Little” problem on that journey of discovery. My version of ELM was producing index.html with a JavaScript bug in it.

So, I removed the offending coma after free : free above

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.

Hello, ELM+HTA World! Courtesy of dbj.org 2016 Jan 22
Hello, ELM+HTA World! Courtesy of dbj.org 2016 Jan 22

Enjoy.

GitHub

Repository is here: https://github.com/DBJDBJ/elm-0

This is where I will be progressing with ELM+HTA+VS2015 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 Reply to “ELM prog. lang., compilation target running locally on Windows 10”

Comments are closed.