Functional Grammar is fun (apparently)
Matt Waller
mw333 at hotmail.com
Tue Nov 2 12:54:42 GMT 2010
If no one has mentioned this before,
the following might be of interest.
[fractal program rewritten in many languages]http://theowoll.netau.net/benchmark_prog.html
http://pleac.sourceforge.net/[the perl cookbook's examples written in alternative languages]
hope that helps.
matt.
> Date: Wed, 20 Oct 2010 12:27:29 +0100
> Subject: Re: Functional Grammar is fun (apparently)
> From: philip.g.potter at gmail.com
> To: london.pm at london.pm.org
>
> On 19 October 2010 17:27, Nick <oinksocket at letterboxes.org> wrote:
> > There's a growing trend for re-writing "99 Prolog Problems" for other languages.
> >
> > https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/
> >
> > Googling for "ninety nine problems X" where X is your language of interest often
> > finds something. e.g.:
> >
> > https://www.socialtext.net/perl5/index.cgi?99_problems
> > http://www.haskell.org/haskellwiki/99_Haskell_exercises
> > http://aperiodic.net/phil/scala/s-99/
>
> http://github.com/perl6/perl6-examples/tree/master/99-problems has
> some solutions for perl 6.
>
> I'd recommend the arithmetic problems (P31 onwards) or the
> miscellaneous problems (P90 onwards) to offer more usefully comparable
> solutions between quite widely different languages.
>
> The data-structure-based problems (lists, graphs, trees) have
> different meanings and purposes in different languages. This causes
> genuine comparison problems for, say, P04 (length of a list) -- in
> Perl 5, Perl 6 and Scala standard solutions are "scalar @foo",
> "@foo.elems", and "foo.length", but in Prolog, Haskell, Lisp and
> friends the point of the exercise is to make an algorithm to manually
> count elements in the list, not to just use a builtin to count it for
> you; manipulating cons lists is an essential skill in Lispy languages
> and requires practice.
>
> Phil
>
More information about the london.pm
mailing list