1. 19

Very compact.


  2. 4

    Thanks, that means something coming from you.

    I wanted to see what Haskell could do with a big and slightly hairy problem. It’s been a lot of fun!

    1. 4

      As I mentioned on reddit, I think your use of the ContT monad and how one uses callCC to implement complex control flow is really clear here. I’ve been using Haskell for almost 7 years and embarrassingly haven’t had a good grasp on Cont until reading this code. Excellent work, and if you get it to a more complete state I’d love to hack on it too.

      1. 3

        I’m surprised and pleased to hear anything I have to say matters, thank you. :)

        A friend of mine did a slightly updated version of the “Write Yourself a Scheme in 48 hours” project. It’s still a bit old so they updated a few different parts of it as they went.

        I’m going to be pointing him at your project to see what he thinks.

        The compactness is useful for more reasons than just aesthetics, this is something cool I can point to if a learner wants to see what writing an interpreter in Haskell would look like. Hython is clean and small enough to be understood, modern enough not to mislead. This is important. I wouldn’t feel as comfortable showing them the SchemeIn48Hours tutorial as it currently exists.

        I’d like to find a few micro-interpreter examples so I can start an interpreters section with this project in my guide.

        1. 4

          Agree on Scheme in 48 Hours, unfortunately. I got a start with that, but eventually felt a bit lost and gave up. On Hython I just started growing the interpreter one statement at a time, and tried to learn enough Haskell to clean it up as I went (ex: ContT).

          I believe there’s great value in making a bit of a mess, and then cleaning it up after the fact. It frees people to not be perfect, and teaches them to always be looking for simplifications.

          1. 4

            This is how most things are constructed, we only pretend that they start from platonic marble and carved with perfect chisel strikes. It is excellent for others to see the process, too often newcomers are dissuaded from the pursuit because they see no path from the first step to the last.

            1. 3
              1. I agree with animatronic

              2. This is one of the facets of a mantra of mine: http://www.folklore.org/StoryView.py?story=Make_a_Mess,_Clean_it_Up!.txt

        2. 2

          Super interesting! I am actually working on a similar project in Rust, for the same reasons (learning).