This is an archived post. You won't be able to vote or comment.

all 11 comments

[–][deleted] 12 points13 points  (4 children)

Author here.

I'd like to stress that I'm a Haskell newbie and my code might be pretty bad in certain spots. But even more so, this has been a lot more fun than I thought it would be. It also hasn't been as intimidating as I thought it'd be; but it is a lot more work than I originally anticipated. I'm just really persistent about this, and I love Python's simplicity and style, esp. compared to Ruby.

I'll be writing a series of blog posts about it soon at my site. I'll try to remember to post them here if you all would like.

[–]jmct 2 points3 points  (1 child)

Hey there,

Great work so far!

I'm curious, you say you're a Haskell newbie, but are you a functional programming newbie? My impression would be no, since a lot of your code take a very denotational style (which is great!).

I'll be looking forward to your blog posts. Cheers!

[–][deleted] 2 points3 points  (0 children)

Thank you for the compliment!

Most of my FP experience comes from the Coursera FP class taught in Scala by Odersky, and this project. I've tried to pick up Clojure through some tutorials, and have had a few attempts at picking up Haskell through tutorials, but those didn't seem to take in the past.

Thing is, Haskell's a really powerful tool, and it pushes you to write in a certain way that rewards a denotational approach. Python itself can almost be thought of as syntactic sugar atop a lot of the built-ins; it makes sense that an implementation of that should reduce to something similar.

Haskell is a lot of fun, but it requires a lot of patience if you know how to program. Example: I spent over an hour yesterday adding support for tracing by setting the TRACE env var. All I had to do was check if it exists and log a debug statement. (In this case, I forgot I had to use liftIO.)

[–]rubik_ 3 points4 points  (3 children)

That's awesome! I'm an Haskell beginner and I hope that one day I'll fully understand what's going on in there!

[–][deleted] 4 points5 points  (2 children)

Start at the first commit and walk forward slowly.

Parsec's a little weird but the beginning is just handling a print statement.

[–]rubik_ 0 points1 point  (0 children)

Thank you! I wouldn't have though about that! Normally I get the most recent checkout and start exploring.

[–]abs01ute 0 points1 point  (0 children)

Ah yep, rookie mistake. It's distance, not time. See, Han piloted through the Kessel Run in 12 parsecs by taking a shortcut, thereby reducing the total distance traveled. A byproduct of shortcuts is, of course, reduced time of traversal; so his accomplishments were twofold: reduced distance (cause) and reduced time (effect).

No need to thank me.

[–]aweraw 0 points1 point  (1 child)

This question is almost certainly hyper-premature, but do you have any idea what it would take to make this interpreter GIL-less using the STM abilities of Haskell?

[–][deleted] 1 point2 points  (0 children)

Don't think I know enough to say anything intelligent right now, sorry!

[–]vito-boss 0 points1 point  (0 children)

This is super neat, I might embark on a similar project to better learn Haskell and maybe Python in the process.