Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-08-05

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:01 moritz masak: I disagree with your analysis at http://irclog.perlgeek.de/perl6/2012-08-04#i_5875141
00:02 moritz masak: in both cases a longname is not recognized as a type, even though it's predeclared
00:02 moritz masak: the error messages might be different, but the underlying problem looks the same
00:06 whiteknight joined #perl6
00:18 shinobicl joined #perl6
00:20 shinobicl left #perl6
00:24 xinming joined #perl6
00:29 xinming_ joined #perl6
00:42 cognominal joined #perl6
00:46 cognominal joined #perl6
01:09 sivoais joined #perl6
01:23 thou joined #perl6
01:30 adu joined #perl6
02:14 adu joined #perl6
02:27 colomon joined #perl6
02:38 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)␤»
02:38 p6eval ..niecza v19-15-g051783d: OUTPUT«Array()␤»
02:38 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␤␤»
02:39 p6eval ..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:41 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:42 TimToady any reason those can't be Cool args?
02:42 Psyche^ joined #perl6
02:43 benabik r: val('2001')
02:43 p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&val' called (line 1)␤»
02:43 colomon TimToady: isn't that the eternal debate?
02:44 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 #perl6
02:59 orafu joined #perl6
03:03 Tangaroa joined #perl6
03:23 tokuhiro_ joined #perl6
03:52 leprevost joined #perl6
03:55 birdwindupbird joined #perl6
03:56 popl joined #perl6
04:05 adu joined #perl6
04:26 cognominal joined #perl6
04:50 SHODAN joined #perl6
04:50 Yappocall joined #perl6
04:50 jeffreykegler joined #perl6
04:50 aloha joined #perl6
04:51 ashleyde1 joined #perl6
04:51 pnu_ joined #perl6
04:51 eiro joined #perl6
04:51 eiro_ joined #perl6
04:51 mikec__ joined #perl6
04:52 prammer joined #perl6
04:52 sjn joined #perl6
04:52 sunnavy joined #perl6
04:52 krunen joined #perl6
04:55 hugme joined #perl6
05:23 mberends joined #perl6
05:28 gongyiliao joined #perl6
05:54 cognominal joined #perl6
05:55 cognominal joined #perl6
05:56 kaare_ joined #perl6
06:00 HarryS joined #perl6
06:02 SamuraiJack joined #perl6
06:09 Tangaroa left #perl6
06:12 tokuhiro_ joined #perl6
06:16 moritz TimToady: agreed, could be Cool
06:46 nwc10 joined #perl6
06:57 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.
06:58 * japhb heads to bed &
07:17 GlitchMr joined #perl6
07:19 cognominal_ joined #perl6
07:44 brrt joined #perl6
07:45 birdwindupbird joined #perl6
08:37 masak antenoon, #perl6
08:39 masak 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:40 masak moritz: you're probably right about the underlying problem being the same in the case of http://rt.perl.org/rt3/Ticket/Display.html?id=112626, though. I might have a second look.
08:40 szabgab joined #perl6
08:40 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 http://szabgab.com/perl-weekly-two-days-later.html
08:40 phenny szabgab: 15 Jul 05:15Z <moritz> tell szabgab *and the
08:41 masak szabgab! \o/
08:41 szabgab \o/
08:42 szabgab 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␤␤»
08:42 p6eval ..niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $b is declared but not used at /tmp/pQjNQ8d_U6 line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { say $a }; f(2, 3); my @z = 2,3; f([0mâ�¤â�¤2â�¤Unhandled exception: No value for parameter '$b' in 'f'â�¤  at /tmp/pQjNQ8d_U6 line 0 (f @ 1) â�¤â€¦
08:42 szabgab can I take an array and flatten it out when passing to a sub?
08:42 szabgab perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(@z.values)
08:42 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␤␤»
08:42 p6eval ..niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $b is declared but not used at /tmp/dYpuOmC7N1 line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { say $a }; f(2, 3); my @z = 2,3; f([0mâ�¤â�¤2â�¤Unhandled exception: No value for parameter '$b' in 'f'â�¤  at /tmp/dYpuOmC7N1 line 0 (f @ 1) â�¤â€¦
08:44 sorear o/ masak, szabgab
08:44 szabgab o/ sorear
08:45 MayDaniel joined #perl6
08:45 szabgab can anyone shed some light on that flattening thing?
08:45 fgomez joined #perl6
08:51 brrt joined #perl6
08:59 masak szabgab: yes. please hold on.
08:59 masak perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
08:59 p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $b is declared but not used at /tmp/rIee_BDfft line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { say $a }; f(2, 3); my @z = 2,3; f([0mâ�¤â�¤2â�¤2â�¤Â»
08:59 p6eval ..rakudo 7e1b38: OUTPUT«2␤2␤»
08:59 masak perl6: sub f($a, $) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
09:00 p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«2␤2␤»
09:00 masak szabgab: here's the important thing.
09:00 masak Perl 5 flattens everything everywhere. as soon as you have list context, you have flattening.
09:01 masak Perl 6 does is sometimes, usually at the last moment. specifically, there's no auto-flattening at all in Parcels.
09:01 masak thus both your attempts above, `@z.list` and `@z.values`, may be collections but they go in a *one value*.
09:01 szabgab perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3; f(|@z)
09:01 p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $b is declared but not used at /tmp/F891uv65Se line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { say $a }; f(2, 3); my @z = 2,3; f([0mâ�¤â�¤2â�¤2â�¤Â»
09:01 p6eval ..rakudo 7e1b38: OUTPUT«2␤2␤»
09:02 masak and to a seasoned sixer they look like one single argument, not several.
09:02 szabgab so does | tell it to flatten?
09:02 masak it does.
09:02 szabgab perl6: sub f($a, $b) { say $a }; f(2, 3); my @z = 2,3,4,5; f(|@z[1..2])
09:02 p6eval rakudo 7e1b38: OUTPUT«2␤3␤»
09:02 p6eval ..niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $b is declared but not used at /tmp/SC7UFM5QgJ line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { say $a }; f(2, 3); my @z = 2,3,4,5[0mâ�¤â�¤2â�¤3â�¤Â»
09:02 masak r: my $a = (1, 2, 3); .say for $a; .say for |$a
09:02 p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
09:02 szabgab thanks
09:02 masak oh, right.
09:03 masak 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␤»
09:03 szabgab ok, now the question I got on G+ was this:
09:03 szabgab for @long -> @array-of-n { }
09:04 szabgab if  I can iterate over an array n-at-a-time when n is not defined up front
09:04 szabgab so    for @long -> $a, $b, $c { }   is not good
09:04 masak hm.
09:05 * masak tries a few things
09:05 szabgab I wrote a sub that can do this
09:05 szabgab but maybe     my $n = 3;   for @long -> @short[ $n ] { }    could work
09:06 masak to me that reads like "each element is an array of length $n".
09:07 masak 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«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable @array is not predeclared at /tmp/xO77C94uVr line 1:â�¤------> [32m = [1, 2, 3], [4, 4, 4], [8, 2, 8]; for [33mâ��[31m@array -> @row { say @row.perl }[0mâ�¤â�¤Potential difficulties:â�¤  @matrix is declared but not used a…
09:07 p6eval ..rakudo 7e1b38: OUTPUT«===SORRY!===␤Variable @array is not declared␤at /tmp/pVsjrmog6R:1␤»
09:07 masak rn: my @matrix = [1, 2, 3], [4, 4, 4], [8, 2, 8]; for @matrix -> @row { say @row.perl }
09:07 p6eval niecza v19-15-g051783d: OUTPUT«[1, 2, 3].list␤[4, 4, 4].list␤[8, 2, 8].list␤»
09:07 p6eval ..rakudo 7e1b38: OUTPUT«Array.new(1, 2, 3)␤Array.new(4, 4, 4)␤Array.new(8, 2, 8)␤»
09:09 szabgab pastebin?
09:10 mucker joined #perl6
09:11 szabgab http://pastebin.com/M8FCXcfx
09:11 szabgab is the sub I wrote trying to implement this
09:12 masak ok.
09:13 szabgab and I think I only have one off-by-one error :)
09:14 GlitchMr joined #perl6
09:15 szabgab masak: and how does this read to you ?    for @long -> *@short[3] { }   ?
09:16 szabgab oxymoron?
09:21 masak that's basically what I was trying locally before.
09:21 masak yes, I think it's stretching what "slurpy" means.
09:22 szabgab ok, thanks
09:23 szabgab BTW something else: is the result of .perl  in a sorted or at least fixed order ?
09:24 JimmyZ_ joined #perl6
09:29 masak today's mini-challenge: http://projecteuler.net/problem=3
09:29 masak szabgab: "the result of .perl" for... what? hashes?
09:30 masak szabgab: generally, the *only* requirement of .perl is that it gets as close to value-string round-tripping as possible.
09:30 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:31 szabgab I am writing tests that compare the output as string to the expected output
09:31 szabgab and I was wondering if I can do that with  the results of %h.perl as well?
09:32 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
09:32 GlitchMr is_deeply()?
09:32 szabgab GlitchMr: that would assume I have subs or other similar thing to test
09:32 szabgab but I have little scripts that I need to test
09:33 szabgab and sometimes the real output of the script is the result of  .perl
09:33 szabgab as these are my examples in the tutorial
09:33 GlitchMr https://github.com/GlitchMr/perl6-Text-Abbrev/blob/master/t/00-basic.t
09:34 tokuhiro_ joined #perl6
09:35 masak "that would assume I have subs or other similar thing to test". sorry, what? how does that follow?
09:36 masak 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?
09:37 szabgab I could capture the output of course and eval it
09:37 szabgab and then use is_deeply
09:38 masak I guess.
09:38 masak or, since you own the script, just test the hash.
09:39 szabgab The hash is hard coded :)
09:41 masak is there a name for the 'opposite reduction' that takes place when teasing an integer apart into prime factors?
09:41 masak or is that simply known as 'factoring', and there's no more general name?
09:41 masak er, 'factorization'.
09:44 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␤»
09:44 GlitchMr 6 15 24 :)
09:56 daniel-s__ joined #perl6
09:57 jnthn oh, with a little more coffee, you can do it as a list comp...
09:57 jnthn 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)
09:57 p6eval rakudo 7e1b38: OUTPUT«6 15 24␤»
09:58 spider-mario joined #perl6
10:02 GlitchMr r: (2 for ^Inf).perl
10:02 p6eval rakudo 7e1b38: OUTPUT«(timeout)»
10:04 GlitchMr Why list comprehension isn't lazy?
10:05 GlitchMr Even Python has lazy list comprehensions
10:05 JimmyZ joined #perl6
10:07 masak they are lazy.
10:07 masak but you called .perl on it.
10:07 GlitchMr > (2 for ^Inf)[0]
10:07 GlitchMr ^Cfish: Job 1, 'perl6' terminated by signal SIGINT (Quit request from job control (^C))
10:07 GlitchMr huh?
10:08 masak rn: say (2 xx Inf)[0]
10:08 p6eval niecza v19-15-g051783d: OUTPUT«2␤»
10:08 p6eval ..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␤␤»
10:08 masak niecza++
10:10 SamuraiJack joined #perl6
10:10 jnthn I'm guessing that's special-cased?
10:11 buubot_backup joined #perl6
10:22 buubot_backup joined #perl6
10:23 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â�
10:23 masak \o/
10:23 brrt joined #perl6
10:25 nwc10 is it supposed to do that? :-)
10:26 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
10:26 masak aye.
10:26 masak I bet it's connected to the timeout somehow.
10:27 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.
10:27 nwc10 has it truncated the last octet of a [snap]
10:27 nwc10 it has, I think.
10:28 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:32 cognominal joined #perl6
10:35 masak yeah, something isn't sufficiently lazy yet.
10:36 masak this hangs, for example:
10:36 masak r: for 100..999 X 100..999 -> $a, $b { next if $a < $b; say $a * $b }
10:36 p6eval rakudo 7e1b38: OUTPUT«(timeout)»
10:36 nwc10 "Less Than Virtuous"
10:36 masak this works:
10:37 masak r: for 100..999 -> $a { for $a..999 -> $b { say $a * $b } }
10:37 masak (and it's shorter)
10:37 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…
10:37 nwc10 I can see the virtues of a lazier Rakudo, and for that matter a more impatient Rakudo
10:37 nwc10 I'm not sure if I want it to get more hubristic
10:37 dalek nqp/toqast: 9aba250 | jnthn++ | src/NQPQ/Actions.pm:
10:37 dalek nqp/toqast: Fix EXPR, in turn somewhat fixing argument list handling.
10:37 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/9aba2508a3
10:37 dalek nqp/toqast: dbe1cbf | jnthn++ | src/NQPQ/Actions.pm:
10:37 dalek nqp/toqast: Various quote construct compilation fixes.
10:37 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/dbe1cbf720
10:38 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 moritz I'm not quite sure what to do about it
10:47 masak r: say [+] (1..100).map(* ** 2); say ([+] 1..100) ** 2
10:47 p6eval rakudo 7e1b38: OUTPUT«338350␤25502500␤»
10:47 fridim_ joined #perl6
10:47 masak \o/
10:50 tadzik \o
10:56 dalek nqp/toqast: fbea939 | jnthn++ | src/NQPQ/World.pm:
10:56 dalek nqp/toqast: Get sub fixups to work (need to revisit this later).
10:56 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/fbea939b7d
10:56 dalek nqp/toqast: 0909ba9 | jnthn++ | src/NQPQ/Actions.pm:
10:56 dalek nqp/toqast: Fix .HOW/.WHAT/.WHO.
10:56 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/0909ba955c
10:56 dalek nqp/toqast: f3524e5 | jnthn++ | / (2 files):
10:56 dalek nqp/toqast: Fix pir::op and Q:PIR.
10:56 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f3524e5ef3
10:56 dalek nqp/toqast: b8f9fa7 | jnthn++ | src/NQPQ/World.pm:
10:56 dalek nqp/toqast: Fix dynamic compilation, and thus roles.
10:56 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/b8f9fa7c42
11:01 spider-mario joined #perl6
11:10 nodmonkey joined #perl6
11:18 fhelmberger joined #perl6
11:22 dalek nqp/toqast: 4dbbc01 | jnthn++ | src/NQPQ/Actions.pm:
11:22 dalek nqp/toqast: Fix $foo<abc> style lookups.
11:22 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/4dbbc0131d
11:22 dalek nqp/toqast: e6f6cf2 | jnthn++ | src/NQPQ/Actions.pm:
11:22 dalek nqp/toqast: Now we're using QAST, switch over to qbuildsub. Gets basic grammar tests passing again.
11:22 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/e6f6cf2950
11:22 dalek nqp/toqast: 08e55f1 | jnthn++ | src/NQPQ/Actions.pm:
11:22 dalek nqp/toqast: Fix a couple of left-behind isdecl usages.
11:22 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/08e55f1903
11:22 dalek nqp/toqast: 53794a0 | jnthn++ | src/NQPQ/Actions.pm:
11:22 dalek nqp/toqast: Assorted fixes/updates to get /abc/ style regexes compiling again.
11:22 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/53794a056a
11:24 mberends_ joined #perl6
11:25 preflex_ joined #perl6
11:28 * masak merges tadzik++'s yapsi pull request
11:29 drbean joined #perl6
11:38 dalek nqp/toqast: d824c22 | jnthn++ | src/NQPQ/Actions.pm:
11:38 dalek nqp/toqast: Couple more regex related fixes; gets the protoregex tests passing.
11:38 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/d824c224de
11:38 dalek nqp/toqast: e9bd21c | jnthn++ | src/NQPQ/Actions.pm:
11:38 dalek nqp/toqast: Some more regex updates for QAST.
11:38 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/e9bd21ca21
11:38 jnthn That lot gets us a few steps closer, at least. :)
11:41 JimmyZ NQP && Rakudo no longer depends on PCT now?
11:41 GlitchMr 'abc' ~~ /a/ & /c/
11:41 GlitchMr I start to like junctions :)
11:47 jnthn JimmyZ: NQP still does in master; the toqast branch is where I'm working to remove that dependency.
11:50 JimmyZ jnthn++, that's nice
11:56 masak yes, conjunctions of regexes are useful.
11:59 colomon joined #perl6
12:00 brrt joined #perl6
12:04 Chillance joined #perl6
12:34 brrt1 joined #perl6
12:44 brrt joined #perl6
13:22 xinming joined #perl6
13:33 JimmyZ joined #perl6
13:38 bonifatio joined #perl6
13:38 bonifatio_ joined #perl6
13:38 bonifatio joined #perl6
13:41 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 GlitchMr huh?
13:42 au GlitchMr: it's a build option to perl 5 that preserves more compile-time information that makes a converter easier.
13:44 birdwindupbird joined #perl6
13:46 bonifatio joined #perl6
14:02 SamuraiJack joined #perl6
14:04 jeffreykegler joined #perl6
14:09 jeffreykegler left #perl6
14:09 jeffreykegler joined #perl6
14:10 telex joined #perl6
14:13 masak au++ # extrapolating GlitchMr's "huh?" questions into enough context to be able to answer them
14:25 SamuraiJack joined #perl6
14:30 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 #perl6
14:30 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;
14:31 p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«"a" => "b" => "c"␤"a" => "b" => "c"␤»
14:31 masak gfldex: if you want to match on substrings, use a regex.
14:31 gfldex i c
14:31 GlitchMr perl6: (a => (b => 'c')).perl.say; ((a => 'b') => 'c').perl.say;
14:31 p6eval rakudo 7e1b38, niecza v19-15-g051783d: OUTPUT«"a" => "b" => "c"␤"a" => "b" => "c"␤»
14:31 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…
14:31 p6eval ..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…
14:31 masak hm.
14:31 GlitchMr Should different values return this same .perl?
14:32 masak GlitchMr: no. it's a known bug.
14:33 jnthn masak: That won't work
14:33 jnthn You end up smart-matching the string against the result of callingg .index on it
14:33 masak oh!
14:33 masak right.
14:34 SamuraiJack joined #perl6
14:39 t0rn joined #perl6
14:49 jeffreykegler I am looking for a convenient source for the BNF of Perl6 regexes.  Is STD.pm the best source?
14:50 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.
14:50 moritz I don't even know if they are parsable by context-free languages (XML for one isn't)
14:52 jeffreykegler My interest is a regex interface for Marpa, and I figured best to leverage the interface thinking done in Perl6
14:52 jeffreykegler So I'm not necessarily trying to implement Perl6 regexes
14:53 moritz well, having some p6-regex-like interface for marpa would really be cool
14:53 nebuchadnezzar hi
14:54 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: http://pastebin.com/v835G1MD
14:54 moritz https://github.com/perl6/std/blob/master/STD.pm6 search for 'grammar Regex'
14:54 moritz (to jeffreykegler)
14:55 nebuchadnezzar "given" in the sub does not seems to behave the same way as outside
14:55 jeffreykegler moritz: thanks!
14:56 moritz r: https://gist.github.com/c7dc535fe2900ff0b75f
14:56 p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤Confused␤at /tmp/0bpTaZxXbD:1␤»
14:57 moritz nebuchadnezzar: I'll look into it later
14:57 * masak is looking into it now
14:57 nebuchadnezzar moritz: thanks
14:57 moritz masak++
14:57 masak reproduced the bug locally.
14:57 masak golfing.
15:01 masak 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«[31m===[0mSORRY![31m===[0m��GLOBAL::T does not name any package at /tmp/p7Paq_1036 line 1:�------> [32mclass R {}; multi w(::T[33m�[31m, T) { 0 }; multi w($, $) { -1 }; sub p([0m��A type must be provided at /tmp/p7Paq_1036 line 1:�------> [32mclas…
15:01 p6eval ..rakudo 7e1b38: OUTPUT«-1␤0␤»
15:01 * masak submits rakudobug
15:01 masak oh, niecza doesn't do type capture yet?
15:04 masak 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␤»
15:04 GlitchMr moritz: http://perlgeek.de/blog-en/perl-tips/in-search-of-an-exponetial-regexp.writeback
15:04 masak so an inner *block* isn't enough. it has to be a sub.
15:04 GlitchMr It's more of 100 million a's
15:05 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␤»
15:05 masak correction: the parameter binding is messing it up somehow.
15:05 GlitchMr (but Perl regexpes are really so slow?)
15:06 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
15:06 p6eval star 2012.07: OUTPUT«-1␤0␤»
15:06 masak yep.
15:06 jnthn OK, not a qast related regression then.
15:08 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␤»
15:08 masak curiouser and curiouser.
15:08 masak r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my ($a, $b) = R, R; say w $a, $b
15:08 p6eval rakudo 7e1b38: OUTPUT«-1␤»
15:09 masak a-ha!
15:09 masak not parameter binding. variables!
15:09 masak containers, most like.
15:09 masak r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; my @x = R, R; say w(|@x)
15:09 p6eval rakudo 7e1b38: OUTPUT«-1␤»
15:09 masak aye.
15:09 jnthn Hm
15:10 jnthn Can you make it happen without type catpures?
15:10 jnthn Or are they a necesary part of it?
15:10 masak I have a hunch they are.
15:10 masak r: class R {}; multi w(R, R) { 0 }; multi w($, $) { -1 }; my @x = R, R; say w(|@x)
15:10 p6eval rakudo 7e1b38: OUTPUT«0␤»
15:10 masak aye. they are part of it.
15:10 masak r: class R {}; multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(|[R, R])
15:10 p6eval rakudo 7e1b38: OUTPUT«-1␤»
15:11 masak r: multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(|[1, 1])
15:11 p6eval rakudo 7e1b38: OUTPUT«-1␤»
15:11 masak r: multi w(::T, T) { 0 }; multi w($, $) { -1 }; say w(1, 1)
15:11 p6eval rakudo 7e1b38: OUTPUT«0␤»
15:12 * masak loves golfin' :)
15:13 masak 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␤␤»
15:13 masak yay, I tricked Rakudo into telling me what's wrong, even!
15:13 jnthn masak++ # that makes it rather clearer
15:13 * masak does a victory dance
15:19 masak https://rt.perl.org/rt3/Ticket/Display.html?id=114394
15:19 masak that was the most fun bug in quite a while. nebuchadnezzar++
15:19 masak also, p6eval++ moritz++ for this way of submitting bugs. it is without equal.
15:25 kaare_ joined #perl6
15:27 jeffreykegler joined #perl6
15:29 fridim_ joined #perl6
15:31 * nebuchadnezzar continue the exploration of the perl6 book
15:36 whiteknight joined #perl6
15:39 jeffreykegler What's the best way to try Perl6 snippets online?  I've found http://perlcabal.org/~fglock/perlito6.html  Anything else?
15:41 nebuchadnezzar jeffreykegler: seems that p6eval take gist URL
15:41 nebuchadnezzar r: https://gist.github.com/c7dc535fe2900ff0b75f
15:41 p6eval rakudo 7e1b38: OUTPUT«===SORRY!===␤Confused␤at /tmp/J3e7pBxkvY:1␤»
15:42 nebuchadnezzar or maybe not ;-)
15:42 masak it does. it *parsed* your code.
15:43 masak 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' } }
15:43 p6eval rakudo 7e1b38: OUTPUT«hi␤»
15:43 dalek rakudo/nom: 268788e | jnthn++ | src/Perl6/Actions.pm:
15:43 dalek rakudo/nom: Fix lexical accessor installation; not entirely sure how this ever worked before. Fixes the SEGV in RT#114380.
15:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/268788e3e3
15:43 masak benabik: the problem was analyzed, golfed and filed at https://rt.perl.org/rt3/Ticket/Display.html?id=114394
15:44 benabik masak: That looked like a parse error, not a runtime.
15:45 xinming joined #perl6
15:51 dalek rakudo/nom: 5d5e3e3 | jnthn++ | src/binder/bind.c:
15:51 dalek rakudo/nom: Add missing decontainerize operation in type capture handling.
15:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d5e3e3bce
15:53 GlitchMr my @factorials = 1, [\*] 1 .. Inf
15:53 GlitchMr -Osub... I meant, -Ofun
15:54 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␤»
15:54 benabik GlitchMr++ # clever
15:56 GlitchMr But... if assignment to @ variable isn't lazy, why it is lazy now?
15:57 GlitchMr ... oh, I see... Mostly Eager
15:57 jnthn It's "mostly eager" which means it stops being eager when it sees an infinite thing
15:57 jnthn The new S07 by pmichaud++ explains it quite nicely :)
15:58 benabik Does it stop when there's something definitely infinite or possibly infinite?
15:58 benabik r: my @fs = 1, 2, 3 ... -1; say @fs[^10]
15:58 p6eval rakudo 7e1b38: OUTPUT«(timeout)»
15:58 jnthn S07 says "Obtain all leading items that are not known to be infinite."
16:00 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:01 moritz it is
16:01 SamuraiJack joined #perl6
16:02 GlitchMr But well, I guess that this counts as "internals", so well
16:03 benabik Proving things like that is what I would call "non-trivial"
16:03 integral joined #perl6
16:03 integral joined #perl6
16:03 GlitchMr Hmmm... yeah...
16:03 GlitchMr I mean, something like my @cake = map { 5 }, ^60 could be lazy and nobody would notice
16:04 GlitchMr (yes, I know, nobody would make cakes of fives
16:04 GlitchMr )
16:04 GlitchMr Also, just wondering - will Perl 6 have taint mode?
16:04 dalek rakudo/nom: b28a908 | jnthn++ | src/Perl6/Actions.pm:
16:04 dalek rakudo/nom: Fix issue that caused state variables in class bodies to segfault, and perhaps some other problems along the way.
16:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b28a9081b5
16:05 GlitchMr 5 but Taint.new
16:05 moritz 5 but Tainted(Black)
16:05 moritz just kidding, probably just   but Tainted
16:06 GlitchMr 5 but Tainted?
16:06 moritz aye
16:06 GlitchMr That sounds... very simple
16:07 GlitchMr I mean, even PHP has more complex taint mode
16:07 GlitchMr https://wiki.php.net/rfc/taint
16:07 jnthn 5 but Tainted(Love)
16:10 * geekosaur thinks simplicity of indicating a taint manually proves little; the heavy lifting is done behind the scenes
16:13 masak benabik: yes, that was a parse error. likely something in p6eval. I have no idea what.
16:21 crab2313 joined #perl6
16:31 jnthn r: say ucfirst "aie!"
16:31 p6eval rakudo b28a90: OUTPUT«Aie!␤»
16:33 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 ....
16:35 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.
16:35 TimToady tainting by doubling the number of types is probably not practical
16:37 TimToady but maybe if it's primarily just string types, it'd work okay to just do "mixouts"
16:37 TimToady I hesitate to call them "mixins" when they remove capabilities :)
16:39 TimToady note also that p5's taint mode kinda cheats
16:39 TimToady the operators don't have to worry about propagating it, just the fetches and stores
16:40 TimToady so if you've fetched any tainted values, the remaining stores of the expression set the taint bit
16:43 jnthn r: say -32768 * -65536
16:43 p6eval rakudo b28a90: OUTPUT«2147483648␤»
16:43 jnthn star: say -32768 * -65536
16:43 p6eval star 2012.07: OUTPUT«-2147483648␤»
16:45 dalek rakudo/nom: c3ffe98 | jnthn++ | src/Perl6/Actions.pm:
16:45 dalek rakudo/nom: Fix curious whitespace.
16:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c3ffe98204
16:45 dalek rakudo/nom: 06262dc | jnthn++ | src/Perl6/Actions.pm:
16:45 dalek rakudo/nom: Ensure require doesn't leak spurious, possibly non-Perl 6 values if used as an r-value.
16:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06262dc33b
16:54 * masak tries to imagine using 'require' as an l-value o.O
16:56 moritz (require "foo") = 'bar';
16:56 moritz speaking of which
16:56 moritz require is still ambiguous
16:56 moritz the text in the synopsis says you can pass a module name or file name to it
16:57 moritz but it doesn't say how the compiler should decided which one it is that was passed in
16:57 moritz we *could* have require and require-file
16:57 moritz or require-module and require-file
16:57 moritz since require now needs explicit import lists, it's not going to be a common operation anyway
16:58 moritz so no need to huffmanize it
16:58 jnthn masak: You submitted the darn ticket :P
16:58 jnthn oh, l-value... :)
17:01 masak :)
17:01 jnthn The ticket was BEGIN { require Marshmallow; } or some such
17:05 dalek rakudo/nom: 0eea687 | jnthn++ | src/ (2 files):
17:05 dalek rakudo/nom: Don't fail with an obscure internals error if arguments are given to .HOW, .WHAT, etc.
17:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0eea68781a
17:06 jnthn Well, there's a few RTs shuffled off to testneeded land :)
17:07 crab2313 joined #perl6
17:22 masak \o/
17:29 SamuraiJack joined #perl6
17:41 thou joined #perl6
17:41 arnsholt_ joined #perl6
17:45 bonifatio joined #perl6
17:45 carlin_ joined #perl6
17:46 Some-body_ joined #perl6
17:49 broquaint joined #perl6
17:52 Celelibi joined #perl6
18:01 Chillance joined #perl6
18:06 nwc10 jnthn: 32 bit FreeBSD system: 487048  maximum resident set size
18:07 Timbus joined #perl6
18:07 nwc10 if it doesn't SEGV in the usual place, Raspberry Pi might have an answer in about 2.5 hours
18:08 Ulti joined #perl6
18:09 masak exciting!
18:10 masak 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 #perl6
18:10 mikemol joined #perl6
18:10 sudokode joined #perl6
18:10 dju joined #perl6
18:10 nwc10 EDL?
18:11 timotimo entry, descent and landing
18:12 nwc10 actually, that FreeBSD answer might not be fair
18:12 nwc10 the machine only seems to have 512M of real RAM
18:12 nwc10 no, I can't read. 1 Gb
18:13 jnthn nwc10: How much RAM does a Raspberry Pi Have?
18:13 nwc10 no, I give up. I think it's 1.5Gb.
18:13 nwc10 256Mb, but the GPU has no less than 32Mb of that
18:13 dju joined #perl6
18:14 jnthn Can see how you end up in swap relatively quickly.
18:15 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 nwc10 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 #perl6
18:16 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 nwc10 it's already hit swap in at least part of the build earlier than the setting
18:16 nwc10 possibly NQP
18:17 nwc10 looks like it only has 240M of swap in use
18:17 nwc10 plus 224M of real RAM for the CPU
18:18 birdwindupbird joined #perl6
18:18 nwc10 the perl6 binary is a "fakecutable", isn' it?
18:18 jnthn yeah
18:18 nwc10 so reading that back in would be "bi" (blocks in) but not "si" (swap in) ?
18:19 daniel-s__ joined #perl6
18:19 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.
18:20 jnthn wait, that made no sense
18:21 jnthn I think it must mmap it normally as a PBC, but in the executable it's embedded there in the file
18:22 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
18:22 jnthn Because the perl6 executable is tiny
18:22 jnthn And it load_bytecode's all the other bits
18:22 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
18:23 nwc10 by simply dropping the page
18:23 nwc10 and then when it wants the page again it would be "bi"
18:23 nwc10 I'm wondering why there is a *lot* of "bi"
18:24 nwc10 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 nwc10 "so" is about 98% of "bo"
18:25 jnthn Hmm
18:25 nwc10 yes. Hmm. It may not be important
18:25 nwc10 but it's a bit strange
18:25 nwc10 this only matters on tightly constrained machines
18:26 nwc10 I'm at the limit of my sysadmin fu - I don't know how to work out *what* the "bi" is.
18:26 nwc10 at least, what the balance is, the bit that isn't "si"
18:26 jnthn read_pbc_file_packfile certainly calls mmap
18:26 jnthn And the bytecode is not exactly compact.
18:26 nwc10 what's the bytecode filename that perl6 maps in?
18:27 moritz perl6.pbc
18:27 nwc10 that's tiny
18:28 jnthn See blib/Perl6 for others
18:28 moritz but it loads stuff like CORE.setting.pbc (11M)
18:28 nwc10 moritz: right now I'm compiling the setting, so presumably that's not the culprit this time?
18:29 jnthn Not when you're compiling CORE.setting :)
18:29 moritz nwc10: right
18:29 moritz blib/Perl6/*.pbc is still 9M in total
18:29 jnthn On my machine here, those lib/Perl6 bytecode files add up to 9.5MB
18:29 jnthn And then there's whatever NQP loads
18:42 cognominal joined #perl6
18:42 dalek perl6-roast-data: ad67bf4 | coke++ | / (4 files):
18:42 dalek perl6-roast-data: today
18:42 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/ad67bf4ea4
18:42 dalek perl6-roast-data: fa88935 | coke++ | / (3 files):
18:42 dalek perl6-roast-data: today
18:42 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/fa88935f44
18:49 fgomez joined #perl6
18:57 masak pmichaud, jnthn: http://act.yapc.eu/ye2012/talk/4202 http://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 kst joined #perl6
19:00 jnthn masak: done
19:00 masak jnthn++
19:05 Chillance joined #perl6
19:08 nwc10 dear ACT, why can I add jnthn's talk to my personal shedule, but not Pm's?
19:09 cognominal joined #perl6
19:13 jnthn .oO( Sounds like it's ACTing up... )
19:13 * nwc10 groans
19:13 nwc10 you're here all week?
19:13 cognominal joined #perl6
19:13 jnthn 'fraid so :)
19:14 jnthn 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:15 nwc10 I should look on the bright side - your code is better than your puns
19:15 nwc10 Pm has suckers already. Although maybe they signed up before it was Pm's talk.
19:15 nwc10 or is that hecklers?
19:16 nwc10 OK, Raspberry PI has just done: Stage post       : 12671.807
19:17 nwc10 previous was: Stage post       : 12113.569
19:17 Chillance joined #perl6
19:17 nwc10 so (assumed) lower RAM is not translating into less swap hell
19:18 jnthn Thing is, the most recent savings were largely in the latter stages.
19:18 jnthn By which point you're already in swap hell.
19:19 nwc10 ah OK. So probably haven't improved the locality of the data
19:21 * masak .oO( swap hell is like regular hell, except every so often reality freezes and says "Loading..." )
19:29 adu joined #perl6
19:30 pmurias_ joined #perl6
19:33 pmurias hi
19:33 jeffreykegler joined #perl6
19:33 pmurias jnthn: will moving to nqp fix dumping of QAST?
19:34 nwc10 bother. The kernel doesn't have enough stuff enabled to run iotop
19:37 Chillance joined #perl6
19:38 birdwindupbird joined #perl6
19:39 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.
20:00 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:13 snearch joined #perl6
20:17 nwc10 jnthn: so, current nom is 487048 max RSS on the 32 bit FreeBSD system
20:17 nwc10 2012.07 does ths:
20:17 nwc10 Stage optimize   : 101.169
20:17 nwc10 Failed allocation of 3291628 bytes
20:17 nwc10 Parrot VM: PANIC: Out of mem!
20:17 nwc10 whoopsy.
20:17 nwc10 "did not finish"
20:19 masak aww
20:19 jnthn Eek
20:20 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"
20:20 jnthn Really?!
20:22 moritz r: say 487048 / 1024
20:22 p6eval rakudo 0eea68: OUTPUT«475.632813␤»
20:22 nwc10 yes, that's a bit less than the 3 gig failed allocation
20:27 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␤␤»
20:30 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␤»
20:31 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
20:31 p6eval rakudo 0eea68: OUTPUT«Mu()␤»
20:32 masak ooh
20:32 nwc10 and /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/datatypes.pasm
20:32 masak better than the Null PMC Access in https://rt.perl.org/rt3/Ticket/Display.html?id=101296
20:32 nwc10 that's just one strace of one process fairly early
20:32 nwc10 but *why* do I see the same thing loaded more than once?
20:33 masak jnthn: could I expect the above to say D()?
20:35 nwc10 wtf wtf wtf wtf. I think we have one smoking gun on "why all the I/O?"
20:36 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 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 )
20:37 jnthn nwc10: It's doing that regularly?
20:38 adu joined #perl6
20:38 nwc10 yes.
20:38 jnthn How regularly?
20:38 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
20:38 p6eval rakudo 0eea68: OUTPUT«42␤»
20:38 nwc10 strace shows bursts of brk
20:38 nwc10 and then dozen or so reads of pasm and pbc files
20:38 tadzik \o
20:39 nwc10 I'm running a better strace of everything on a big x86_64 linux box
20:39 nwc10 108 opens of /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/datatypes.pasm
20:40 nwc10 108 opens of /home/nick/Perl/rakudo/install/lib/parrot/4.6.0-devel/include/sysinfo.pasm
20:40 nwc10 108 opens of 9 files
20:41 masak tadzik! \o/
20:41 SamuraiJack joined #perl6
20:41 jnthn r: say 9 * 108
20:41 p6eval rakudo 0eea68: OUTPUT«972␤»
20:41 jnthn nwc10: I can guess what's going on.
20:41 nwc10 good
20:41 nwc10 is it easy to fix? :-)
20:42 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 jnthn For example, trait_mod code.
20:42 jnthn In doing that, we split out PIR that includes a bunch of .include
20:42 jnthn I'm guessing they get loaded every single time.
20:43 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.
20:43 nwc10 yes, trade off versus everything else that needs doing
20:43 jnthn How much of a problem is it?
20:43 masak rn: my $a = 42; say "$a [<file>]"
20:43 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 2, near "file>]\""␤»
20:43 p6eval ..niecza v19-15-g051783d: OUTPUT«42 [<file>]␤»
20:44 nwc10 jnthn: it's only a problem if you're crazy enough to build on a machine that needs to swap
20:44 nwc10 so, um, it's not :-)
20:44 jnthn OK. Then it probably doesn't get priority.
20:44 sorear good * #perl6
20:45 PacoAir joined #perl6
20:46 Chillance joined #perl6
20:48 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 #perl6
20:58 SamuraiJack joined #perl6
21:02 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␤␤»
21:03 masak better than the Null PMC Access at https://rt.perl.org/rt3/Ticket/Display.html?id=78276
21:03 masak 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"
21:03 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␤…
21:05 * masak would expect that to say "lol-greeting", but it's still better than the Null PMC Access the above URL.
21:09 bruges_ joined #perl6
21:10 mberends joined #perl6
21:11 jnthn mberends! o/
21:11 jnthn masak: That looks familiar somehow. Hm.
21:11 mberends jnthn: o/
21:12 masak mberends! \o/
21:12 masak jnthn: yeah, it's all from RT.
21:15 sorear mberends! o/
21:16 mberends /o sorear, masak
21:19 pmurias sorear: hi
21:20 cognominal joined #perl6
21:22 masak I'm now back two years in the bug queue. yes, we definitely have more "high-level" bugs these days.
21:22 masak and I bet I will see a similar decrease in quality going back two more years.
21:23 masak it's a nice trend.
21:23 masak given that we'll see more of the future as we go along, I mean.
21:24 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 nwc10 and then get read back
21:24 nwc10 well, their clean pages are discarded, and re-read
21:25 sftp joined #perl6
21:26 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␤»
21:26 masak r: class A::B { my $c = 42; method foo { $c = "OH HAI"; say $A::B::c } }; A::B.foo
21:26 p6eval rakudo 0eea68: OUTPUT«Any()␤»
21:28 masak the former one is fine, I guess. at least if package stashes can be extended like that.
21:28 masak the latter one is, hm, also fine.
21:29 * masak rejects https://rt.perl.org/rt3/Ticket/Display.html?id=72326
21:33 adu joined #perl6
21:46 nwc10 left #perl6
21:50 gongyiliao joined #perl6
21:59 colomon joined #perl6
22:10 _sri joined #perl6
22:11 hanekomu joined #perl6
22:20 quietfanatic joined #perl6
22:23 quietfanatic I like how you're adding Perl6ish features to functional programming.
22:24 quietfanatic Is 'say' not a normal function?  Is it a low-precedence prefix instead?
22:24 jnthn Normal function
22:26 quietfanatic whoops
22:26 quietfanatic sorry, that was meant to be a privmsg
22:26 quietfanatic about something else.
22:26 * jnthn found the first statement kinda curious :)
22:27 quietfanatic haha
22:27 quietfanatic I am not at liberty to say more myself, unfortunately :)
22:27 jnthn That's OK, you needn't. :)
22:33 quietfanatic I am so full of fail right now.
22:36 masak quietfanatic! \o/
22:37 masak yeah, I'm not yet ready to divulge that secret project yet :P
22:38 masak s/yet //
22:38 jnthn masak and his secret projects! :P
22:38 masak yeah, I'm like, the only person with them.
22:43 quietfanatic hello
22:43 quietfanatic yeah, I accidentally dumped a bunch of PMs on moritz++ just now too
22:44 masak you're still in the channel :)
22:44 quietfanatic so you may have to give him the NDA talk too. :)
22:44 masak shut up! :)
22:44 quietfanatic geh
22:44 masak I'm so glad this isn't serious.
22:44 * masak hugs quietfanatic :)
22:45 quietfanatic I probably shouldn't Internet on a tired sunday afternoon when I'm sleepy and watching olympics :)
22:45 jaldhar joined #perl6
23:07 jnthn 'night, #perl6
23:10 quietfanatic night
23:37 sorear night?  aren't you still in CA, quietfanatic?
23:37 masak it was directed to jnthn.
23:37 sorear ...oh
23:38 masak sometimes we momentarily pretend that the other person's time zone has some basis in objective reality, direct observations nonwithstanding... :)
23:39 masak in other news, I'm not convinced all you people aren't just simulations of consciousness, rather than the real thing.
23:39 masak you're very faithful simulations, I'll grant you that. :)
23:39 quietfanatic quite impressive simulation, if so.  I'd like to meet the creator :)
23:40 * masak .oO( "that could be arranged..." )
23:40 quietfanatic eep
23:40 masak :P
23:44 masak 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 masak put differently, why the heck am I inside *my* brain of all brains?
23:53 * masak 's late-night solipsism got warnocked ;)
23:53 masak 'night, #perl6
23:56 au masak: rest well, and dream of self-representational, higher-order theories of consciousness, preconsciousness and unconsciousness, not necessarily in that sequence :)
23:58 nebuchadnezzar r: http://pastebin.com/raw.php?i=L2p6aGwG
23:58 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Confused␤at /tmp/c6fSn42yp2:1␤»
23:59 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

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

Perl 6 | Reference Documentation | Rakudo