Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 fgomez joined #perl6
00:14 _jaldhar joined #perl6
00:30 _jaldhar joined #perl6
00:33 * [Coke] yawns.
00:37 snearch joined #perl6
00:37 sisar joined #perl6
00:39 * [Coke] remains blocked on partcl-nqp for now.
00:40 dalek perl6-roast-data: 083a5ab | coke++ | / (4 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/083a5ab48f
00:40 dalek perl6-roast-data: 00bc2db | coke++ | / (3 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/00bc2db772
00:40 dalek perl6-roast-data: c0d51ce | coke++ | p (2 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/c0d51ce5ac
00:40 dalek perl6-roast-data: bcf5da5 | coke++ | p (2 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bcf5da5c78
00:40 dalek perl6-roast-data: 8cd608d | coke++ | p (2 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/8cd608d0b7
00:40 dalek perl6-roast-data: 770f64f | coke++ | p (2 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/770f64fe02
00:40 dalek perl6-roast-data: e004f76 | coke++ | / (4 files):
00:40 dalek perl6-roast-data: today
00:40 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e004f76f9b
00:42 benabik joined #perl6
01:00 skids joined #perl6
01:03 scott__ joined #perl6
01:12 masak joined #perl6
01:12 telex joined #perl6
01:18 TimToady ?"""
01:21 TimToady that would be my kitty, who doesn't know Perl 6 very well yet
01:21 rk joined #perl6
01:24 tokuhiro_ joined #perl6
01:28 colomon std: ?"""
01:28 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/9yM1_q_E9N line 1:â�¤------> [32m?""[33mâ��[31m"[0mâ�¤    expecting any of:â�¤  POSTâ�¤   infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤        postfix_prefix_meta_operatorâ�¤   postopâ�¤ statement modifier
01:28 p6eval ..loop␤Parse failed␤…
01:33 fgomez joined #perl6
02:09 MikeFair_ joined #perl6
02:11 orafu joined #perl6
02:15 * MikeFair_ waves to #perl6.
02:53 colomon o/
02:54 sorear o/
04:27 tipdbmp r: "abc".chars
04:27 p6eval rakudo d1f4dc:  ( no output )
04:27 tipdbmp r: say "abc".chars
04:27 p6eval rakudo d1f4dc: OUTPUT«3␤»
04:28 tipdbmp r: say "за̀пра".chars
04:28 p6eval rakudo d1f4dc: OUTPUT«6␤»
04:30 bluescreen100 joined #perl6
04:31 tipdbmp How do you count the characters of a string like the above (not counting the stress mark as a character)?
04:31 sorear r: say "за̀пра".ords
04:31 p6eval rakudo d1f4dc: OUTPUT«1079 1072 768 1087 1088 1072␤»
04:31 sorear r: say "за̀пра".comb.grep(/<!:Mark>/)
04:31 p6eval rakudo d1f4dc: OUTPUT«з а ̀ п р а␤»
04:31 sorear n: say "за̀пра".comb.grep(/<!:Mark>/)
04:31 p6eval niecza v21-1-ga8aa70b: OUTPUT«з а ̀ п р а␤»
04:32 sorear n: say "за̀пра".comb.grep(/<!:M>/)
04:32 p6eval niecza v21-1-ga8aa70b: OUTPUT«з а ̀ п р а␤»
04:32 sorear n: say "за̀пра".comb.grep(/<:Gc(!/M/)>/)
04:32 p6eval niecza v21-1-ga8aa70b: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1287 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting…
04:32 sorear n: say "за̀пра".comb.grep(/<:ccc(0)>/)
04:32 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Cannot parse number: Aâ�¤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/lib/CORE.setting line 3525 (ANON @ 11) â�¤  at /home/p6eval/niecza/lib/CORE.setting line 3527 (NumSyntax.str2num @ 5…
04:32 sorear n: say "за̀пра".comb.grep(/<:ccc<0>>/)
04:32 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Cannot parse number: Aâ�¤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/lib/CORE.setting line 3525 (ANON @ 11) â�¤  at /home/p6eval/niecza/lib/CORE.setting line 3527 (NumSyntax.str2num @ 5…
04:33 sorear theoretically .chars will do it.
04:33 TimToady we don't have NFG yet
04:33 tipdbmp Oh, ok.
04:33 TimToady but 5 would be the "correct" answer by spec
04:37 sorear n: say "за̀пра".comb.grep(/<:ccc("0")>/)
04:37 p6eval niecza v21-1-ga8aa70b: OUTPUT«з а п р а␤»
04:38 sorear n: say "за̀пра".comb.grep(/<:ccc("0")>/).elems
04:38 p6eval niecza v21-1-ga8aa70b: OUTPUT«5␤»
04:38 sorear r: say "за̀пра".comb.grep(/<:ccc("0")>/).elems
04:38 p6eval rakudo d1f4dc: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 2, near "(\"0\")>/).e"␤»
04:39 sorear \o/
04:42 [particle] joined #perl6
04:42 tipdbmp =)
04:46 sorear of course this will be several orders of magnitude slower than .chars :(
04:51 benabik joined #perl6
04:51 benabik_ joined #perl6
05:23 xinming joined #perl6
05:46 kaleem joined #perl6
05:55 stepnem joined #perl6
06:05 wtw_ joined #perl6
06:17 daniel-s joined #perl6
06:18 xinming_ joined #perl6
06:25 Su-Shee good morning everyone.
06:30 scott__ welcome
06:36 sorear o/
06:44 FROGGS__ joined #perl6
06:48 xinming joined #perl6
06:48 Edument joined #perl6
06:56 am0c joined #perl6
07:02 brrt joined #perl6
07:03 FROGGS joined #perl6
07:07 FROGGS good morning
07:11 brrt 'o
07:11 sorear o/
07:11 scott__ o/
07:22 dalek ecosystem: ee40694 | ronaldxs++ | META.list:
07:22 dalek ecosystem: Add Enc::MIME::Base64 module
07:22 dalek ecosystem:
07:22 dalek ecosystem: See end of README.md for explanation of why Perl 6 wants another MIME Base64 encoder.
07:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ee40694821
07:22 dalek ecosystem: b5a2b54 | (Aliaksandr Zahatski)++ | META.list:
07:22 dalek ecosystem: Merge pull request #13 from ronaldxs/patch-1
07:22 dalek ecosystem:
07:22 dalek ecosystem: Add Enc::MIME::Base64 module
07:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b5a2b544cf
07:28 tadzik haha, I just did the same thing :)
08:03 dalek Perlito: 8b845c5 | (Flavio S. Glock)++ | / (3 files):
08:03 dalek Perlito: Perlito5 - javascript: fix context in eval and in anon sub
08:03 dalek Perlito: review: https://github.com/fglock/Perlito/commit/8b845c5b5a
08:06 Edument joined #perl6
08:16 fhelmberger joined #perl6
08:21 kresike joined #perl6
08:21 kresike good morning all you happy perl6 people
08:21 tadzik good day kresike-y
08:22 kresike hello tadzik o/
08:22 masak morning, #perl6
08:22 kresike hello masak o/
08:24 Psyche^ joined #perl6
08:26 moritz \o masak
08:26 moritz \o tadzik, kresike
08:26 FROGGS joined #perl6
08:26 sorear o//
08:26 FROGGS__ joined #perl6
08:33 kresike hello moritz o/
08:35 * moritz just created his first object in the RIPE test database
08:36 dalek Perlito: da14ca5 | (Flavio S. Glock)++ | / (4 files):
08:36 dalek Perlito: Perlito5 - update Makefile; bump perl version to 5.14.1
08:36 dalek Perlito: review: https://github.com/fglock/Perlito/commit/da14ca582f
08:36 Su-Shee moritz: so, you're going to bring down the european internet until noon today? :)
08:38 moritz Su-Shee: I'm trying hard, yes :-)
08:38 moritz no, it's just the test database so far
08:39 Circlepuller joined #perl6
08:40 Su-Shee moritz: I just wanted to make you nervous. :)
08:41 abraxxa joined #perl6
08:41 moritz and suddenly I have to think of http://www.youtube.com/watch?v=_y36fG2Oba0
08:41 abraxxa i've upgraded rakudo from 2011.01 to 2012.08 and now the line $play_again = $input eq 'j'; result in the error Cannot assign into a PMCNULL container in block  at
08:42 mathw joined #perl6
08:42 hoelzro that's quite an upgrade
08:42 moritz r: my $input = 'foo'; my $play_again = $input eq 'j'; say 'alive'
08:42 p6eval rakudo d1f4dc: OUTPUT«alive␤»
08:42 moritz abraxxa: seems to work here... maybe show more context?
08:43 moritz abraxxa: and delete any old .pir files (from precompiled modules)
08:43 Su-Shee well if that's all he's got as a error with an upgrade of a year...
08:43 moritz well, it's the *first* error :-)
08:43 abraxxa https://gist.github.com/806301
08:43 abraxxa line 81
08:44 abraxxa it was the first time i touched perl6 and never had time to do so since then
08:44 abraxxa was a coding contest against a friend who does c#
08:44 abraxxa the original c# code of a co-student had over thousand lines!
08:45 moritz it doesn't even show me the first prompt here :*
08:45 moritz :(
08:45 Su-Shee abraxxa: "Willkommen bei EuroMillionen"? What are you going to pay for help? :))
08:47 Su-Shee isn't there just a ; missing in the line above?
08:47 moritz shouldn't be necessary, because the previous line ends with }
08:47 Su-Shee ok.
08:49 abraxxa when i comment out line 81 i get Null PMC access in get_bool() in block  at ./euromill.pl6:82
08:50 moritz abraxxa: are you sure you're using the right perl6 binary
08:50 moritz ?
08:50 moritz so many Null PMC accesses are very uncharacteristic of rakudo 2012.08
08:50 abraxxa [ahartmai@ahartmai-nb:~/perl6$ ]$ which perl6 -> /home/ahartmai/perl6/rakudo-2012.08/install/bin/perl6
08:50 sorear r: https://gist.github.com/806301
08:50 moritz what does  perl6 --version  say?
08:51 p6eval rakudo d1f4dc: OUTPUT«(timeout)Willkommen bei EuroMillionen!␤use of uninitialized value of type Str in string context  in block  at /tmp/NVkV7LiIcX:34␤␤use of uninitialized value of type Str in string context  in block  at /tmp/NVkV7LiIcX:34␤␤use of uninitialized value of type Str in st…
08:51 sorear n: https://gist.github.com/806301
08:51 abraxxa This is perl6 version 2012.08 built on parrot 4.4.0 revision RELEASE_4_4_0
08:51 p6eval niecza v21-1-ga8aa70b: OUTPUT«(signal XFSZ)Willkommen bei EuroMillionen!␤Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen sie einen Quicktipp abgeben? j/n: Wollen si…
08:51 moritz wtf is signal XFSZ?
08:51 sorear File size limit exceeded
08:52 sorear I did not know you had a disk quota on p6eval
08:52 moritz it's per-process
08:52 moritz set in Evalbot::Executer or so
08:52 moritz not globally
08:53 sorear I guess it just kept spewing messages to the output file until it got to 15M
08:54 sorear .oO( proof of niecza speed )
08:56 abraxxa so the syntax hasn't change somewhere since i wrote it?
08:59 sorear doesn't look like it
08:59 sorear but I do see one questionable bit
08:59 sorear until (my $input = prompt("Bitte geben sie Nummer $_ ein (1-50): ")) ~~ any @allowed_numbers && $input !~~ any @numbers {}
08:59 sorear until (my $input = prompt("Bitte geben sie Stern $_ ein (1-9): ")) ~~ any @allowed_stars && $input !~~ any @stars {}
08:59 dakkar joined #perl6
08:59 moritz precedence?
09:00 sorear that is parsed as $input ~~ any( @allowed_numbers && $input !~~ any @numbers )
09:00 sorear a function call without parens swallows everything to the right
09:00 moritz ... depending on the precedence of the stuff on the right :-)
09:02 sorear I am fairly certain that there is no such dependance
09:02 sorear ah, 'and'
09:07 abraxxa the code runs until after the prompt in line 81
09:07 abraxxa is the repeat while loop ok?
09:08 sorear repeat while loops are still valid
09:08 moritz sorear: and, or, feed operators, statement modifiers
09:08 jerome joined #perl6
09:09 wk joined #perl6
09:09 sorear that particular repeat while is legal syntax
09:09 abraxxa line 80 is different from the same lines above by not using my before $input
09:10 sorear if you fix the precedence thing what happens?
09:11 abraxxa the error remains the same
09:15 sorear you may have found a nom regression./
09:15 sorear you could try my compiler :D
09:15 FROGGS sorear: you'are the only one hacking on niecza?
09:17 moritz now please reduce the example to something minimal that still exposes the bug, and submit as a bug report
09:18 UncleFester6 joined #perl6
09:18 moritz somehow prompt doesn't work at all on my machine :(
09:19 UncleFester6 After a few small fixes my new Enc::MIME::Base64 module now installs OK with panda ...
09:20 tadzik awesome
09:21 abraxxa http://paste.scsys.co.uk/207402
09:21 sorear FROGGS: no, colomon has been contributing a lot lately
09:21 sorear and others have done so in the paste
09:24 abraxxa that's a minimal test case
09:25 abraxxa moritz: how should perl6 bugs be submitted? can i transform it to a test case for the testsuite?
09:25 moritz abraxxa: per email to rakudobug@perl.org
09:26 moritz abraxxa: and yes, a test case would also be nice
09:26 abraxxa is the pasted code sufficient?
09:26 moritz no
09:26 moritz it contains way too much irrelevant code
09:26 abraxxa you might want to add this info to the channel topic
09:26 moritz remove everything from it that you don't need to reproduce the bug
09:26 abraxxa moritz: i'm talking about this one http://paste.scsys.co.uk/207402
09:27 * sorear wonders if that can still be simplified
09:28 sorear e.g. do you really need the outer loop?
09:28 sorear or the ~~ any('j', 'n') ?
09:28 sorear think about this in terms of features
09:28 abraxxa works without the loop
09:28 sorear making your test case not use junctions would be a big simplification
09:29 abraxxa works also in a block
09:29 moritz does it need prompt?
09:29 moritz abraxxa: oh, I didn't see that paste. Much better.
09:29 sorear sleep&
09:30 abraxxa http://paste.scsys.co.uk/207406
09:30 moritz abraxxa++
09:31 abraxxa moritz: no prompt for you ;)
09:31 abraxxa so the error message pointed to the right line
09:31 abraxxa rakudo++
09:32 moritz r: my $r; repeat { $r = False } while $r
09:32 p6eval rakudo d1f4dc: OUTPUT«Cannot assign into a PMCNULL container␤  in block  at /tmp/uNv11_2WYi:1␤␤»
09:32 dalek Perlito: 6807ab1 | (Flavio S. Glock)++ | README-perlito5:
09:32 dalek Perlito: Perlito5 - add a note about javascript minification
09:32 dalek Perlito: review: https://github.com/fglock/Perlito/commit/6807ab178b
09:32 moritz r: my $r; repeat { } while $r
09:32 p6eval rakudo d1f4dc: OUTPUT«Null PMC access in get_bool()␤  in block  at /tmp/3zlZmjjYKh:1␤␤»
09:32 moritz ooh, different error message :-)
09:32 abraxxa looks like a boolification problem
09:32 moritz the problem is that likely that $r isn't set up properly
09:33 moritz so it's either a problem with assignment to it, or boolification, depending on what happens first
09:33 moritz abraxxa++
09:33 moritz abraxxa: do you want to submit the bug, or should I?
09:34 abraxxa if that last code snippet is ok for submission i'll do it
09:34 moritz it is
09:35 xinming joined #perl6
09:36 abraxxa sent
09:38 moritz r: my $r; repeat { $r = 1 } while False;
09:38 p6eval rakudo d1f4dc:  ( no output )
09:39 moritz r: my $r; repeat { $r = 1 } while $r
09:39 p6eval rakudo d1f4dc: OUTPUT«Cannot assign into a PMCNULL container␤  in block  at /tmp/cDgkya3ZJR:1␤␤»
09:39 moritz so it's dependent on $r being reference in the while condition
10:11 spider-mario joined #perl6
10:11 UncleFester6 left #perl6
10:16 moritz TIL that the RIPE database stores poems
10:20 cognominal joined #perl6
10:22 daniel-s_ joined #perl6
10:26 huf joined #perl6
10:33 marmay joined #perl6
10:36 daxim joined #perl6
10:38 woosley joined #perl6
10:40 estrai is there an easy way to tell a class to accept only the attributes it knows about (as in defined) in the constructor?
10:41 tadzik not that I know of
10:41 tadzik it should be possible to write MuX::StrictConstructor, like Moose has it :)
10:42 flussence make a stricter constructor that just passes through to default .new?
10:43 flussence (is the default .new even reachable once you define another one?)
10:44 jnthn nextsame
10:44 arnsholt Something like method new(:$arga!, :$argb!) { nextsame; } should do it I think
10:44 jnthn aye
10:44 arnsholt Or submethod, if it shouldn't be inherited
10:45 jnthn role CheckedNew { method new(*%args) { nextsame;
10:45 jnthn oops
10:46 flussence r: class A { has $.foo = 0; only method new(:$foo) { nextsame } }; my $a = A.new(:foo(5), :wuz(3));
10:46 p6eval rakudo d1f4dc:  ( no output )
10:46 estrai that's awesome, didn't know you can override .new like that
10:47 flussence that lack of error seems wrong
10:47 jnthn oh...
10:47 jnthn methods get an implicit *%_
10:47 flussence r: class A { has $.foo = 0; only method new(:$foo) { die if %_; nextsame } }; my $a = A.new(:foo(5), :wuz(3));
10:47 p6eval rakudo d1f4dc: OUTPUT«␤  in method new at /tmp/ygSHTT47yY:1␤  in block  at /tmp/ygSHTT47yY:1␤␤»
10:48 flussence that sounds better
10:48 jnthn r: class A { has $.foo = 0; only method new((% (:$foo)) { nextsame } }; my $a = A.new(:foo(5), :wuz(3));
10:48 p6eval rakudo d1f4dc: OUTPUT«===SORRY!===␤Missing block␤at /tmp/dY2PiB6Ds7:1␤»
10:48 jnthn grr
10:48 jnthn r: class A { has $.foo = 0; only method new(*% (:$foo)) { nextsame } }; my $a = A.new(:foo(5), :wuz(3));
10:48 p6eval rakudo d1f4dc: OUTPUT«Unexpected named parameter 'wuz' passed in sub-signature␤  in method new at /tmp/UjfWbX8HUQ:1␤  in block  at /tmp/UjfWbX8HUQ:1␤␤»
10:48 jnthn That also does it :)
10:48 flussence jnthn++
10:48 jnthn but really, you can write a role that pulls in a new method that does the validation.
10:49 jnthn (against the object attributres)
10:49 estrai what would be the check I could use?
10:49 cognominal joined #perl6
10:51 estrai eval likely, right?
10:51 buubot_backup estrai: ERROR: syntax error at (eval 20) line 2, at EOF
10:54 jnthn do self.^attributes to introspect the object's available attributes.
10:54 jnthn Only look for those that have an accessor
10:58 estrai that's cool but still involves some manual work to remove sigils, is there any other method to retrieve only the attribute names?
10:58 jnthn Don't think so
10:58 jnthn otoh, it's only a call to .substr :)
10:59 FROGGS__ joined #perl6
10:59 jnthn and you're factoring it out into a role so it's not so much work
10:59 jnthn (as in, can re-use the effort)
11:00 FROGGS joined #perl6
11:01 estrai yy, just checking :) thank you
11:05 Su-Shee_ joined #perl6
11:11 daxim someone with a reddit account please reply:  http://www.reddit.com/r/perl/comments/zi3ev/should_i_learn_perl5_or_perl6/c6533z7  "You're probably thinking of [November](http://www.perlfoundation.org/perl6/index.cgi?november) by viklund and masak."
11:26 ggoebel__ joined #perl6
11:37 ggoebel__ joined #perl6
11:38 UncleFester6 joined #perl6
11:48 broquaint joined #perl6
11:54 sisar joined #perl6
11:58 ggoebel__ joined #perl6
12:01 vs-midi joined #perl6
12:08 fgomez joined #perl6
12:12 GlitchMr joined #perl6
12:30 benabik joined #perl6
12:31 dayangkun joined #perl6
12:41 JimmyZ joined #perl6
12:42 mtk joined #perl6
12:44 sergot hi o/
12:47 atrodo joined #perl6
12:51 PacoAir joined #perl6
13:07 dakkar joined #perl6
13:08 tokuhiro_ joined #perl6
13:25 bluescreen10 joined #perl6
13:31 colomon \o
13:33 SmartViking joined #perl6
13:34 SmartViking If I don't know perl to begin with, should I focus in learning perl6 or perl5?
13:35 SmartViking I'm asking for opinions because I have none
13:35 hoelzro SmartViking: Perl6 still isn't considered "production ready"
13:35 tadzik SmartViking: what do you want to do with it?
13:35 hoelzro Perl 5 is still alive and kicking, and will be for a while
13:35 SmartViking tadzik: Just for my own amusement
13:35 moritz SmartViking: if you want results fast, Perl 5 is probably better. If you want to learn a nicer language, Perl 6 is better :-)
13:35 hoelzro and learning Perl 6 after Perl 5 shouldn't be a problem
13:35 tadzik SmartViking: Perl 6 is good for own amusement :)
13:36 SmartViking Hm ok now I've got a better idea, thanks :)
13:43 PerlJam SmartViking: so ... which are you going to put effort into learning?  :)
13:43 GlitchMr joined #perl6
13:43 Circlepuller_ joined #perl6
13:43 SmartViking PerlJam: I think I'm going to learn perl 6 :)
13:44 PerlJam SmartViking: excellent!
13:44 SmartViking PerlJam: :)
13:46 skids joined #perl6
13:46 GlitchMr joined #perl6
13:51 [Coke] SmartViking: welcome aboard. Let us know if you have any questions.
13:51 SmartViking [Coke]: Thanks, I will :)
13:55 gongyiliao joined #perl6
13:57 Circlepuller joined #perl6
13:59 fgomez joined #perl6
14:01 moritz github fail: cuts off two characters from an overlong message, and replaces it by three dots
14:02 [Coke] moritz: wow, that sounds like something *I* would do.
14:04 PerlJam sounds like a one of the standard rails routines.
14:07 moritz I've even seen that once with a printer for bank statements
14:08 moritz the last page contained something along the lines of "please remove all the pages printed so far, more forthcoming"
14:08 moritz and then there was one more :-)
14:08 Woodi rn: sub set( $a ) { say $a.encode.bytes }; set( 3 );
14:08 p6eval rakudo d1f4dc: OUTPUT«No such method 'encode' for invocant of type 'Int'␤  in sub set at /tmp/Dzez5aMpI5:1␤  in block  at /tmp/Dzez5aMpI5:1␤␤»
14:08 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method encode in type Int␤  at /tmp/h4O2ThGwCf line 1 (set @ 4) ␤  at /tmp/h4O2ThGwCf line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting lin…
14:09 Woodi it's nqp ?
14:09 jnthn encode is a method on Str
14:10 Woodi but $a is Perl varible
14:10 jnthn wat?
14:10 Woodi so Int2Str conversion should be automatic I think
14:11 moritz not every possible method
14:11 Woodi or it is perl6 here :)
14:11 jnthn That's only true for things we explicitly put in Cool.
14:11 moritz only for those specced to be present in class Cool
14:11 jnthn I'm not sure encode belongs there.
14:11 Woodi k, understud
14:11 moritz I'm sure it doesn't belong there
14:11 jnthn :)
14:12 stopbit joined #perl6
14:13 benabik joined #perl6
14:16 mucker joined #perl6
14:17 Edument left #perl6
14:18 nnunley joined #perl6
14:24 Celelibi joined #perl6
14:28 [Coke] crud. I just did a git stash on a branch, did a bisect, checkout'd master, git stash pop... conflicts. is there a way to undo the git stash pop? (are the stash commits stored somewhere I could get a pristine copy?)
14:30 moritz [Coke]: check with 'git stash show' if the stash is still in the stash list
14:30 moritz [Coke]: if yes, you can just 'git checkout .' to reset the working copy to the repo, which undoes the stashing (but discards all other changes you made)
14:30 hoelzro git stash drop shouldn't mutate the stash if there are conflicts
14:30 [Coke] ah, even better.
14:31 moritz [Coke]: or did you want to find the commit from which you did the 'git stash'?
14:32 * moritz is a bit confused
14:35 [Coke] no, I wanted the stash back so I could re-apply it cleanly. I just freaked out when I got the conflict.
14:36 [Coke] all set now, danke.
14:38 [Coke] moritz++ hoelzro++
14:40 sirrobert joined #perl6
14:41 GlitchMr joined #perl6
14:50 FROGGS__ joined #perl6
14:51 FROGGS joined #perl6
15:06 lorenzo542 joined #perl6
15:11 jnthn goeteborg &
15:27 kresike bye folks
15:30 MayDaniel joined #perl6
15:46 sivoais joined #perl6
15:46 SmartViking What does the //= operator do? Is it different from =?
15:47 hoelzro SmartViking: //= is "defined or"
15:47 PerlJam SmartViking: $a //= $b  is the same as $a = $a // $b
15:47 diakopter if the lhs is not defined, it assigns the rhs to the lhs
15:48 SmartViking Ok thanks
15:49 SmartViking What does it mean that it's not defined?
15:49 daxim that the variable has no value
15:49 SmartViking daxim: But the variable does exist?
15:49 daxim yes
15:49 SmartViking Ok thanks
15:50 PerlJam SmartViking: when you say "my $foo;"  $foo will be undefined until you assign a value to it.
15:50 atrodo joined #perl6
15:50 TimToady this is often used with array elements to make a cache
15:50 SmartViking PerlJam: Ah that makes sense
15:50 TimToady in that case, the array exists, but the element won't exist
15:53 thou joined #perl6
15:54 SmartViking I'm liking perl 6 though. Seems like a language that will allow me to glu stuff together quickly
15:54 SmartViking glue*
15:55 SmartViking And get stuff done
15:55 pmurias joined #perl6
15:55 PerlJam That's pretty much the definition of "Perl"
15:55 pmurias jnthn: how do I hook it a js backend to nqp?
16:01 SmartViking I've used Python for some years and while it's great, it aimes to be so 'clean' and canonical, it's hard to run a system command for example, and regex isn't that straighforward either which I've heard it is in perl
16:01 ggoebel__ joined #perl6
16:03 PerlJam SmartViking: python tries to shoe-horn regex into strings.  Having a little more first-class syntax for them helps.
16:03 Pleiades` joined #perl6
16:06 SmartViking PerlJam: Yeah. Python isn't that great with regex from the stance of the developer in my experience, it's always been a bit of a hazzle
16:09 kaare__ joined #perl6
16:10 SmartViking Excuse my verbosity, bad personality trait
16:13 ggoebel__ joined #perl6
16:21 TimToady verbosity is not a problem here, as long as you're interesting :)
16:23 TimToady we find that we all have complementary personality defects here, so as long as it contributes to the overhealth of the culture and the technology, we like defective people here
16:23 TimToady *overall health
16:23 SmartViking Great :)
16:25 PerlJam SmartViking: and if you're not careful, someone may hug you.
16:25 SmartViking PerlJam: I'll watch my back :)
16:25 TimToady there are a few personality defects that we try to discourage, such as the kinds of behaviors that reinforce the Male Only ethos prevalent among geeks
16:26 tokuhiro_ joined #perl6
16:27 TimToady basically, it's fine to be weird here, as long as it's not an excuse to be antisocial
16:29 SmartViking What does '~~ 'do?
16:29 PerlJam SmartViking: ~~ is smart match.
16:29 TimToady in which context?  in normal expressions, it's a smartmatch
16:30 SmartViking TimToady: Yeah normal expressiosn
16:30 TimToady it's something a little different in regexes, but not yet implemented, actually, I think
16:30 wk joined #perl6
16:31 wk joined #perl6
16:32 TimToady smartmatching is described in S03:3552
16:33 SmartViking Thanks
16:34 TimToady afk &
16:47 patspam joined #perl6
16:55 fgomez joined #perl6
16:57 stepnem_ joined #perl6
17:01 sorear good * #perl6
17:03 stopbit joined #perl6
17:05 felher o/ sorear
17:24 jnthn pmurias: Probably similar-ish to Rakudo.
17:25 jnthn pmurias: I suspect that QAST::Compiler will want to become QAST::Compiler::Parrot or so, and then write a QAST::Compiler::JS or so. That's how the integration will want to look eventually, I think.
17:25 benabik joined #perl6
17:28 TimToady nr: proto A(Int, Int) { {*} }
17:28 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  &A is declared but not used at /tmp/bVYHvmhseb line 1:â�¤------> [32mproto A[33mâ��[31m(Int, Int) { {*} }[0mâ�¤â�¤Â»
17:28 p6eval ..rakudo d1f4dc: OUTPUT«===SORRY!===␤{*} may only appear in proto at line 2, near " }"␤»
17:29 TimToady um, that *is* a proto
17:29 jnthn Hm :)
17:29 moritz TimToady: no, it's inside a block inside a proto :-)
17:29 jnthn What it really wants to tell you is "we only support proto foo(...) { * }"
17:29 TimToady and the idea was that we could put stuff in the proto with the {*}, before and after
17:29 TimToady like, caching
17:29 jnthn Yeah. I even implemented and use that in NQP
17:30 jnthn Kinda funny that NQP has a feature that Rakudo doesn't :)
17:30 TimToady (you may recognized that as the proto for an ackermann function :)
17:30 jnthn If somebody want to steal NQP's handling of it, go for it. Otherwise I'll try and get to it when I have a tuit supply again :)
17:30 benabik joined #perl6
17:30 * jnthn is currently preoccupied with the talk he's giving tomorrow that ain't really written yet :)
17:31 TimToady of course, niecza's failure mode is to just return Whatever.new there...
17:31 TimToady so I guess I prefer rakudo's failure mode on sorear++'s principle of failing early :)
17:33 TimToady jnthn: no rush, just didn't want it slipping past into 6.0.0  :)
17:34 benabik joined #perl6
17:35 dalek Perlito: 52de322 | (Flavio S. Glock)++ | / (7 files):
17:35 dalek Perlito: Perlito5 - javascript: add "Javascript2" backend for optimization experiments
17:35 dalek Perlito: review: https://github.com/fglock/Perlito/commit/52de3223f1
17:36 fglock joined #perl6
17:36 benabik joined #perl6
17:41 benabik joined #perl6
17:42 jnthn TimToady: Yeah, but adding the things I already figured out how to is kinda LHF ;)
17:43 TimToady will it handle: proto A(Int $m, Int $n) { (state @)[$m][$n] //= do {*} }
17:44 jnthn I don't immediately see any reason why not
17:44 benabik joined #perl6
17:45 TimToady I suppose a question is whether it requires the 'do' there
17:47 benabik joined #perl6
17:50 jnthn nqp: proto sub foo() { my $x := {*}; say($x) }; multi sub foo() { 42 }; foo()
17:50 p6eval nqp: OUTPUT«42␤»
17:50 jnthn Not in NQP, apparently :)
17:50 felher (state @) is an persistent array with an empty name?
17:50 jnthn yeah
17:51 felher k, thnx :)
17:51 sorear It's only persistent relative to the current instance of the current sub
17:51 sorear for the most part state variables act like normal variables lifted 1 sub up
17:52 * jnthn thinks of it as "one per closure clone"
17:52 PerlJam well, you could bind it to a name with a wider scope
17:52 sorear sub foo { return sub { push (state @), $_ } }  # each time foo is called, a new state @ is created
17:52 jnthn aye
17:52 felher I see. Thanks :)
17:54 Chillance joined #perl6
17:55 TimToady then the other question is, if {*} is just a magic term, can it be used where other blocks are expected, such as loop {*}
17:57 TimToady or would that have to be written {{*}} ?
17:58 ggoebel__ joined #perl6
18:00 benabik joined #perl6
18:04 fgomez joined #perl6
18:07 Chillance joined #perl6
18:12 [Coke] that looks like another way to do something macroish.
18:17 TimToady well, kind of, except it's standing for a dispatcher, not an AST
18:18 TimToady it's similar to {YOU_ARE_HERE} in the setting, which also has the brackets to remind you that it's a subscope, but also allow -n to be implemented as: for lines() {YOU_ARE_HERE}
18:20 TimToady that's a little closer to a macro, since the setting could construed as a large macro around your compilation unit
18:25 TimToady maybe if we treat that as an actual unquasi, and generalize those to any rule in the grammar, we'll replace {YOU_ARE_HERE} someday with ¤blockoid:UNIT or some such
18:25 TimToady and it would be one less special case
18:26 TimToady I doubt we'd do anything similar to {*} though, since 1) it's not an AST, and 2) it needs to be huffmanly short
18:27 wamba joined #perl6
18:28 TimToady thinking of the setting as a macro means you could conceivably have a setting that composes multiple compilation units, which is a bit mind blowing
18:31 wamba left #perl6
18:32 sirrobert joined #perl6
18:34 Celelibi joined #perl6
18:39 sirrobert is there any current work going on for a DBI-type module?
18:39 sirrobert I saw DBIish, but the last commits were 4-5 months ago
18:40 moritz is there anything in particular you want from it?
18:40 sirrobert Yes... but I can't remember what it was that wasn't working for me at the moment ... =)
18:40 moritz please open a ticket the next time you remember
18:41 sirrobert sure thing
18:41 sirrobert I'll try to re-implement DBI and see what I hit
18:41 sirrobert DBIish
18:41 moritz my Perl 6 tuits have decreased, but they are still > 0)
18:41 sirrobert heh good
18:41 sirrobert I can try to do some stuff on it too
18:41 sirrobert if I understand it =)
18:41 moritz why would you try to reimplement it?
18:42 sirrobert I meant re-integrate
18:42 sirrobert not re-implement
18:42 moritz oh
18:42 moritz :-)
18:42 sirrobert heh
18:43 wk joined #perl6
18:51 wamba1 joined #perl6
18:53 fgomez joined #perl6
18:55 shinobicl joined #perl6
18:58 ggoebel__ joined #perl6
18:58 Patterner joined #perl6
18:58 [Coke] joined #perl6
18:58 spacebat joined #perl6
18:58 Grrrr joined #perl6
18:58 shachaf joined #perl6
18:58 avar joined #perl6
19:09 sirrobert moritz:  huh, it integrated easily.  I guess either I didn't know enough p6 a couple months ago or the architecture changes made it "just work"
19:09 fhelmberger joined #perl6
19:09 moritz sirrobert: good to hear :-)
19:09 moritz sirrobert: what backend are you using?
19:11 sirrobert mysql
19:11 fhelmberger_ joined #perl6
19:12 sirrobert I think I'll start a light-weight ORM project
19:12 sirrobert I didn't see one in the modules list
19:12 arnsholt Yeah, that one's a TODO
19:12 moritz fwiw I consider the postgresql backend the most robust one
19:13 moritz it does proper prepared statements (which the mysql backend doesn't)
19:14 sirrobert huh
19:14 sirrobert I've never used postgres
19:14 sirrobert I'll see if switching makes sense for me
19:14 moritz you should. It's quite a nice database
19:15 arnsholt Postgres can be a bit odd at first when coming from MySQL, but on the whole it's awesome
19:15 moritz at least if you start with something newish
19:15 sirrobert my old boss was into it (though the team used mysql)
19:15 moritz if you have a huge body of mysql data and SQL, switching won't make sense at all
19:15 sirrobert nah, it's a small set
19:15 arnsholt There was a pretty good post on HN comparing MySQL and Postgres the other day
19:16 sirrobert most everything is programmatic (p6-wise right now) and uses adapters
19:16 sirrobert HN?
19:16 arnsholt Hacker News
19:16 ggoebel__ joined #perl6
19:16 arnsholt http://news.ycombinator.com/
19:16 sirrobert looking
19:17 sirrobert found it; thanks =)
19:17 sirrobert reading
19:17 benabik this? http://news.ycombinator.com/item?id=4495377
19:17 sirrobert I had found http://news.ycombinator.com/item?id=4387407
19:17 sirrobert but yours looks better, benabik =)
19:20 Targen joined #perl6
19:28 sirrobert pretty cool
19:28 sirrobert (postgres)
19:28 sirrobert I'll have to take a practical look too, but I like the theoretical emphasis.
19:31 arnsholt I think the post you found is pretty reasonable
19:32 arnsholt The data truncation stuff in MySQL does make a certain kind of sense when you see the DB as "where some app stores its data"
19:32 arnsholt But if you're in the "lots of apps sharing a data source" it's pretty crazy
19:38 sirrobert nod
19:50 simcop2387 joined #perl6
19:51 ggoebel__ joined #perl6
19:52 fgomez joined #perl6
20:01 ggoebel__ joined #perl6
20:02 tokuhiro_ joined #perl6
20:04 M_o_C joined #perl6
20:09 FROGGS__ joined #perl6
20:10 * [Coke] wonders if we are anywhere near an oracle or ms sql integration
20:12 araujo joined #perl6
20:12 araujo joined #perl6
20:12 sirrobert is there native big-int support in rakudo?
20:14 [Coke] "built in" is probably better than "native" when mentioning ints. Yup.
20:14 [Coke] nr: say 2**100
20:14 p6eval rakudo d1f4dc, niecza v21-1-ga8aa70b: OUTPUT«1267650600228229401496703205376␤»
20:14 [Coke] nr: say 2**1000
20:14 p6eval niecza v21-1-ga8aa70b: OUTPUT«10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196…
20:14 p6eval ..rakudo d1f4dc: OUTPUT«1071508607186267320948425049060001810561404811705533607443750388370351051124936122493198378815695858127594672917553146825187145285692314043598457757469857480393456777482423098542107460506237114187795418215304647498358194126739876755916554394607706291457119647768654…
20:14 sirrobert cool
20:15 sirrobert how about base conversions?
20:15 sirrobert hex to dec, etc?
20:15 [Coke] <nod>
20:15 sirrobert is there a page somewhere with code examples?
20:15 [Coke] r: say :08<10>
20:15 p6eval rakudo d1f4dc: OUTPUT«8␤»
20:15 sirrobert ooh
20:15 [Coke] r: say :08<13>
20:15 p6eval rakudo d1f4dc: OUTPUT«11␤»
20:15 [Coke] r: say :13<22>
20:15 p6eval rakudo d1f4dc: OUTPUT«28␤»
20:16 sirrobert wow, it's fast too
20:16 [Coke] sirrobert: there's docs.perl.org, the synopsis, and the spec tests (perl6/roast on github). that's where I usually look
20:16 sirrobert I mean, fast enough for me =)
20:16 sirrobert r: say (:10<0xa111ff4efc4c11e18d67080027f5e34b>) ** 10
20:16 p6eval rakudo d1f4dc: OUTPUT«2023715812404703679235203663383420543796506403783669618127906032009103508390627719708547814169269664260282428553784381864262027334858930200053064046901569273192257097336014118586511821526010272249171977304148848604687935662228390091491975276477058903425186245122413…
20:17 sirrobert thanks, that's excellent
20:20 thou joined #perl6
20:21 FROGGS joined #perl6
20:28 * colomon just figured out a $work bug which had been plaguing him for about six weeks...
20:28 sirrobert w00t =)
20:32 colomon something incredibly simple once I figured it out, of course.  :)
20:36 sirrobert heh, was playing with randomly-chosen numbers to test things... hit a very weird thing (bug?)
20:36 sirrobert r: say 24.base(20)
20:36 p6eval rakudo d1f4dc: OUTPUT«14␤»
20:36 sirrobert r: say 24.base(24)
20:36 p6eval rakudo d1f4dc: OUTPUT«10␤»
20:36 sirrobert r: say 24.base(36)
20:36 p6eval rakudo d1f4dc: OUTPUT«O␤»
20:36 sirrobert 0???
20:36 sirrobert but then I realized it was 'O' not 0 =)
20:40 geekosaur hee
20:40 sirrobert =)
20:40 * geekosaur was just commenting about that kind of thing...
20:42 snearch joined #perl6
20:54 benabik joined #perl6
20:58 benabik_ joined #perl6
21:04 [Coke] .
21:05 Circlepuller r: say 24.base(12)
21:05 p6eval rakudo d1f4dc: OUTPUT«20␤»
21:05 Circlepuller r: say 24.base(16)
21:05 p6eval rakudo d1f4dc: OUTPUT«18␤»
21:05 Circlepuller r: say 16.base(24)
21:05 p6eval rakudo d1f4dc: OUTPUT«G␤»
21:05 nwc10 joined #perl6
21:06 Circlepuller r: say 9.base(16)
21:06 p6eval rakudo d1f4dc: OUTPUT«9␤»
21:06 nwc10 Is the ; mandatory after a sub declaration?
21:06 nwc10 ie
21:06 nwc10 std: sub foo {} foo
21:06 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/GpwdzYOEaw line 1:â�¤------> [32msub foo {}[33mâ��[31m foo[0mâ�¤    expecting any of:â�¤    horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤       statement
21:06 p6eval ..mo…
21:06 benabik I think it's not required if there is a newline.
21:06 nwc10 ah OK.
21:06 benabik This is more difficult to demonstrate in IRC.
21:06 Circlepuller like reg perl
21:06 nwc10 that's valid perl 5
21:07 Circlepuller ^
21:07 diakopter p6eval takes a ␤ as a newline
21:07 diakopter std: sub foo {}␤ foo
21:07 p6eval std cfe8d43: OUTPUT«ok 00:00 42m␤»
21:08 nwc10 can I do this?
21:08 nwc10 p5: sub foo {} foo
21:08 nwc10 no, just tumbleweed
21:08 Circlepuller no, go to #perl for that
21:08 diakopter eval: sub foo {} foo
21:08 buubot_backup diakopter: No output.
21:09 diakopter eval: sub foo {die} foo
21:09 buubot_backup diakopter: ERROR: Died at (eval 20) line 1.
21:09 benabik diakopter++
21:10 nwc10 aha thanks
21:10 nwc10 will it crash with interesting pack templates? :-)
21:12 benabik nwc10: We thank you for not abusing our bots.
21:14 nwc10 thanks for the help
21:14 nwc10 left #perl6
21:20 masak good morning, #perl6!
21:21 sorear masak++
21:21 sorear good #perl6, masak
21:22 jnthn evening o/
21:22 jnthn with free wine
21:22 jnthn oops, wrong window
21:24 masak :P
21:25 jnthn Wrong window is consequence of very laggy connection rather than wine :P
21:28 masak just keep telling yourself that. :P
21:28 * masak is on a train, and still gets window changing right!
21:29 jnthn .oO( Wine Is Not an Excuse? )
21:30 masak :P
21:35 fgomez joined #perl6
22:03 stopbit joined #perl6
22:04 SHODAN joined #perl6
22:14 jlaire joined #perl6
22:20 raiph joined #perl6
22:39 ggoebel__ joined #perl6
22:43 whiteknight joined #perl6
22:47 flussence .oO( I want a loose-precedence "." so I don't need to bounce on the shift/9/0 keys as often... )
22:49 ggoebel__ joined #perl6
22:53 diakopter std: maybe { } maybe { }
22:53 p6eval std cfe8d43: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/tiHeHpA6hN line 1:â�¤------> [32mmaybe { }[33mâ��[31m maybe { }[0mâ�¤    expecting any of:â�¤       horizontal whitespaceâ�¤  infix or meta-infixâ�¤    infixed functionâ�¤
22:53 p6eval ..stateme…
22:53 diakopter TimToady: std doesn't like S17's maybe
22:53 diakopter chained, at least
22:57 vs-midi joined #perl6
23:02 ggoebel__ joined #perl6
23:03 skids joined #perl6
23:06 TimToady std: maybe { }; maybe { }
23:06 p6eval std cfe8d43: OUTPUT«ok 00:00 42m␤»
23:06 TimToady looks fine to me
23:07 TimToady std: maybe { }␤ maybe { }
23:07 p6eval std cfe8d43: OUTPUT«ok 00:00 42m␤»
23:07 TimToady there are no blocks in Perl 6 that are special-cased not to need a semicolon when followed by something on the same line
23:08 TimToady we absolutely do not distinguish built-ins from user-defined code at that point
23:09 TimToady so S17 is just wrong
23:12 dalek specs: a9f9c60 | larry++ | S17-concurrency.pod:
23:12 dalek specs: uncuddle maybes to avoid need for ;
23:12 dalek specs:
23:12 dalek specs: discovered by diakopter++
23:12 dalek specs: review: https://github.com/perl6/specs/commit/a9f9c60e33
23:16 diakopter here's my number, so call me maybe
23:17 benabik joined #perl6
23:24 TimToady just added a fancy version to http://rosettacode.org/wiki/Ackermann_function#Perl_6 that allows us to calculate A(4,2)
23:24 TimToady also shows off use of Unicode
23:25 diakopter aww; my poor font
23:25 diakopter lots o boxes
23:26 sorear TimToady: what do we think of S06:1135 these days?
23:28 TimToady it was an attempt to out-dwim Ruby on magic callback syntax, but should probably be marked as conjectural
23:29 TimToady we do seem to be doing pretty well without it
23:31 diakopter how long does A(4,2) take
23:33 ggoebel__ joined #perl6
23:34 dayangkun joined #perl6
23:34 TimToady 2.2 seconds in rakudo, 3.1 in niecza, so rakudo wins on this one
23:35 diakopter 3.1s; that's a good length for profiling
23:35 TimToady without the extra cheating terms, A(4,2) chewed up multiple gigs before I killed it
23:36 TimToady (even with the caching)
23:36 TimToady ((which I wish I could write in the proto, but oh well))
23:36 timotimo (state @)[????][????] //= ????(????,????) - that's a really nice trick (and the copypaste totally botched it i think)
23:36 TimToady (((actually, I wish "is cached" did that for me)))
23:37 diakopter is memoed?
23:37 TimToady we're trying to speak English, not CSese
23:37 timotimo agreed.
23:38 tokuhiro_ joined #perl6
23:39 TimToady though in this case, an explicit cache with integer indexes is likely to beat an automatic hash-based cache
23:39 TimToady and "is cached" can't know whether the integers are going to be compact or sparse
23:39 TimToady even if declared Int
23:40 TimToady nor can it know without help that the integers never go negative
23:41 TimToady I suppose if it were declare sub A(Uint8, Uint8) or some such, it could figure it out
23:42 diakopter rn: say $_[Nil].WHAT
23:42 p6eval niecza v21-1-ga8aa70b: OUTPUT«Parcel()␤»
23:42 p6eval ..rakudo d1f4dc: OUTPUT«use of uninitialized value of type Nil in numeric context  in block  at /tmp/r9MvqOmGer:1␤␤Any()␤»
23:42 TimToady but then we'd not be feeding it back into the cache with results larger than 256, which wouldn't work
23:42 timotimo Uint8? wow, you're optimistic :))
23:42 timotimo perl6 won't be that amazing, even when finished
23:43 diakopter :P
23:43 TimToady (Uint8, Uint) would maybe work
23:43 TimToady since we feed A() to itself only in the second argument
23:45 diakopter n: say Inf[0-1]
23:45 p6eval niecza v21-1-ga8aa70b: OUTPUT«Any()␤»
23:45 TimToady to a first approximation, though, "is cached" is always going to be hash based
23:46 TimToady timotimo: but we do have uint8 specced, and Uint8 is just a boxed one of those :)
23:46 diakopter rn: say 1[1]
23:46 p6eval rakudo d1f4dc: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method gist at src/gen/CORE.setting:9831␤  in sub say at src/gen/CORE.setting:7161␤  in block  at /tmp/HYCAiGKW2x:1␤␤»
23:46 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Any()␤»
23:47 timotimo no, i meant, having values up to 256 for the arguments is optimistic ;)
23:48 timotimo uh, up to 255 of course
23:48 diakopter timotimo: heh; nothing will be amazing when Perl 6 is finished
23:49 Circlepuller_ joined #perl6
23:50 TimToady oh, okay, then make it Uint3 or so :)
23:50 timotimo perl6 getting finished will redefine amazing for quite a long time, no?
23:50 TimToady and it'll still be amazing :)
23:51 timotimo i'm already amazed!
23:52 TimToady iterestingly, the RC "fixed width" font isn't really quite, notice how the mathematical italic m and n are different widths
23:52 TimToady and the double-struck A is a bit wider
23:53 TimToady at least in my firefox rendering
23:53 * TimToady ponders whether "iterest" should be a word or not
23:57 fgomez joined #perl6
23:58 flussence TimToady: I've noticed a few "monospace" fonts aren't, too. Inconsolata isn't and that's one of the ones I like :(
23:59 timotimo you were the one font he liked and you BLEW IT!
23:59 flussence (that case is worse, because it's got varying widths in *latin-1* characters...)

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

Perl 6 | Reference Documentation | Rakudo