Really awesome stuff JP and Steve! I've been having similar ideas about the subject myself :)
λ Lessons
11–20 of 20 posts
Re: λ Lessons
#12Neat, however it feel clunky. Few things that bugged me: 1. Clear does not work. Firefox 22.0, private mode. 2. Clicking to expand gets tedious fast. Adding shortcut like space would be nice. 3. No syntax highlighting on function editor, also lists could use some colors.
2. But what should we expand then? Just the first one? Part what makes it interesting is that you can decide for yourself what to expand, and it doesn't matter in which order you do it (Church-Rosser).
3. Feel free to hack CodeMirror or Ace in there! :)
Re: λ Lessons
#13This will be a cool demo once the kinks get worked out. It lets you see first-hand that you can choose which redex to beta-expand first. Haskell is an excellent choice for this because -- unlike almost every other language -- it does not matter the order you evaluate subexpressions in. I feel like this could be useful to show someone when teaching them to program. The language in the function editor on the right look…
Re: λ Lessons
#14Very nice. It took me a while to realize that array literals aren't supported, but once I did that I was able to write concatMap and watch it being evaluated. A couple of points: - If there is a syntax error, the box just turns red. It would be nice to see what the issue is. - You could probably make it clearer that it's possible to execute arbitrary expressions, by editing the map term, for example.
The (edit) and (clear) links are now always visible to encourage editing, per https://github.com/stevekrouse/hs.js/commit/e301961c03d92c58...
Thanks!!
Re: λ Lessons
#15This will be a cool demo once the kinks get worked out. It lets you see first-hand that you can choose which redex to beta-expand first. Haskell is an excellent choice for this because -- unlike almost every other language -- it does not matter the order you evaluate subexpressions in. I feel like this could be useful to show someone when teaching them to program. The language in the function editor on the right look…
In any case, the parser can be found here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., the transformations on the AST here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., and the specs here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f....
Re: λ Lessons
#16Would love to play with this, but clicking the expansions crashes Safari on my machine
Re: λ Lessons
#17Doesn't appear to work on ipad.
Re: λ Lessons
#18Re: λ Lessons
#19Really awesome stuff JP and Steve! I've been having similar ideas about the subject myself :)
Thanks Michael ;)
Re: λ Lessons
#20This will be a cool demo once the kinks get worked out. It lets you see first-hand that you can choose which redex to beta-expand first. Haskell is an excellent choice for this because -- unlike almost every other language -- it does not matter the order you evaluate subexpressions in. I feel like this could be useful to show someone when teaching them to program. The language in the function editor on the right look…
It is supposed to be Haskell-ish, but admittedly I haven't done much Haskell in a while. I just went roughly with what Steve suggested. But yeah, the missing commas in lists is a pretty big mistake! In any case, the parser can be found here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f... , the transformations on the AST here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f... , and the s…