Sep 29, 2015

The Magic of Elm

This isn't directly related to Blender, but might be of interest to those of us Blenderites who also dabble with website design and coding.

Recently, thanks to this tweet from Python's Guido van Rossum, I found Bruce Eckel and a link to the Elm programming language.

What is the Elm, you might ask. It's the best thing since sliced bread. Or at least since Blender. Elm is an incredibly "clean" and easy to use programming language, similar to Python. But the best thing about it is that it "compiles" into HTML, CSS, and JavaScript. It might be just about the easiest way to create small web applications.

You can use the online interpreter for Elm, no need to download the package. Try the Clock Example:

Click to enlarge
Notice in the code that the clock is made of two ngons, which I have edited to be 64 sides for a smooth round circle. Click on Compile in the header to see the effect of your changes.

I haven't figured out how to enable the Javascript code that Elm produces here on this blog, but the code works otherwise. Here's a screenshot of the adjusted clock:


What do you think? Does Elm look promising to you? Let us know in the comments.

UPDATE 3 Oct 2015: I've looked into Elm some more and my enthusiasm has waned. Elm is not "simplified Python, compiled for the web" as I first thought. It is more of a niche language, pursuing a particular programming paradigm, based on the concept of signals. It still looks interesting and clever, though, if you can invest the time to learn it.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.