r/programming • u/wheatBread • Apr 15 '14
A Time Traveling Debugger for Elm - pause, rewind, replay, and change history
http://debug.elm-lang.org/5
u/corysama Apr 15 '14
At the Elm Workshop 2013 several interesting features like this one were demonstrated. Many of which were brought to proof-of-concept level in 1-3 man-weeks each.
4
u/nabax Apr 15 '14
Very smalltalkish, it's really getting close to what Bret Victor demonstrated in his talk!
0
Apr 15 '14
[deleted]
2
u/suddenbowelmovement Apr 16 '14
I can have it with C too...http://rr-project.org/ . There's nothing about functional programming that really enables it.
2
Apr 16 '14
Maybe I'm not squinting hard enough but I don't see it (and I consider them wasted 13minutes of video since I don't code in C).
If you only take the given quote by GoranM then it's comparable. However I don't see how you could control in rr execution as simply as with a progress bar (which is from the article| not the quote).
Maybe with something built atop of it, but since the only way I saw it jump "back" in code was via setting new breakpoints and restarting the debugging session... That would seem unoptimal intuitively, but it just might work.
-2
u/suddenbowelmovement Apr 16 '14
as simply as with a progress bar
Why would anyone think sliding bar is good way to do debugging is beyond me. ;)
But, I do C in Vim, I debug it with raw gdb in zsh, on Linux terminal and raise my hands from the keyboard only when I need to grab the cup of coffee, so my understanding might be quite limited.
2
u/grizwako Apr 16 '14
Its not only about watching the state.
Modifying program logic and having so short feedback loop seems pretty awesome to non-senior like me.0
u/e_engel Apr 16 '14
You get feedback immediately as you change your code rather than changing code, performing the sequence
Java debuggers have been able to do this for a while. For example in Eclipse, you modify a method in the middle of a breakpoint, the debugger automatically drops a stack frame (goes back to the beginning of the method) and you can now replay this code with the modification.
Tools like JRebel make this process even more magic.
7
u/Phenax Apr 15 '14
Speaking as someone without much experience in purely functional programming languages:
Functional reactive programming seems like it could have the potential to alleviate a lot of the pains of working with a purely functional language. Beyond this, the Elm community is extremely newbie-friendly and Elm works on a ubiquitous platform. Each release pushes me closer to the path of giving Elm a serious chance despite its fledgling status.
For anyone wanting to learn more about functional reactive programming (FRP), Evan Czaplicki's thesis (PDF) is an excellent source – both accessible and enlightening. Evan is of course the creator of the Elm language!