Learning FP the hard way: Experiences on the Elm language
gist.github.com
Learning FP the hard way: Experiences on the Elm language
1–10 of 13 posts
Re: Learning FP the hard way: Experiences on the Elm language
#2Re: Learning FP the hard way: Experiences on the Elm language
#3I have done my own exploration in this area. I hack on a game engine written in Scheme that includes a signal implementation, a declarative scene graph, and a live coding environment via a REPL server. It's not as glamorous as Elm, but I'm quite proud of it and I plan to make the first release soon.
http://dthompson.us/pages/software/sly.html
An older blog post I did with code samples and a quick screencast when the project had a different name:
http://dthompson.us/functional-reactive-programming-in-schem...
Re: Learning FP the hard way: Experiences on the Elm language
#4Thanks!
Re: Learning FP the hard way: Experiences on the Elm language
#5I think this is the first time the concept of currying has solidly clicked for me; most explanations focus on the "your function should take one argument" aspect more than the "your function should return a new function" aspect, which meant that, until now, currying looked more like an obstacle than a tool. Thanks!
Re: Learning FP the hard way: Experiences on the Elm language
#6Really nice explanation and code samples. I'm glad to see more accessible materials emerge for explaining what signals are. The Elm website already does a good job, but I think the extra detail in this article will help more people grok it. I have done my own exploration in this area. I hack on a game engine written in Scheme that includes a signal implementation, a declarative scene graph, and a live coding environm…
Sly seems very cool too, I hope it will help popularizing these ideas!
Re: Learning FP the hard way: Experiences on the Elm language
#7Re: Learning FP the hard way: Experiences on the Elm language
#8So when I update ship, that means a new ship was created right? What happens to the old ship? and how is recreating the universe for every iteration efficient? Is there something tricky going on in the background?
Also, to get to the old ship, you just rewind the events, because the state can be fully reconstructed (no weird side-effects).
Re: Learning FP the hard way: Experiences on the Elm language
#9So when I update ship, that means a new ship was created right? What happens to the old ship? and how is recreating the universe for every iteration efficient? Is there something tricky going on in the background?
This is going to add more pressure on the garbage-collector for sure.
Re: Learning FP the hard way: Experiences on the Elm language
#10So when I update ship, that means a new ship was created right? What happens to the old ship? and how is recreating the universe for every iteration efficient? Is there something tricky going on in the background?
See this previous HN discussion about Elm's persistent data structures: https://news.ycombinator.com/item?id=7686272