请输入您要查询的百科知识:

 

词条 Rosetta Code
释义

  1. Website

     Data and structure  Languages  Tasks 

  2. See also

  3. References

  4. External links

{{about|a website|code written for the protein-folding system|Rosetta@home}}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]

Website

Rosetta Code was created in 2007 by Michael Mol. 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.[2]

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

{{As of|2019|03|14}}, Rosetta Code has:[6]
  • 930 programming tasks (or problems)
  • 220 additional draft programming tasks
  • 693 computer programming languages
  • 63,553 programming language examples/entries

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. 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 computer programming languages found on Rosetta Code include:[7]

{{columns-list|colwidth=15em|
  • Ada
  • ALGOL 60
  • ALGOL 68
  • ALGOL W
  • APL
  • AWK
  • AutoHotKey
  • BASIC (40 different forms)
  • C
  • C Sharp (C#)
  • C++
  • Clojure
  • COBOL
  • Common Lisp
  • D
  • Erlang
  • F Sharp (F#)
  • Factor
  • Forth
  • Fortran
  • Elixir
  • Go
  • Groovy (Apache Groovy)
  • Haskell
  • Icon
  • J
  • Java
  • JavaScript
  • Julia
  • Kotlin
  • Maple
  • Mathematica
  • MATLAB
  • Nim
  • OCaml
  • Octave
  • PARI/GP
  • Pascal
  • Perl
  • Perl 6
  • PHP
  • Picolisp
  • PL/I
  • PowerShell
  • PureBasic
  • Python
  • R
  • Racket
  • REXX
  • Ring
  • Ruby
  • Rust
  • Scala
  • Scheme
  • Seed7
  • SequenceL
  • Swift
  • Tcl
  • Unicon
  • XPL0

}}

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

Tasks

Some tasks found on Rosetta Code include:[9]

{{columns-list|colwidth=18em|
  • 99 Bottles of Beer (song)
  • Abbreviations
  • Ackermann function
  • Amicable numbers
  • Anagrams
  • Bernoulli numbers
  • Bitwise operations
  • Cholesky decomposition
  • Combinations
  • Comments
  • Continued fractions
  • Cyclic redundancy check (CRC-32)
  • Death Star (draw)
  • Dot product
  • Dragon curve
  • Egyptian fractions
  • Eight queens puzzle
  • Factorials
  • Fibonacci sequence
  • FizzBuzz
  • Galton box (bean box) animation
  • Gamma function
  • Gaussian elimination
  • Greatest common divisor (GCD)
  • Hello world program Hello world/Text
  • Hofstadter Q sequence
  • Infinity
  • Least common multiple (LCM)
  • Leonardo numbers
  • Levenshtein distance
  • Look-and-say sequence
  • Lucas numbers
  • Lucas-Lehmer primality test
  • Mandelbrot set (draw)
  • Mersenne primes
  • Miller-Rabin primality test
  • Morse code
  • Numerical integration
  • Pascal's triangle (draw)
  • Perfect numbers
  • Permutations
  • Prime numbers
  • Primorial numbers
  • Quaternions
  • Quine
  • Random numbers
  • Rock-paper-scissors (play)
  • Roman numerals (encode/decode)
  • Roots of unity
  • roots of a function
  • Rot13 - a simple letter substitution cipher
  • Runge–Kutta method
  • SEDOLs
  • Semiprimes
  • Sierpinski triangle (draw)
  • Sorting algorithms
  • Square-free integers
  • Statistics
  • Stem-and-leaf display
  • Function definition
  • Sudoku (solve)
  • Taxicab numbers
  • Thue-Morse sequence
  • Tic-tac-toe (noughts and crosses)
  • Tower of Hanoi (solve)
  • Trigonometric functions
  • Ulam spiral (draw)
  • Vampire numbers
  • Xiaolin Wu's line algorithm (draw)
  • Zebra Puzzle or Einstein riddle
  • Zeckendorf representation

}}

See also

  • Example-centric programming

References

1. ^Ralf Lämmel. "Software chrestomathies". {{doi|10.1016/j.scico.2013.11.014}}. 2013.
2. ^{{cite web|url=http://rosettacode.org/wiki/Rosetta_Code:Copyrights|title=Rosetta Code:Copyrights|accessdate=2010-12-19}}
3. ^Neil Walkinshaw. Chapter One: "Reverse-Engineering Software Behavior". [https://books.google.com/books?id=zvNvk-1OuBoC "Advances in Computers"]. 2013. p. 14.
4. ^Geoff Cox. [https://books.google.com/books?id=wgnSUL0zh5gC "Speaking Code: Coding as Aesthetic and Political Expression"]. MIT Press, 2013. p. 6.
5. ^Nick Montfort "No Code: Null Programs". 2013. p. 10.
6. ^{{cite web|url=http://rosettacode.org/wiki/Welcome_to_Rosetta_Code|accessdate=2019-03-14|title=Welcome to Rosetta Code}}
7. ^{{cite web|url=http://rosettacode.org/wiki/Special:MostLinkedCategories|accessdate=2018-09-25|title=Most linked-to categories}}
8. ^http://rosettacode.org/wiki/RC_POP.OUT#output
9. ^{{cite web|url=http://rosettacode.org/wiki/Special:MostCategories|accessdate=2018-10-11|title=Pages with the most categories}}

External links

  • {{Official website|http://rosettacode.org/}}
  • Perl 6 on Rosetta Code

2 : Programming language comparisons|Wikis

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 1:09:48