Welcome to RosettaProjects! This is an organization dedicated to providing something similar to Rosetta Code and Hyperpolyglot, but rather than snippets or single-file solutions, the basic unit here is entire, self-contained projects that contain everything required to build and/or execute the code they contain.
Additionally, this project also provides templates for use with the excellent Copier and Cookiecutter tools, dockerfiles, nix scripts (flakes and shell.nix), guix scripts, and other scripts aiming to facilitate the process of setting up a developer environment on any suitable machine.
Why the focus on projects? In part, because this helps to instill a sense of patterns and best practices for a given language (and, to an extent, in general). Another reason is that learning any language necessitates learning boilerplate, like it or not. Finally, most real-world software development involves multiple files, and a developer needs to understand not just the syntax of the language, but also how the various files interact and what is typically located where.
How did we choose the projects? They should be relatively small and self-contained, and with the exception of the "Hello, World!" projects, they should also be interesting, perhaps even useful. Collectively, they should cover most aspects of programming and should be complex enough that languages can showcase their salient features, as well as their relative shortcomings.
-
This is a side-by-side, feature-by-feature comparison of programming languages, where both the programming languages and the features can be selected and ordered and their appearance customized. The source is kept in Markdown and synchronized between per-language and per-feature formats. The site is generated by a bespoke custom site generator written in
TBD
. The website is here. -
This is a collection of tools and scripts that may be used to develop, build, test, and run the projects here.
-
Project Templates
Templates are provided for use with copier or cookiecutter. If running without Nix, installation with pipx is recommended.
by language
- c copier cookiecutter
- c++ copier cookiecutter
- pythoncopier cookiecutter
- lua copier cookiecutter
- go copier cookiecutter
- rust copier cookiecutter
- javascript copier cookiecutter
- typescript copier cookiecutter
-
Development Environments
For (ideally) each language, there are a Nix shell and a Nix flake provided here, as well as dockerfiles and possibly links to containers on DockerHub.
by language
For guidance using these development environments, see the repository's README.
-
Code Projects
Self-contained projects in various languages, all conforming to the same specification. Designed to make comparison between languages easier and to serve as a kind of 'Rosetta Stone' for programming languages.
by project
1. Hello, World!
2. Simplified 'cat' clone
3. Simplified 'tree' clone
4. Simplest JSON-YAML converter
5. nbcat: simple 'cat' command adapted to Jupyter notebooks
6. Implementation of Gale-Church text alignment algorithm
7. colorcritic: CLI for creation and validation of color configs
8. keycritic: CLI for creation and validation of keybindings configs