Rosetta Code:Village Pump/LibRC, A Library for RosettaCode Code: Difference between revisions

Rosetta Processing, ideas on per-language example sets
(A great deal of human effort will be required.)
(Rosetta Processing, ideas on per-language example sets)
 
Line 59:
 
:But but... Many of the code examples have not been written with a "library" intent so as to be worthy of reliance in all (or even most) circumstances! Surely many have been written with a view to demonstrating the idea and especially for the examples only, rather than full generality with diligent attention to structure and interface and accuracy and speed and storage use and error testing and recovery and ... Indeed, in many examples it is stated that error checking is not wanted because the example input ''is'' correct. In other words, someone intent on implementing some algorithm for a serious purpose could well gain insight from the various demonstration routines, but ''must not hope to evade putting thought to the matter'' by copying in a "library" routine. And, in my case, I have provided at least one example (of valid code) with the remark "This will ''not'' work" - this in [[Jensen's_Device|Jensen's Device]] - and others may have done so as well... So, there seems to me to be no way to select suitable library-worthy examples without a great deal of human effort. [[User:Dinosaur|Dinosaur]] ([[User talk:Dinosaur|talk]]) 12:33, 29 September 2016 (UTC)
 
: I like the idea of an uber-repository of code samples from Rosetta Code -- or perhaps just API of some kind to retrieve code from the pages, although that could also be done directly by parsing html pages and extracting lang tags. I think the use case is the big question. My suggestion would be to curate / compile single-language example sets for those languages that makes sense. Depending on the language those might be packaged and distributed as a library, an example set, an application et cetera. For example, Processing PDE has a built-in mechanism for distributing example sets structured as "sketches." In order to disseminate the Rosetta code examples to that community I have started an open source project which follows the Rosetta Code terms and builds releases of the Processing examples repackaged as working sketches with links pointing back to the Rosetta source pages:
:
: * https://github.com/jeremydouglass/rosetta_examples_p5
:
: However, if I was trying to do the same project for Java examples and a Java audience then it would be structured and curated in a different way -- for example, perhaps as an Eclipse project -- even though the languages are extremely similar. Ditto Python. My suggestion would be to tackle things like this in an audience-first way, asking who in for example the Python community would most benefit from a large set of runnable Rosetta examples and how they would ideally want to import / browse / edit / run those (for example, would there be top level python3 and python2 example collections). [[User:Jeremydouglass|Jeremydouglass]] ([[User talk:Jeremydouglass|talk]]) 21:50, 3 March 2020 (UTC)