2 ms·
This is already on haskell.org and I know it was posted here in the early stages, but maybe a few maybe-interested-in-trying-Haskell-ers haven't heard of it and
by chrisdone 16y ago
This is already on haskell.org and I know it was posted here in the early stages, but maybe a few maybe-interested-in-trying-Haskell-ers haven't heard of it and would like to try Haskell. As of this week there are 30 tutorial steps / 7 lessons, finishing at the type system (so far).
There's a lot more potential for this project (adding a CodeMirror editor with "loadable" code, allowing uploading of tutorials like a pastebin... but a tutorialbin, asking exercise questions which are then quickcheck'd, etc.), but I like to incrementally add and then get feedback.
For newbies to Haskell I would like your feedback/comments, if you have any. I'm hoping to reach fresh Haskell newbies here on Hacker News for an unbiased experience.
I asked a non-programmer friend to try it out a while ago and got some invaluable feedback. Send it to your friends, just to see how far they get! Post what they say! Anyone who's read something like Rocket Surgery Made Easy will be familiar with how invaluable feedback is.
I am also interested in hearing about general ideas on what you think would just be cool to see.
If you want to let me know about bugs please post them here: http://github.com/chrisdone/tryhaskell/issues http://github.com/chrisdone/tryhaskell/issues Granted there are some browser/OS oddities but I can only test on so many! Bugfixes welcome! PM me on github.
Cheers!
- phob 16y agoI thought it was great, except the way "let" was introduced was a little shocking. You just assumed what it was doing was intuitive (which it was, coming from a lisp background). I look forward to more!
- chrisdone 16y agoThat's definitely a pattern I'm seeing; people don't like the way "let" is introduced. I think in writing it I hoped it would be intuitive. I think, actually, someone suggested that I spend a few examples demonstrating it to ease the idea into the reader's brain. It seems people don't mind weird things as long as you explain them. Interesting lesson. Thanks for the feedback and thanks for trying!
- sdp 16y agoI like everything up to but not including step 7. (http://tryhaskell.org/#7 http://tryhaskell.org/#7) The syntax let villain = (28,"chirs") in fst villain is not obvious to me, and the tutorial doesn't explain what each piece of the new syntax means, and quickly moves on to something new in step 8. Only through experimentation, I find: fst (28,"chirs") => 28 snd (28,"chirs") => "chirs" So I gather the let is equivalent to: (let ((villain '(28 "chirs"))) (first villain)) But without parens, line breaks or semicolons I have difficulty determining where one expression ends and another begins. Plus, the arbitrary shortening of "first" to "fst" doesn't help, and should probably be clarified. You seem to only check the return value to determine when to skip to the next step in the tutorial, since in step10, you want me to type: ['a','b','c'] == "abc" But it skips ahead when I play around and return True from a different expression: 'a' : 'b' : [] == "ab" => True
- dkersten 16y agoAre fst and snd the standard haskell functions? It doesn't seem worth saving a few characters for how awkward it makes it to read the code, but then again, if we can get used to car, cdr and so on, I guess its not bad. Though in the case of the tutorial, it should definitely state what fst and snd are.
- vito 16y agoThey are standard. There's also `first` and `second`, but they do something different: Prelude> :m + Control.Arrow Prelude Control.Arrow> :t first first :: (Arrow a) => a b c -> a (b, d) (c, d) Prelude Control.Arrow> first (2 +) (1, 4) (3,4) In this case the Arrow instance is just (->), the function type constructor, so you could read that strange type signature as `first :: (b -> c) -> ((b, d) -> (c, d))`. But I've said too much.
- chrisdone 16y agoHey, I will explain fst and snd. In fact I go into them in some detail in later chapters, but I'll mention their use and why they're short at this step too!