Camelia, the Perl 6 bug

IRC log for #masakism, 2013-06-20

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

All times shown according to UTC.

Time Nick Message
00:05 timotimo masak: may i ask you to look over my cod
00:05 timotimo my code? :)
00:06 timotimo r: https://gist.github.com/timo/5819240
00:06 camelia rakudo b2072f: OUTPUT«I bought a B of As from T S.␤{"pattern" => "A", "replacement" => "apple", "terminal" => Bool::False}␤{"pattern" => "B", "replacement" => "bag", "terminal" => Bool::False}␤{"pattern" => "S", "replacement" => "shop", "terminal" => Bool::False}␤{"pattern" => "T", "rep…
00:07 timotimo maybe it'll be enough to replace the <.ws> with ' '*
00:10 timotimo hm, i think now i'm matching whitespace where i shouldn't
00:10 timotimo er. not matching whitespace where i should, actually
00:10 timotimo aaand i made it work :)
00:12 timotimo now to make it clever and beautiful
00:14 timotimo r: say 1, 2, 3, 4, { @_.pick } ... { * != * };
00:14 camelia rakudo b2072f: OUTPUT«1␤»
00:14 timotimo r: say 1, 2, 3, 4, { @_.pick } ... { * == * };
00:14 camelia rakudo b2072f: OUTPUT«1␤»
00:14 timotimo r: say 1, 2, 3, 4 ... { * == * };
00:14 camelia rakudo b2072f: OUTPUT«1␤»
00:14 timotimo r: say 1, 2, 3, 4 ... { $^a == $^b };
00:14 camelia rakudo b2072f: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/vd1lKx_irq:1␤␤»
00:14 timotimo oh? i can't have an ending block that gets more than one value passed?
00:14 timotimo that's kind of a bummer :(
00:22 * masak kinds of comes back to the conversation
00:22 timotimo at the gist link from above you'll find the current, working version
00:22 masak oh, seems most problems resolved themselves :)
00:22 timotimo indeed, .ws was the source of all of my troubles ;)
00:35 * masak .oO( in whitespace, no-one can hear you scream )
00:38 benabik joined #masakism
00:50 masak nice solution. timotimo++
00:50 masak bedtime. 'night
01:45 BenGoldberg joined #masakism
02:19 benabik left #masakism
03:49 dmol joined #masakism
04:04 Teratogen hello
04:22 labster hello Teratogen
04:23 Teratogen I missed masakism!
04:23 Teratogen darn it!
04:23 labster I was going to work on my PROMISE and HEX problems a little bit more, but I got distracted by breaking rakudo on windows right before the release date :/
04:24 labster We won't have full attention, but you should be able to jump in and do the work.  Of course, it's better when masak is awake
04:25 labster You can take a look here: https://github.com/masak/workshop
04:39 Teratogen I am not a Perl 6 person =/
04:40 labster That's okay.  This is a Perl 5 and 6 workshop.
04:42 labster You can do either one you want to do.
04:43 labster Most of the tests are written in P5, so it's probably easier to do it in 5.
06:31 dmol joined #masakism
09:11 snearch joined #masakism
10:44 masak oh hai #masakism
10:44 masak I'm awake :)
10:44 masak yes, it's rather fun how the workshop doesn't "take sides" between Perl 5 and Perl 6. it just uses one or the other whenever convenient.
10:44 masak and doesn't make such a big deal out of it.
10:45 masak I'm usually quite aware of all the differences between the two languages, but when producing the workshop it didn't feel like they were that far apart.
10:46 masak * benabik is also amused that he can use the p5 tests with not much more than s/->/./g
10:47 masak heh -- that's because long before we started going on about "sister languages", we actually considered Perl 5 and Perl 6 to be *the same language*. :)
10:59 lizmat fwiw, I still consider Perl 1,2,3,4,5,6 to be all Perl
10:59 lizmat :-)
11:02 masak so does TimToady, I believe.
11:03 masak as someone who was there when the "sister languages" meme got forged, I know it's there mostly for diplomatic reasons.
11:03 masak it wouldn't have been needed at all in a perfect world where Perl 6 was developed in three years flat, and superseded all Perl 5 installs across the world.
11:08 lizmat like the other meme, in time it will die
11:08 lizmat .oO{does that qualify as an autpun?}
11:08 lizmat *autopun
11:09 masak no, don't think so :)
11:09 lizmat as it requires knowledge about the other Perl meme?
11:16 masak oh, that one.
11:16 masak still doesn't quite connect for me as an autopun. just mentioning the same thing twice isn't really enough.
11:16 masak this is an autopun: https://twitter.com/ditchkel​ly/status/323941393091407872 :)
11:19 lizmat ;-)
12:08 timotimo masak: refering to https://gist.github.com/timo/5819240 ; do you have a suggestion for something nicer-looking than the nested $beginning and $prev comparison stuff?
12:16 lizmat joined #masakism
12:32 * masak looks
12:34 timotimo i was hoping i could use the sequence operator, but the end-point closure would need to take two arguments for it to actually look nice
12:40 masak timotimo: I think you could get rid of beginning by doing 'ENTER $value'.
12:41 masak but it seems that doesn't work right now.
12:41 masak bringing the issue over to #perl6.
12:41 timotimo does "seems not to work" mean you tested it?
12:42 masak yes, of course. this is #masakism :)
12:48 timotimo :3
12:50 masak FROGGS++ found https://rt.perl.org/rt3/Tic​ket/Display.html?id=116102 which is why this doesn't work yet.
12:50 masak seemingly that ticket made the spec clarify that ENTER does leave a value at all.
12:51 masak hm. or not.
12:56 timotimo i kind of remember digging into that
16:31 GlitchMr joined #masakism
16:54 dmol joined #masakism
17:21 masak I like the fact that there's 26 people in here (and 2 bots) despite the fact that this channel may never again be host to any significant activity whatsoever :)
17:21 masak then again, maybe there is room for a third workshop...
17:25 timotimo maybe :)
17:26 timotimo https://gist.github.com/timo/5819240/revisions ← masak, this is a version I feel confident uploading to rosettacode now; i think it's very pretty now
17:27 timotimo maybe i'll do :$verbose = any(@*ARGS) eq "--verbose", though
17:27 timotimo yeah, that sounds like a good addition
17:29 timotimo that doesn't seem to work o_O
17:29 timotimo does MAIN clear out the $*ARGS or something?
17:30 * masak looks
17:32 masak timotimo: I'm wondering if 'rule' shouldn't be a rather than a token. then you could make the <.ws> calls implicit.
17:33 timotimo is there a way then to "unspace" the spot between terminal rule and replacement string?
17:35 masak yes. just put them together without whitespace in between.
17:36 timotimo i was hoping i could have whitespace in the definition that won't invoke .ws, but that's okay
17:37 masak it feels slightly inelegant (at lines 40..41) to slurp in all the data, and then only loop through things one-by-one.
17:38 masak I mean, it's nice uses of >> and Z but it ends up wasting memory for no real benefit.
17:38 masak I think I'd've done 'for 1..5 -> $n' instead, to be honest ;)
17:38 timotimo mhm
17:39 masak an extra reason for that:
17:39 masak that's the logic you have in your other two MAIN routines *anyway*.
17:39 masak so you can probably unify things a bit more and not repeat code there.
17:39 timotimo i could defer to the other main subs, yeah
17:40 timotimo and then i could even use dir to find all rule* that have test* files
17:40 masak or factor out what's there into yet another subroutine.
17:40 masak but yes.
17:40 masak beyond that, it looks very nice. timotimo++
17:41 timotimo thanks! :)
17:49 timotimo my $start_value = (try $testfile.IO.slurp.trim-trailing) // prompt("please give a start value: ");  # this is pretty cool.
17:49 masak najs :)
17:50 timotimo replacing .IO.slurp with .&slurp, yey or nay?
17:50 masak slurp($testfile).trim-trailing, maybe?
17:50 timotimo mhm
17:53 timotimo okay, i've updated the gist and i'll upload it to RC now :D
17:55 masak \o/
17:55 masak timotimo++
17:57 timotimo that was a fun task
17:57 masak :)
18:25 spider-mario joined #masakism
19:53 dmol joined #masakism
20:31 moritz left #masakism
22:02 dagurval joined #masakism
22:38 BenGoldberg joined #masakism
23:28 KvH_ joined #masakism
23:35 dagurval joined #masakism
23:36 census joined #masakism
23:36 census left #masakism

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