»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:01 facefox_com left
moritz masak: I disagree with your analysis at irclog.perlgeek.de/perl6/2012-08-04#i_5875141 00:01
masak: in both cases a longname is not recognized as a type, even though it's predeclared 00:02
masak: the error messages might be different, but the underlying problem looks the same
00:03 cognominal left 00:06 whiteknight joined 00:07 whiteknight is now known as Guest36970, mberends left 00:18 shinobicl joined 00:20 shinobicl left 00:24 xinming joined 00:29 xinming_ joined 00:30 xinming left 00:42 cognominal joined 00:44 cognominal left 00:46 cognominal joined 01:08 sivoais left 01:09 sivoais joined 01:23 thou joined 01:30 adu joined 01:38 adu left 01:49 Guest36970 left 02:02 xinming_ is now known as xinming 02:07 dbr left 02:14 adu joined 02:27 colomon joined
TimToady nr: .WHAT.say for val 'March 7 2009 7:30pm EST'.words; 02:38
p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&val' called (line 1)␤»
..niecza v19-15-g051783d: OUTPUT«Array()␤»
TimToady nr: .WHAT.say for 'March 7 2009 7:30pm EST'.words».val; 02:39
p6eval rakudo 7e1b38: OUTPUT«No such method 'val' for invocant of type 'Str'␤ in method dispatch:<hyper> at src/gen/CORE.setting:886␤ in block at /tmp/kCpJTepSaQ:1␤␤»
..niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method val in type Str␤ at /tmp/SjIHGeP2Ux line 1 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3063 (hyperunary @ 66) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3054 (hyperunary @ 36) ␤ at /tmp/Sj…
02:40 Patterner left
TimToady kinda disgusting to try DateTime.new(:$month, :$day, :$year, :$hour, :$minute, :timezone($tz)) only to be told that $year has to be Int, not Str 02:41
any reason those can't be Cool args? 02:42
02:42 Psyche^ joined, Psyche^ is now known as Patterner
benabik r: val('2001') 02:43
p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&val' called (line 1)␤»
colomon TimToady: isn't that the eternal debate?
TimToady well, wouldn't matter so much if either rakudo implemented val or niecza implemented DateTime... 02:44
colomon argh, yeah, I guess I need to get around to trying to implement DateTime. But not this week, it's Celtic College time.
02:56 crab2313 joined 02:57 orafu left 02:59 orafu joined 03:03 Tangaroa joined 03:11 colomon left 03:22 adu left 03:23 tokuhiro_ joined, crab2313 left 03:52 leprevost joined 03:55 birdwindupbird joined 03:56 popl joined 03:57 cognominal left 04:05 adu joined 04:25 tokuhiro_ left 04:26 cognominal joined 04:28 cognominal left 04:33 u_u left 04:50 SHODAN joined, Yappocall joined, jeffreykegler joined, aloha joined 04:51 ashleyde1 joined, pnu_ joined, eiro joined, eiro_ joined, mikec__ joined 04:52 prammer joined, sjn joined, sunnavy joined, krunen joined 04:55 hugme joined, ChanServ sets mode: +v hugme 04:56 leprevost left 05:05 jeffreykegler left 05:23 mberends joined 05:28 gongyiliao joined 05:54 cognominal joined, cognominal left 05:55 cognominal joined 05:56 kaare_ joined 05:57 HarryS left 06:00 HarryS joined, thou left 06:02 SamuraiJack joined 06:09 Tangaroa left 06:12 tokuhiro_ joined
moritz TimToady: agreed, could be Cool 06:16
06:37 adu left 06:46 nwc10 joined
japhb phenny, ask TimToady Coincidentally earlier today I was looking around for something useful to do for the #perl6 team, and thought of finally implementing val() in Rakudo. Is Niecza's basic design acceptable to you? I can just port that over .... 06:57
phenny japhb: I'll pass that on when TimToady is around.
japhb heads to bed & 06:58
07:17 GlitchMr joined 07:19 cognominal_ joined 07:21 cognominal left 07:26 cognominal_ left 07:31 popl left 07:34 GlitchMr left 07:44 brrt joined, birdwindupbird left 07:45 birdwindupbird joined 08:09 brrt left 08:14 tokuhiro_ left
masak antenoon, #perl6 08:37
moritz: oh, um. 'longname' doesn't mean "all the steps of a mult-namespace package name" in the Perl 6 spec. it means "name of a method *and* a sufficient part of the signature". 08:39
moritz: you're probably right about the underlying problem being the same in the case of rt.perl.org/rt3/Ticket/Display.html?id=112626, though. I might have a second look. 08:40
08:40 szabgab joined
szabgab hi 08:40
phenny szabgab: 15 Jul 05:15Z <moritz> tell szabgab your website the p6mave one seem to have each article several times perl page, for example on szabgab.com/perl-weekly-two-days-later.html
szabgab: 15 Jul 05:15Z <moritz> tell szabgab *and the
08:41 fgomez left
masak szabgab! \o/ 08:41
szabgab \o/
perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(@z.list) 08:42
p6eval rakudo 7e1b38: OUTPUT«2␤Not enough positional parameters passed; got 1 but expected 2␤ in sub f at /tmp/2vbOIJwy15:1␤ in block at /tmp/2vbOIJwy15:1␤␤»
..niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/pQjNQ8d_U6 line 1:␤------> sub f($a, ⏏$b) { say $a }; f(2, 3); my @z = 2,3; f(␤␤2␤Unhandled exception: No value for parameter '$b' in 'f'␤ at /tmp/pQjNQ8d_U6 line 0 (f @ 1) ␤…
szabgab can I take an array and flatten it out when passing to a sub?
perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(@z.values)
p6eval rakudo 7e1b38: OUTPUT«2␤Not enough positional parameters passed; got 1 but expected 2␤ in sub f at /tmp/nT2jV5b9oB:1␤ in block at /tmp/nT2jV5b9oB:1␤␤»
..niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/dYpuOmC7N1 line 1:␤------> sub f($a, ⏏$b) { say $a }; f(2, 3); my @z = 2,3; f(␤␤2␤Unhandled exception: No value for parameter '$b' in 'f'␤ at /tmp/dYpuOmC7N1 line 0 (f @ 1) ␤…
sorear o/ masak, szabgab 08:44
szabgab o/ sorear
08:45 MayDaniel joined
szabgab can anyone shed some light on that flattening thing? 08:45
08:45 fgomez joined 08:47 birdwindupbird left 08:51 brrt joined 08:55 SamuraiJack left
masak szabgab: yes. please hold on. 08:59
perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/rIee_BDfft line 1:␤------> sub f($a, ⏏$b) { say $a }; f(2, 3); my @z = 2,3; f(␤␤2␤2␤»
..rakudo 7e1b38: OUTPUT«2␤2␤»
masak perl6: sub f($a, $) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«2␤2␤» 09:00
masak szabgab: here's the important thing.
Perl 5 flattens everything everywhere. as soon as you have list context, you have flattening.
Perl 6 does is sometimes, usually at the last moment. specifically, there's no auto-flattening at all in Parcels. 09:01
thus both your attempts above, `@z.list` and `@z.values`, may be collections but they go in a *one value*.
szabgab perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/F891uv65Se line 1:␤------> sub f($a, ⏏$b) { say $a }; f(2, 3); my @z = 2,3; f(␤␤2␤2␤»
..rakudo 7e1b38: OUTPUT«2␤2␤»
masak and to a seasoned sixer they look like one single argument, not several. 09:02
szabgab so does | tell it to flatten?
masak it does.
szabgab perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3,4,5; f(|@z[1..2])
p6eval rakudo 7e1b38: OUTPUT«2␤3␤»
..niecza v19-15-g051783d: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/SC7UFM5QgJ line 1:␤------> sub f($a, ⏏$b) { say $a }; f(2, 3); my @z = 2,3,4,5␤␤2␤3␤»
masak r: my $a = (1, 2, 3); .say for $a; .say for |$a
p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
szabgab thanks
masak oh, right.
r: my $a = (1, 2, 3); sub foo(*@x) { .say for @x }; foo($a); foo(|$a) 09:03
p6eval rakudo 7e1b38: OUTPUT«1 2 3␤1␤2␤3␤»
szabgab ok, now the question I got on G+ was this:
for @long -> @array-of-n { }
if I can iterate over an array n-at-a-time when n is not defined up front 09:04
so for @long -> $a, $b, $c { } is not good
masak hm.
masak tries a few things 09:05
szabgab I wrote a sub that can do this
but maybe my $n = 3; for @long -> @short[ $n ] { } could work
masak to me that reads like "each element is an array of length $n". 09:06
rn: my @matrix = [1, 2, 3], [4, 4, 4], [8, 2, 8]; for @array -> @row { say @row.perl } 09:07
p6eval niecza v19-15-g051783d: OUTPUT«===SORRY!===␤␤Variable @array is not predeclared at /tmp/xO77C94uVr line 1:␤------> = [1, 2, 3], [4, 4, 4], [8, 2, 8]; for ⏏@array -> @row { say @row.perl }␤␤Potential difficulties:␤ @matrix is declared but not used a…
..rakudo 7e1b38: OUTPUT«===SORRY!===␤Variable @array is not declared␤at /tmp/pVsjrmog6R:1␤»
masak rn: my @matrix = [1, 2, 3], [4, 4, 4], [8, 2, 8]; for @matrix -> @row { say @row.perl }
p6eval niecza v19-15-g051783d: OUTPUT«[1, 2, 3].list␤[4, 4, 4].list␤[8, 2, 8].list␤»
..rakudo 7e1b38: OUTPUT«Array.new(1, 2, 3)␤Array.new(4, 4, 4)␤Array.new(8, 2, 8)␤»
szabgab pastebin? 09:09
09:10 mucker joined
szabgab pastebin.com/M8FCXcfx 09:11
is the sub I wrote trying to implement this
masak ok. 09:12
szabgab and I think I only have one off-by-one error :) 09:13
09:14 GlitchMr joined
szabgab masak: and how does this read to you ? for @long -> *@short[3] { } ? 09:15
oxymoron? 09:16
masak that's basically what I was trying locally before. 09:21
yes, I think it's stretching what "slurpy" means.
szabgab ok, thanks 09:22
BTW something else: is the result of .perl in a sorted or at least fixed order ? 09:23
09:24 JimmyZ_ joined
masak today's mini-challenge: projecteuler.net/problem=3 09:29
szabgab: "the result of .perl" for... what? hashes?
szabgab: generally, the *only* requirement of .perl is that it gets as close to value-string round-tripping as possible. 09:30
09:30 JimmyZ_ is now known as JimmyZ
masak if you're asking that question, it probably means you're trying to parse it or do something with it for which it wasn't intended :) 09:30
szabgab I am writing tests that compare the output as string to the expected output 09:31
09:31 brrt left
szabgab and I was wondering if I can do that with the results of %h.perl as well? 09:31
masak .perl is very implementation-dependent. I wouldn't use it in tests. 09:32
szabgab but from your words I understand that I cannot
GlitchMr is_deeply()?
szabgab GlitchMr: that would assume I have subs or other similar thing to test
but I have little scripts that I need to test
and sometimes the real output of the script is the result of .perl 09:33
as these are my examples in the tutorial
GlitchMr github.com/GlitchMr/perl6-Text-Abb...00-basic.t
09:34 tokuhiro_ joined
masak "that would assume I have subs or other similar thing to test". sorry, what? how does that follow? 09:35
I'm not saying "don't use .perl in your tests". I'm saying I don't use .perl in my tests. to me, it's more of a debugging tool. it's (intentionally) not specified enough to generate accurate, predictable string representations of things. 09:36
szabgab ok, have a scipt showing the output of .perl of a hash. How can I test that my script still works?
I could capture the output of course and eval it 09:37
and then use is_deeply
masak I guess. 09:38
or, since you own the script, just test the hash.
szabgab The hash is hard coded :) 09:39
masak is there a name for the 'opposite reduction' that takes place when teasing an integer apart into prime factors? 09:41
or is that simply known as 'factoring', and there's no more general name?
er, 'factorization'.
jnthn r: sub map-by($n, $b, *@a) { gather { while @a { my @xs; @xs.push(@a.shift) if @a for ^$n; take $b(@xs) } } }; say map-by(3, -> @a { [+] @a }, 1..9) 09:44
p6eval rakudo 7e1b38: OUTPUT«6 15 24␤»
GlitchMr 6 15 24 :)
09:56 daniel-s__ joined
jnthn oh, with a little more coffee, you can do it as a list comp... 09:57
r: sub map-by($n, $b, *@a) { gather { while @a { take $b((@a.shift if @a for ^$n)) } } }; say map-by(3, -> @a { [+] @a }, 1..9)
p6eval rakudo 7e1b38: OUTPUT«6 15 24␤»
09:58 spider-mario joined 10:00 daniel-s left
GlitchMr r: (2 for ^Inf).perl 10:02
p6eval rakudo 7e1b38: OUTPUT«(timeout)»
GlitchMr Why list comprehension isn't lazy? 10:04
10:05 JimmyZ left
GlitchMr Even Python has lazy list comprehensions 10:05
10:05 JimmyZ joined
masak they are lazy. 10:07
but you called .perl on it.
GlitchMr > (2 for ^Inf)[0]
^Cfish: Job 1, 'perl6' terminated by signal SIGINT (Quit request from job control (^C))
huh?
masak rn: say (2 xx Inf)[0] 10:08
p6eval niecza v19-15-g051783d: OUTPUT«2␤»
..rakudo 7e1b38: OUTPUT«Cannot coerce Inf to an Int␤ in method Numeric at src/gen/CORE.setting:9652␤ in sub infix:<==> at src/gen/CORE.setting:2542␤ in sub infix:<xx> at src/gen/CORE.setting:5667␤ in block at /tmp/ont8C5dRiE:1␤␤»
masak niecza++
10:10 SamuraiJack joined
jnthn I'm guessing that's special-cased? 10:10
10:11 buubot_backup joined 10:15 buubot_backup left 10:22 buubot_backup joined 10:23 szabgab left
masak r: my @primes; my $n = 2; loop { push @primes, $n and say $n if !@primes.grep($n %% *); $n++ } 10:23
p6eval rakudo 7e1b38: OUTPUT«(timeout)2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤191␤193␤197␤199␤211␤223␤227␤229␤233␤239␤241␤251␤257␤263␤269␤271␤277␤281␤283␤293␤307␤311␤313␤317␤331␤337␤347␤349␤353􏿽xE2􏿽x90
masak \o/
10:23 brrt joined
nwc10 is it supposed to do that? :-) 10:25
masak do you have some other expectations? 10:26
nwc10 well, I guess I really meant - that output isn't UTF-8 is it? The IRC log certainly doesn't like it
masak aye.
I bet it's connected to the timeout somehow.
nwc10 "timeout" makes sense, and I see primes in there 10:27
masak the output probably gets interrupted in the middle of printing a char.
nwc10 has it truncated the last octet of a [snap]
it has, I think.
masak aye. 10:28
nwc10 interesting failure mode - I would have expected a truncated UTF-8 sequence to end up with a splat question mark at that point, but the valid UTF-8 displayed as valid Unicode characters
10:29 spider-mario left 10:32 cognominal joined
masak yeah, something isn't sufficiently lazy yet. 10:35
this hangs, for example: 10:36
r: for 100..999 X 100..999 -> $a, $b { next if $a < $b; say $a * $b }
p6eval rakudo 7e1b38: OUTPUT«(timeout)»
nwc10 "Less Than Virtuous"
masak this works:
r: for 100..999 -> $a { for $a..999 -> $b { say $a * $b } } 10:37
(and it's shorter)
p6eval rakudo 7e1b38: OUTPUT«(timeout)10000␤10100␤10200␤10300␤10400␤10500␤10600␤10700␤10800␤10900␤11000␤11100␤11200␤11300␤11400␤11500␤11600␤11700␤11800␤11900␤12000␤12100␤12200␤12300␤12400␤12500␤12600␤12700␤12800␤12900␤13000␤13100␤13200␤13300␤13400␤13500␤13600␤13700␤13800␤13900␤14000␤14100␤1420…
nwc10 I can see the virtues of a lazier Rakudo, and for that matter a more impatient Rakudo
I'm not sure if I want it to get more hubristic
dalek p/toqast: 9aba250 | jnthn++ | src/NQPQ/Actions.pm:
Fix EXPR, in turn somewhat fixing argument list handling.
p/toqast: dbe1cbf | jnthn++ | src/NQPQ/Actions.pm:
Various quote construct compilation fixes.
moritz nwc10: (non-UTF-8 output) that happens if the IRC line length cutoff destroys multi-byte sequences in UTF-8, I think 10:38
I'm not quite sure what to do about it
10:39 nodmonkey left 10:47 brrt left
masak r: say [+] (1..100).map(* ** 2); say ([+] 1..100) ** 2 10:47
p6eval rakudo 7e1b38: OUTPUT«338350␤25502500␤»
10:47 fridim_ joined
masak \o/ 10:47
tadzik \o 10:50
10:54 cognominal left
dalek p/toqast: fbea939 | jnthn++ | src/NQPQ/World.pm:
Get sub fixups to work (need to revisit this later).
10:56
p/toqast: 0909ba9 | jnthn++ | src/NQPQ/Actions.pm:
Fix .HOW/.WHAT/.WHO.
p/toqast: f3524e5 | jnthn++ | / (2 files):
Fix pir::op and Q:PIR.
p/toqast: b8f9fa7 | jnthn++ | src/NQPQ/World.pm:
Fix dynamic compilation, and thus roles.
11:01 spider-mario joined 11:10 nodmonkey joined 11:18 fhelmberger joined
dalek p/toqast: 4dbbc01 | jnthn++ | src/NQPQ/Actions.pm:
Fix $foo<abc> style lookups.
11:22
p/toqast: e6f6cf2 | jnthn++ | src/NQPQ/Actions.pm:
Now we're using QAST, switch over to qbuildsub. Gets basic grammar tests passing again.
p/toqast: 08e55f1 | jnthn++ | src/NQPQ/Actions.pm:
Fix a couple of left-behind isdecl usages.
p/toqast: 53794a0 | jnthn++ | src/NQPQ/Actions.pm:
Assorted fixes/updates to get /abc/ style regexes compiling again.
11:23 fhelmberger left 11:24 mberends_ joined 11:25 preflex left, preflex_ joined 11:26 preflex_ is now known as preflex 11:28 mberends left
masak merges tadzik++'s yapsi pull request 11:28
11:29 drbean joined 11:34 mberends_ left
dalek p/toqast: d824c22 | jnthn++ | src/NQPQ/Actions.pm:
Couple more regex related fixes; gets the protoregex tests passing.
11:38
p/toqast: e9bd21c | jnthn++ | src/NQPQ/Actions.pm:
Some more regex updates for QAST.
jnthn That lot gets us a few steps closer, at least. :)
JimmyZ NQP && Rakudo no longer depends on PCT now? 11:41
GlitchMr 'abc' ~~ /a/ & /c/
I start to like junctions :)
jnthn JimmyZ: NQP still does in master; the toqast branch is where I'm working to remove that dependency. 11:47
JimmyZ jnthn++, that's nice 11:50
masak yes, conjunctions of regexes are useful. 11:56
11:59 colomon joined 12:00 brrt joined 12:04 Chillance joined 12:26 gongyiliao left 12:34 brrt1 joined, brrt left 12:44 brrt joined, brrt left 12:45 tokuhiro_ left 12:47 brrt1 left 12:53 xinming left 13:17 Chillance left 13:22 xinming joined 13:33 JimmyZ left, JimmyZ joined 13:38 bonifatio joined, bonifatio_ joined, bonifatio_ left, bonifatio left, fridim_ left, bonifatio joined 13:39 bonifatio left
GlitchMr "Would you like to build with Misc Attribute Decoration? This is development work leading to a Perl 5 to Perl 6 convertor, which imposes a space and speed overhead on the interpreter." 13:41
huh?
au GlitchMr: it's a build option to perl 5 that preserves more compile-time information that makes a converter easier. 13:42
13:43 kaare_ left 13:44 birdwindupbird joined 13:46 bonifatio joined 13:54 SamuraiJack left 14:02 SamuraiJack joined 14:04 jeffreykegler joined 14:08 telex left 14:09 jeffreykegler left, jeffreykegler joined 14:10 telex joined
masak au++ # extrapolating GlitchMr's "huh?" questions into enough context to be able to answer them 14:13
14:19 SamuraiJack left 14:25 SamuraiJack joined
gfldex p6: say '-->' ~~ '-->'; say '<!-- Scope is simpler than headers attribute for common tables -->' ~~ '-->'; 14:30
p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«True␤False␤»
14:30 leprevost joined
gfldex why is that? 14:30
masak gfldex: because smartmatching on strings matches on the string. 14:31
GlitchMr perl6: (a => b => 'c').perl.say; ((a => 'b') => 'c').perl.say;
p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«"a" => "b" => "c"␤"a" => "b" => "c"␤»
gfldex i c
masak gfldex: if you want to match on substrings, use a regex.
GlitchMr perl6: (a => (b => 'c')).perl.say; ((a => 'b') => 'c').perl.say;
p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«"a" => "b" => "c"␤"a" => "b" => "c"␤»
14:31 SamuraiJack left
masak p6: say '<!-- Scope is simpler than headers attribute for common tables -->' ~~ .index('-->') 14:31
p6eval niecza v19-15-g051783d: OUTPUT«Unhandled exception: Cannot parse number: <!-- Scope is simpler than headers attribute for common tables -->␤ at /home/p6eval/niecza/lib/CORE.setting line 1414 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3492 (ANON @ 11) ␤ at /home/p6eval/n…
..rakudo 7e1b38: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏<!-- Scope is simpler than headers attribute for common tables -->' (indicated by ⏏)␤ in method Numeric at src/gen/CORE.setting:9652␤ in sub infix:<==> at src/gen/CORE.settin…
masak hm.
GlitchMr Should different values return this same .perl?
masak GlitchMr: no. it's a known bug. 14:32
jnthn masak: That won't work 14:33
You end up smart-matching the string against the result of callingg .index on it
masak oh!
right.
14:34 SamuraiJack joined 14:37 t0rn left 14:39 t0rn joined
jeffreykegler I am looking for a convenient source for the BNF of Perl6 regexes. Is STD.pm the best source? 14:49
moritz yes, except it's not written in BNF :-) 14:50
jeffreykegler Close enough. Ideally it would be both clean BNF and authoritative but you take what's out there.
moritz I don't even know if they are parsable by context-free languages (XML for one isn't)
jeffreykegler My interest is a regex interface for Marpa, and I figured best to leverage the interface thinking done in Perl6 14:52
So I'm not necessarily trying to implement Perl6 regexes
moritz well, having some p6-regex-like interface for marpa would really be cool 14:53
nebuchadnezzar hi
jeffreykegler Don't know how far I'll take it at this point 14:54
nebuchadnezzar looking at perl6 book, I tried the examples and find something curious: pastebin.com/v835G1MD
moritz github.com/perl6/std/blob/master/STD.pm6 search for 'grammar Regex'
(to jeffreykegler)
nebuchadnezzar "given" in the sub does not seems to behave the same way as outside 14:55
jeffreykegler moritz: thanks!
moritz r: gist.github.com/c7dc535fe2900ff0b75f 14:56
p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤Confused␤at /tmp/0bpTaZxXbD:1␤»
moritz nebuchadnezzar: I'll look into it later 14:57
masak is looking into it now
nebuchadnezzar moritz: thanks
moritz masak++
masak reproduced the bug locally.
golfing.
rn: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; sub p($a, $b) { w $a, $b }; say p(R, R); say w(R, R) 15:01
p6eval niecza v19-15-g051783d: OUTPUT«===SORRY!===␤␤GLOBAL::T does not name any package at /tmp/p7Paq_1036 line 1:␤------> class R {}; multi w(::T⏏, T) { 0 }; multi w($, $) { -1 }; sub p(␤␤A type must be provided at /tmp/p7Paq_1036 line 1:␤------> clas…
..rakudo 7e1b38: OUTPUT«-1␤0␤»
masak submits rakudobug
oh, niecza doesn't do type capture yet?
r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; { say w R, R }; say w R, R 15:04
p6eval rakudo 7e1b38: OUTPUT«0␤0␤»
GlitchMr moritz: perlgeek.de/blog-en/perl-tips/in-se....writeback
masak so an inner *block* isn't enough. it has to be a sub.
GlitchMr It's more of 100 million a's
masak r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; (-> $a, $b { say w $a, $b })(R, R); say w R, R 15:05
p6eval rakudo 7e1b38: OUTPUT«-1␤0␤»
masak correction: the parameter binding is messing it up somehow.
GlitchMr (but Perl regexpes are really so slow?)
jnthn masak: Was the issue there with star? 15:06
masak star: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; (-> $a, $b { say w $a, $b })(R, R); say w R, R
p6eval star 2012.07: OUTPUT«-1␤0␤»
masak yep.
jnthn OK, not a qast related regression then.
masak r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my ($a, $b) = (-> $a, $b { $a, $b })(R, R); say w $a, $b 15:08
p6eval rakudo 7e1b38: OUTPUT«-1␤»
masak curiouser and curiouser.
r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my ($a, $b) = R, R; say w $a, $b
p6eval rakudo 7e1b38: OUTPUT«-1␤»
masak a-ha! 15:09
not parameter binding. variables!
containers, most like.
r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my @x = R, R; say w(|@x)
p6eval rakudo 7e1b38: OUTPUT«-1␤»
masak aye.
jnthn Hm
Can you make it happen without type catpures? 15:10
Or are they a necesary part of it?
masak I have a hunch they are.
r: class R {}; multi w(R, R) { 0 }; multi w($, $) { -1 }; my @x = R, R; say w(|@x)
p6eval rakudo 7e1b38: OUTPUT«0␤»
masak aye. they are part of it.
r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(|[R, R])
p6eval rakudo 7e1b38: OUTPUT«-1␤»
15:11 jeffreykegler left
masak r: multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(|[1, 1]) 15:11
p6eval rakudo 7e1b38: OUTPUT«-1␤»
masak r: multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(1, 1)
p6eval rakudo 7e1b38: OUTPUT«0␤»
masak loves golfin' :) 15:12
r: sub w(::T, T) { 0 }; say w(|[1, 1]) 15:13
p6eval rakudo 7e1b38: OUTPUT«Nominal type check failed for parameter ''; expected Scalar but got Int instead␤ in sub w at /tmp/SHfHn2cw5P:1␤ in block at /tmp/SHfHn2cw5P:1␤␤»
masak yay, I tricked Rakudo into telling me what's wrong, even!
jnthn masak++ # that makes it rather clearer
masak does a victory dance
rt.perl.org/rt3/Ticket/Display.html?id=114394 15:19
that was the most fun bug in quite a while. nebuchadnezzar++
also, p6eval++ moritz++ for this way of submitting bugs. it is without equal.
15:20 JimmyZ left 15:25 kaare_ joined 15:27 jeffreykegler joined 15:29 fridim_ joined
nebuchadnezzar continue the exploration of the perl6 book 15:31
15:31 bonifatio left 15:36 whiteknight joined, whiteknight is now known as Guest94890 15:39 xinming left
jeffreykegler What's the best way to try Perl6 snippets online? I've found perlcabal.org/~fglock/perlito6.html Anything else? 15:39
nebuchadnezzar jeffreykegler: seems that p6eval take gist URL 15:41
r: gist.github.com/c7dc535fe2900ff0b75f
p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤Confused␤at /tmp/J3e7pBxkvY:1␤»
nebuchadnezzar or maybe not ;-) 15:42
masak it does. it *parsed* your code.
for some reason that code doesn't parse in p6eval. it parsed locally when I tried. (after a simple copy+paste) 15:43
benabik r: given 1 { when +1 { say 'hi' } }
p6eval rakudo 7e1b38: OUTPUT«hi␤»
dalek kudo/nom: 268788e | jnthn++ | src/Perl6/Actions.pm:
Fix lexical accessor installation; not entirely sure how this ever worked before. Fixes the SEGV in RT#114380.
masak benabik: the problem was analyzed, golfed and filed at rt.perl.org/rt3/Ticket/Display.html?id=114394
benabik masak: That looked like a parse error, not a runtime. 15:44
15:45 xinming joined
dalek kudo/nom: 5d5e3e3 | jnthn++ | src/binder/bind.c:
Add missing decontainerize operation in type capture handling.
15:51
GlitchMr my @factorials = 1, [\*] 1 .. Inf 15:53
-Osub... I meant, -Ofun
benabik r: my @fs = 1, [\*] 1 .. Inf; say @fs[^10] 15:54
p6eval rakudo 7e1b38: OUTPUT«1 1 2 6 24 120 720 5040 40320 362880␤»
benabik GlitchMr++ # clever
GlitchMr But... if assignment to @ variable isn't lazy, why it is lazy now? 15:56
... oh, I see... Mostly Eager 15:57
jnthn It's "mostly eager" which means it stops being eager when it sees an infinite thing
The new S07 by pmichaud++ explains it quite nicely :)
benabik Does it stop when there's something definitely infinite or possibly infinite? 15:58
15:58 SamuraiJack left
benabik r: my @fs = 1, 2, 3 ... -1; say @fs[^10] 15:58
p6eval rakudo 7e1b38: OUTPUT«(timeout)»
jnthn S07 says "Obtain all leading items that are not known to be infinite."
GlitchMr I wonder if implementation is allowed to be lazy when it should be eager and it can prove that iterator doesn't have sideeffects on program (like using print). 16:00
moritz it is 16:01
16:01 SamuraiJack joined 16:02 integral left
GlitchMr But well, I guess that this counts as "internals", so well 16:02
benabik Proving things like that is what I would call "non-trivial" 16:03
16:03 integral joined, integral left, integral joined
GlitchMr Hmmm... yeah... 16:03
I mean, something like my @cake = map { 5 }, ^60 could be lazy and nobody would notice
(yes, I know, nobody would make cakes of fives 16:04
)
Also, just wondering - will Perl 6 have taint mode?
dalek kudo/nom: b28a908 | jnthn++ | src/Perl6/Actions.pm:
Fix issue that caused state variables in class bodies to segfault, and perhaps some other problems along the way.
GlitchMr 5 but Taint.new 16:05
moritz 5 but Tainted(Black)
just kidding, probably just but Tainted
GlitchMr 5 but Tainted? 16:06
moritz aye
GlitchMr That sounds... very simple
I mean, even PHP has more complex taint mode 16:07
wiki.php.net/rfc/taint
jnthn 5 but Tainted(Love)
geekosaur thinks simplicity of indicating a taint manually proves little; the heavy lifting is done behind the scenes 16:10
masak benabik: yes, that was a parse error. likely something in p6eval. I have no idea what. 16:13
16:21 crab2313 joined
jnthn r: say ucfirst "aie!" 16:31
p6eval rakudo b28a90: OUTPUT«Aie!␤»
16:33 birdwindupbird left
TimToady can't have tainting unless all the important datatypes reserve a bit for it in their header 16:33
phenny TimToady: 06:57Z <japhb> ask TimToady Coincidentally earlier today I was looking around for something useful to do for the #perl6 team, and thought of finally implementing val() in Rakudo. Is Niecza's basic design acceptable to you? I can just port that over ....
TimToady phenny: tell japhb I think niecza's design of val() seems to work pretty well, as far as I've used it, though I think there should be method form 16:35
phenny TimToady: I'll pass that on when japhb is around.
TimToady tainting by doubling the number of types is probably not practical
but maybe if it's primarily just string types, it'd work okay to just do "mixouts" 16:37
I hesitate to call them "mixins" when they remove capabilities :)
note also that p5's taint mode kinda cheats 16:39
the operators don't have to worry about propagating it, just the fetches and stores
16:40 jeffreykegler left
TimToady so if you've fetched any tainted values, the remaining stores of the expression set the taint bit 16:40
jnthn r: say -32768 * -65536 16:43
p6eval rakudo b28a90: OUTPUT«2147483648␤»
jnthn star: say -32768 * -65536
p6eval star 2012.07: OUTPUT«-2147483648␤»
dalek kudo/nom: c3ffe98 | jnthn++ | src/Perl6/Actions.pm:
Fix curious whitespace.
16:45
kudo/nom: 06262dc | jnthn++ | src/Perl6/Actions.pm:
Ensure require doesn't leak spurious, possibly non-Perl 6 values if used as an r-value.
masak tries to imagine using 'require' as an l-value o.O 16:54
moritz (require "foo") = 'bar'; 16:56
speaking of which
require is still ambiguous
the text in the synopsis says you can pass a module name or file name to it
but it doesn't say how the compiler should decided which one it is that was passed in 16:57
we *could* have require and require-file
or require-module and require-file
since require now needs explicit import lists, it's not going to be a common operation anyway
so no need to huffmanize it 16:58
jnthn masak: You submitted the darn ticket :P
oh, l-value... :)
16:59 crab2313 left 17:00 SamuraiJack left
masak :) 17:01
jnthn The ticket was BEGIN { require Marshmallow; } or some such
dalek kudo/nom: 0eea687 | jnthn++ | src/ (2 files):
Don't fail with an obscure internals error if arguments are given to .HOW, .WHAT, etc.
17:05
jnthn Well, there's a few RTs shuffled off to testneeded land :) 17:06
17:07 crab2313 joined
masak \o/ 17:22
17:26 GlitchMr left 17:29 SamuraiJack joined 17:36 colomon left 17:40 crab2313 left 17:41 thou joined, arnsholt_ joined 17:45 bonifatio joined, carlin_ joined 17:46 Some-body_ joined, Celelibi left, arnsholt left, carlin left, DarthGandalf left, Some-body_ is now known as DarthGandalf 17:48 bonifatio left 17:49 broquaint left, broquaint joined 17:52 Celelibi joined 18:01 Chillance joined 18:04 daniel-s__ left, mikemol left, sudokode left, dju left, Timbus left, Ulti left
nwc10 jnthn: 32 bit FreeBSD system: 487048 maximum resident set size 18:06
18:07 Timbus joined
nwc10 if it doesn't SEGV in the usual place, Raspberry Pi might have an answer in about 2.5 hours 18:07
18:08 Ulti joined 18:09 benabik left
masak exciting! 18:09
nwc10++ 18:10
timotimo after EDL is finished, our Raspberry Pi will send test results back to earth via the UHF channel ...
18:10 daniel-s__ joined, mikemol joined, sudokode joined, dju joined
nwc10 EDL? 18:10
18:10 dju left, sudokode left
timotimo entry, descent and landing 18:11
18:11 carlin_ is now known as carlin
nwc10 actually, that FreeBSD answer might not be fair 18:12
the machine only seems to have 512M of real RAM
no, I can't read. 1 Gb
jnthn nwc10: How much RAM does a Raspberry Pi Have? 18:13
nwc10 no, I give up. I think it's 1.5Gb.
256Mb, but the GPU has no less than 32Mb of that
18:13 dju joined
jnthn Can see how you end up in swap relatively quickly. 18:14
18:14 daniel-s__ left
nwc10 I'n not sure if that's a question I'm suppoed to answer. I think it only goes into real swap hell after Stage parse 18:15
although judging by looking at vmstat a couple of times, there are periods during stage parse when it's not swapping, but is doing a lot of I/O. Input, specifically
18:15 bonifatio joined
nwc10 the question I'm trying to answer is "is it less swap hell than last time?" 18:16
jnthn Wasn't a question so much as thinking through where it's likely to exhaust the RAM it has to hand.
18:16 Guest94890 left
nwc10 it's already hit swap in at least part of the build earlier than the setting 18:16
possibly NQP
looks like it only has 240M of swap in use 18:17
plus 224M of real RAM for the CPU
18:18 birdwindupbird joined
nwc10 the perl6 binary is a "fakecutable", isn' it? 18:18
jnthn yeah
nwc10 so reading that back in would be "bi" (blocks in) but not "si" (swap in) ?
18:19 daniel-s__ joined
nwc10 (ie the linux kernel will map the parrot bytecode read only because it's part of the executable?) 18:19
jnthn I believe Parrot mmap's it.
wait, that made no sense 18:20
I think it must mmap it normally as a PBC, but in the executable it's embedded there in the file 18:21
nwc10 yes, which I think means that the kernel will have mapped it read only 18:22
jnthn Ah, the mmap thing probably matters a lot
Because the perl6 executable is tiny
And it load_bytecode's all the other bits
nwc10 what I'm getting at is that if the machine is short on RAM (which it is), then the kernel will be able evict anything that's mapped read only
by simply dropping the page 18:23
and then when it wants the page again it would be "bi"
I'm wondering why there is a *lot* of "bi"
ie "si" is only 60% of "bi", meaning that quite a lot of the reads aren't due to swapping the heap (etc) back in 18:24
"so" is about 98% of "bo"
jnthn Hmm 18:25
nwc10 yes. Hmm. It may not be important
but it's a bit strange
this only matters on tightly constrained machines
I'm at the limit of my sysadmin fu - I don't know how to work out *what* the "bi" is. 18:26
at least, what the balance is, the bit that isn't "si"
jnthn read_pbc_file_packfile certainly calls mmap
And the bytecode is not exactly compact.
nwc10 what's the bytecode filename that perl6 maps in?
moritz perl6.pbc 18:27
nwc10 that's tiny
jnthn See blib/Perl6 for others 18:28
moritz but it loads stuff like CORE.setting.pbc (11M)
nwc10 moritz: right now I'm compiling the setting, so presumably that's not the culprit this time?
jnthn Not when you're compiling CORE.setting :) 18:29
moritz nwc10: right
blib/Perl6/*.pbc is still 9M in total
jnthn On my machine here, those lib/Perl6 bytecode files add up to 9.5MB
And then there's whatever NQP loads
18:42 cognominal joined
dalek rl6-roast-data: ad67bf4 | coke++ | / (4 files):
today
18:42
rl6-roast-data: fa88935 | coke++ | / (3 files):
today
18:44 fgomez left 18:49 fgomez joined 18:50 Chillance left 18:54 spider-mario left
masak pmichaud, jnthn: act.yapc.eu/ye2012/talk/4202 act.yapc.eu/ye2012/talk/4055 -- the tag system of Act sorts tags in Unicode order, so '6' gets flung loose and becomes its own category. maybe 'perl6' instead? (to make the 'perl6' tag bigger!) 18:57
18:57 kst joined
jnthn masak: done 19:00
masak jnthn++
19:05 Chillance joined
nwc10 dear ACT, why can I add jnthn's talk to my personal shedule, but not Pm's? 19:08
19:09 cognominal left, cognominal joined 19:12 Chillance left
jnthn
.oO( Sounds like it's ACTing up... )
19:13
nwc10 groans
you're here all week?
19:13 cognominal left, cognominal joined
jnthn 'fraid so :) 19:13
I ticked the "confirmed" button a few moments ago on my talk, and maybe it's just that Pm didn't get to doing that yet. 19:14
nwc10 I should look on the bright side - your code is better than your puns 19:15
Pm has suckers already. Although maybe they signed up before it was Pm's talk.
or is that hecklers?
OK, Raspberry PI has just done: Stage post : 12671.807 19:16
previous was: Stage post : 12113.569 19:17
19:17 mucker left, Chillance joined
nwc10 so (assumed) lower RAM is not translating into less swap hell 19:17
jnthn Thing is, the most recent savings were largely in the latter stages. 19:18
By which point you're already in swap hell.
nwc10 ah OK. So probably haven't improved the locality of the data 19:19
masak .oO( swap hell is like regular hell, except every so often reality freezes and says "Loading..." ) 19:21
19:29 adu joined 19:30 pmurias_ joined 19:32 pmurias_ is now known as pmurias
pmurias hi 19:33
19:33 jeffreykegler joined
pmurias jnthn: will moving to nqp fix dumping of QAST? 19:33
19:34 Chillance left
nwc10 bother. The kernel doesn't have enough stuff enabled to run iotop 19:34
19:35 jeffreykegler left 19:36 birdwindupbird left 19:37 Chillance joined 19:38 birdwindupbird joined
jnthn pmurias: Maybe not automatically, but the dumper we use today is, afaik, written in PIR so re-doing it in NQP will be needed anyway. 19:39
19:43 Chillance left
masak hey, does anyone know where I can find the Knuth quote about how writing the input source meant to exercise TeX to its utmost by being as out-of-the-box evil as possible, was among the most fun things he ever did? 20:00
20:07 SamuraiJack left 20:13 snearch joined
nwc10 jnthn: so, current nom is 487048 max RSS on the 32 bit FreeBSD system 20:17
2012.07 does ths:
Stage optimize : 101.169
Failed allocation of 3291628 bytes
Parrot VM: PANIC: Out of mem!
whoopsy.
"did not finish"
masak aww 20:19
jnthn Eek
20:19 kaare_ left
jnthn Well, at least 2012.08 will be better for that system then :) 20:20
masak hadn't noticed until now that "DNF" is the acronym both for "Duke Nukem Forever" and "Did Not Finish"
jnthn Really?!
moritz r: say 487048 / 1024 20:22
p6eval rakudo 0eea68: OUTPUT«475.632813␤»
nwc10 yes, that's a bit less than the 3 gig failed allocation
20:23 cognominal left, HarryS left 20:26 adu left
masak r: say Date(now) 20:27
p6eval rakudo 0eea68: OUTPUT«No such method 'Date' for invocant of type 'Instant'␤ in <anon> at src/gen/BOOTSTRAP.pm:812␤ in any <anon> at src/gen/BOOTSTRAP.pm:809␤ in block at /tmp/GCtxwuziog:1␤␤»
masak r: sub foo ($a, $f) { if $f { foo('z', 0) }; {$_=$a; say $a; say $_} }; foo('x', 1) # should say z z x x 20:30
p6eval rakudo 0eea68: OUTPUT«z␤z␤z␤z␤»
nwc10 jnthn: *repeated* open and read of things like /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/stat.pasm 20:31
masak r: role A[$B] { class C { method foo() { say $B } }; method bar { C.foo } }; class D { }; A[D].bar
p6eval rakudo 0eea68: OUTPUT«Mu()␤»
masak ooh 20:32
nwc10 and /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/datatypes.pasm
masak better than the Null PMC Access in rt.perl.org/rt3/Ticket/Display.html?id=101296
nwc10 that's just one strace of one process fairly early
but *why* do I see the same thing loaded more than once?
masak jnthn: could I expect the above to say D()? 20:33
nwc10 wtf wtf wtf wtf. I think we have one smoking gun on "why all the I/O?" 20:35
20:36 snearch left
masak r: my $x; role A { has $!foo = $x }; role B does A {}; role C does A {}; class D does B does C {} 20:36
p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Attribute '$!foo' conflicts in role composition␤»
20:37 birdwindupbird left
masak r: role R { method bar($x) {}; method foo { self.bar(42) } }; class C does R { method foo { self.R::foo } }; C.new.foo 20:37
p6eval rakudo 0eea68: ( no output )
jnthn nwc10: It's doing that regularly?
20:38 adu joined
nwc10 yes. 20:38
jnthn How regularly?
masak r: role R { method bar($x) { say $x }; method foo { self.bar(42) } }; class C does R { method foo { self.R::foo } }; C.new.foo
p6eval rakudo 0eea68: OUTPUT«42␤»
nwc10 strace shows bursts of brk
and then dozen or so reads of pasm and pbc files
tadzik \o
nwc10 I'm running a better strace of everything on a big x86_64 linux box 20:39
108 opens of /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/datatypes.pasm
108 opens of /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/sysinfo.pasm 20:40
108 opens of 9 files
masak tadzik! \o/ 20:41
20:41 SamuraiJack joined
jnthn r: say 9 * 108 20:41
p6eval rakudo 0eea68: OUTPUT«972␤»
jnthn nwc10: I can guess what's going on.
nwc10 good
is it easy to fix? :-)
jnthn We do on-demand compilation of bits of the AST to bytecode, if that bit of code gets invoked during teh compilation process 20:42
For example, trait_mod code.
In doing that, we split out PIR that includes a bunch of .include
I'm guessing they get loaded every single time.
nwc10 OK. might not be worth it/sane to fix 20:43
jnthn I doubt it's a difficult fix...wouldn't mind running it by Pm to see if he's a good idea.
nwc10 yes, trade off versus everything else that needs doing
jnthn How much of a problem is it?
masak rn: my $a = 42; say "$a [<file>]"
p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 2, near "file>]\""␤»
..niecza v19-15-g051783d: OUTPUT«42 [<file>]␤»
nwc10 jnthn: it's only a problem if you're crazy enough to build on a machine that needs to swap 20:44
so, um, it's not :-)
jnthn OK. Then it probably doesn't get priority.
sorear good * #perl6
20:45 PacoAir joined 20:46 Chillance joined
masak r: for ^8 { .=fmt("%03b"); .say } 20:48
p6eval rakudo 0eea68: OUTPUT«Cannot assign to a non-container␤ in method dispatch:<.=> at src/gen/CORE.setting:846␤ in block at /tmp/cOZVorA6ID:1␤␤»
20:53 cognominal joined 20:55 cognominal left 20:56 SamuraiJack left 20:58 SamuraiJack joined, SamuraiJack left
masak r: multi detect(Str $foo where { /O/ }) {}; detect "O" 21:02
p6eval rakudo 0eea68: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in method Bool at src/gen/CORE.setting:9912␤ in sub detect at /tmp/XnFa5xyP8F:1␤ in block at /tmp/XnFa5xyP8F:1␤␤»
masak better than the Null PMC Access at rt.perl.org/rt3/Ticket/Display.html?id=78276 21:03
r: subset Greeting of Str where { /:i ^oh \s+ \w+ '!'?$/ }; subset LolGreeting of Str where { .words[1].lc eq 'hai' }; multi detect(Str) { "not a greeting" }; multi detect(Greeting) { "regular greeting" }; multi detect(LolGreeting) { "lol-greeting" }; say detect "OH HAI"
p6eval rakudo 0eea68: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in method Bool at src/gen/CORE.setting:9912␤ in any accepts_type at src/gen/Metamodel.pm:2443␤ in method ACCEPTS at src/gen/CORE.setting:562␤ in sub detect at /tmp/O4oPdiMqRO:1␤ in block at /tmp/O4oPdiMqRO:1␤…
masak would expect that to say "lol-greeting", but it's still better than the Null PMC Access the above URL. 21:05
21:09 bruges_ joined 21:10 mberends joined 21:11 bruges left
jnthn mberends! o/ 21:11
masak: That looks familiar somehow. Hm.
mberends jnthn: o/
masak mberends! \o/ 21:12
jnthn: yeah, it's all from RT.
sorear mberends! o/ 21:15
mberends /o sorear, masak 21:16
21:17 adu left
pmurias sorear: hi 21:19
21:20 cognominal joined
masak I'm now back two years in the bug queue. yes, we definitely have more "high-level" bugs these days. 21:22
and I bet I will see a similar decrease in quality going back two more years.
it's a nice trend. 21:23
given that we'll see more of the future as we go along, I mean.
21:24 sftp left
nwc10 OK, after staring at atop a lot, I think that the "bi" > "si" mystery is simply that a lot of things get paged out (eg cron, sshd) 21:24
and then get read back
well, their clean pages are discarded, and re-read
21:25 sftp joined
masak r: class A::B { my $c = 42; method foo { $A::B::c = "OH HAI"; say $c } }; A::B.foo 21:26
p6eval rakudo 0eea68: OUTPUT«42␤»
masak r: class A::B { my $c = 42; method foo { $c = "OH HAI"; say $A::B::c } }; A::B.foo
p6eval rakudo 0eea68: OUTPUT«Any()␤»
masak the former one is fine, I guess. at least if package stashes can be extended like that. 21:28
the latter one is, hm, also fine.
masak rejects rt.perl.org/rt3/Ticket/Display.html?id=72326 21:29
21:33 adu joined 21:46 nwc10 left 21:50 gongyiliao joined 21:59 colomon joined 22:08 _sri left 22:10 hanekomu left, _sri joined 22:11 hanekomu joined 22:14 adu left 22:18 MayDaniel left 22:20 quietfanatic joined 22:22 mberends left
quietfanatic I like how you're adding Perl6ish features to functional programming. 22:23
Is 'say' not a normal function? Is it a low-precedence prefix instead? 22:24
jnthn Normal function
22:24 pmurias left
quietfanatic whoops 22:26
sorry, that was meant to be a privmsg
about something else.
jnthn found the first statement kinda curious :)
quietfanatic haha 22:27
I am not at liberty to say more myself, unfortunately :)
jnthn That's OK, you needn't. :)
quietfanatic I am so full of fail right now. 22:33
masak quietfanatic! \o/ 22:36
yeah, I'm not yet ready to divulge that secret project yet :P 22:37
s/yet // 22:38
jnthn masak and his secret projects! :P
masak yeah, I'm like, the only person with them. 22:39
22:41 jaldhar left
quietfanatic hello 22:43
yeah, I accidentally dumped a bunch of PMs on moritz++ just now too
masak you're still in the channel :) 22:44
quietfanatic so you may have to give him the NDA talk too. :)
masak shut up! :)
quietfanatic geh
masak I'm so glad this isn't serious.
masak hugs quietfanatic :)
quietfanatic I probably shouldn't Internet on a tired sunday afternoon when I'm sleepy and watching olympics :) 22:45
22:45 jaldhar joined
jnthn 'night, #perl6 23:07
quietfanatic night 23:10
23:28 thelazydeveloper left
sorear night? aren't you still in CA, quietfanatic? 23:37
masak it was directed to jnthn.
sorear ...oh
masak sometimes we momentarily pretend that the other person's time zone has some basis in objective reality, direct observations nonwithstanding... :) 23:38
in other news, I'm not convinced all you people aren't just simulations of consciousness, rather than the real thing. 23:39
you're very faithful simulations, I'll grant you that. :)
quietfanatic quite impressive simulation, if so. I'd like to meet the creator :)
masak .oO( "that could be arranged..." ) 23:40
quietfanatic eep
masak :P
actually, the one thing that's always bothered me about solipsism is the overwhelming, always-present evidence *for* it: the undeniable asymmetry between my subjective consciousness and your indirectly observable ones. 23:44
put differently, why the heck am I inside *my* brain of all brains?
23:49 Khisanth left
masak 's late-night solipsism got warnocked ;) 23:53
'night, #perl6
au masak: rest well, and dream of self-representational, higher-order theories of consciousness, preconsciousness and unconsciousness, not necessarily in that sequence :) 23:56
nebuchadnezzar r: pastebin.com/raw.php?i=L2p6aGwG 23:58
p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Confused␤at /tmp/c6fSn42yp2:1␤»
nebuchadnezzar hmm, I saw in perl book that do disambiguate role composition we could define a method in the class, but it does not seems to work 23:59