Live data from Hacker News

λ Lessons

stevekrouse.github.io

1–10 of 20 posts

Re: λ Lessons

#3
Very 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.

Re: λ Lessons

#4
Neat, 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.

Re: λ Lessons

#7
there is a typo

  This document implements a small, dyanmically-typed, 
  subset of Haskell that includes integers, lists, functions,      
  pattern matching and recursion.
Also, Haskell is strictly typed... but most of us aren't ready for that anyway :-P

Re: λ Lessons

#8

Neat, 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.

4. Hitting 'enter' after editing only sometimes gets you out of editing mode; seemingly only if your expression is well-formed?

5. 'Clear' clears some lines but not all. It usually seems to clear all but the top two lines for me.

Chrome v.36 in Ubuntu

Re: λ Lessons

#9
This 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 looks like Haskell. I'm confused as to what the language you run is supposed to be, though. It doesn't seem to have Haskell syntax or semantics. The lists aren't comma-separated, and the main expression seems to require parenthesis? And what is this program doing?

    (map (plus 1) [12])
    (( 1) : (map (plus 1) [2]))
    (( 1) : (( 2) : (map (plus 1) [])))
    (( 1) : (( 2) : []))
    (( 1) : [( 2)])
    [( 1)( 2)]
vs. in Haskell

    Prelude> map (+ 1) [1, 2]
    [2,3]

Re: λ Lessons

#10
post #7

there is a typo This document implements a small, dyanmically-typed, subset of Haskell that includes integers, lists, functions, pattern matching and recursion. Also, Haskell is strictly typed... but most of us aren't ready for that anyway :-P

Thanks, fixed in https://github.com/stevekrouse/hs.js/commit/9882af6312f93a29...
Post reply on HN