Nice project. I like this dedication and the idea. But I think these comparison always lack experts in individual languages. When I read C# code in projects like this, it is seldom modern or realistic. The project already compares apples with oranges but additionally the oranges are "rotten".
I would prefer a smaller set of compared languages where the provided snippets are actually up to date. Take the Techempower Benchmarks. Here experts fight against experts for the performance crown. And they categorize what they compare.
Hi, I’m the author =). Glad this hit the top of HN, as any help would be highly appreciated! With your help this could become a really valuable asset. Looking forward to your merge requests ;-) Let me know if you have any questions!
It is definitely a problem that contributing to Rosetta Code is only possible through a clumsy WikiMedia interface. This makes it difficult to test and maintain the solutions for a given language. I'm not convinced a fork is the best solution, however. A tool for synchronising on-disk files with the wiki contents would have been sufficient, and seems eminently doable.
And approaching the problem from the other end, there's the git porcelain git-remote-mediawiki that translates git commands into MediaWiki API requests: https://github.com/Git-Mediawiki/Git-Mediawiki
In Rosetta Code you can split the code and insert some text and formulas between them. Sometimes it makes the explanation easier. Also, the free form in useful to add different ways to solve the task and compare them.
The problem is that you must trust your cut&paste abilities to not break the code :).
Lots of languages have different assumptions about which edge cases you must handle or are handled automatically for you, or what restrictions you have. How do you account for a language which allows memory management or not? One that has higher- vs. lower-level threading APIs? These can be handled, but consider the complexity necessary to do so for only a single language. Then, imagine the thousands of other things you can't call to mind until you hit them as a crazy edge case trying to do this. While it may be theoretically possible, this means such a model is probably not the best tool to do this.
That would be possible for purely funcional languages, but the mainstream ones allow side effects that you can't quite predict. Remember training a model is just teaching a machine to memorise statistical occurrences. Anything the model doesn't anticipate can be catastrophical.
I could see something like control engineers do, use machine learn to help tune a controller. In this case, use a model to generate an aproximation code translation with accompanying degree of precision.
Unfortunately this fork loses the changes history of the countless people that have contributed during the decade that RC exists. To say the truth RG looks more polished but not something that couldn't be done on RC.
What is the difference between this and RosettaCode? A tip for a feature, when I filter by language and I click in a solution I want to be presented automatically with the solution, an not having to search or scrolldown for it.
The data was originally forked from rosettacode.org on 2019-10-22. In comparison to Rosetta Code, in RosettaGit all code is stored and hosted in a repository on GitHub instead of a MediaWiki. This has following advantages:
* Code can be edited with proper text editors
* Continous integration and delivery can be used to ensure a high code quality
* All infrastrucuture for git (e.g. GitHub) simplifies further development
* Faster load times as pages are only rebuilt after a change
I would believe so. Things like dynamic programming (memoization) takes only a few characters, not to mention a wealth of facilities already built in. It's what I use for prototyping math-y software.
If you discount its standard library however, I think it might not necessarily beat APL.
Within one language, a project can have numerous valid, qualitatively different implementations. How to ensure that the implementations in different languages are comparable? And if that's not the goal, how is this different from searching GitHub for "implementation of 2048 in Rust"?
Why is it important to ensure that the implementations are comparable? Why would someone contribute one that isn't? And if a language has to do something unusual because of specific quirks, I'd argue that's interesting by itself, and demonstrates how languages are similar and different (the stated goal of Rosetta Code).
Rosetta Code is specifically not a collection of library code. You're not supposed to take code from there, so it doesn't matter whether they all implement exactly the same thing.
The advantage over GitHub is that it's much easier to find what you're looking for, and the code you will find will (supposedly) be written explicitly for expository purposes.
I have been trying to learn Racket and I already know a lot of other languages. This will give me a place to compare implementations of the same problem.
[+] [-] nordsieck|6 years ago|reply
https://github.com/mame/quine-relay
[+] [-] tasogare|6 years ago|reply
[+] [-] oaiey|6 years ago|reply
I would prefer a smaller set of compared languages where the provided snippets are actually up to date. Take the Techempower Benchmarks. Here experts fight against experts for the performance crown. And they categorize what they compare.
[+] [-] adius|6 years ago|reply
[+] [-] tom_mellior|6 years ago|reply
[+] [-] Athas|6 years ago|reply
[+] [-] trynewideas|6 years ago|reply
There's an older, more generic git transclusion extension for MediaWiki that needs a maintainer and updates: https://www.mediawiki.org/wiki/Extension:Git2Pages
And approaching the problem from the other end, there's the git porcelain git-remote-mediawiki that translates git commands into MediaWiki API requests: https://github.com/Git-Mediawiki/Git-Mediawiki
Git-Mediawiki is also known as mw-to-git in git's `contrib`: https://git.kernel.org/pub/scm/git/git.git/tree/contrib/mw-t...
[+] [-] gus_massa|6 years ago|reply
The problem is that you must trust your cut&paste abilities to not break the code :).
[+] [-] sansnomme|6 years ago|reply
[+] [-] octonion|6 years ago|reply
https://github.com/octonion/recursion
[+] [-] armanboyaci|6 years ago|reply
[+] [-] big_chungus|6 years ago|reply
[+] [-] gchamonlive|6 years ago|reply
I could see something like control engineers do, use machine learn to help tune a controller. In this case, use a model to generate an aproximation code translation with accompanying degree of precision.
[+] [-] forgotpwd16|6 years ago|reply
[+] [-] svnpenn|6 years ago|reply
https://cup.github.io/autumn
[+] [-] jchook|6 years ago|reply
I clicked "Send Email" and scrolled down the page, curious what might help out my recent PHP rage.
And what to my wondering eyes should appear? A concise PHP example using several undocumented features!
Thanks!
[+] [-] cambalache|6 years ago|reply
[+] [-] rckclmbr|6 years ago|reply
[+] [-] unknown|6 years ago|reply
[deleted]
[+] [-] georgewsinger|6 years ago|reply
[+] [-] krackers|6 years ago|reply
[+] [-] kccqzy|6 years ago|reply
If you discount its standard library however, I think it might not necessarily beat APL.
[+] [-] luadigest|6 years ago|reply
https://rosettacode.org/wiki/Category:Lua
[+] [-] rav|6 years ago|reply
[+] [-] Athas|6 years ago|reply
Rosetta Code is specifically not a collection of library code. You're not supposed to take code from there, so it doesn't matter whether they all implement exactly the same thing.
The advantage over GitHub is that it's much easier to find what you're looking for, and the code you will find will (supposedly) be written explicitly for expository purposes.
[+] [-] tonetheman|6 years ago|reply
I have been trying to learn Racket and I already know a lot of other languages. This will give me a place to compare implementations of the same problem.
[+] [-] fernly|6 years ago|reply
https://eugenkiss.github.io/7guis/implementations
[+] [-] unknown|6 years ago|reply
[deleted]
[+] [-] Lanrei|6 years ago|reply
[+] [-] wiseleo|6 years ago|reply