Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-10-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Guest5511 joined #perl6
00:04 Guest5511 joined #perl6
00:05 Guest5511 hallo
00:06 flussence I thought we were rid of those users... :/
00:12 TimToady they can join an listen, but they can't be heard, if I understand correctly
00:12 TimToady seems not to be the case, thoguh
00:13 diakopter hrm
00:15 simcop2387 joined #perl6
00:15 flussence I'm wondering whether freenode itself will do something. It can't be isolated to just this channel, right?
00:18 simcop2387 joined #perl6
00:18 diakopter oh; someone removed my quiet entry from the channel mode list
00:30 diakopter we'll see if the +b persists
00:30 soh_cah_toa nqp: say("foo" !~~ /abc/)
00:30 p6eval nqp: OUTPUT«Confused at line 1, near "say(\"foo\" "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)␤»
00:30 soh_cah_toa nqp: say("foo" ~~ /abc/)
00:30 p6eval nqp: OUTPUT«␤»
00:31 soh_cah_toa nqp: say("foo" !~ /abc/)
00:31 p6eval nqp: OUTPUT«Confused at line 1, near "say(\"foo\" "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)␤»
00:31 soh_cah_toa huh? how can ~~ work but !~~ doesn't?
00:31 soh_cah_toa nqp: say(!("foo" ~~ /abc/))
00:31 p6eval nqp: OUTPUT«1␤»
00:31 soh_cah_toa eq, i guess that'll have to do :
01:07 thou joined #perl6
01:15 [Coke] rakudo: say [+] '08:12:23'.split(':') Z* (60 X** reverse ^3)
01:15 p6eval rakudo 142c41: OUTPUT«29543␤»
01:16 PerlJam cute
01:18 [Coke] phenny: ask masak if RT#78250 is a duplicate of RT#61838
01:18 phenny [Coke]: I'll pass that on when masak is around.
01:19 [Coke] PerlJam: also a bug.
01:20 [Coke] rakudo: sub foo ( $f = rand ) { say $f; }; say Capture.new() ~~ &foo.signature;
01:20 p6eval rakudo 142c41: OUTPUT«No applicable candidates found to dispatch to for 'ACCEPTS'. Available candidates are:␤:(Mu, Mu $topic, Mu %_)␤␤  in method ACCEPTS at src/gen/CORE.setting:482␤  in block <anon> at /tmp/jYwZbPOtsI:1␤  in <anon> at /tmp/jYwZbPOtsI:1␤»
01:22 skangas joined #perl6
01:23 [Coke] std: {redo}
01:23 p6eval std 580b69a: OUTPUT«ok 00:01 118m␤»
01:27 [Coke] phenny: tell jnthn there are like 4 tickets that all involve weird issues when defining a sub called "if".
01:27 phenny [Coke]: I'll pass that on when jnthn is around.
01:29 japhb .oO( DIHWIDT )
01:29 [Coke] rakudo: grammar A { token TOP { <any> }; token any { 'foo' | 'bar' } }; say A.parse('foo')
01:29 p6eval rakudo 142c41: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method any at src/gen/CORE.setting:1015␤  in !reduce at src/stage2/QRegex.nqp:590␤  in !cursor_pass at src/stage2/QRegex.nqp:570␤  in regex any at /tmp/5upIqusrBR:1␤  in regex TOP at /tmp/5upIqusrBR:1…
01:35 [Coke] rakudo: my %hash; push(%hash<books>, 'Cooking for Geeks');
01:35 p6eval rakudo 142c41: OUTPUT«No applicable candidates found to dispatch to for 'push'. Available candidates are:␤:(Positional @a, Positional @elems)␤␤  in block <anon> at /tmp/PFGqPFv1b7:1␤  in <anon> at /tmp/PFGqPFv1b7:1␤»
01:36 [Coke] rakudo: my %h; push %h<a>, 1, 2; say %h.perl
01:36 p6eval rakudo 142c41: OUTPUT«No applicable candidates found to dispatch to for 'push'. Available candidates are:␤:(Positional @a, Positional @elems)␤␤  in block <anon> at /tmp/k6AgMSS5ut:1␤  in <anon> at /tmp/k6AgMSS5ut:1␤»
01:38 [Coke] rakudo: eval "say 1" for 1..4
01:38 p6eval rakudo 142c41: OUTPUT«1␤1␤1␤1␤»
01:38 [Coke] rakudo: eval '' for 1..2
01:38 p6eval rakudo 142c41:  ( no output )
01:41 [Coke] std: &infix:<Xxx>
01:41 p6eval std 580b69a: OUTPUT«ok 00:01 123m␤»
01:41 [Coke] rakudo: &infix:<Xxx>
01:41 p6eval rakudo 142c41: OUTPUT«===SORRY!===␤Symbol '&infix:<Xxx>' not predeclared in <anonymous> (/tmp/D4XbOGkOB0:1)␤»
01:43 [Coke] rakudo: my $b = &time; say &$b;
01:43 p6eval rakudo 142c41: OUTPUT«===SORRY!===␤Symbol '&time' not predeclared in <anonymous> (/tmp/rmLVBpfpsa:1)␤»
01:43 [Coke] rakudo: my $b = time; say &$b;
01:43 p6eval rakudo 142c41: OUTPUT«1319247789␤»
01:43 [Coke] rakudo: my $b = time; say $b.gist;
01:43 p6eval rakudo 142c41: OUTPUT«1319247798␤»
01:44 [Coke] hurm. should $b = &time still work?
01:44 [Coke] (RT #74654)
01:45 [Coke] rakudo: class A { class B {} }; A::B.new
01:45 p6eval rakudo 142c41:  ( no output )
01:45 [Coke] rakudo: class A { class B {} }; A::B.new.WHAT.say
01:45 p6eval rakudo 142c41: OUTPUT«B()␤»
01:46 [Coke] rakudo: package A { package C::B { our sub c { say "OH HAI" } } }; A::C::B::c
01:46 p6eval rakudo 142c41: OUTPUT«OH HAI␤»
01:46 [Coke] rakudo: package A { package C::B { our sub c { say "OH HAI" } } }; C::B::c
01:46 p6eval rakudo 142c41: OUTPUT«Could not find symbol 'C::B::&c'␤  in block <anon> at /tmp/PYAMo6baOl:1␤  in <anon> at /tmp/PYAMo6baOl:1␤»
02:01 [Coke] rakudo: .++()
02:01 p6eval rakudo 142c41: OUTPUT«===SORRY!===␤Method 'unshift' not found for invocant of class 'Undef'␤»
02:02 [Coke] std: .++()
02:02 p6eval std 580b69a: OUTPUT«ok 00:01 118m␤»
02:06 thou joined #perl6
02:10 [Coke] rakudo: say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl
02:10 p6eval rakudo 142c41: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block <anon> at /tmp/Pcm5rrYfqp:1␤  in method ACCEPTS at src/gen/CORE.setting:1141␤  in method reify at src/gen/CORE.setting:4045␤  in method reify at src/gen/CORE.setting:3952␤  in method gimme at …
02:12 [Coke] rakudo: %*ENV<TEST> = 'Test'; say %*ENV<TEST>
02:12 p6eval rakudo 142c41: OUTPUT«Test␤»
02:15 dalek roast: 203e22e | Coke++ | S02-magicals/env.t:
02:15 dalek roast: add an RT ref.
02:15 dalek roast: review: https://github.com/perl6/roast/commit/203e22e26b
02:15 tokuhiro_ joined #perl6
02:16 [Coke] rakudo: %*h.push: $*IN.slurp.join.comb.map(-> $k {$k=>1}); say %*h.perl
02:16 p6eval rakudo 142c41: OUTPUT«Dynamic variable %*h not found␤  in method throw at src/gen/CORE.setting:6295␤  in method <anon> at src/gen/CORE.setting:6393␤  in <anon> at src/gen/Metamodel.pm:2082␤  in find_method_fallback at src/gen/Metamodel.pm:2080␤  in find_method at src/gen/Metamodel.pm:78…
02:19 [Coke] rakudo: class HTTP::Request { has Str $.method is rw; } ; say HTTP::Request.new( method => 'GET' ).WHAT;
02:19 p6eval rakudo 142c41: OUTPUT«HTTP::Request()␤»
02:20 [Coke] rakudo: my $x = :a<5>; say $x.map({.key => .value + 1}).perl
02:20 p6eval rakudo 142c41: OUTPUT«Method 'key' not found for invocant of class 'Any'␤  in block <anon> at /tmp/O3LAqYDA8t:1␤  in <anon> at /tmp/O3LAqYDA8t:1␤»
02:20 [Coke] rakudo: say ~(1, 1, &[+] ... *)[^10]
02:20 p6eval rakudo 142c41: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
02:20 [Coke] rakudo: say ~(1, 1, &[+] ... 50)
02:21 p6eval rakudo 142c41: OUTPUT«(timeout)»
02:21 [Coke] rakudo: say ~(1, 1, &[+] ... 55)
02:21 p6eval rakudo 142c41: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
02:21 [Coke] rakudo: my $foo = &prefix:<!>;say $foo.signature;
02:21 p6eval rakudo 142c41: OUTPUT«:(Any)␤»
02:43 [Coke] nom: say 699-102," Tickets"
02:43 p6eval nom 142c41: OUTPUT«597 Tickets␤»
02:43 [Coke] \o/
02:49 colomon \o/
02:49 colomon [Coke]++
02:57 aindilis joined #perl6
03:01 jaldhar joined #perl6
03:01 sorear good * #perl6
03:09 voot545 joined #perl6
03:10 voot545 I'm a newb just looking around; I'm curious, how difficult would it be to create a game like minecraft using rakudo?
03:10 voot545 are openGL/audio libraries available?
03:11 worr joined #perl6
03:14 soh_cah_toa voot545: well, parrot has an opengl library but that won't help you much. i don't think there's an opengl module for p6 either :\
03:16 wolfman2000 joined #perl6
03:17 soh_cah_toa even if there was, it would end up being one really slow game
03:30 Tene soh_cah_toa: There were both OpenGL and SDL examples in Perl 6 at least two years ago, if not more.
03:30 soh_cah_toa really?
03:30 Tene see parrot/examples/sdl/blue_rect.pl
03:31 Tene added in 2007
03:31 kaleem joined #perl6
03:33 soh_cah_toa yeah, i suppose you could just use the parrot libraries. don't know how update to date they are though
03:33 soh_cah_toa i was under the impression that they were experimental
03:36 soh_cah_toa looks like they don't even work
03:36 soh_cah_toa blue_rect.pl that is
03:38 Tene nope, but they did
03:54 sorear good * #perl6
04:09 chitragupt joined #perl6
04:13 betterworld joined #perl6
04:14 Gothmog_ joined #perl6
04:19 benabik_ joined #perl6
04:35 dalek niecza/serialize: 1943538 | sorear++ | lib/ (2 files):
04:35 dalek niecza/serialize: Finish reimplementation of parametric roles
04:35 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/1943538a16
04:36 sorear Failed 430/1007 subtests
04:57 ponbiki joined #perl6
05:02 am0c joined #perl6
05:06 daniel___ joined #perl6
05:08 sorear 400/1007
05:08 dalek niecza/serialize: 9f9dd7f | sorear++ | src/niecza:
05:08 dalek niecza/serialize: Fix hash constructor detection
05:08 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/9f9dd7fa40
05:10 uasi joined #perl6
05:12 orafu joined #perl6
05:43 * sorear is thinking about parallel compilation
05:44 sorear if Perl 6 is going to get a built-in multithreaded make like ghc --make, then GLOBAL needs to be in some sense thread-local
05:48 daniel-s joined #perl6
05:49 Sarten-X joined #perl6
06:09 dalek niecza/serialize: 376ebc0 | sorear++ | src/niecza:
06:09 dalek niecza/serialize: Reset paren numbering with each new regex :)
06:09 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/376ebc03d4
06:09 sorear Failed 320/1007 subtests
06:24 bbkr1 joined #perl6
06:25 dalek niecza/serialize: c604de2 | sorear++ | lib/ (2 files):
06:25 dalek niecza/serialize: Actually run setting mainline code
06:25 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/c604de2017
06:25 sorear Failed 263/1007...
06:25 sorear o/ bbkr1
06:44 GlitchMr joined #perl6
06:48 moritz \o
06:48 phenny moritz: 21 Oct 18:07Z <bbkr_> tell moritz to check "my $b = Buf.new(1); for ^100 { $b~=Buf.new(1..100); say [+]$b.list}" code, something causes Segmentation fault there (ticket also filled)
06:48 kaare_ joined #perl6
06:48 sorear o/ moritz, GlitchMr
06:48 GlitchMr Hi
06:57 dalek niecza/serialize: 925d787 | sorear++ | lib/ (2 files):
06:57 dalek niecza/serialize: Reimplement generation of succeed handlers for topicalizer blocks
06:57 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/925d787a73
06:57 sorear Failed 8/1007 subtests
06:57 * sorear -> sleep
06:57 GlitchMr {} if $something
06:57 GlitchMr if $something {}
06:57 GlitchMr ...
06:58 GlitchMr perl6: {print '.'; print '.'; print '.'} if 2+2===4
06:58 p6eval pugs b927740: OUTPUT«...»
06:58 p6eval ..rakudo 142c41, niecza v10-59-g5d1ba41:  ( no output )
06:58 GlitchMr ok...
06:58 GlitchMr perl6: if 2+2===4 {print '.'; print '.'; print '.'}
06:58 p6eval pugs b927740, rakudo 142c41: OUTPUT«...»
06:58 p6eval ..niecza v10-59-g5d1ba41:  ( no output )
06:59 GlitchMr perl6: {print '.'; print '.'; print '.'} if 2+2==4
06:59 p6eval pugs b927740: OUTPUT«...»
06:59 p6eval ..rakudo 142c41, niecza v10-59-g5d1ba41:  ( no output )
06:59 GlitchMr niecza> 2+2===4
06:59 GlitchMr Bool::False
06:59 GlitchMr ... ok...
07:00 sorear GlitchMr: niecza doesn't fully implement === yet; it's only working for "normal" (mutabl) types
07:00 * sorear sleep for real
07:00 GlitchMr ok
07:01 GlitchMr For me it was always "==", but fail instantly if it's different type.
07:01 GlitchMr but whatever
07:04 DarthGandalf joined #perl6
07:28 moritz bbkr1: fwiw I've re-coded your Buf segfault example in PIR, and there it doesn't segfault
07:45 preflex joined #perl6
07:47 satyavvd joined #perl6
08:02 daniel-s joined #perl6
08:30 mj41_nb joined #perl6
08:30 mj41 joined #perl6
08:42 satyavvd joined #perl6
08:45 f00li5h joined #perl6
08:48 cognominal___ joined #perl6
08:52 cognominal_ joined #perl6
08:56 MayDaniel joined #perl6
09:02 dorlamm joined #perl6
09:05 masak morning, #perl6
09:05 phenny masak: 01:18Z <[Coke]> ask masak if RT#78250 is a duplicate of RT#61838
09:06 masak [Coke]: yep.
09:06 * masak merges
09:06 satyavvd_ joined #perl6
09:18 GlitchMr perl6: multi sub postfix:<!> (Int $x) { return [*] 1..$x }
09:18 p6eval pugs b927740, rakudo 142c41:  ( no output )
09:18 p6eval ..niecza v10-59-g5d1ba41: OUTPUT«Potential difficulties:â�¤  &postfix:<!> is declared but not used at /tmp/tawHrpiQPC line 1:â�¤------> [32mmulti sub postfix:<!> [33mâ��[31m(Int $x) { return [*] 1..$x }[0mâ�¤â�¤Â»
09:18 GlitchMr oh right
09:18 GlitchMr perl6: multi sub postfix:<!> (Int $x) { return [*] 1..$x } print 2!
09:18 p6eval niecza v10-59-g5d1ba41: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/tbxPfiIWxe line 1:�------> [32mostfix:<!> (Int $x) { return [*] 1..$x }[33m�[31m print 2![0m��Parse failed��»
09:18 p6eval ..rakudo 142c41: OUTPUT«===SORRY!===␤Confused at line 1, near "multi sub "␤»
09:18 p6eval ..pugs b927740: OUTPUT«2»
09:19 masak GlitchMr: semicolon
09:19 masak }; print
09:19 GlitchMr perl6: multi sub postfix:<!> (Int $x) { return [*] 1..$x }; print 10!
09:19 p6eval rakudo 142c41: OUTPUT«===SORRY!===␤Confused at line 1, near "print 10!"␤»
09:19 p6eval ..pugs b927740, niecza v10-59-g5d1ba41: OUTPUT«3628800»
09:19 GlitchMr perl6: multi sub postfix:<!> is equiv:<++> (Int $x) { return [*] 1..$x }; print 10!
09:19 p6eval niecza v10-59-g5d1ba41: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unhandled trait equiv:<++> for this context at /tmp/mMuoLbuz99 line 1:â�¤------> [32mmulti sub postfix:<!> is equiv:<++> [33mâ��[31m(Int $x) { return [*] 1..$x }; print 10![0mâ�¤â�¤â�¤Unhandled Exception: Check failedâ�¤â�¤  at /home/…
09:19 p6eval ..rakudo 142c41: OUTPUT«===SORRY!===␤Malformed block at line 1, near "(Int $x) {"␤»
09:19 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected ":<++>"␤    expecting trait or block␤    at /tmp/WWHbeIXr07 line 1, column 31␤»
09:19 GlitchMr ...
09:20 GlitchMr ok...
09:20 wamba joined #perl6
09:27 Trashlord joined #perl6
09:30 masak yeah, there's some work left to do there.
09:30 masak I'd say the basic infrastructure (in nqp) is in place, and has been for a long time now.
09:30 masak but it hasn't fully bubbled up into Rakudo.
09:33 MayDaniel joined #perl6
09:45 masak people come in and ask "hi, can I do OpenGL in Rakudo" and we answer "yeah, that worked two years ago. probably doesn't anymore." we keep reaching these cool milestones and then let them bitrot. anything we can do to do better on that?
09:45 masak such as extending our testing regime even to less immediately testable things.
09:46 masak GlitchMr: it's not '{ ... } if $something', it's '... if $something'
09:46 masak perl6: say "OH HAI" if 2 + 2 < 5
09:47 p6eval pugs b927740, rakudo 142c41, niecza v10-59-g5d1ba41: OUTPUT«OH HAI␤»
09:47 GlitchMr I know
09:47 GlitchMr :)
09:47 masak what you did is a no-op, since it just sees the block and says, "OK, block".
09:48 masak GlitchMr: it's hard to tell what you know at times, since your reaction to things is most often three dots :)
09:48 GlitchMr ...
09:48 GlitchMr yeah
09:48 masak :P
09:50 GlitchMr Synopsis seems to be down :(
09:50 MayDaniel joined #perl6
09:50 GlitchMr At least for me
09:50 GlitchMr https://github.com/perl6/spe​cs/blob/master/S05-regex.pod
09:50 masak here, too -- http://perlcabal.org/syn/ is not available.
09:50 GlitchMr I think I will use this version for a while...
09:51 masak you can also check out the spec using git -- then if github goes down... :)
09:51 GlitchMr "this blob is taking too long to generate."
09:51 GlitchMr ... ok...
09:52 masak it tries to render the Perl 5 Pod into nice HTML.
09:52 GlitchMr I will use RAW version of it
09:52 GlitchMr ...
09:52 GlitchMr Makes sense
09:57 GlitchMr So, I want to parse grammar, but I don't know how to access parts of grammar
09:58 GlitchMr I have something like Match.new(named=>{
09:58 masak perl6: sub isprime($n) { not '1' x $n ~~ /^ (1+) $0+ $/ }; "$_ is{ isprime $_ ?? "" !! "not" } a prime" for 2..12
09:58 GlitchMr But how can I access "named"?
09:58 p6eval pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
09:58 p6eval ..rakudo 142c41:  ( no output )
09:58 p6eval ..niecza v10-59-g5d1ba41: OUTPUT«␤Unhandled Exception: System.FormatException: Invalid format.␤  at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 ␤  at System.Double.Parse (System.String s, IFormatProvider provider) […
09:58 masak hm.
09:59 masak GlitchMr: your question is a bit unclear to me.
09:59 GlitchMr ... ok, whatever
09:59 masak GlitchMr: but you can do $/<named> or $<named> on a match object in $/
09:59 masak perl6: sub isprime($n) { not '1' x $n ~~ /^ (1+) $0+ $/ }; say "$_ is{ isprime $_ ?? "" !! "not" } a prime" for 2..12
09:59 p6eval pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
09:59 p6eval ..rakudo 142c41: OUTPUT«2 isTrue a prime␤3 isTrue a prime␤4 isTrue a prime␤5 isTrue a prime␤6 isTrue a prime␤7 isTrue a prime␤8 isTrue a prime␤9 isTrue a prime␤10 isTrue a prime␤11 isTrue a prime␤12 isTrue a prime␤»
09:59 p6eval ..niecza v10-59-g5d1ba41: OUTPUT«␤Unhandled Exception: System.FormatException: Invalid format.␤  at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 ␤  at System.Double.Parse (System.String s, IFormatProvider provider) […
10:00 masak ah.
10:00 masak perl6: sub isprime($n) { not '1' x $n ~~ /^ (1+) $0+ $/ }; say "$_ is{ isprime($_) ?? "" !! "not" } a prime" for 2..12
10:00 p6eval rakudo 142c41: OUTPUT«Method 'Int' not found for invocant of class 'Any'␤  in sub infix:<x> at src/gen/CORE.setting:832␤  in sub isprime at /tmp/Gq0GO2ywc4:1␤  in block <anon> at /tmp/Gq0GO2ywc4:1␤  in block <anon> at /tmp/Gq0GO2ywc4:1␤  in method reify at src/gen/CORE.setting:4045␤  in…
10:00 p6eval ..pugs b927740: OUTPUT«pugs: Missing required parameters: $_␤»
10:00 p6eval ..niecza v10-59-g5d1ba41: OUTPUT«2 isnot a prime␤3 isnot a prime␤4 isnot a prime␤5 isnot a prime␤6 isnot a prime␤7 isnot a prime␤8 isnot a prime␤9 isnot a prime␤10 isnot a prime␤11 isnot a prime␤12 isnot a prime␤»
10:00 TiMBuS GlitchMr, you access the named param like a hash key.
10:01 GlitchMr http://glitchmr.pastebay.com/142137
10:01 masak niecza: sub isprime($n) { not '1' x $n ~~ /^ (11+) $0+ $/ }; say "$_ is{ isprime($_) ?? "" !! " not" } a prime" for 2..12
10:01 p6eval niecza v10-59-g5d1ba41: OUTPUT«2 is a prime␤3 is a prime␤4 is not a prime␤5 is a prime␤6 is not a prime␤7 is a prime␤8 is not a prime␤9 is not a prime␤10 is not a prime␤11 is a prime␤12 is not a prime␤»
10:01 GlitchMr Let's say I want to parse every got element.
10:01 masak \o/
10:02 GlitchMr To show some message on 'A', different on 'B', different on 'C'
10:02 masak rakudo: sub isprime($n) { not '1' x $n ~~ /^ (11+) $0+ $/ }; say "$_ is{ isprime($_) ?? "" !! " not" } a prime" for 2..12
10:02 p6eval rakudo 142c41: OUTPUT«Method 'Int' not found for invocant of class 'Any'␤  in sub infix:<x> at src/gen/CORE.setting:832␤  in sub isprime at /tmp/n4IoUchny7:1␤  in block <anon> at /tmp/n4IoUchny7:1␤  in block <anon> at /tmp/n4IoUchny7:1␤  in method reify at src/gen/CORE.setting:4045␤  in…
10:02 masak GlitchMr: action method?
10:02 GlitchMr Yeah
10:02 masak action method.
10:02 masak that's how you do it.
10:03 GlitchMr {say 'a'}
10:03 GlitchMr I guess...
10:03 GlitchMr or what
10:03 masak GlitchMr: see https://github.com/moritz/json/b​lob/master/lib/JSON/Tiny.pm#L52 for a good example.
10:03 masak note :actions($a)
10:04 masak and then you have an actions class like in https://github.com/moritz/json/blo​b/master/lib/JSON/Tiny/Actions.pm
10:04 masak to mirror the grammar.
10:04 masak (but yes, you can do it with { say 'a' } too, but it doesn't scale as well as action classes)
10:07 TiMBuS masak, "we keep reaching these cool milestones and then let them bitrot. anything we can do to do better on that?"
10:07 TiMBuS hows yapsi going :v
10:08 masak Yapsi isn't suffering from that, but from tuit underflow. the last release was half a year back, and it's still doing well.
10:08 masak it's nonexistent userbase is very happy with it.
10:08 TiMBuS hehe
10:08 masak gah, s/it\'s/its/
10:08 masak I spell like an American.
10:10 TiMBuS i guess what I mean is perl6 is a moving target, and developers are far and few between
10:11 masak I know.
10:11 TiMBuS even worse is the abstraction at the moment. calling nqp from rakudo to call pir modules to call c code
10:12 masak we're slowly getting the abstractions we need, though.
10:12 masak I just thought that we do tests well, and maybe we could borrow something from that to make sure we do cool use cases well, too.
10:12 tadzik masak: re 'letting milestones go', I have plans to seriously get back to the emmentaller idea, even to the extent to reporting here, on this channel, 'revision aq21sj1 broke Some::Module (4 tests failed)'
10:13 masak \o/
10:13 masak that's an awesome idea.
10:13 TiMBuS sounds cool
10:13 tadzik as most of the ideas :) Well done is harder than Well said
10:14 masak is it feasible yet to write Perl 6 IRC bots?
10:14 masak if it is, we should devote some time to give that a really nice base that people can start from.
10:14 tadzik sure
10:14 TiMBuS hi
10:14 tadzik having .poll :)
10:14 masak \o/
10:14 masak let's make a module.
10:14 drbean joined #perl6
10:15 tadzik I thought about writing something like an event loop
10:15 masak yeah.
10:15 tadzik there's sun behind the window, maybe it's a good excuse to get outside and hack a bit
10:15 masak there's been an AOP-like idea floating around for IRC bots.
10:15 TiMBuS hi im good at irc bot writing
10:15 masak TiMBuS: yay!
10:15 TiMBuS github.com/TiMBuS/Net--IRC
10:15 * masak looks
10:16 masak looks really nice!
10:16 TiMBuS i need to add 'admin' controls so you can load/unload modules on the fly with eval. thats about all i need to add
10:16 tadzik and once again I'm hell disappointed with my university :/
10:16 masak TiMBuS++
10:17 tadzik I've finished 'event-driven programming' course, and I have no idea how to write an event loop
10:17 tadzik I know how to write battleship in Java, OTOH
10:17 tadzik they could consider naming classes realistically
10:17 masak :/
10:17 tadzik see also: having the highest possible grade for 'object-oriented programming' and not knowing what LSP is
10:18 masak tadzik: that's fine though, no-one knows what OO is... :P
10:18 tadzik but I know the order in which destructors in seeples fire up
10:18 tadzik or I did know
10:19 tadzik masak: yeah, but I'd expect to be able to talk to people about basic OO concepts, as I understand it
10:19 masak tadzik: LSP is easy to understand; it's just that it's easy to break, too.
10:20 masak tadzik: the real answer is "try not to inherit so much".
10:21 masak tadzik: I've been teaching SOLID a few times now. I've come to realize that one some level they all say the same thing: "use roles/interfaces".
10:21 tadzik :)
10:22 masak s/one/on/
10:22 tadzik the conclusion me/classmates could get from those OO classes would be something like 'OO is about inheritance, which is about code reuse'
10:22 masak well, yeah.
10:23 masak but that's the place SOLID takes off from, really.
10:23 masak SOLID starts at "ah, I see you're using classes and inheritance -- and it still hurts? well..."
10:24 tadzik ;)
10:24 TiMBuS what the heck. 'acted'? what a bad event name. what was i thinking
10:25 tadzik I remember this Dependency Injection workshop in Warsaw a while ago, one of the participant said, during some active discussion 'but every pre-school child knows what SOLID is!'. That was the 'ha-ha' moment for us, second-year students
10:25 masak :)
10:25 GlitchMr or what
10:26 GlitchMr ...
10:26 GlitchMr random paste
10:26 GlitchMr lol
10:26 tadzik happens to me all the time
10:26 tadzik I wonder when I'll share something I don't want to
10:26 masak tadzik: Moukeddar++ used to come in here, excited about some letter or other in SOLID. I told him "slow down, they're just guidelines" :)
10:26 tadzik oh, where is he by the way?
10:26 tadzik phenny: seen Moukeddar
10:26 masak good question. maybe he has school.
10:27 tadzik phenny: seen Moukeddar?
10:27 tadzik meh
10:27 masak seen Moukedda?
10:27 aloha Sorry, I haven't seen Moukedda.
10:27 masak seen Moukeddar?
10:27 aloha Moukeddar was last seen in #perl6 12 days 13 hours ago joining the channel.
10:27 tadzik oh, that's aloha
10:27 * colomon has no idea what SOLID is...
10:27 tadzik we need a metabot, dispatching events
10:27 masak colomon: it's five OO principles made up by Uncle Bob.
10:28 masak colomon: they each give a clue to how to factor things into smaller, more independent pieces.
10:29 masak colomon: if you follow them, you end up with many cute extensible interfaces that each do one thing, without circular dependencies.
10:29 masak S - single responsibility principle - "don't put too much crap in your class"
10:30 masak O - open/closed principle - "make interfaces of the things you think will change"
10:30 colomon well, I'm a firm believer in LSP, anyway
10:30 masak L - Liskov substitution principle - "it shouldn't *matter* whether it's a subclass"
10:30 masak I - interface consistency principle - "don't put too much crap in your interface"
10:31 masak D - dependency inversion principle - "the observer patter rocks. know it."
10:31 masak pattern*
10:34 colomon I fear I'm in violent disagreement with OCP, based on a quick reading of it.
10:34 masak I think OCP is the odd one out in that bunch.
10:35 masak it sort of stands in opposition to YAGNI, too.
10:35 colomon yeah, that was part of my reasoning.  :)
10:35 masak :)
10:36 masak it feels like OCP is something you'd employ if you've done an implementation for the domain 50 times already, and know which paths you'll be going down.
10:36 colomon (though I had forgotten the YAGNI acronym, the principle is strong in my coding DNA)
10:37 masak mine too.
10:37 masak or rather, I like to spike and prototype. I like small and simple.
10:38 colomon I can't say I'm in love with SRP, either. To be more precise, I see places where it's a good idea and places where it's a bad idea.
10:40 masak these rules all sit on top of "forces" applying to your problem. if the forces are different enough, the rules don't hold.
10:40 colomon Or perhaps I mostly agree with "Don't put too much crap in your class", but can't agree with "every object should have a single responsbility"
10:40 masak it's a bit hard to pin down "responsibility" sometimes.
10:40 masak Uncle Bob defines it as "reason to change".
10:41 colomon which is what I disagree with.  :)
10:41 masak nodnod
10:45 tadzik there was an abandoned event loop project in Perl 6, wasn't there?
10:45 colomon tadzik: sounds vaguely familiar
10:45 masak rakudo: class Net::IRC::Parser { grammar RawEvent {} }; class Net::IRC::Bot { method foo { RawEvent.parse("OH HAI") } }; Net::IRC::Bot.new.foo
10:46 p6eval rakudo 142c41: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&RawEvent' called (line 1)␤»
10:46 masak TiMBuS: how can the above work in your code?
10:46 masak TiMBuS: that's what I see when reading it.
10:46 drbean joined #perl6
10:48 TiMBuS is that what you want, or,
10:48 masak it's the structure I see in your module.
10:49 TiMBuS maybe I'm missing something here
10:49 masak does your IRC bot code run?
10:49 masak if so, it should run into the above issue.
10:49 TiMBuS i did in alpha and b
10:50 masak ah.
10:50 TiMBuS it*
10:50 masak well, then all bets are off :P
10:50 TiMBuS moving target, etcetc
10:50 TiMBuS but what's the problem there. i can fix it
10:50 * masak goes back to S11 to read about the namespace rules
10:52 TiMBuS oh. i see
10:52 TiMBuS well, how to export the grammar
10:53 masak 'is export', I guess.
10:54 masak I think your grammar is currently available under the name Net::IRC::Parser::RawEvent
10:54 TiMBuS i would hope so
10:54 masak rakudo: class Net::IRC::Parser { grammar RawEvent {} }; class Net::IRC::Bot { method foo { Net::IRC::Parser::RawEvent.parse("OH HAI") } }; Net::IRC::Bot.new.foo
10:54 p6eval rakudo 142c41: OUTPUT«Method 'TOP' not found for invocant of class 'RawEvent'␤  in method parse at src/gen/CORE.setting:6582␤  in method foo at /tmp/Sq_qP2XkhX:1␤  in block <anon> at /tmp/Sq_qP2XkhX:1␤  in <anon> at /tmp/Sq_qP2XkhX:1␤»
10:54 masak yep :)
10:54 TiMBuS cam io pur fpfpbpt typing with fingerless gloves
10:55 TiMBuS can i put it in a module instead of a class
10:55 masak sure.
10:56 tadzik perl6: time.perl.say
10:56 p6eval niecza v10-59-g5d1ba41: OUTPUT«1319281002.08147␤»
10:56 p6eval ..pugs b927740: OUTPUT«372596198172009/1000000␤»
10:56 p6eval ..rakudo 142c41: OUTPUT«1319280999␤»
10:57 tadzik time's supposed to be Int, si?
10:57 TiMBuS nope, cant 'is export' my grammar
10:57 TiMBuS arg
10:58 masak not sure time's s'posed to be Int.
10:58 masak jnthn or pmichaud will know more about the current state of 'is export'. or moritz.
10:59 TiMBuS $line := $line.substr($index+1);
10:59 TiMBuS not allowed anymore?
10:59 TiMBuS :<
11:00 colomon TiMBuS: probably NYI rather than "not allowed", but still :x
11:03 TiMBuS can't help myself. avoid copying data in tight loops
11:06 bbkr joined #perl6
11:07 masak certainly allowed still.
11:07 TiMBuS okay i fixed the bots
11:07 masak but I'm not sure you'll get away any cheaper with binding than with assignment there.
11:07 TiMBuS probably not, no
11:09 masak I mean, that would require some semantics that said "if you bind to a .substr, you actually bind into part of the original string"
11:10 drbean joined #perl6
11:13 TiMBuS Cannot use negative index -1 on List
11:13 TiMBuS >:[
11:13 TiMBuS mad about nom
11:14 masak it's *-1
11:14 TiMBuS :what(~$raw<params>[*-1]),
11:14 masak since about 2006, I think.
11:15 masak TiMBuS: but yeah, nom is recovering too slowly to b's levels.
11:15 masak nom: say Any.^methods.grep(/dispatch/)
11:15 p6eval nom 142c41: OUTPUT«dispatch:<var> dispatch:<::> dispatch:<!> dispatch:<.^> dispatch:<.=> dispatch:<.?> dispatch:<.+> dispatch:<.*> dispatch:<hyper>␤»
11:15 masak ooh
11:16 worr joined #perl6
11:20 masak nom: class A { method foo { say "A" } }; class B is A { method foo { say "B" } }; B.new.*foo
11:20 p6eval nom 142c41: OUTPUT«B␤A␤»
11:21 wk joined #perl6
11:21 tadzik Use of uninitialized value in numeric context could tell the line number
11:21 Mowah_ joined #perl6
11:21 masak phenny: ask jnthn if I read dispatch:<.*> correctly, callsame/nextsame has nothing whatsoever to do with .* dispatch. is that right?
11:21 phenny masak: I'll pass that on when jnthn is around.
11:23 TiMBuS ok well i fixed it
11:24 masak TiMBuS++
11:24 TiMBuS huge issue tho: params passed to new are overridden by defaults
11:26 TiMBuS nom: class a { has $.b = "fallback"; }; my $a = a.new(b => "real value"); say $a.b;
11:26 p6eval nom 142c41: OUTPUT«real value␤»
11:26 TiMBuS thats confusing
11:26 JimmyZ joined #perl6
11:26 TiMBuS nom: class a { has $b = "fallback"; }; my $a = a.new(b => "real value"); say $a!b;
11:26 p6eval nom 142c41: OUTPUT«===SORRY!===␤Private method call to 'b' must be fully qualified with the package containing the method at line 1, near ";"␤»
11:27 TiMBuS eye sea
11:28 TiMBuS nom: class a { has $b = "fallback"; method sayb {say $b}; }; my $a = a.new(b => "real value"); $a.sayb;
11:28 p6eval nom 142c41: OUTPUT«fallback␤»
11:29 satyavvd joined #perl6
11:36 Trashlord joined #perl6
11:37 tadzik nom: my @a = 1, 2, 3, 4; @a.=grep: { $_ > 2 };
11:37 p6eval nom 142c41: OUTPUT«splice() not implemented in class 'Mu'␤  in method reify at src/gen/CORE.setting:3952␤  in method gimme at src/gen/CORE.setting:4313␤  in method eager at src/gen/CORE.setting:4288␤  in method STORE at src/gen/CORE.setting:4707␤  in method dispatch:<.=> at src/gen/CORE…
11:37 tadzik nom: my @a = 1, 2, 3, 4; @a = @a.grep: { $_ > 2 };
11:37 p6eval nom 142c41: OUTPUT«splice() not implemented in class 'Mu'␤  in method reify at src/gen/CORE.setting:3952␤  in method gimme at src/gen/CORE.setting:4313␤  in method eager at src/gen/CORE.setting:4288␤  in method STORE at src/gen/CORE.setting:4707␤  in block <anon> at /tmp/FjwszYClkh:1␤  …
11:37 tadzik nom: my @a = 1, 2, 3, 4; @a.grep({ $_ > 2 }).perl.say;
11:37 p6eval nom 142c41: OUTPUT«(3, 4).list␤»
11:37 tadzik why, rakudo?
11:38 Psyche^ joined #perl6
11:41 replore joined #perl6
11:41 masak feels like it could have parsing causes.
11:41 masak I know I've seen that one before.
11:42 mj41 joined #perl6
11:42 mj41_nb joined #perl6
11:43 tadzik modeled after AnyEvent, sort of: https://gist.github.com/1305904
11:44 satyavvd joined #perl6
11:53 im2ee joined #perl6
11:54 im2ee Hello! :)
11:55 tadzik hello im2ee
12:08 masak hi2ee :)
12:11 Trashlord joined #perl6
12:13 whiteknight joined #perl6
12:16 tadzik TiMBuS: does that look useful to you? https://gist.github.com/1305904
12:16 tadzik it handles multiple clients connecting and disconnecting pretty nicely, it seems
12:19 tadzik https://github.com/tadzik/MuEvent for the interested
12:23 masak oh, it's actually implemented? woot!
12:23 masak tadzik++
12:23 im2ee nom: say <a b c>.elems;
12:23 p6eval nom 142c41: OUTPUT«3␤»
12:23 im2ee nom: say <a b c>;
12:23 p6eval nom 142c41: OUTPUT«a b c␤»
12:23 im2ee nom: say <a b c>.chars;
12:23 p6eval nom 142c41: OUTPUT«5␤»
12:24 tadzik masak: more of a proof of concept, but yeah :)
12:25 masak nom: say <a b c>.keys
12:25 p6eval nom 142c41: OUTPUT«0 1 2␤»
12:25 masak nom: say <a b c>.values
12:25 p6eval nom 142c41: OUTPUT«a b c␤»
12:25 masak nom: say <a b c>.pairs
12:25 p6eval nom 142c41: OUTPUT«0    a 1     b 2     c␤»
12:25 im2ee so. <a b c> == <a b c>.values? :)
12:26 masak nom: say <a b c>.pairs.fmt("The %s bone's connected to the -- %s bone")
12:26 p6eval nom 142c41: OUTPUT«The 0 bone's connected to the -- a bone The 1 bone's connected to the -- b bone The 2 bone's connected to the -- c bone␤»
12:26 masak im2ee: yes.
12:26 tadzik nom: say <a b c>.values.values.values.values
12:26 p6eval nom 142c41: OUTPUT«a b c␤»
12:26 tadzik seems so
12:26 masak nom: use MONKEY_PATCHING; augment class List { method pie { self.values } }; say <a b c>.pie.pie.pie.pie.pie
12:26 p6eval nom 142c41: OUTPUT«===SORRY!===␤Could not find MONKEY_PATCHING in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/nom-inst2/lib/parrot​/3.9.0-devel/languages/perl6/lib, .␤»
12:26 im2ee nom: sub lol(@r is rw) { say @r }; my @tab; lol(@tab);
12:27 p6eval nom 142c41: OUTPUT«␤»
12:27 masak nom: use MONKEY_TYPING; augment class List { method pie { self.values } }; say <a b c>.pie.pie.pie.pie.pie
12:27 p6eval nom 142c41: OUTPUT«Method 'pie' not found for invocant of class 'Parcel'␤  in block <anon> at /tmp/Se8NYCgASx:1␤  in <anon> at /tmp/Se8NYCgASx:1␤»
12:27 masak nom: use MONKEY_TYPING; augment class Parcel { method pie { self.values } }; say <a b c>.pie.pie.pie.pie.pie
12:27 p6eval nom 142c41: OUTPUT«Method 'pie' not found for invocant of class 'List'␤  in block <anon> at /tmp/4CnkDOpssa:1␤  in <anon> at /tmp/4CnkDOpssa:1␤»
12:27 masak aurgh :)
12:27 masak nom: use MONKEY_TYPING; augment class Any { method pie { self.values } }; say <a b c>.pie.pie.pie.pie.pie
12:27 p6eval nom 142c41: OUTPUT«a b c␤»
12:27 masak \o/
12:27 im2ee nom: sub lol(@r is rw) { say @r }; my @tab; lol('a');
12:27 p6eval nom 142c41: OUTPUT«Nominal type check failed for parameter '@r'; expected Positional but got Str instead␤  in sub lol at /tmp/cftlMbV8RP:1␤  in block <anon> at /tmp/cftlMbV8RP:1␤  in <anon> at /tmp/cftlMbV8RP:1␤»
12:27 im2ee nom: sub lol(@r is rw) { say @r }; my @tab; lol('a', 'b');
12:27 p6eval nom 142c41: OUTPUT«Nominal type check failed for parameter '@r'; expected Positional but got Str instead␤  in sub lol at /tmp/XcMHZDBhre:1␤  in block <anon> at /tmp/XcMHZDBhre:1␤  in <anon> at /tmp/XcMHZDBhre:1␤»
12:27 im2ee nom: sub lol(@r is rw) { say @r }; my @tab; lol(['a', 'b']);
12:27 masak im2ee: you're not passing in Positionals.
12:27 p6eval nom 142c41: OUTPUT«a b␤»
12:28 masak there we go.
12:29 im2ee I have a problem:
12:29 im2ee (...)
12:29 im2ee has @!connections is rw;
12:29 im2ee (...)
12:29 donri joined #perl6
12:29 im2ee self!check(@!connections);
12:30 im2ee (...)
12:30 im2ee method !check(@readers is rw) {
12:30 im2ee (...)
12:30 im2ee got:
12:30 im2ee Not enough positional parameters passed; got 1 but expected 2
12:30 tadzik nom: use MONKEY_TYPING; augment class Any { method nyan { self.values } }; say <a b c>.nyan.nyan.nyan.nyan.nyan.nyan.nyan
12:30 p6eval nom 142c41: OUTPUT«a b c␤»
12:31 GlitchMr joined #perl6
12:37 masak nom: class A { has @!c is rw; method foo { self!bar(@!c) }; method !bar(@r is rw) { say "OH HAI" } }; A.new.foo
12:37 p6eval nom 142c41: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method bar at /tmp/5N67J4NTFy:1␤  in method dispatch:<!> at src/gen/CORE.setting:710␤  in method foo at /tmp/5N67J4NTFy:1␤  in block <anon> at /tmp/5N67J4NTFy:1␤  in <anon> at /tmp/5N67J4NTFy:1␤»…
12:37 masak im2ee: confirmed.
12:37 masak im2ee: I think that's a bug.
12:37 masak anyone agree/disagree?
12:38 im2ee It can be my first rakudobug which i found. :)
12:39 tadzik it does look wrongy, at the first glance
12:40 * masak submits rakudobug
12:41 im2ee :)
12:47 preflex_ joined #perl6
12:55 donri joined #perl6
12:55 Chillance joined #perl6
12:57 donri joined #perl6
13:06 tokuhiro_ joined #perl6
13:08 cognominal_ joined #perl6
13:21 masak nom: class A { method foo { self!bar() }; method !bar() { say "OH HAI" } }; A.new.foo
13:21 p6eval nom 142c41: OUTPUT«OH HAI␤»
13:21 masak nom: class A { method foo { self!bar(42) }; method !bar($a) { say "OH HAI $a" } }; A.new.foo
13:21 p6eval nom 142c41: OUTPUT«OH HAI 42␤»
13:21 masak nom: class A { method foo { self!bar([1,2,3]) }; method !bar(@a) { say "OH HAI $a" } }; A.new.foo
13:21 p6eval nom 142c41: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in bar (/tmp/2qAocdBWcB:1)␤»
13:21 masak nom: class A { method foo { self!bar([1,2,3]) }; method !bar(@a) { say "OH HAI @a" } }; A.new.foo
13:22 p6eval nom 142c41: OUTPUT«OH HAI @a␤»
13:22 masak nom: class A { method foo { self!bar([1,2,3]) }; method !bar(@a) { say "OH HAI @a[]" } }; A.new.foo
13:22 p6eval nom 142c41: OUTPUT«OH HAI 1 2 3␤»
13:22 masak nom: class A { method foo { self!bar([1,2,3]) }; method !bar(@a is rw) { say "OH HAI @a[]" } }; A.new.foo
13:22 p6eval nom 142c41: OUTPUT«OH HAI 1 2 3␤»
13:22 masak nom: class A { has @.x; method foo { self!bar(@.x) }; method !bar(@a is rw) { say "OH HAI @a[]" } }; A.new.foo
13:22 p6eval nom 142c41: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method bar at /tmp/9xXRjYSVwL:1␤  in method dispatch:<!> at src/gen/CORE.setting:710␤  in method foo at /tmp/9xXRjYSVwL:1␤  in block <anon> at /tmp/9xXRjYSVwL:1␤  in <anon> at /tmp/9xXRjYSVwL:1␤»…
13:22 masak nom: class A { has @.x; method foo { self!bar(@.x) }; method !bar(@a) { say "OH HAI @a[]" } }; A.new.foo
13:22 p6eval nom 142c41: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method bar at /tmp/tLNX3EJDv8:1␤  in method dispatch:<!> at src/gen/CORE.setting:710␤  in method foo at /tmp/tLNX3EJDv8:1␤  in block <anon> at /tmp/tLNX3EJDv8:1␤  in <anon> at /tmp/tLNX3EJDv8:1␤»…
13:23 masak nom: class A { has @.x; method foo { self!bar(@!x) }; method !bar(@a) { say "OH HAI @a[]" } }; A.new.foo
13:23 p6eval nom 142c41: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method bar at /tmp/m1xZa7zbJN:1␤  in method dispatch:<!> at src/gen/CORE.setting:710␤  in method foo at /tmp/m1xZa7zbJN:1␤  in block <anon> at /tmp/m1xZa7zbJN:1␤  in <anon> at /tmp/m1xZa7zbJN:1␤»…
13:29 drbean joined #perl6
13:34 Trashlord joined #perl6
13:35 abercrombie joined #perl6
13:40 satyavvd joined #perl6
13:46 Trashlord joined #perl6
13:55 masak nom: role A {}; role B {}; role C is A is B {}; class D does A {}; class E does C {}; multi foo(A) { say "A" }; multi foo(C) { say "C" }; foo(A.new); foo(C.new)
13:55 p6eval nom 142c41: OUTPUT«A␤Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(A)␤:(C)␤␤  in block <anon> at /tmp/rY52A3MXJN:1␤  in <anon> at /tmp/rY52A3MXJN:1␤»
13:55 mj41 joined #perl6
13:55 mj41_nb joined #perl6
13:55 masak nom: role A {}; role B {}; role C is A is B {}; class D does A {}; class E does C {}; multi foo(A) { say "A" }; multi foo(C) { say "C" }; foo(D.new); foo(E.new)
13:55 p6eval nom 142c41: OUTPUT«A␤Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(A)␤:(C)␤␤  in block <anon> at /tmp/CK7_0b2BQH:1␤  in <anon> at /tmp/CK7_0b2BQH:1␤»
14:01 GlitchMr42 joined #perl6
14:03 djanatyn joined #perl6
14:05 Trashlord joined #perl6
14:11 thou joined #perl6
14:14 SHODAN joined #perl6
14:15 TiMBuS tadzik, sorry i was afk
14:15 TiMBuS that's not bad
14:17 TiMBuS i mean, the module i wrote already does its own dispatching and the like, so I'm not sure how to hook it all up on my end..
14:18 TiMBuS but thats more my problem
14:19 TiMBuS you should also be calling socket-cb with $l as the param
14:19 tadzik I thought about that, is that how anyevent does that?
14:19 TiMBuS none of that global stuff. no sir.
14:19 tadzik yeah, I imagine
14:20 dalek niecza/serialize: c8e7307 | sorear++ | src/ (2 files):
14:20 dalek niecza/serialize: $?FILE and $?ORIG are ordinary pseudohints now
14:20 dalek niecza/serialize: review: https://github.com/sorear/niecza/commit/c8e7307aca
14:20 tadzik I'm looking at AE::Handle now, it would seem that it does .recv on its own too
14:20 TiMBuS yep
14:20 TiMBuS well ae is different to anyevent
14:20 tadzik oh, right
14:21 TiMBuS also all event connectors should take extra params
14:21 TiMBuS to pass to the sub when called
14:22 TiMBuS then its pretty much perfect
14:22 tadzik okay
14:23 TiMBuS then just figure out how to get it all workign with cooperative threads and added as a core module :P
14:24 tadzik :)
14:24 tadzik hm, we want that as a core module?>
14:24 sorear \o/ no more "Bad plan"
14:24 tadzik . o O ( which core? )
14:24 tadzik sorear: \o/
14:24 tadzik sorear: testing desired?
14:25 TiMBuS a core event loop would be fantastic imo
14:25 TiMBuS you could almost integrate it with the mmd stuff
14:26 sorear tadzik: if you want to start early, go ahead, but there are still known missing features, 7 fails in the coretests, and I haven't even started spectests
14:27 sorear huh, 6 of the remaining corefails are due to True.perl returning "True".  no clue how *that* broke
14:29 Trashlord joined #perl6
14:30 abercrombie regex between niecza and rakduo are different?
14:31 TiMBuS probably
14:32 tadzik TiMBuS: changes pushed, the params thing
14:32 TiMBuS rad
14:32 TiMBuS i should rewrite my irc framework probably. maybe.
14:33 TiMBuS i did like having it modular
14:33 abercrombie rakudo: my $str = '<div class="hemin">  <pre>aaaaaa</pre> </div>'; if $str ~~ /('<div class="hemin">'.*)'<pre>'.*'</pre>'(.*)/ { say "yes" }
14:33 p6eval rakudo 142c41:  ( no output )
14:33 tadzik I should write some tests, probably
14:33 abercrombie niecza: my $str = '<div class="hemin">  <pre>aaaaaa</pre> </div>'; if $str ~~ /('<div class="hemin">'.*)'<pre>'.*'</pre>'(.*)/ { say "yes" }
14:33 p6eval niecza v10-59-g5d1ba41: OUTPUT«yes␤»
14:33 daniel-s joined #perl6
14:34 TiMBuS the problem with most event frameworks is, no one wants to hook up the functions. so they do it by function name
14:34 TiMBuS which is why i fell back to just using class methods which you can already call by name
14:34 abercrombie same string, same pattern, different results.
14:35 TiMBuS abercrombie, doesn't surprise me
14:35 masak TiMBuS: is there an "example bot" that I missed in your project repository?
14:35 TiMBuS not sure if its in the repo
14:36 TiMBuS is freenodebot.pl in there?
14:37 TiMBuS the examples are actually the Modules folder
14:39 TiMBuS since you are supposed to make your own modules..
14:41 wk joined #perl6
14:43 TiMBuS masak, do default initializers work correctly in nom now? or is it a bug how it currently works?
14:44 TiMBuS referring to this:
14:44 TiMBuS nom: class a { has $b = "fallback"; method sayb {say $b}; }; my $a = a.new(b => "real value"); $a.sayb;
14:44 p6eval nom 142c41: OUTPUT«fallback␤»
14:46 drbean joined #perl6
14:48 TiMBuS nom: my @a = (); say @a[1];
14:48 p6eval nom 142c41: OUTPUT«Any()␤»
14:48 TiMBuS nom: my @a = (); say @a[*+1];
14:48 p6eval nom 142c41: OUTPUT«Any()␤»
14:48 TiMBuS nom: my @a = (); say @a[*-1];
14:48 p6eval nom 142c41: OUTPUT«Failure.new()␤»
14:49 TiMBuS probably an easy fix
14:50 Trashlord joined #perl6
14:56 MayDaniel joined #perl6
14:56 abercrombie nom: class a { has $!b = "fallback"; method sayb {say $!b}; }; my $a = a.new(b => "real value"); $a.sayb;
14:56 p6eval nom 142c41: OUTPUT«fallback␤»
14:57 abercrombie nom: class a { has $.b = "fallback"; method sayb {say $.b}; }; my $a = a.new(b => "real value"); $a.sayb;
14:57 p6eval nom 142c41: OUTPUT«real value␤»
14:59 TiMBuS surely you can set values in a class on construction that are only to be used internally later
15:00 Trashlord joined #perl6
15:02 Woodi Hi, found nice song for Perl6 :) http://www.youtube.com/watch?v=Nr8x78rwkCo
15:03 tadzik oh you :)
15:06 abercrombie nom: class a { has $.b is rw = "fallback"; };  my $a = a.new(b => "real value"); say $a.b; $a.b="another"; say $a.b
15:06 p6eval nom 142c41: OUTPUT«real value␤another␤»
15:13 shinobicl_ joined #perl6
15:15 Trashlord joined #perl6
15:20 TimToady sorear: re http://irclog.perlgeek.de/​perl6/2011-10-22#i_4599626, GLOBALish is supposed to be a lexical in UNIT before unification; consequently, if UNIT is thread-local, GLOBALish would be too
15:24 masonkramer joined #perl6
15:28 soh_cah_toa joined #perl6
15:30 Trashlord joined #perl6
15:33 tadzik masak: btw, how did S26 patches review go?
15:36 tadzik huh. #= is broken for 'our sub' for some reason
15:37 wolfman2000 joined #perl6
15:38 TimToady re http://irclog.perlgeek.de/​perl6/2011-10-22#i_4599801, see S04:597, S04:637 and S04:692
15:38 TimToady masak: ^^
15:38 TimToady perl6: { say $_ } for 1..5
15:39 p6eval rakudo 142c41: OUTPUT«1␤2␤3␤4␤5␤»
15:39 p6eval ..pugs b927740, niecza v10-59-g5d1ba41:  ( no output )
15:39 TimToady perl6: { say 'hi' } for 1..5
15:39 p6eval pugs b927740, niecza v10-59-g5d1ba41:  ( no output )
15:39 p6eval ..rakudo 142c41: OUTPUT«hi␤hi␤hi␤hi␤hi␤»
15:39 TimToady rakudo: { say $_ } if $_ for 1..5
15:39 p6eval rakudo 142c41:  ( no output )
15:40 TimToady rakudo gets that one wrong though
15:46 Trashlord joined #perl6
15:48 AntiGov joined #perl6
15:49 AntiGov hello all
15:49 soh_cah_toa AntiGov: howdy
15:50 AntiGov im cool soh . thankx and you
15:50 soh_cah_toa not bad :)
15:51 AntiGov Thats cool
15:51 AntiGov Is there anyone can help me
15:51 AntiGov to complete my botirc
15:52 soh_cah_toa i can do my best ;)
15:52 soh_cah_toa what're you having problems w/?
15:52 AntiGov yes
15:52 AntiGov give me
15:52 AntiGov a sec
15:52 AntiGov plz
15:52 soh_cah_toa sure
15:54 Trashlord joined #perl6
15:56 properly joined #perl6
15:57 mj41 joined #perl6
15:58 c9s joined #perl6
16:00 AntiGov back
16:00 AntiGov u still here soh_cah
16:00 soh_cah_toa yeah
16:00 AntiGov ok
16:00 AntiGov i made a project
16:00 AntiGov and all was good
16:01 AntiGov only one problem
16:01 AntiGov the bot work fine
16:01 AntiGov but when he try to register on website and bring me result
16:02 AntiGov to #channel
16:02 tadzik are you sure you're using Perl 6 and not Perl 5?
16:02 AntiGov let me check again
16:03 AntiGov perl v5.10.1
16:03 soh_cah_toa ah :)
16:03 flussence wow... that's ancient even by p5 standards.
16:03 AntiGov how to update it ?
16:03 tadzik AntiGov: Perl 6 is not "a newer Perl 5", it
16:03 flussence just use your package manager
16:03 tadzik 's a completely different language
16:03 soh_cah_toa yeah
16:04 soh_cah_toa tadzik: indeed
16:04 tadzik you probably want to ask for help on a Perl 5 channel, as #perl-help on irc.perl.org
16:04 TimToady TiMBuS: see S12:882 about initializing private attributes
16:04 AntiGov ok guys
16:04 AntiGov thankx alot
16:04 soh_cah_toa no problem :)
16:05 AntiGov i appericite
16:05 Guest41469 joined #perl6
16:06 tadzik good luck :)
16:06 dalek rakudo/nom: f3849a6 | tadzik++ | / (3 files):
16:06 dalek rakudo/nom: Fix Sub documentation when using 'our sub'
16:06 dalek rakudo/nom:
16:06 dalek rakudo/nom: Reset $*DECLARATOR_DOCS as late as possible, when we're sure it was
16:06 dalek rakudo/nom: used, so it's not accidentally cleaned if we backtrack too much.
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3849a6d44
16:08 TimToady we need a better mechanism than *%_ binding to deal with unwanted named parameters, so we can get a good warning when nobody in the dispatch wants a given named parameter
16:13 mj41_nb joined #perl6
16:17 colomon +1
16:20 benabik joined #perl6
16:26 wk joined #perl6
16:30 Trashlord joined #perl6
16:32 benabik joined #perl6
16:48 benabik joined #perl6
17:11 drbean joined #perl6
17:24 im2ee joined #perl6
17:27 uasi joined #perl6
17:42 bluescreen10 joined #perl6
18:23 * moritz peeks in
18:24 mj41 joined #perl6
18:24 mj41_nb joined #perl6
18:29 moritz http://perlcabal.org/syn/ is now up again
18:34 dalek rakudo/nom: 424d2dd | moritz++ | src/core/ (2 files):
18:34 dalek rakudo/nom: better .gist for Method and Submethod
18:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/424d2dddf4
19:07 mj41 joined #perl6
19:08 im2ee joined #perl6
19:08 masak TimToady: oh! that's kinda nice, actually.
19:09 masak TiMBuS: haven't backlogged fully, but what you tried to initialize was a private attr, and only public attrs can be initialized.
19:09 masak tadzik: haven't gotten to the S26 patch review yet. I can do it right now, though.
19:23 mj41_nb joined #perl6
19:24 Sarten-X joined #perl6
19:32 masak tadzik: at http://irclog.perlgeek.de/​perl6/2011-10-21#i_4597092 you talked about not liking C< $| >. did you mean C< #| >?
19:33 masak ok, this is just 390 lines of diff. I think I can de-tangle it into a small number of atomic commits.
19:37 masak I think it should be spelled 'bracketed', not 'bracketted', no?
19:37 masak the former looks wrong to my non-native eye.
19:38 soh_cah_toa masak: bracketed is how it's spelled
19:38 cyfi joined #perl6
19:40 masak thanks. changing it before applying the patch, then. :)
19:41 masak I see four commits in there: introduction of #|, nice diagram of .WHY/.WHEREFORE, de-capitalization of $=POD to $=pod, rename of =END to =finish.
19:41 TimToady general rule is that unstressed syllables don't double, since they're just a schwa sound, not subject to "lengthening"
19:42 masak ah, nice.
19:42 masak "ya can't schwaaaa the schwa"
19:43 masak oh, and =DATA changed to =data
19:43 masak but I'll consider that part of the fourth change.
19:46 Moukeddar joined #perl6
19:46 masak Moukeddar! \o/
19:47 Moukeddar Hi Sir!
19:48 Moukeddar how are you doing ?
19:48 masak good. we were talking about you (and the SOLID principles) today!
19:48 masak how are you?
19:49 * masak briefly ponders putting Damian Conway's name on the commits, which is apparently possible, but decides against and just marks up the commit messages instead
19:50 alester joined #perl6
19:51 colomon does anyone remember where the tests for single (or no) argument usage of the infix operators live?
20:03 dalek specs: d5614d9 | masak++ | S26-documentation.pod:
20:03 dalek specs: [S26] fixed blatant p5ism
20:03 dalek specs:
20:03 dalek specs: Commit prepared by Damian Conway.
20:03 dalek specs: review: https://github.com/perl6/specs/commit/d5614d9db7
20:03 masak ok, here goes.
20:04 masak oh, I killd dalek :(
20:04 masak anyway, there's three more commits after that one.
20:04 dalek joined #perl6
20:04 masak dalek: sorry :/
20:05 masak tadzik: patch review completed. thanks for the encouragement.
20:08 tadzik masak: oh, I meant #|, yeah
20:08 cognominal_ if we remove all the fossils, some creationists will say that Perl 6 was created in one day.
20:08 masak cognominal_: *lol*
20:09 masak tadzik: you may like it or not like it -- now it's da law ;)
20:09 masak tadzik: I must confess to being seriously biased towards #| rather than some more-or-less brittle heuristic.
20:10 tadzik fair enough
20:10 masak anyway, the point of dividing up the patch into four commits is so that we can vet, reason about, and ultimately perhaps revert the ideas on an individual basis.
20:14 colomon masak++
20:14 colomon and +1, too
20:16 cyfi joined #perl6
20:17 Moukeddar oh crap, i forgot about this window
20:17 Moukeddar so sorry
20:18 Moukeddar i demonstrated SOLID in front of the whole class few days ago
20:18 tadzik nice
20:19 Moukeddar it was like explaining astrophysics to kindergarten :p
20:21 masak Moukeddar: you often say that about your fellow programmers :)
20:21 masak Moukeddar: you shouldn't be so sad about this -- it's good news for you, because it means you know stuff they need to learn.
20:21 Moukeddar i know, it's their reactions that's frustrating
20:22 masak what's their reaction?
20:22 Moukeddar they don't get
20:22 Moukeddar and the teacher told me : "why bother with all this?"
20:23 Moukeddar i was shocked
20:24 masak Moukeddar: I once did a half hour presentation on regexes for my department. professor asked in the end "why learn all this? it looks like a funny little language with few practical applications."
20:24 masak I was shocked, but mostly amused because I had used regexes for so much myself.
20:24 Moukeddar lol
20:25 Moukeddar i'm not saying i'm a SOLID Master, but i did my best
20:25 masak I said "there are many situations out there which can be solved with regexes. *not* knowing about them in that situation probably means you'll be re-inventing them, badly"
20:25 Moukeddar true
20:26 masak now, I'm not saying it's exactly the same with SOLID, but I think it is at least somewhat the same.
20:26 Moukeddar and my current problem is :the course is exhausting it leaves me no time to progress on my own in other stuff like TDD or DDD
20:27 Moukeddar it's pretty much the same situation :D
20:27 masak funnily enough, next month I'll be giving a talk about how using regexes too much can take you down the wrong path, and fast :P
20:28 Moukeddar it is like this huge hole in the engine room situation?
20:28 Moukeddar lol
20:28 masak I'm not familiar with that situation. :)
20:28 cognominal_ masak: I would have answered "the history of unix is very much tied to regex, there must be a reason", and would have gone thru the unix tools that include regex support.
20:29 tadzik there must be a reason for creat() too :)
20:29 cognominal_ too bad they do it in many different ways, but that's another story.
20:29 Moukeddar Titanic and other ships, the engine room is getting flooded fast, making the ship sink faster
20:29 masak cognominal_: hm, yes. that is a good answer. I don't even think of the regexes being there in a lot of Unix tools, I just take them for granted.
20:29 masak tadzik: good oblique point :)
20:30 masak cognominal_: "we liked the standard so much that we decided to embrace and extend it a bit"
20:30 cognominal_ tadzik: that mistake was done once.
20:30 Moukeddar masak, maybe you should give us a visit :)
20:30 masak Moukeddar: yeah, something like that. regexes are great, but not when what you really needed was a parser.
20:30 masak Moukeddar: that's not impossible, you know.
20:31 Moukeddar i know, and i wish so
20:31 masak I hope we meet someday, Moukeddar.
20:31 Moukeddar fabulous
20:32 Moukeddar what would be my next presentation's topic ?
20:32 tadzik nom: sub foo {}; &foo.perl.say
20:32 p6eval nom 424d2d: OUTPUT«Sub.new()␤»
20:32 masak "Perl 6: the singularity is near"
20:33 tadzik I think it used to be better, I mean, Pod::To::Text used to work with it
20:33 masak did people see the "why should I learn Perl 6" thread on reddit?
20:33 tadzik eyeah
20:33 masak http://www.reddit.com/r/perl/comment​s/liwyi/learning_perl_6_a_good_idea/
20:33 tadzik OH NOT THOSE GC BUGS AGAIN
20:33 masak :/
20:33 tadzik Method 'WHY' not found for invocant of class 'NQPLexPad'
20:34 Moukeddar talk them about perl6?
20:36 masak just a suggestion.
20:40 Moukeddar interesting one, but i don't think they'll appreciate it
20:40 sorear good * #perl6
20:41 colomon \o
20:41 tadzik b: sub foo {}; &foo.perl.say
20:41 p6eval b 1b7dd1: OUTPUT«{ ... }␤»
20:41 tadzik nom: sub foo {}; &foo.perl.say
20:41 p6eval nom 424d2d: OUTPUT«Sub.new()␤»
20:42 tadzik nom: sub foo {}; &foo.gist.say
20:42 p6eval nom 424d2d: OUTPUT«Sub.new()␤»
20:42 masak Moukeddar: what interests you? that's often a more important question.
20:42 colomon sorear: any reason you can think of not to resolve https://github.com/sorear/niecza/issues/71 by adding default values for infix:<*>?
20:42 colomon sorear: I think in b we used multis instead, but default values seem more elegant to me atm
20:44 sorear I fail to see how default values would be any more elegant
20:45 tadzik hello sorear
20:46 colomon sorear: it's just adding a couple of symbols to the existing operators signature rather than writing two more versions of each operator
20:46 sorear "two" more versions of each operator?
20:46 colomon one argument and zero argument
20:47 sorear what do you need the one-arg form for?
20:47 sorear also, what happens once * is a multi?
20:47 Moukeddar back
20:47 Moukeddar interests me or them?
20:47 * sorear has to head off again for a bit
20:48 colomon "If fewer than two arguments are given, a dispatch is still attempted with whatever arguments are given, and it is up to the receiver of that dispatch to deal with fewer than two arguments." S03
20:49 colomon hmmm.... may be off with the context on that, however.  :\
20:50 * masak wrote a reply in that thread: http://www.reddit.com/r/perl/comments/li​wyi/learning_perl_6_a_good_idea/c2tln1n
20:50 masak Moukeddar: interests *you*.
20:51 Moukeddar oh, things like patterns, architecture stuff, getting to know  programming pradigms
20:51 Moukeddar those are the stuff that interests me
20:58 drbean joined #perl6
20:59 masak why?
21:00 Moukeddar since i'll not have the chance to study them i'm learning them on my own
21:00 Moukeddar plus
21:00 Moukeddar there's always more to learn when dealing with this topics
21:01 masak yes, but *why*? :)
21:01 masak why do these topics interest you?
21:02 Moukeddar because regular topics don't anymore :)
21:02 Moukeddar i really can't explain why
21:03 masak I mean something like, what is your goal with learning about patterns, architecture, and paradigms?
21:04 Moukeddar it pleases me, knowledge,and when i'll get in the field i'll have a strong ground to stand on
21:04 colomon sorear: I must be slow.  Just figured out what you meant by "also, what happens once * is a multi?"  Yes, that's a very good reason to go the multi route.
21:05 masak Moukeddar: with patterns and architecture, I feel I don't really get their use until I've done it wrong at least once ;)
21:07 Moukeddar practice, practice,practice
21:07 masak right.
21:08 masak and just like Neo, knowing when those sacred rules are best *broken*. :)
21:08 colomon I'm intrigued by the argument that patterns are just signs of where your programming language is weak.  Wish someone would make it at greater length...
21:09 masak a lot of people have.
21:09 masak I think I remember both a "Coding Horror" post on the topic, and a "Universe of Discourse" post on the topic.
21:10 Moukeddar masak, i completely agree, good matrix reference :D
21:10 colomon "Universe of Discourse"?
21:10 masak MJD's
21:10 geekosaur just keep in mind that that argument tends to run headlong into Gödel
21:10 colomon and why isn't that blog in my reading list?!?
21:11 masak colomon: if you haven't read it, go read the archives, like, right now.
21:11 geekosaur there's always *something* that can't be formally captured
21:11 colomon okay with me, I've spent more time studying Gödel than I have patterns.  ;)
21:11 masak it's not so much about formally capturing everything. it's about providing decent primitives with which to think bigger coherent thoughts.
21:12 geekosaur (and even when it can be, sometimes the price is too high --- whether in things like compile time or runtime complexity, or in semantic complexity)
21:12 masak I love being part of a time when those primitives are still being built.
21:12 geekosaur see, Haskell is a counterexample:  it can reproduce most languages' patterns in libraries, but has its own patterns (at a higher conceptual levewl)
21:12 masak maybe it'll never end, I dunno. but in a way it feels like we're just getting started on the ladder of abstraction.
21:13 geekosaur we are.  but we can't *currently* go very far before being overloaded by semantic complexity
21:13 masak nod
21:14 masak complection is the source of complexity. don't complect. :)
21:15 masak http://www.infoq.com/prese​ntations/Simple-Made-Easy
21:15 masak Moukeddar: that one will probably interest you, by the way.
21:15 masak Moukeddar: presenter is the guy who built Clojure, a language from the Lisp family on the JVM.
21:16 Moukeddar oh, nice topic :)
21:16 Moukeddar clojure ? isn't it a hybrid language?
21:16 Moukeddar both functional and O-O
21:16 Moukeddar ?
21:16 masak yes, and some other things too :)
21:16 daniel-s joined #perl6
21:17 tadzik I have a feeling WHY will have to be redesigned after we get rid of backtracking in the grammar. So many things are now workarounds for this
21:17 masak it's very concurrency-friendly.
21:17 masak tadzik: we have backtracking in the grammar?
21:17 MayDaniel joined #perl6
21:17 Moukeddar concurrency ?
21:18 skangas joined #perl6
21:18 masak Moukeddar: several computations executing simultaneously.
21:18 tadzik masak: apparently, yes
21:19 tadzik also, I hate that when we have #= bla bla \n sub foo {} \n #= baz baz, action method for sub foo is called after we consume '#= baz baz'
21:20 masak huh.
21:20 Moukeddar ah, like threading and parallel stuff, right?
21:20 masak tadzik: because of <.ws> handling?
21:21 tadzik I suppose so
21:21 masak Moukeddar: you're in the right area, yes :)
21:21 masak Moukeddar: there are some differences between all these topics, but yes.
21:21 Moukeddar i thought concurrency had to do with distibuted computing :s
21:21 masak Moukeddar: Clojure has something called "persistent data structures" which I find interesting.
21:22 masak Moukeddar: http://en.wikipedia.org/wik​i/Persistent_data_structure
21:22 Moukeddar never worry about backup heh? lol$
21:24 masak not that kind of persistence ;)
21:24 masak the other kind.
21:24 Moukeddar it's a nice concept :D
21:26 masak it's the kind of "giants' shoulders" I suspect we need to stand on in order to do concurrency properly.
21:29 bluescreen10 joined #perl6
21:30 Moukeddar you suspect? should we bring it to investigate with it?
21:31 masak heh. :) suspicion does not imply a criminal investigation needs to be made.
21:31 masak consider it a "positive suspicion", if you will.
21:31 Moukeddar there is no such thing as "positive suspicion" here ;)
21:32 masak I'm not surprised. I just made the term up.
21:32 Moukeddar it's not about the word
21:32 Moukeddar it's about the context
21:32 masak aye.
21:34 im2ee joined #perl6
21:34 Moukeddar i wish i can download those presentations
21:38 masak Moukeddar: http://news.ycombinator.com/item?id=3135843
21:43 Moukeddar not the slides, i'm talking about the whole presentation (video)
21:44 masak oh, ok.
21:44 masak I don't know how to do that :)
21:45 tadzik nqp: my $a := Regex::Match.new; say(~$a)
21:45 p6eval nqp: OUTPUT«Null PMC access in get_string()␤current instr.: 'nqp;Regex;Match;Str' pc 5329 (src/Regex/Cursor.pir:227)␤»
21:45 Moukeddar me neither
21:45 tadzik nqpbug?
21:46 masak tadzik: either that, or DIHWIDT
21:47 tadzik DIHWIDT?
21:47 tadzik nqp: my $a := Regex::Match.new; if pir::defined($a) { say(~$a) }
21:47 p6eval nqp: OUTPUT«Null PMC access in get_string()␤current instr.: 'nqp;Regex;Match;Str' pc 5329 (src/Regex/Cursor.pir:227)␤»
21:47 tadzik that's quite annoying
21:47 masak "Doctor, It Hurts When I DO This"
21:47 tadzik :)
21:47 masak Do*
21:48 masak tadzik: I think no-one would complained if you patched it not to NPMCA.
21:48 tadzik hah, yeah
21:48 tadzik I would have to understand it first
21:48 tadzik hmm
21:49 masak Perl 6 gets a mention here, by the way: http://news.ycombinator.com/item?id=3137227
21:50 masak I'd really like to know what "special syntax and really crazy semantics" the commenter has seen in Perl 6. :)
21:50 im2ee Good night! :)
21:51 masak dang, why do people say good night and then sign out immediately. so annoying! :P
21:52 Moukeddar lol, they don't give you a chance to wish them a sweet night?
21:53 tadzik masak: you do that too :>
21:53 masak that was the implied humour, yes.
21:53 tadzik :)
21:54 masak I used to do that back when I was an ERC user.
21:54 masak now I'm on irssi/screen, so I don't log out.
21:55 lue joined #perl6
21:55 [Coke] are we at a point where we can move all the SYN to pod6?
21:55 lue Is there any way I can write a buffer to a file without UTF-8 making a mess of what's in the buffer?
21:58 tadzik [Coke]: let's try with a small one
21:58 masak lue: I'm not sure I see what UTF-8 has to do with buffers.
21:58 masak lue: at that point, your data is already in binary form.
21:59 lue For example, 0xff in a buffer gets transformed into 0xc3 0xbf
22:00 masak lue: that sounds... wrong...
22:00 lue rakudo: say "ÿ".ord; say "ÿ".encode; # when working with binary files, these should equal each other
22:00 p6eval rakudo 424d2d: OUTPUT«255␤Buf:0x<c3 bf>␤»
22:00 lue rakudo: say "ÿ".encode('ISO-8859-1');
22:00 p6eval rakudo 424d2d: OUTPUT«Buf:0x<ff>␤»
22:00 masak lue: those are strings.
22:00 masak not buffers.
22:01 flussence rakudo: say Buf.new("ÿ".ords)
22:01 p6eval rakudo 424d2d: OUTPUT«Buf:0x<ff>␤»
22:01 masak flussence++
22:01 lue I had to use  my $input = open($file, :bin).get.encode('ISO-8859-1')  to get binary files read in correctly, but I can't find a similar solution for Buf being passed to a file's write()
22:02 masak lue: doing first :bin and then .encode feels... wrong...
22:02 masak lue: if it's already a buffer, you shouldn't be converting it from a string to a buffer.
22:03 lue well, all the file-reading-related functions still return Str's
22:04 masak then that sounds wrong, too.
22:04 masak it can't both be :bin and return a Str.
22:04 masak it has to return a Buf.
22:04 flussence .read should return a Buf, spec says so
22:05 flussence get() is underspecced.
22:05 masak apparently.
22:05 [Coke] tadzik: I figured it would be LHF if we could consider it now. (but not for me. ;)
22:05 flussence .slurp, on the other hand, is specced to return a Str or a Buf depending on :bin...
22:06 lue I tried get, but when it needed a parameter, I moved on. Now looking at the spec, I see why (but what if I want the whole file at once?)
22:06 flussence er
22:06 lue slurp will return Str even w/ :bin
22:06 flussence that's definitely a bug
22:07 lue $output.write(Buf.new($outfile​.decode('ISO-8859-1').ords)); will still mangle the data
22:07 tadzik [Coke]: maybe it's a good GCI task
22:07 tadzik if we want Rakudo in GCI
22:08 * colomon has somehow completely broken his niecza install.  :(
22:15 * lue wonders which of those lines in the write method are messing up
22:32 masak god natt, #perl6.
22:32 tadzik masak: o/
22:41 mj41 joined #perl6
22:41 mj41_nb joined #perl6
22:46 lue I don't suppose anyone knows a way to write to a file without anything messing with what I pass it, is there?
22:47 tadzik I don't think I understand?
22:49 gfldex nom: my $str = 'foo'; my %hash; %hash{$str} = 42; say 'yay' if  $str ~~ %hash; say 'nay' if %hash ~~ $str;
22:49 p6eval nom 424d2d: OUTPUT«yay␤»
22:50 gfldex is there a infix operator missing?
22:50 tadzik nope, ~ isn't, erm, mirrory?
22:51 tadzik ~~ I mean
22:53 lue joined #perl6
22:53 lue sorry 'bout that [stupid computer]
22:57 gfldex Str ~~ Hash seams not to be defined by S03 either
22:57 gfldex and ~~ aint no operator at all!
22:57 gfldex it's a topicalizer
22:58 gfldex Still it's rather confusing to have Str ~~ Hash but not Hash ~~ Str. May need devine judgement by TimToady
23:02 * [Coke] is trying to get local students to sign up for GCI.
23:03 flussence I take $str ~~ $container to mean something like ?$container.values.grep($str)
23:07 lue that's annoying. write seems to fail only in my program. I'll upload it now to see if anyone can find the issue
23:09 molaf__ joined #perl6
23:12 Trashlord joined #perl6
23:13 dalek rakudo/nom: b3e3008 | tadzik++ | lib/Pod/To/Text.pm:
23:13 dalek rakudo/nom: [Pod::To::Text] Make object stringification in declarator2text less implementation-dependent
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b3e3008a2d
23:13 dalek rakudo/nom: 5b16dbe | tadzik++ | / (2 files):
23:13 dalek rakudo/nom: Partially fix WHY bugs for two subs in a row
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5b16dbe771
23:13 dalek rakudo/nom: 7895d52 | tadzik++ | / (3 files):
23:13 dalek rakudo/nom: Store declarator docs in Matches rather than Strings
23:13 dalek rakudo/nom:
23:13 dalek rakudo/nom: This way we can distinguish the same documentation for two different
23:13 dalek rakudo/nom: objects. Yet another workaround for routine_def eating declarator
23:13 dalek rakudo/nom: comment from routine_def after it.
23:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7895d52849
23:13 lue https://gist.github.com/1306608  hopefully I'm making a stupid error.
23:15 tadzik whoa, that's plenty of code
23:16 cyfi joined #perl6
23:16 lue All in one evening, so I'm suspecting a bug somewhere.
23:18 cognominal_ joined #perl6
23:21 * lue wonders if Buf's are being overzealous in being valid UTF-8
23:24 Trashlord joined #perl6
23:26 colomon ah, check it out.
23:26 colomon if you declare the very basic arithmetic operators to be multis in niecza, you completely break it -- it just hangs when you try to do anything
23:27 colomon so much for that fix....
23:30 colomon oooo, MJD calls it exactly right: http://blog.plover.com/brain/immortality.html
23:37 lue I'd opt out of the email service. I could be a real jerk to myself :) [by the way, I've always considered that kind of "immortality" cheating, like claiming a *really* good simulation of the past is time travel]
23:38 tadzik I'm about to travel through time tomorrow
23:38 tadzik you'll know that I succeded if dollar is the currency of the US and wednesday comes *after* tuesday
23:39 tadzik wish me luck
23:39 lue that's how it's always been though.
23:40 tadzik then I have succeded! \o/
23:40 tadzik or, will. Or, I don't know
23:43 lue Now I know it has to be a problem with my code (I wrote up a much simpler version of what my program essentially does, and it worked). Perhaps unit testing would be useful here, seeing as it's clearly not "just a script" :)
23:44 Trashlord joined #perl6
23:44 lue [like I thought it of being as last night]
23:46 tadzik heh, the fate of neutro
23:46 tadzik 'whatever, it's just 30 LoC'
23:46 lue I was planning on expanding it into something worthy of a proper git repo anyway.
23:46 soh_cah_toa well, 30 lines of perl code == full fledged project in c
23:47 soh_cah_toa :P
23:47 dukeleto joined #perl6
23:48 tadzik :)
23:48 dukeleto joined #perl6
23:49 dukeleto joined #perl6
23:50 lue ooc, (doesn't matter for me (at least yet)), can panda handle multiple modules in one repo seperately, or are they all forcefully installed together?
23:51 lue (e.g. if a repo has lib/A/B.pm and lib/Z/Y.pm , can one choose only A::B or only Z::Y thru panda?)
23:51 tadzik lue: well, panda will just install everything from lib/
23:53 tadzik you can always write your own Makefile, panda should respect that
23:56 lue will someone using panda be able to specify "I want just A::B" and then have the Makefile respond correctly ('cos writing the Makefile to install one or the other is easy)
23:57 flussence .oO( does time travel use threads or forks? )

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

Perl 6 | Reference Documentation | Rakudo