7 ms·
RosettaGit: Same projects in many programming languages
- tonetheman 7y agoI love this. 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 7y agoThis is one of the most impressive things I've ever seen: a 128 language quine replay. https://github.com/mame/quine-relay https://github.com/mame/quine-relay
- tasogare 7y agoI’m surprised Lisaac is in the list, I thought the author stopped developing the compiler.
- cambalache 7y agoWhat 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.
- deleted 7y ago[deleted]
- rckclmbr 7y agoIt literally says this in the link: 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
- weberc2 7y agoThe readable/properly-formatted version: 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
- deleted 7y ago[deleted]
- rav 7y agoWithin 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"?
- Athas 7y agoWhy 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.
- Athas 7y agoIt 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.
- sansnomme 7y agoSomething that uses Repl.it or tio.run or klipse would be even better.
- adius 7y agoI‘m planing to add support for those platforms. E.g. providing a button to run the code on them for the beginning ...
- trynewideas 7y agoThere's a GitHub extension to transclude content from a GH repo into a MediaWiki page, allowing the code to be managed separately from the wiki presentation: https://github.com/JeroenDeDauw/GitHub#github-extension-for-mediawiki https://github.com/JeroenDeDauw/GitHub#github-extension-for-... There's an older, more generic git transclusion extension for MediaWiki that needs a maintainer and updates: https://www.mediawiki.org/wiki/Extension:Git2Pages 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 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-to-git https://git.kernel.org/pub/scm/git/git.git/tree/contrib/mw-t...
- trynewideas 7y agoIn particular re: the concerns raised by forgotpwd16 about losing history, Git-Mediawiki preserves the wiki's change history.
- armanboyaci 7y agoDid anyone try to train a model to translate a code to other languages (i.e. Google translate for codes) using data in this site?
- gchamonlive 7y agoThat 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.
- big_chungus 7y agoLots 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.
- georgewsinger 7y agoIs the Wolfram Programming Language/Mathematica still the most concise language? https://blog.revolutionanalytics.com/2012/11/which-programming-language-is-the-most-concise.html https://blog.revolutionanalytics.com/2012/11/which-programmi...
- luadigest 7y agoThey need to benchmark Lua. Lua is ridiculously concise when it comes to implementing algorithms. https://rosettacode.org/wiki/Category:Lua https://rosettacode.org/wiki/Category:Lua
- naniwaduni 7y agoIt's not, though? For most tasks not solved by standard library, Lua is going to fall somewhere between JS and Ruby.
- krackers 7y agoWolfram Language has an absolutely huge "standard library" though which probably accounts for some of this.
- georgewsinger 7y agoYes, but that's explicitly part of Wolfram's design philosophy: embed as much computational knowledge as possible into the core language.
- kccqzy 7y agoI 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.
- adius 7y agoHi, 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!
- tom_mellior 7y agoThe first link I clicked was the one leading to https://rosettagit.org/tasks/bitmap/ https://rosettagit.org/tasks/bitmap/ . The first link I clicked there was the one labeled "write ppm file" leading to https://rosettagit.org/tasks/write_ppm_file https://rosettagit.org/tasks/write_ppm_file, which 404s. Was I exceptionally unlucky?
- svnpenn 7y agoI have a similar project, 94 tasks currently: https://cup.github.io/autumn https://cup.github.io/autumn
- jchook 7y agoWow very impressive. Did you write all of these? 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!
- svnpenn 7y agoSome 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.
- wiseleo 7y agoI am saving this thread :)
- octonion 7y agoI have a similar repository with about 150 different languages & combinations. It's a fantastic exercise! https://github.com/octonion/recursion https://github.com/octonion/recursion
- forgotpwd16 7y agoUnfortunately 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.
- Lanrei 7y agoSed looks like someone decided to make regex into a programming language.
- oaiey 7y agoNice 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.
- fernly 7y agoRelated, recently featured on HN, 7GUIs, seven tasks for a GUI platform, with comparable implementations from many platforms. https://eugenkiss.github.io/7guis/implementations https://eugenkiss.github.io/7guis/implementations