Adventures in Elm - Let's get out there
For what it's worth, I managed to port elm-community/elm-webgl/examples/first-person.elm to Elm 0.16.0 and evancz/start-app. I've published that to genthaler/first-person-start-app.elm.
Using that as a guide, I should have an updated version of evancz/first-person-elm up at genthaler/first-person-elm fairly soon.
It took a lot longer than it should have. I probably should have tried my hand at a regular HTML SPA first, but this looked like more fun. Some of the things that got me were:
- I didn't understand how
Tasks, theinputsentry in the Config object andports all hung together, and therefore how to translate the more hand-wired code in elm-community/elm-webgl/examples/first-person.elm to evancz/start-app. Hopefully it stands up to critical analysis. - I'm using Atom. Mostly because it's free. But it's a memory hungry, rather flaky beast, at least when coding in Elm. It frequently stops highlighting errors, somewhat frequently crashes. I couldn't get Go to Declaration working. I played with Sublime (nice, but not free), Brackets, LightTable, but the Elm integration wasn't quite what I was looking for. I'm a Java/Eclipse programmer during the day, so I'm accustomed to having a free IDE that does a lot for me.
- Elm 0.16.0 isn't (or wasn't when I started this exercise) very widely supported; there were some pretty substantial changes, lots of modules hadn't been updated, and much of the documentation out there was outdated (e.g. references to the
liftand<~family). - Time. Functional and reactive programming are paradigm shifts, and though I've been playing around with functional languages like Haskell/Gofer, Clean and Erlang, that's not the same as really getting into it. So I needed to really put my head down and nut it out, something I hadn't needed to do for a while.
- No idea about WebGL. Oh well, have to start somewhere.