Hacker Newsnew | past | comments | ask | show | jobs | submit | koloron's commentslogin

Here are two blog posts on free monads that should be accessible for people who understand what a monad is and are able to read Haskell:

http://www.haskellforall.com/2012/06/you-could-have-invented...

http://www.haskellforall.com/2012/07/purify-code-using-free-...


Yeah, someone please write reverse-dependency-ci! :)


> but it's still the best at what it does.

If "what it does" means "build complex software projects" I think your claim is rather debatable.

GHC is currently switching away from make after having already overhauled its make-based build system two times:

http://research.microsoft.com/en-us/um/people/simonpj/papers...



Hah, just today I started to read "Haskell programming from first principles"[1] which also targets non-programmers but builds on lambda calculus instead of assembly.

Would anyone actually recommend to a beginner to start learn assembly first?

[1]http://haskellbook.com/


>Would anyone actually recommend to a beginner to start learn assembly first?

Yes, if you can find a good book about it. Assembler isn't particularly difficult, but the information teaching it is rather hard.

Right now, the lowest-level language I know of with a really good beginner book is C, and it's this book: http://smile.amazon.com/Absolute-Beginners-Guide-C-2nd/dp/06...


The C book you recommended is the exact same one my mum bought for me years ago in late elementary school; I've never seen it mentioned on HN or elsewhere before so I thought I'd also vouch to its effectiveness.

Now that I think of it, I should give my mum a call :)


Yeah, I used to recommend it to students who were struggling. So far everyone I know who's tried it has succeeded. It teaches in a very clear way.

I hope my books do too :)


I've used Little Man Computer successfully to teach even very young kids (elementary school age) basics of computer architecture and a very basic assembly language. Some reading materials and a java based LMC simulator here: http://www.yorku.ca/sychen/research/LMC/


Out of curiosity, have you looked at the 3rd edition?

http://www.amazon.com/Programming-Absolute-Beginners-Guide-3...


I just took a look at the "LOOK INSIDE!" sample available on amazon.com. A few observations:

The front cover says it's been "Updated for C11", but all the sample programs use "main()" rather than "int main(void)". The form without an explicit return type has been invalid since C99.

Page 11:

"In 1983, ANSI created the X3J11 committee to set a standard version of C. This became known as ANSI C. The most recent version of ANSI C, C11, was formally adopted in 2011."

That's loosely correct, but in fact the 1990, 1999, and 2011 editions of the C standard were published by ISO, not by ANSI (and later adopted by ANSI). Furthermore, it ignores the fact that the phrase "ANSI C" is commonly but incorrectly used to refer to the 1989/1990 version of the language (see gcc's "-ansi" option, for example).

Page 16:

"These are functions:

main() calcIt() printf() strlen()

and these are commands:

return while int if float"

No, those aren't "commands", they're keywords. I can't think of any reasonable meaning of the word "command" that would include "int".

Page 26:

The sample program listing is not properly indented.

Page 36:

"\b moves the cursor back a line".

No, it moves the cursor back a column.

A book for beginning C programmers should not have these kinds of errors after three editions.


No, sorry; but I suspect it's just as good.



If you start with assembly I would suggest not picking x86. I would suggest a RISC or virtual assembly like LLVM. x86 just has too much historic weirdness.


MIPS is a great RISC instruction set to learn and has a ton of good emulators out there too, highly recommended.


definitely this. MIPS is a great start for anyone interested in taking the assembly route at any point.

as for simulators i enjoyed using MARS: http://courses.missouristate.edu/KenVollmar/MARS/


Like scores of other generation C64 kids by second language (after BASIC) was 6502 assembly. I think it's suitably straightforward. Although the special addressing mode for the zero page might count as a weirdness.


On the other hand, the x86-64 is a lot nicer and you certainly don't have to go very far to find one to practice with.


I wouldn't. It's like teaching someone to cook by starting with teaching them chemistry.


Right that would be ridiculous! <thinks about it> no wait maybe you have something there... Some more Kitchen science might be a good thing.


I consider it possible, and found a game that tries to teach one the concepts: Human Resource Machine[0]

[0] http://tomorrowcorporation.com/humanresourcemachine


Nearly the same question was recently asked in r/haskell:

https://www.reddit.com/r/haskell/comments/4fhuw3/json_for_ad...


Even better with mapMaybe:

    map transform . mapMaybe safeHead


The project has existed only since last summer.


If you're still using string types for pathnames you may want to check out the path and path-io packages. The path package defines a Path type parameterized by its locality (absolute or relative) and type (pointing at a file or a directory).

Especially the distinction between relative and absolute paths adds a nice safety layer.


mcbuilder has already mentioned it, but I really want to emphasize that dependency management in Haskell is an entirely different story now with stack.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: