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.
Some are copy and paste, some are modified from other sources, some are made from scratch. If you have some suggestions I am open to adding more topics or languages.
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
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.
https://github.com/mame/quine-relay