Perl 6 - the future is here, just unevenly distributed

IRC log for #rosettacode, 2015-11-05

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:08 FireFly joined #rosettacode
00:51 FireFly joined #rosettacode
01:28 FireFly joined #rosettacode
01:39 FireFly joined #rosettacode
01:51 FireFly joined #rosettacode
02:08 pmarreck joined #rosettacode
02:10 pmarreck So if Rosetta Code had some sort of language-agnostic standardized test suite format for the various language implementations... wouldn't that be amazing? Because that would make it super-easy to add working implementations in new languages as well as make RosettaCode.org a "specification leader" for new implementations of known algorithms
02:10 fedaykin "Rosetta Code"
02:10 pmarreck Thoughts?
02:12 pmarreck I was thinking the test cases would be in some standard format like JSON and look like, [{"given": [list,of,"values"], "assert": some_return_value},...]
02:19 FireFly joined #rosettacode
02:27 opticron that'd be neat
02:34 pmarreck I mean, it would have to be more complicated than that (for example, you'd have to specify what function/method of what module/class would get called, etc.... or perhaps there could be a standardized entry point?) Point is, I think a somehow-standardized test suite for each language implementation would be cool/useful
02:36 opticron you'd have to specify that on a per-language basis in the wiki
02:37 pmarreck Yeah, there'd have to be some per-language transformation, no doubt
02:38 pmarreck I wonder if it might actually uncover bugs in some of the implementations...
02:39 opticron I'm sure it would
02:40 pmarreck anyway i thought it would be a useful addition to the site and figured I'd throw it out there.
02:40 opticron there would also be a LOT of boilerplate to write for every example to translate stdin or program arguments into function arguments
02:40 pmarreck Maybe the boilerplate could be standardized.
02:40 opticron to an extent
02:41 pmarreck I mean, every implementation in Bash could just assume they're coming in on $1-$n
02:42 opticron right, but you'd have to adjust every example to accomodate that
02:45 pmarreck Possibly. :O
02:45 pmarreck There would be a period where some would be compliant and some wouldn't.
02:45 pmarreck Again, the details would need to be gnawed on for a bit, but I think the general idea has legs
02:45 opticron absolutely
02:45 pmarreck I was actually surprised when I first came upon RosettaCode and there weren't test suites for all these implementations
02:45 pmarreck Like, how do I know that this implementation actually satisfies all the requirements of this algorithm?
02:45 opticron yeah...
02:47 ilbot3 joined #rosettacode
02:47 Topic for #rosettacode is now Rosetta Code: Coding in  (∞ - 1) languages ; http://irclog.perlgeek.de/rosettacode/today ; Pop  a tab and stick around! ; Account creation issues? Send an email with  your desired username to bureaucrats@rosettacode.org.
02:47 opticron so, assume you'll have to run the testsuite against a wiki dump, I guess
02:49 opticron the wiki dump can provide the per-language boilerplate, per-task expected inputs and outputs
02:49 pmarreck yeah you'd have to either write a generic language-specific interface and then alter the algorithm implementation somewhat, or you'd have to write a wrapper around every implementation that interfaces with the generic language-specific interface, which accesses the test input data and output expectations
02:50 pmarreck there would have to be a little bit of work, per implementation
02:50 pmarreck but hey it's crowdsourced so... just provide good docs and examples and hope others buy in :)
02:51 pmarreck So not only could folks contribute implementations, they could contribute failing test cases
02:51 pmarreck which could then apply across ALL implementations
02:52 FireFly joined #rosettacode
02:53 opticron the only thing to be concerned about is sandboxing all the interpreters/compilers/binaries
02:53 pmarreck If I was contributing an implementation, I would definitely want it to pass an existing test suite for that algorithm which was already on the site
02:53 pmarreck opticron: oh you mean to do actual validation on the site itself? Yep
02:54 opticron no matter where it's run
02:54 opticron you're running potentially unknown code
02:54 pmarreck Just start with the langs which can compile to javascript and done :O LOL
02:54 * opticron weeps
02:55 pmarreck Then there's probably some additional set of languages which could be compiled against emscripten...
02:55 pmarreck Hey, it would solve the sandboxing problem! I think...
02:56 opticron that might be a good least-effort jab at sandboxing
02:56 opticron at least to start with
02:56 pmarreck Yep
02:56 opticron I wonder how long it'll take to run everything
02:57 pmarreck Good question
03:02 pmarreck Some languages already made it easy, such as scala-js: http://www.scala-js-fiddle.com/
03:03 opticron https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
03:03 fedaykin "List of languages that compile to JS · jashkenas/coffeescript Wiki · GitHub" http://rldn.net/698
03:04 pmarreck clojurescript for clojure, etc. mruby for ruby maybe http://qiezi.me/projects/mruby-web-irb/mruby.html
03:04 fedaykin "Emscripten: mruby"
03:04 pmarreck yep, seen that
03:04 pmarreck I think almost all of them will, eventually (sadly... or perhaps, it just is what it is)
03:11 pmarreck All the new langs I'm seeing target JS, such as Elm http://elm-lang.org/
03:11 fedaykin "gen/pages/home"
03:16 FireFly joined #rosettacode
04:13 FireFly joined #rosettacode
04:26 Sinclair6 joined #rosettacode
04:50 Wright joined #rosettacode
04:55 Wright joined #rosettacode
14:25 FireFly joined #rosettacode
14:45 mikemol joined #rosettacode
14:47 diginet joined #rosettacode
14:56 eMBee joined #rosettacode
15:37 FireFly joined #rosettacode
15:42 Sinclair_ joined #rosettacode
15:50 Sinclair_ joined #rosettacode
16:02 Sinclair6 joined #rosettacode
16:51 pmarreck_ joined #rosettacode
16:58 Shayanjm_ joined #rosettacode
17:01 Sinclair6 joined #rosettacode
17:09 lambdabot joined #rosettacode
17:40 FireFly joined #rosettacode
17:44 Lord_of_Life joined #rosettacode
17:59 sorakun joined #rosettacode
18:39 Lord_of_Life joined #rosettacode
18:39 Lord_of_Life joined #rosettacode
20:20 FireFly joined #rosettacode
20:41 opticron_ joined #rosettacode

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary