For a purely functional language like Haskell, this would not be a very good advice. Any kind of I/O would involve monads and other imperative constructs. Better implement an algorithm involving trees or graphs to better appreciate a functional language.
Not at all. You can start doing I/O in Haskell without knowing anything at all about monads by just treating the do-syntax as an imperative DSL. In fact, Bryan O'Sullivan (who wrote Real World Haskell) just held a tutorial session on Haskell a couple of weeks ago where people completely new to the language implemented simple Unix tools like "wc". I don't think monads were mentioned at all.
Learn a Programming Language Faster by Copying Unix
51–60 of 110 posts
Re: Learn a Programming Language Faster by Copying Unix
#52I write a unit testing framework in every new language I learn. I find it's a great workout because making it usable for yourself is immediately assessable, and it often forces you into deeper areas of the language, including reflection and meta-programming.
Re: Learn a Programming Language Faster by Copying Unix
#53Great advice. I've written a simple version of the `column` tool as an entry to the International Obfuscated Ruby Code Contest: https://github.com/saizai/iorcc/pull/1 Just a bit of fun, the contest doesn't seem to be very 'official'.
Re: Learn a Programming Language Faster by Copying Unix
#54Re: Learn a Programming Language Faster by Copying Unix
#55Re: Learn a Programming Language Faster by Copying Unix
#56Re: Learn a Programming Language Faster by Copying Unix
#57It is a good approach and back say 20 years ago the favorite was to redo the du command and add a conversion to MB (now handled by the -h option for human in the du and ls command). Cat is also a good example and not just to learn a programming language but the OS. Ask somebody to come up with 20 ways to display a file, you can do it with not just the cat command. Now I'm not saying there are twenty ways, but it is o…
http://99-bottles-of-beer.net/ http://pleac.sourceforge.net/ http://rosettacode.org/wiki/Main_Page
Re: Learn a Programming Language Faster by Copying Unix
#58But if you use it to start something new, or to add to your repretoire of utilities, then that is something you're more motivated to complete and more useful expenditure of time to boot.
Re: Learn a Programming Language Faster by Copying Unix
#59Re: Learn a Programming Language Faster by Copying Unix
#60It is a good approach and back say 20 years ago the favorite was to redo the du command and add a conversion to MB (now handled by the -h option for human in the du and ls command). Cat is also a good example and not just to learn a programming language but the OS. Ask somebody to come up with 20 ways to display a file, you can do it with not just the cat command. Now I'm not saying there are twenty ways, but it is o…