Skip to content

jeremydouglass/rosetta_examples_p5

Repository files navigation

Rosetta Code Examples for P5

Rosetta Code Examples for P5 Logo 300x300

Examples from Rosetta Code for Processing (Java Mode) and Python Mode for Processing and Processing.R.

These sets of example Processing sketches (includiing Java mode, Python mode, and R mode) compile available versions of code tasks listed on the Rosetta Code wiki. The examples are directly downloadable from the repository. They may also be loaded directly into the Processing PDE desktop environment through Contributions Manager under the Examples tab.

Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another.

Rosetta Code has ~1000 tasks including file and sysem access, string manipulation, math problems, graphics output and more -- with some of these tasks implemented in dozens or even hundreds of programming languages (although the example sketches here only the Processing implementations).

A few examples include:

  • Anagrams
  • Archimedean spiral
  • Binary digits
  • Draw a pixel
  • FizzBuzz
  • Josephus Problem
  • Levenshtein distance
  • Mandelbrot set
  • Ninety-nine bottles
  • Rename a file
  • Sieve of Eratosthenes

Simply put, this project both solicits Processing contributions to Rosetta Code and curates the resulting examples as a set for Processing language learners.

Getting the examples

Examples are available from the github project homepage: https://github.com/jeremydouglass/rosetta_examples_p5

You may download the files as a zip or clone the repository using the "Clone or Download" button.

Another option is to install all the examples through the desktop Processing Development Environment (PDE). From the menu, File > Examples > Add Examples will open the Contributions Manager to the Examples tab. Download the example set. All sketches will be installed in the Examples subfolder of your Processing data folder, and available through the Examples pop-up menu under Contributed Examples > Rosetta Examples for P5.

Examples are organized in subfolders by mode / language: Java, Python, and R.

License and Contributions

This example set uses the same open documentation license as the Rosetta Code Project, and contributes and redistributes Processing Examples under those same terms.

See LICENSE.md for the current license.

See CONTRIBUTING.md for more information on how you can contribute to this repository.