PLEAC - Programming Language Examples Alike Cookbook

Summary

Following the great Perl
Cookbook (by Tom Christiansen & Nathan Torkington, published by
O'Reilly; you can freely browse an excerpt of the book
here) which
presents a suite of common programming problems solved in the
Perl language, this project aims to implement the solutions in
other programming languages.

If successful, this project may become a primary resource for quick, handy
and free reference to solve most common programming problems using
various programming languages, and for comparison on ease-of-use and
power/efficiency of these languages.

Compare sections

Milestones

201112. So the project got his 10th birthday this year.
So much time passed, so much changes in our lives, it's fun to
think about how and when I first discussed the project with Pixel
while walking in some french mountains together 10 years ago...
Little changes in the top 5 on the last 4 years: Groovy 100%,
Ocaml 100%, Python 85%, Ruby 66%, Guile 47%. The total combined
lines of raw material written by contributors (*.data) is 108,000
lines, with Ocaml even longer than original Perl implementation!
Thanks a lot again to all the contributors, Pleac is somehow
great thanks to all of you!

200704. The project has been making rapid progress of
late. Significant additions have been made to both OCaml and
Guile with both languages now over 40% complete, as they have
been made to Tcl, PHP, Pike and REXX, where these languages are
now well over 30% complete. Haskell is undergoing a
reimplementation so as to better conform to standards, and code
has been added to each of C, C++, and Common LISP, with each of
these languages now near 10% complete. Special mention should be
made of Python, a language which has made slow, but steady,
progress to now be about 85% complete, as it should be made of
Groovy, which is the latest PLEAC language addition, one which
has made remarkably rapid progress, having achieved 100%
completion in a matter of months. The top 5 are now Groovy
(100%), Python (85%), Ruby (63%), Guile (43%) and OCaml
(41%). According to Sourceforge statistics, we have 2,000 page
views a day.

200501. The project is evolving well. Python and Ruby
contributions have been coming in steadily (both now over 60%),
sizable contributions have been made to Tcl (25%), Ocaml (24%),
Ada (26%) and Pliant (9%). Pike has also picked up as of late
(14%). R has been added. To simplify using and creating example
scripts, an include system has been implemented, allowing scripts
and data to live in seperate files, which makes them easier to be
accessed and used. Standalone scripts are also accessible as
links from the web presentation. And if you're curious of
statistics, you can have a look at the graphics showing evolution
over time (available upper in the Status section).

200307. The project is slowing down a bit, but still
alive: there are contributed additions, some languages get
beginning of implementations (forth, common lisp, pike). This
main-page sees an average of 50 visitors per day.

200110. The project is in good shape: we now have
decent versions in Python (43%), Merd (30%), Guile (27%), Ruby (25%),
Haskell (21%), Tcl (17%), and Java (14%). It can already be used to make
basic comparisons between languages, and begins to be referred in some
programming language mailing lists. We also have starting implementations
in languages which are not part of the industry standards, but still very
important for a programmers' culture, namely OCaml (7.29%), Erlang (1.86%)
and Pliant (1.71%).

To contribute to this projet, you may implement the Solutions shown in the
Perl Cookbook in your language of choice, writing them in a simple
description language made of @@PLEAC@@_KEYWORD sections:

If you're adding a new part for an existing programming language
(already some done in PLEAC for that language, for example Ruby), follow what's in
this simple sample.

If you're adding a new programming language (nothing done in
PLEAC for that language), follow what's in
this sample.

You may also follow the "code" links upper.

In all cases,
please subscribe
to the discussion mailing-list and post your submission there, so
we can discuss and include your work.

You may pay particular attention to the results produced by your code.
Given merits and drawbacks of the Perl language, main aim of the project
is to solve exactly the same problems in other languages; indeed, when a
resembling keyword of another language doesn't behave the same way, be
sure to underline this within comments in your source, and provide us with
the solution in order to solve exactly the same problem, and produce
exactly the same output.

Each time new contents is uploaded to this web site, all description
language sources are copied under the "code" links in the Status
section upper, and compiled into "html output".

Building the project

To generate the sgml and build the html outputs off the source from nightly
tarball or directly via an anoymous CVS checkout, you'll
need the relevant building software. Here are the typically
needed packages:

Administrative

As the legal parts of any project is primarily important, O'Reilly, who
is the publisher of the Perl Cookbook, was asked for a confirmation that
this project would not infringe patents or harm copyright and intellectual
property. Linda Mui from O'Reilly was kind enough to answer back and
confirm that this project would not harm in any way their business with
the Perl Cookbook. Many thanks to Linda.