PLEAC - Programming Language Examples Alike Cookbook

Get PLEAC at SourceForge.net. Fast, secure and Free Open Source software downloads

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.

The material, considered as some Documentation, is wholly released under the Gnu Free Documentation License, except the Perl part, which is copyrighted by O'Reilly & Associates yet freely available.

Please subscribe to the discussion mailing-list if interested in the project.

The FAQ is here. You may also see who talked about Pleac.

Status

The latest status is accessible from here (the Perl part is the Solutions from the Perl Cookbook, the rest is PLEAC contents):

Your favourite language hasn't yet got any implementation? Contribute!.

If you like statistics, you may have a look at pleac evolving over time. It shows the evolution of completeness percentage since the beginning of the project, for the top implementations.

Here is the name of the authors so far.

Compare sections

You can quickly and easily compare a section of Pleac between different languages with this nice script by Seo Sanghyeon.

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%).

200108. Project registered in Freshmeat. Versions status are: Merd 30%, Ruby 25%, Haskell and Python around 10%.

200105 (project founding). The project has been accepted by SourceForge. Great! Time to work on the generic sourcecode-colorized web pages, and to begin implementations in Ruby and Merd.

Contribute

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:

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".

There is a mailing-list logging the CVS commits (see SourceForge documentation on this topic), you can subscribe in order to be informed and discuss the commits.

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:

make
ruby
sgml-common
sgml-tools
openjade
docbook-style-dsssl
docbook-dtd31-sgml
emacs
emacs-X11

Additionally, find `htmlize.el' and put it in your ~/etc/emacs. All right, you'll probably suffer to successfully compile the stuff ;p.

Related links

These are interesting projects on the same topic (thanks to Pixel):

Administrative

SourceForge is kind enough to host this project.

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.

Guillaume Cottenceau is project maintainer.

Last update: Sun Dec 18 22:01:33 CET 2011