| 1 | This started as a little exercise for asavige to |
|---|
| 2 | learn Haskell. |
|---|
| 3 | |
|---|
| 4 | I started by writing a simple RPN (Reverse Polish Notation) |
|---|
| 5 | evaluator in a "natural"/"clear" (non-golf;-) style in Perl 5. |
|---|
| 6 | Then converted it to both Perl 6 and Haskell. |
|---|
| 7 | |
|---|
| 8 | Being a TDD Fascist, I naturally wrote a unit test for the |
|---|
| 9 | little evaluator function in each of the languages. |
|---|
| 10 | |
|---|
| 11 | Since then, starting with the addition of the piln |
|---|
| 12 | sub-directory, this directory has morphed (in a positive way) |
|---|
| 13 | as a place to showcase and compare how the same algorithm |
|---|
| 14 | and its unit tests are expressed in different languages |
|---|
| 15 | (a bit like http://www.99-bottles-of-beer.net/). |
|---|
| 16 | |
|---|
| 17 | Some references: |
|---|
| 18 | |
|---|
| 19 | http://www.perlmonks.org/?node_id=520826 |
|---|
| 20 | (the p5/p6/haskell code was discussed/analysed there) |
|---|
| 21 | |
|---|
| 22 | http://perlgolf.sourceforge.net/TPR/0/5a/ |
|---|
| 23 | (in particular, the test cases in the test program) |
|---|
| 24 | |
|---|
| 25 | http://en.wikipedia.org/wiki/Haskell_programming_language |
|---|
| 26 | (example of simple Haskell RPN there) |
|---|
| 27 | |
|---|
| 28 | http://www.cse.unsw.edu.au/~dons/code/h4sh/ |
|---|
| 29 | (in particular, his drop in replacement for HUnit) |
|---|
| 30 | |
|---|
| 31 | On CPAN: Math::RPN, Parse::RPN, Affix::Infix2Postfix |
|---|
| 32 | (any others, please let me know). |
|---|
| 33 | |
|---|
| 34 | Cheers, |
|---|
| 35 | asavige aka mad golfer (30 Dec 2005) |
|---|