Rosetta Code

Last updated
Rosetta Code
Rosetta Code 2022 screenshot.png
Front page of rosettacode.org
Available inEnglish
URL www.rosettacode.org
LaunchedJanuary 1, 2007;18 years ago (2007-01-01)
Current statusOnline
Content license
GFDL
Written in PHP, MediaWiki

Rosetta Code is a wiki-based programming chrestomathy website with implementations of common algorithms and solutions to various programming problems in many different programming languages. [1] [2] It is named for the Rosetta Stone, which has the same text inscribed on it in three languages, and thus allowed Egyptian hieroglyphs to be deciphered for the first time. [3]

Contents

Website

Rosetta Code was created in 2007 by Michael Mol. [3] The site's content is licensed under the GNU Free Documentation License 1.2, though some components may be dual-licensed under more permissive terms. [4]

The Rosetta Code web repository illustrates how desired functionality is implemented very differently in various programming paradigms, [5] [6] and how "the same" task is accomplished in different programming languages. [7]

As of 22 February 2024, Rosetta Code has: [8]

In August 2022, Rosetta Code migrated from independent hosting to Miraheze.

Presently, Rosetta Code is hosted by WikiTide. [9]

Data and structure

The Rosetta Code site is organized as a browsable cross-section of tasks (specific programming problems or considerations) and computer programming languages. [2] A task's page displays visitor-contributed solutions in various computer languages, allowing a viewer to compare each language's approach to the task's stated problem.

Task pages are included in per-language listings based on the languages of provided solutions; a task with a solution in the C programming language will appear in the listing for C. If the same task has a solution in Ruby, the task will appear in the listing for Ruby as well.

Languages

Some of the computer programming languages found on Rosetta Code (which have Wikipedia descriptions) include: [10]

A complete list of the computer programming languages that have examples (entries/solutions to the Rosetta Code tasks) is available. [11]

Tasks

Some of the tasks found on Rosetta Code include: [12]

See also

Related Research Articles

<span class="mw-page-title-main">Algorithm</span> Sequence of operations for a task

In mathematics and computer science, an algorithm is a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing calculations and data processing. More advanced algorithms can use conditionals to divert the code execution through various routes and deduce valid inferences.

In computer programming, operator overloading, sometimes termed operator ad hoc polymorphism, is a specific case of polymorphism, where different operators have different implementations depending on their arguments. Operator overloading is generally defined by a programming language, a programmer, or both.

<span class="mw-page-title-main">Programming language</span> Language for communicating instructions to a machine

A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their syntax (form) and semantics (meaning), usually defined by a formal language. Languages usually provide features such as a type system, variables, and mechanisms for error handling. An implementation of a programming language is required in order to execute programs, namely an interpreter or a compiler. An interpreter directly executes the source code, while a compiler produces an executable program.

<span class="mw-page-title-main">String (computer science)</span> Sequence of characters, data type

In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed. A string is generally considered as a data type and is often implemented as an array data structure of bytes that stores a sequence of elements, typically characters, using some character encoding. String may also denote more general arrays or other sequence data types and structures.

<span class="mw-page-title-main">Shell script</span> Script written for the shell, or command line interpreter, of an operating system

A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be command languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper.

In computer science, control flow is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an imperative programming language from a declarative programming language.

This is a "genealogy" of programming languages. Languages are categorized under the ancestor language with the strongest influence. Those ancestor languages are listed in alphabetic order. Any such categorization has a large arbitrary element, since programming languages often incorporate major ideas from multiple sources.

A high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language elements, be easier to use, or may automate significant areas of computing systems, making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.

A string literal or anonymous string is a literal for a string value in the source code of a computer program. Modern programming languages commonly use a quoted sequence of characters, formally "bracketed delimiters", as in x = "foo", where, "foo" is a string literal with value foo. Methods such as escape sequences can be used to avoid the problem of delimiter collision and allow the delimiters to be embedded in a string. There are many alternate notations for specifying string literals especially in complicated cases. The exact notation depends on the programming language in question. Nevertheless, there are general guidelines that most modern programming languages follow.

Non-English-based programming languages are programming languages that do not use keywords taken from or inspired by English vocabulary.

In computer programming, a free-form language is a programming language in which the positioning of characters on the page in program text is insignificant. Program text does not need to be placed in specific columns as on old punched card systems, and frequently ends of lines are insignificant. Whitespace characters are used only to delimit tokens, and have no other significance. Free-form languages allow a greater degree of flexibility and have fewer syntactic rules to learn, which could lower the entry barrier for beginners.

In computer science, arbitrary-precision arithmetic, also called bignum arithmetic, multiple-precision arithmetic, or sometimes infinite-precision arithmetic, indicates that calculations are performed on numbers whose digits of precision are potentially limited only by the available memory of the host system. This contrasts with the faster fixed-precision arithmetic found in most arithmetic logic unit (ALU) hardware, which typically offers between 8 and 64 bits of precision.

In computer programming, a nested function is a named function that is defined within another, enclosing, block and is lexically scoped within the enclosing block – meaning it is only callable by name within the body of the enclosing block and can use identifiers declared in outer blocks, including outer functions. The enclosing block is typically, but not always, another function.

Programming languages are used for controlling the behavior of a machine. Like natural languages, programming languages follow rules for syntax and semantics.

String functions are used in computer programming languages to manipulate a string or query information about a string.

The following outline is provided as an overview of and topical guide to computer programming:

<span class="mw-page-title-main">Sudoku solving algorithms</span> Algorithms to complete a sudoku

A standard Sudoku contains 81 cells, in a 9×9 grid, and has 9 boxes, each box being the intersection of the first, middle, or last 3 rows, and the first, middle, or last 3 columns. Each cell may contain a number from one to nine, and each number can only occur once in each row, column, and box. A Sudoku starts with some cells containing numbers (clues), and the goal is to solve the remaining cells. Proper Sudokus have one solution. Players and investigators use a wide range of computer algorithms to solve Sudokus, study their properties, and make new puzzles, including Sudokus with interesting symmetries and other properties.

<span class="mw-page-title-main">Scripting language</span> Programming language designed for scripting

In computing, a script is a relatively short and simple set of instructions that typically automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming language that is used for scripting.

References

  1. Ralf Lämmel. "Software chrestomathies". doi : 10.1016/j.scico.2013.11.014. 2013.
  2. 1 2 Nanz, Sebastian; Furia, Carlo A. (2015). A Comparative Study of Programming Languages in Rosetta Code. pp. 778–788. arXiv: 1409.0252 . doi:10.1109/ICSE.2015.90. ISBN   978-1-4799-1934-5. S2CID   2570311 . Retrieved 2024-02-22.{{cite book}}: |website= ignored (help)
  3. 1 2 "Rosetta Code:About - Rosetta Code". www.rosettacode.org. 8 August 2010.
  4. "Rosetta Code:Copyrights". 24 January 2010. Retrieved 2010-12-19.
  5. Neil Walkinshaw. Chapter One: "Reverse-Engineering Software Behavior". "Advances in Computers". 2013. p. 14.
  6. Geoff Cox. "Speaking Code: Coding as Aesthetic and Political Expression". MIT Press, 2013. p. 6.
  7. Nick Montfort "No Code: Null Programs". 2013. p. 10.
  8. "Welcome to Rosetta Code" . Retrieved 2007-01-07.
  9. "WikiTide". wikitide.org. Retrieved 2024-02-22.
  10. "Most linked-to categories" . Retrieved 2024-02-22.
  11. "Rosetta Code/Languages/Full list". rosettacode.org. 4 March 2024.
  12. "Pages with the most categories" . Retrieved 2018-10-11.