»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:04 NamelessTee left 00:07 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 00:16 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 00:33 geekosaur left 00:39 geekosaur joined 00:44 tokuhirom joined 00:48 geekosaur left, eviltwin_b joined 00:49 eviltwin_b is now known as geekosaur 00:52 thelazydeveloper left 00:54 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 01:01 eviltwin_b joined, geekosaur left 01:02 eviltwin_b is now known as geekosaur 01:04 geekosaur left, lutok left 01:05 lutok joined, geekosaur joined 01:07 geekosaur left, eviltwin_b joined 01:09 allbery_b joined, allbery_b is now known as geekosaur 01:11 eviltwin_b left 01:16 PacoAir left 01:19 lutok left 01:23 wolfman2000 joined 01:29 Chillance left 01:45 whiteknight left 01:50 geekosaur left 01:52 geekosaur joined 01:59 JimmyZ_ joined 02:15 zhutingting joined 02:17 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 02:29 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 02:38 spaceships joined 02:39 wolfman2000 left 02:40 tokuhirom left, eviltwin_b joined, geekosaur left 02:41 eviltwin_b is now known as geekosaur 02:42 orafu left 02:45 orafu joined, tokuhirom joined 02:54 adu joined
adu such a trip 02:57
03:00 jaldhar left 03:09 jaldhar joined 03:11 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 03:15 thou joined 03:17 jferrero left 03:20 eviltwin_b joined, geekosaur left 03:21 eviltwin_b is now known as geekosaur 03:32 poincare101 left 03:36 fgomez left 03:42 REPLeffect left 03:43 fgomez joined 03:49 JimmyZ_ left 03:50 zhutingting left 03:56 REPLeffect joined 04:07 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 04:18 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 04:20 geekosaur left, eviltwin_b joined 04:21 eviltwin_b is now known as geekosaur 04:45 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 04:46 jaldhar left, jaldhar joined, eviltwin_b joined, geekosaur left, eviltwin_b left, eviltwin_b joined 04:47 eviltwin_b is now known as geekosaur 04:51 zhutingting joined 04:58 geekosaur left 05:00 geekosaur joined 05:36 zhutingting left 05:40 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 05:43 orafu left 05:45 orafu joined 05:55 adu left 05:59 jaldhar left, jaldhar joined 06:01 thou left 06:10 thelazydeveloper joined 06:15 araujo left, fgomez left 06:25 plobsing left 06:38 isBEKaml joined 07:19 xinming left 07:20 stepnem left, xinming joined 07:31 stepnem joined 07:35 sergot joined
sergot hi o/ 07:35
isBEKaml o/
dalek blets: 66fc254 | (Herbert Breunung)++ | docs/appendix- (2 files):
some small linkfixes
sorear o| 07:43
lumi_ $ perl6 2>/dev/null --profile -e 'say $*PROGRAM_NAME' # prints --profile 07:45
sorear cute 07:47
07:49 raiph left 07:56 Entonian joined 08:02 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 08:18 eviltwin_b joined, geekosaur left 08:19 allbery_b joined 08:20 allbery_b is now known as geekosaur 08:22 eviltwin_b left 08:26 NamelessTee joined 08:32 eviltwin_b joined, geekosaur left 08:33 eviltwin_b is now known as geekosaur, Entonian left 08:41 tokuhiro_ joined 08:43 tokuhirom left 08:50 araujo joined, araujo left, araujo joined
masak Sunday salutations, #perl6 09:05
isBEKaml hola, masak! 09:06
09:10 geekosaur left 09:11 geekosaur joined 09:20 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 09:26 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur
jnthn mornin', #perl6 09:27
tadzik hello hello 09:28
moritz \o 09:36
masak such a wonderful day for doing Perl 6 stuff. 09:38
tadzik and dogwalks, and bookreading :) 09:40
masak oh, still in Izabelin? :) 09:42
09:44 birdwindupbird joined, thou joined, eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 09:45 geekosaur left, JimmyZ_ joined
tadzik aye :) 09:46
last day though
time to get back to work :/
I've realized yesterday that most of the university projects are due to the end of the month
the "whoops" moment
masak s/due to the end/due the end/ # silly English 09:47
tadzik right
anyway, I should probably be doing 1.25 projects a week now, starting tomorrow :) 09:48
downsides of lazy evaluation 09:49
09:51 isBEKaml_ joined, isBEKaml left 09:52 isBEKaml_ is now known as isBEKaml 09:54 geekosaur joined 09:56 pernatiy joined 10:22 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 10:40 tokuhiro_ left, tokuhirom joined 10:48 PacoAir joined 10:54 thou left 11:09 fglock_ left 11:18 sunnavy joined 11:21 thou joined 11:25 kaare_ joined 11:26 fgomez joined 11:50 zhutingting joined 11:54 whiteknight joined 12:01 isBEKaml left 12:02 Guest44043 left 12:04 gv joined
masak TimToady: S06:2766 -- that looks like an immediate block to me. thinko? 12:05
12:08 xenu joined 12:09 xenu is now known as Guest48761
dalek ast: 4614839 | jnthn++ | S04-blocks-and-statements/temp.t:
Fudge temp.t for Rakudo; don't have TEMP phasers yet.
12:13
kudo/nom: 973df80 | jnthn++ | src/ (3 files):
Implement temp and let. Passes all of let.t and all the temp.t tests apart from those that depend on TEMP phaser, which is still NYI.
12:14
kudo/nom: 3e82557 | jnthn++ | t/spectest.data:
Run let.t and temp.t.
masak jnthn++ 12:15
12:15 gv left
dalek kudo/nom: e5683d3 | jnthn++ | docs/ROADMAP:
Remove completed item from ROADMAP.
12:17
12:26 JimmyZ joined 12:28 JimmyZ_ left 12:44 Chillance joined 12:49 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 12:57 Radvendii joined
Radvendii hey guys, real quick question (i couldn't find this anywhere online): how does the prompt() statement work? 12:57
phenny Radvendii: 05 Mar 16:44Z <TimToady> tell Radvendii irclog.perlgeek.de/perl6/2012-03-04#i_5244895 is why we always use looser/tighter precedence instead of higher/lower; it's clearer which way the metaphor maps, especially when your precedence table is printed upside-down
12:58 fgomez left 13:00 tyatpi joined
sisar Radvendii: for the most basic explanation, see masak++ post: strangelyconsistent.org/blog/june-...and-output 13:02
Radvendii thanks 13:04
so it does just return the inputed value
sisar yes, exactly
13:04 fgomez joined
Radvendii so that i don't have to bother y'all as much, how can i search for just perl6 things, every time i type in "perl6 <question>" into my search engine, i get perl5 stuff 13:05
sisar well, specs are the canonical location. If you find them hard to understand, and you want to look up really basic stuff, i would recommend masak++ 30 articles 13:06
the frist one of which I pointed you to
the 30 articels cover basic perl6 stuff quite nicely 13:07
*articles
Radvendii sweet
thanks
sisar for quick look up of different perl6 things, tablets.perl6.org is also useful. Especially its Appendix A. ( fine work by litchking there) 13:08
i meant litchkind++
Radvendii: anything i can help you with ? 13:09
*anything else 13:10
Radvendii not at the moment, but as always, i run into problems and commands i don't fully understand all the time
sisar we here at #perl6 are always happy to give the appropriate amount of help :) 13:11
Radvendii thanks
13:12 eviltwin_b joined, thou left, geekosaur left 13:13 eviltwin_b is now known as geekosaur
tadzik hehe, litchking :) 13:13
sisar :)
tadzik fires up gimp
sisar
.oO( litch*i*king, yumm...)
13:14
dalek kudo/nom: dd66583 | jnthn++ | docs/ChangeLog:
Updated ChangeLog.
13:16
13:21 birdwindupbird left, JimmyZ_ joined
tadzik sorry, couldn't resist etc: i.imgur.com/V7z2j.jpg 13:23
sisar :) 13:24
13:24 JimmyZ__ joined
tadzik afk 13:24
13:25 JimmyZ left, JimmyZ__ is now known as JimmyZ
moritz jnthn++ # suddenly let, temp 13:25
13:26 geekosaur left, eviltwin_b joined
moritz r: my $x = 5; try { temp $x = 8; say $x }; say $x 13:26
p6eval rakudo e5683d: OUTPUT«8␤5␤»
13:26 eviltwin_b is now known as geekosaur
moritz r: my $x = 5; try { lte $x = 8; say $x }; say $x 13:26
p6eval rakudo e5683d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&lte' called (line 1)␤»
moritz r: my $x = 5; try { let $x = 8; say $x }; say $x
p6eval rakudo e5683d: OUTPUT«8␤8␤»
moritz r: my $x = 5; try { let $x = 8; say $x; die '' }; say $x
p6eval rakudo e5683d: OUTPUT«8␤5␤»
moritz jnthn++
13:27 JimmyZ_ left
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'ddd' }; say $x; say $! 13:31
p6eval rakudo e5683d: OUTPUT«8␤5␤ddd␤ in block <anon> at /tmp/67B3LJGATX:1␤␤»
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'ddd' }; CATCH { say $x }
p6eval rakudo e5683d: OUTPUT«8␤»
13:32 pomysl joined, pomysl left, pomysl joined
jnthn Which is right, since CATCH runs, *then* we unwind. :) 13:35
moritz erm, CATCH doesn't run in JimmyZ's last example at all 13:36
because it's outside the try 13:37
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'ddd'; CATCH { } }
p6eval rakudo e5683d: OUTPUT«8␤ddd␤ in block <anon> at /tmp/0HnXaoD1q4:1␤␤»
13:38 ponbiki joined
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'ddd'; CATCH { say 'hi' } } 13:38
p6eval rakudo e5683d: OUTPUT«8␤hi␤ddd␤ in block <anon> at /tmp/3G1YEBH0kb:1␤␤»
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'sss'; CATCH { say 'xxxxx' } } ; say 'aloha'; END { say 'END'} 13:40
p6eval rakudo e5683d: OUTPUT«8␤xxxxx␤sss␤ in block <anon> at /tmp/D4KJsGJFB3:1␤␤»
jnthn moritz: ah, I mis-read it :) 13:41
JimmyZ looks like END block not always run?
jnthn No, though that's known. 13:42
Exceptional exits currently miss out running END blocks.
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'sss'; } ; say 'aloha'; END { say 'END'} 13:43
p6eval rakudo e5683d: OUTPUT«8␤aloha␤END␤»
13:43 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'sss'; }; END { say 'END'} 13:44
p6eval rakudo e5683d: OUTPUT«8␤END␤»
JimmyZ r: my $x = 5; try { let $x = 8; say $x; die 'sss'; } ; say $!; END { say 'END'}
p6eval rakudo e5683d: OUTPUT«8␤sss␤ in block <anon> at /tmp/cIwsSA1QCF:1␤␤END␤»
JimmyZ that's a bit surprised
moritz by what part? 13:45
JimmyZ with say $! and without say $!
13:45 tokuhirom left
moritz the only difference is the 'say $!' part 13:45
which prints the exception message plus backtrace
JimmyZ with $! means END is not executed 13:46
moritz it is
geekosaur look at the end of the output
moritz 15:44 <+p6eval> rakudo e5683d: OUTPUT«8␤sss␤ in block <anon> at /tmp/cIwsSA1QCF:1␤␤END␤»
there's an END at the end
JimmyZ oh
13:53 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 13:57 PacoAir left 13:59 PacoAir joined 14:01 geekosaur left 14:11 geekosaur joined
masak submits rakudobug 14:12
we have various END-related rakudobugs already, but this one seems new. 14:13
moritz I tried the obvious patch. Didn't work :/
masak oh! 14:14
I did the same mis-read as JimmyZ :)
there's no bug there.
14:14 dbr joined
moritz well, END blocks not firing in the case of exceptions is a bug, afacit 14:14
but it's known?
masak moritz: in which evaluation is the END block not firing? 14:15
:)
moritz r: die "foo"; END { say 'END' }
p6eval rakudo dd6658: OUTPUT«foo␤ in block <anon> at /tmp/wbvyGeFRFB:1␤␤»
masak oh, that one's known.
and submut long ago.
jnthn Right.
I was gonna say, what's new...
masak I could make an argument for $!.gist not printing le stacktrace, though. 14:16
jnthn moritz: What was the obvious patch, and how did it not work?
masak doesn't feel very gistish.
jnthn masak: If somebody is gonna gist me an exception, I'd find the stack trace handy :P
moritz jnthn: $_() for @*END_PHASERS; in sub print_exception, src/core/Exception.pm 14:17
14:17 plobsing joined
jnthn moritz: That does look like the obvious patch. 14:17
masak jnthn: I disagree, but I don't have any further argument than "it's too long for a .gist output"
jnthn: we went from "Bool::True" to just "True", for example.
moritz jnthn: and it looped infitely when trying to invoke the END phaser
masak long stacktraces don't play well with other surrounding output.
moritz jnthn: and all the while printed 14:18
Can not get non-existent attribute '$!ex' on class 'Exception' in block <anon> at -e:1
jnthn eeek
moritz jnthn: I hypothized that it somehow throws an exception while trying to invoke the END phaser, and the rethrowing logic is busted
jnthn masak: I guess the info is available with $!.backtrace or so...
moritz: That sounds quite possible.
moritz masak: what method would you use to have a text representation of the whole exception (message + backtrace)? 14:19
s/have/get/?
s/\?$// ;-)
jnthn .all_the_things 14:20
:P
.details
moritz I've now scattered a bit more debug output, and recompiling
masak jnthn: .stacktrace ?
jnthn: or .detailed ?
or something. it just doesn't feel like "the gist of an exception" should be all the details. 14:21
moritz masak: well, we use .gist to include more than just the basic .Str output
compare say Str; with print Str;
so I think it's quite reasonable to provide some more info (the backtrace) along with the mere stringification 14:22
jnthn: oh, the error that it fails to rethrow is Method 'postcircumfix:<( )>' not found for invocant of class 'Parcel'
jnthn moritz: ohh. 14:23
I think @*END_PHASERS is actually an NQP array (thus RPA)
moritz: Thus a Perl 6 "for" loop over it seemingly doesn't quite work out.
moritz jnthn: so $_() for nqp::perl6ize_type(@*END_PHASERS)? 14:24
masak moritz: good point.
jnthn moritz: Maybe that, yes
I think it's nqp::p6type though
the one you wrote is the pir:: one
moritz right
hm, can't find a single occorance of nqp::p6type 14:25
14:25 timotimo joined
jnthn oh, maybe I'm just dreaming it then :) 14:25
moritz there seems to be no alias for it
jnthn hmm, you're right, there ain't an alias for it. :)
14:29 Radvendii left 14:33 Radvendii joined
dalek kudo/nom: d9fd173 | moritz++ | src/core/Exception.pm:
run END blocks after printing exception
14:35
masak \o/ 14:36
now we just need to run END blocks after exit(), too...
should LEAVE blocks run on exit() ? 14:37
14:40 geekosaur left 14:41 geekosaur joined 14:43 Radvendii left 14:50 s1n joined 14:53 icwiener joined 14:54 geekosaur left, eviltwin_b joined, eviltwin_b is now known as geekosaur 14:56 Radvendii joined 15:01 fgomez left, fgomez joined, sergot left 15:03 sergot joined 15:08 geekosaur left 15:09 geekosaur joined 15:10 glass joined
sisar rosettacode.org/wiki/Classes#Perl_6, both examples suffer from a 'two terms in a row error'. Can someone correct it ? 15:14
masak sisar: 'my Camel $b .= new humps => 2;' should be 'my Camel $b .= new(humps => 2);'
sisar thanks. I'll try to fix 'em both. 15:15
masak the second piece of code is wrong on a more fundamental level.
well, the same syntactical omission of parens holds there, too.
tadzik r: class Camel { has Int $.humps = 1; }; my Camel $b .= new: humps => 2; 15:16
p6eval rakudo d9fd17: ( no output )
masak or what tadzik++ did.
but the second constructor call passes a named argument :age which doesn't map to anything in the .new methods.
tadzik I, for one, quite like this syntax :)
masak it grows on me. it certainly has its place. 15:19
Kodi wrote the code for that RC entry.
it can't have worked even on Rakudo #22.
Kodi-- 15:20
sisar dosen't have a RC account 15:21
masak sisar++ # getting an RC account just to make the edit 15:22
masak grins
15:22 JimmyZ_ joined
sisar i'm doing exactly that :) 15:22
masak hence the karma :)
15:22 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur, buubot_backup joined 15:23 JimmyZ left, JimmyZ_ is now known as JimmyZ
sisar masak: i've corrected the first one. But since i'm not familiar with bless, can you correct the second example ? 15:29
15:29 s1n left
sisar (i've also removed the "works with ..." line) 15:29
removing it was the right thing, right? 15:31
.oO ( two 'right's in a row :p )
15:34 Guest48761 left
masak sisar: well, the second one is deeper. I'm not too fond of overriding .new methods like that in the first place. 15:39
15:40 zhutingting left
sisar maybe you can come up with a more interesting and much better example? :) 15:40
masak it creates exactly the kind of inflexibility that bites the author of that code. 15:41
yeah, I think coming up with a more idiomatic example would be good.
15:43 JimmyZ left, eviltwin_b joined, geekosaur left 15:44 eviltwin_b is now known as geekosaur, xenu joined 15:45 xenu is now known as Guest51792 15:46 s1n joined 15:50 ponbiki left 15:52 Patterner left 15:54 Psyche^ joined, Psyche^ is now known as Patterner
jnthn phenny: "uttrycksfulla"? 16:05
phenny jnthn: "expressive" (sv to en, translate.google.com)
jnthn aha
masak think so. 16:06
oops, stale backlog.
jnthn: en:"expression" === sv:"uttryck"
ex-pression, ut-tryck. :) 16:07
jnthn Ah...
That makes even more sense :)
masak language is so boringly predictable sometimes :)
sisar: fixed. rosettacode.org/wiki/Classes#Perl_6 16:08
16:09 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur
sisar \o/ 16:10
arnsholt masak: Thankfully, it's also excitinly non-predictable as well =D 16:12
Modulo spelling. I blame my cold ^_^
16:14 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 16:20 thou joined
sisar perl6: say i == sqrt(-1); 16:26
p6eval rakudo d9fd17, niecza v17-2-gb8fcf85: OUTPUT«False␤»
..pugs: OUTPUT«*** No such subroutine: "&i"␤ at /tmp/aJ6cx7ci6A line 1, column 5-18␤»
sisar :)
masak submits rakudobug
16:26 geekosaur left, eviltwin_b joined
sisar r: sqrt(-1).WHAT 16:26
p6eval rakudo d9fd17: ( no output )
masak surely those should be numerically equal, no?
16:27 eviltwin_b is now known as geekosaur
masak r: say sqrt(-1) 16:27
p6eval rakudo d9fd17: OUTPUT«NaN␤»
masak oh wait :)
that's right.
sisar yeah, maybe not a bug after all :)
masak no, it isn't.
masak unsubmits
r: say sqrt(-1 + 0i)
p6eval rakudo d9fd17: OUTPUT«6.12303176911189e-17+1i␤»
masak there you go.
you need to know about complex numbers to enter the magical land of milk and honey known as the complex plane :) 16:28
sisar n: say sqrt(-1 + 0i );
p6eval niecza v17-2-gb8fcf85: OUTPUT«6.1230317691118863E-17+1i␤»
16:36 s1n left
sisar r: 1**(100**100); #blazingly fast ! 16:36
p6eval rakudo d9fd17: ( no output )
sisar n: say 1**(100**100) # hangs ! 16:37
p6eval niecza v17-2-gb8fcf85: OUTPUT«(timeout)»
sisar r: say 1**(100**100); #blazingly fast !
p6eval rakudo d9fd17: OUTPUT«1␤»
sisar rakudo++
colomon n: say 100**100 16:38
p6eval niecza v17-2-gb8fcf85: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
sisar huh. That took no time ? hmm..
colomon all it means is niecza doesn't special case 1 ** $n 16:39
r: say 1.0000001 ** (100 ** 100) 16:40
p6eval rakudo d9fd17: OUTPUT«Nominal type check failed for parameter '$nu'; expected Int but got Num instead␤ in sub DIVIDE_NUMBERS at src/gen/CORE.setting:7254␤ in sub infix:<**> at src/gen/CORE.setting:7396␤ in block <anon> at /tmp/_kmcGf2Zqh:1␤␤»
colomon n: say 1.0000001 ** (100 ** 100)
p6eval niecza v17-2-gb8fcf85: OUTPUT«Inf␤»
masak my tip: don't raise things to the (100**100)th power ;) 16:41
either the base is 1, and then you know the answer already.
or it's not, and then you're toast anyway.
colomon r: say 1.0000001 ** (10 ** 100) 16:42
p6eval rakudo d9fd17: OUTPUT«Nominal type check failed for parameter '$nu'; expected Int but got Num instead␤ in sub DIVIDE_NUMBERS at src/gen/CORE.setting:7254␤ in sub infix:<**> at src/gen/CORE.setting:7396␤ in block <anon> at /tmp/IUtc842LIM:1␤␤»
colomon n: say 1.0000001 ** (10 ** 100)
p6eval niecza v17-2-gb8fcf85: OUTPUT«Inf␤»
colomon n: say (10 ** 100).Num
p6eval niecza v17-2-gb8fcf85: OUTPUT«1E+100␤»
sisar masak: was trying it just for fun :) somewhere Rakudo is faster than Niecza :p
colomon n: say 1.0000001 ** (10 ** 10) 16:44
p6eval niecza v17-2-gb8fcf85: OUTPUT«Inf␤»
colomon ... that can't be right, can it? 16:45
masak seems a bit high.
jnthn :P
colomon n: say 1.0000001 ** (10 ** 2) 16:46
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.0000100000495054␤»
colomon n: say 1.0000001 ** (10 ** 3)
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.0001000049952189␤»
colomon n: say 1.0000001 ** (10 ** 4)
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.0010005001171869␤»
colomon n: say 1.0000001 ** (10 ** 5)
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.0100501665844765␤»
colomon n: say 1.0000001 ** (10 ** 6)
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.1051709126081526␤»
colomon n: say 1.0000001 ** (10 ** 7)
p6eval niecza v17-2-gb8fcf85: OUTPUT«2.7182816939803724␤»
colomon n: say 1.0000001 ** (10 ** 8)
p6eval niecza v17-2-gb8fcf85: OUTPUT«22026.45489788942␤»
colomon n: say 1.0000001 ** (10 ** 9)
p6eval niecza v17-2-gb8fcf85: OUTPUT«2.688103843211962E+43␤»
timotimo and here it explodes :)
colomon yowza 16:47
moritz r: say 1.0000001 ** (10 ** 9)
p6eval rakudo d9fd17: OUTPUT«Nominal type check failed for parameter '$nu'; expected Int but got Num instead␤ in sub DIVIDE_NUMBERS at src/gen/CORE.setting:7254␤ in sub infix:<**> at src/gen/CORE.setting:7396␤ in block <anon> at /tmp/P5rMiu7o7C:1␤␤»
moritz r: say 1.0000001 ** (10 ** 5) 16:48
p6eval rakudo d9fd17: OUTPUT«(timeout)»
colomon that's a legit rakudo bug
moritz aye
moritz leaves it to masak++ 16:49
masak submits it
colomon wait, that's two legit rakudo bugs
masak do you want them as different tickets? 16:50
moritz you mean the timeout?
colomon yes
masak: I am supremely uncaring on the question.
moritz how long do you think it is reasonable to take something to the 1e5ths power?
masak only submits the first one 16:51
moritz since 1.0000001 is a Rat, it exponentiates numerator and denominator separately
which generally gives the best accuracy
colomon moritz: that's a good question.... i forget how crazy quick the p6eval timeout is sometimes.
moritz which can take a lot of memory
colomon n: say 1.0000001 ** (10 ** 5) 16:52
p6eval niecza v17-2-gb8fcf85: OUTPUT«1.0100501665844765␤»
colomon n: say (1.0000001 ** (10 ** 5)).WHAT
p6eval niecza v17-2-gb8fcf85: OUTPUT«Num()␤»
16:52 s1n joined
moritz I wonder if it could somehow determine to downgrade to Num more quickly 16:52
colomon doh!
I'd argue that's a Niecza bug. Sigh.
moritz n: say (1.000001 ** 5).WHAT
p6eval niecza v17-2-gb8fcf85: OUTPUT«Num()␤»
moritz n: say (1.000001 ** 2).WHAT
p6eval niecza v17-2-gb8fcf85: OUTPUT«Rat()␤»
moritz n: say (1.000001 ** 3).WHAT 16:53
p6eval niecza v17-2-gb8fcf85: OUTPUT«Rat()␤»
moritz n: say (1.000001 ** 4).WHAT
p6eval niecza v17-2-gb8fcf85: OUTPUT«Num()␤»
moritz colomon: might not be a bug, but simple result of Rat -> Num overflow
I wonder if rakudo should use a a different implementation for Rat ** Int
colomon moritz: oh. good point. 16:54
duh.
colomon--
[Coke] colomon-- # what did he do this time? 16:55
colomon n: say 1.00000001.FatRat ** (10 ** 5)
16:55 geekosaur left, eviltwin_b joined
p6eval niecza v17-2-gb8fcf85: OUTPUT«(timeout)» 16:55
moritz colomon++ forgot some details of our number system for a few minutes
16:55 eviltwin_b is now known as geekosaur
colomon In my defense, I am scrambling to cook lunch so I can eat, change my shirt, and be ready to report for pre-concert rehearsal in 33 minutes. 16:57
[Coke] colomon: why the hell are you on IRC? ;) 16:58
having just had to get through this to get my son to his concert which is an hour away from our house yesterday...
colomon Laptop on kitchen counter. :)
moritz slidetocode.com/2012/05/06/the-perf...-language/ 16:59
16:59 eviltwin_b joined, geekosaur left
moritz "The well-trodden path to glory for an internet entrepreneur is to write version 1 of the next great product in Python, or Ruby, or Javascript, launch it to high acclaim, instantly run into scaling problems, and use VC money to hire a small army of C++ programmers with pony tails and faded star wars T-Shirts to beef up their backend." 16:59
colomon [Coke]: the big concert hall in town is only three minutes' drive away.
16:59 eviltwin_b is now known as geekosaur
moritz if we can make Perl 6 with type annotations scale more like C/C++/C#, that would be a huge win on that front 17:00
tadzik Parallelisability, Typed languages with the feel of a scripting language. Sounds like Go
arnsholt moritz: I think that's entirely possible in the long run
masak sounds like Scala.
jnthn That's why I'm so into the gradual typing bits :) 17:01
arnsholt There are some ridiculously good Common Lisp compilers, and CL's type system is less useful in some ways than Perl 6's
Of course, that'll most likely require that someone writes a compiler that compiles to native code =)
But since most CL compilers need a CL compiler to bootstrap, that's not as much of an issue as it might be. It can be written in Perl 6 when the time comes =) 17:02
17:08 s1n left
moritz aye 17:10
I think once we have a fast and mostly complete Perl 6 compiler, people will start to write more Perl 6 compilers in Perl 6 :-) 17:11
[Coke] Yes, but I think my great granchildren might be using some other language by then. 17:13
moritz I'm pretty sure that's what the people in the 60s said about lisp too :-) 17:14
geekosaur that's only because perl6 will be complete when it's stable (for CS and bio meaning of stable)
er, developer not CS 17:19
17:25 s1n joined
[Coke] # 05/06/2012 - rakudo++ (21745); niecza (93.72%); pugs (41.92%) 17:28
tadzik . o O ( how many tests could the spec tests test if the spec tests could tests spec ) 17:30
17:30 s1n left
Celelibi is there something new about map / grep and sort in perl6 ? 17:34
moritz well, map and grep are lazy
and sort can take an unary closure too 17:35
masak Celelibi: map and grep can work several elements at a time.
Celelibi: also, there's .first, which is more fun than .grep if you want at most one match.
Celelibi looks like most of List::MoreUtils has been integrated to the language. 17:36
moritz aye 17:40
jnthn Hmm. Wonder what it's gonna take to get to 22000 :) 17:43
17:44 s1n joined, tyatpi left
moritz jnthn: at your convenience, could you place take a look at the use-arglist branch? 17:46
jnthn: when I do a ./perl6 -Ilib -e 'use Test :DEFAULT;', it tries to call postcircumfix:<( )> on class Bool
jnthn moritz: Cooking at the moment, but will fire off a build so I can look at if after dinner :) 17:47
moritz jnthn: the thunk is created of class Code, and it errors somewhere in the invoke proxy or so
jnthn: ok, great
17:48 not_gerd joined
dalek pan style="color: #395be5">perl6-examples: 2e1557f | gerdr++ | shootout/revcomp.p6.pl:
fix shootout/revcomp.p6.pl
17:48
pan style="color: #395be5">perl6-examples: d4b8941 | (It's secret to everybody)++ | shootout/revcomp.p6.pl:
Merge pull request #2 from gerdr/patch-4

fix shootout/revcomp.p6.pl
not_gerd was just about to ask for ^^ 17:49
hello, #perl6
masak hi, not_gerd! 17:55
moritz o/ 17:59
not_gerd: now you have commit access 18:00
18:00 raiph joined
raiph r: callframe.gist.say 18:01
p6eval rakudo d9fd17: OUTPUT«CallFrame.new(level => Int, annotations => ("file" => "/tmp/D7NcT1RZbO", "line" => 1).hash, my => EnumMap.new("\$!", Any, "\$=pod", Array.new(), "!UNIT_MARKER", !UNIT_MARKER, "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\$_", …
not_gerd moritz: thanks
raiph ww
not_gerd some benchmark results: gist.github.com/2623550 18:02
masak not_gerd++ # comparisons like this are nice to see 18:03
moritz not_gerd: what does revcomp do?
18:03 bip` joined
jnthn not_gerd: Got a link to revcomp? 18:03
not_gerd moritz,jnthn: github.com/perl6/perl6-examples/bl...comp.p6.pl 18:04
18:05 NamelessTee left
moritz ah, trans and lots of IO 18:05
dalek pan style="color: #395be5">perl6-examples: a80cf81 | gerdr++ | tutorial/lazy.pl:
fix tutorial/lazy.pl
18:06
pan style="color: #395be5">perl6-examples: e447209 | gerdr++ | tutorial/lazy.pl:
Merge pull request #1 from gerdr/patch-3

fix tutorial/lazy.pl
18:06 s1n left 18:09 fglock left
tadzik jnthn: are you using putty, by any chance? 18:09
masak we really need to get .trans to run fast. 18:10
moritz does at $work
masak: hold your horses, profile first
masak moritz: no doubt. but I'm under no illusions that .trans is currently fast. 18:11
even if it doesn't come out as the main villain here... we really need to get .trans to run fast.
18:16 Timbus left 18:19 Timbus joined
[Coke] yes, but if it's not the main villian, it's ore important to get /that/ to run fast! 18:20
moritz trans: incl: 99.69% 18:22
moritz.faui2k3.org/tmp/revcomp.profile.gz gzip'ed version of --profile output 18:25
not_gerd could someone take a look at what's wrong with shootout/n-body.p6.pl? 18:26
18:27 NamelessTee joined
moritz r: constant LAST = 4; for 1..LAST { .say } 18:27
p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤Missing block␤at /tmp/rQGNogs6zD:1␤»
Celelibi What about perldoc ? is there perl6doc ?
moritz not_gerd: probably conflicts with the LAST phaser
Celelibi: perl6 --doc $file
Celelibi: that extracts the Pod
Celelibi: but we don't have much documentation yet :/
Celelibi ok, but what about perldoc -f $fun ? or perldoc perlsyn ? 18:28
moritz not_gerd: using constant $LAST instead of constant LAST helps with the syntax errors
dalek pan style="color: #395be5">perl6-examples: 05d4466 | moritz++ | shootout/n-body.p6.pl:
fix syntax errors
18:29
pan style="color: #395be5">perl6-examples: fce6a8b | (Gerhard R)++ | shootout/fasta.p6.pl:
fix shootout/fasta.p6.pl
18:30 sisar left
Celelibi Is there a programmatic way to extract all the method name from an object? 18:30
dalek pan style="color: #395be5">perl6-examples: 35a8ba2 | moritz++ | shootout/n-body.p6.pl:
[n-body] fix some type errors
moritz Celelibi: $obj.^methods(:all)>>.name 18:31
masak I love how all the words of the answer also occur in the question :P
moritz++ 18:32
Celelibi :)
and now : what does this mean?
moritz it means: give me the name of all the methods in object $obj :-)
masak Celelibi: named argument. 18:33
Celelibi yes, this was my question.
moritz .^ is a method call on the meta class
Celelibi what is .^ what is :all what is >>. ?
masak Celelibi: but the colon means different things in different places in the language.
Celelibi: .^ is call method on metaclass object.
moritz and >>. is call distributed to all methods in a list
masak oh, moritz is way ahead :)
Celelibi What is "metaclass" ? 18:34
the class named "class" ?
moritz it's the class that defines how a class works.
masak Celelibi: it's the thing that knows things about your class.
Celelibi: for example what methods it has.
Celelibi: you can't just go .methods, because $obj probably doesn't have such a method.
moritz or what attributes, what parents
jnthn tadzik: Yes, I use putty. 18:35
Celelibi so .^ goes to the meta-level. Ok.
not_gerd some more data: gist.github.com/2623550
Celelibi Can I navigate through the class hirarchy?
not_gerd compared to 2009, Rakudo got faster, except for revcomp
moritz Celelibi: yes 18:36
Celelibi For instance, getting the names of the methods of the parent class of $obj.
tadzik jnthn: okay, I solved my problem already :)
moritz r: say Str.^parents(:tree)
p6eval rakudo d9fd17: OUTPUT«use of uninitialized value of type Cool in string context in block <anon> at /tmp/kUntTsQfFp:1␤␤use of uninitialized value of type Any in string context in block <anon> at /tmp/kUntTsQfFp:1␤␤use of uninitialized value of type Mu in string context in block <anon>…
moritz r: say Str.^parents(:tree).perl
p6eval rakudo d9fd17: OUTPUT«([Cool, [Any, [Mu]]],)␤»
Celelibi ok, parent. :)
Hum... Ok, actually .^ query the Meta-model instance.
18:37 NamelessTee left
Celelibi what is the :all or :tree ? 18:37
Beside this, Can I manipulate the metamodel "by hand"? 18:38
Adding an attribute or a method dynamically or so.
jnthn Celelibi: jnthn.net/papers/2012-gpw-meta-programming.pdf has various examples 18:39
geekosaur :all and :tree are named parameters, as opposed to positional parameters. metaprogramming is possible, you need to turn on monkey patching though because it's a bad idea
jnthn Meta-programming is a fine idea. :) It's changing classes after the initial declaration that's not so good. 18:41
18:41 crab2313 joined
jnthn augment class Foo { method bar() { ... } } # the best way to update a class with extra stuff, requires "use MONKEY_TYPING") 18:41
Best as in, it won't leave you with an inconsistent state because it takes care of making the correct metamodel calls for you. 18:42
geekosaur yeh, I meant the kind of metaprogramming celelibi asked about though which is changing classes post-declaration
jnthn You can add a method by doing Foo.^add_method($name, $some-code-object)
Which many people know.
Fewer people know that they should really call Foo.^compose() after taht.
18:43 crab2313 left, crab2313 joined
Celelibi I just ask how far goes the metaprogramming with perl6. 18:43
jnthn Celelibi: A long way. 18:44
Celelibi: All of the class syntax is just sugar that reduces to the compiler making calls on meta-objects.
not_gerd hm... trying to go native in n-body.p6.pl via s/Num/num/ results in Null PMC access
Celelibi Can I even modify the metaclass? 18:45
(thus possibly making it unusable)
jnthn Celelibi: You can write a module that replaces, say, what the "class" keyword maps to, associating it with a different meta-object of your choice. 18:46
not_gerd are native array implemented?
jnthn Celelibi: The Grammar::Debugger module does that with "grammar". Replaces the normal meta-class with a subclass of it that hooks dispatch and prints out debug info.
not_gerd: No.
18:47 Radvendii left
Celelibi jnthn: that sounds really great. 18:47
There is a lot of interesting stuff in perl6. I definitely need to spend more time on it. 18:48
18:48 geekosaur left
moritz agreed :-) 18:49
Celelibi And I definitely need more documentation.
Do you know how "clean" and "easily understandable" the code of rakudo is? :) 18:50
moritz Celelibi: in my experience it's well readable
Celelibi: though some areas are complicated, because the language requires it
Celelibi ok
sorear good * #perl6 18:52
masak sorear! \o/ 18:53
jnthn hi sorear
[Coke] sorear. 18:54
18:57 crab2313 left
jnthn moritz: about? 19:00
moritz jnthn: aye 19:01
jnthn moritz: Think I figured out the arglist thing.
moritz jnthn: what is it? 19:02
jnthn moritz: Answer lies in what method arglist($/) { ... } in Actions.pm produces
moritz: It produces a PAST::Op node, :pasttype('call') or so
moritz oh
jnthn moritz: It then expects the consumer of that bit of AST to either set .name or unshift a thing to call.
19:02 birdwindupbird joined
jnthn moritz: So a name isn't getting set and thus it tries to invoke the first child. :) 19:03
moritz: The next problem is that arglist also triggers the named handling. 19:04
moritz: Meaning that :DEFAULT won't end up as a pair, but instead be a named argument.
moritz jnthn: so should we walk the arglist instead, and for each one evaluate the value at compile time, and simply record the name? 19:05
jnthn moritz: In short, you're probably better off thunking $<arglist><EXPR> or so.
moritz: Or that.
moritz: It's probably better to actually run the thing though...
moritz: Not doing so has a history of being painful. 19:06
moritz jnthn: should I create an identity sub that retunrs its arglist?
jnthn moritz: No
moritz: If you instead look at $<arglist><EXPR>.ast instead of $<arglist>.ast you'll probably get what you want, more or less. 19:07
moritz: All the arglist action method does is turn what EXPR parsed into something we can then easily turn into a sub or method call. 19:08
But we don't want to do that here...we just want the expression itself.
moritz: gist.github.com/2623892 19:11
That's what I tried here.
moritz jnthn: commit it? 19:12
jnthn moritz: I can if you like 19:13
moritz jnthn: please do
dalek kudo/use-arglist: 5162c8b | jnthn++ | src/Perl6/Grammar.pm:
Get arglist thunk to run and return something.
19:14
19:16 not_gerd left
moritz jnthn: I think we should factor out this whole checking for compile time value, and thunking and executing otherwise 19:24
into a world method
we'll need it for import too
jnthn moritz: +1
moritz jnthn: is there something like the reverse of pir::perl6ize_type? 19:32
jnthn: I guess that the arglist thunk returns a Parcel, and I need to iterate that in NQP land 19:33
do I need to manually getattr the $!storage or so?
jnthn moritz: You'd have to do that, yeah... 19:34
moritz: Note in the case of :DEFAULT it's just gonna return a Pair. 19:35
:DEFAULT, :CHIMPANZEE would return a Parcel
moritz r: say (:DEFAULT).Parcel.WHAT 19:36
p6eval rakudo d9fd17: OUTPUT«Method 'Parcel' not found for invocant of class 'Pair'␤ in block <anon> at /tmp/DpqCT7bVBT:1␤␤»
moritz meh
this is going to be no fun
r: say (:DEFAULT).List.Parcel
p6eval rakudo d9fd17: OUTPUT«Method 'List' not found for invocant of class 'Pair'␤ in block <anon> at /tmp/OuzVyKbDLX:1␤␤»
moritz r: say (:DEFAULT).list.Parcel
p6eval rakudo d9fd17: OUTPUT«ListIter.new()␤»
moritz erm, what?
jnthn o.O
OTOH 19:37
r: say (:DEFAULT).list.eager
moritz r: say (:DEFAULT).list.Parcel.join
p6eval rakudo d9fd17: OUTPUT«DEFAULT True␤»
jnthn r: nqp::getattr((:DEFAULT).list.eager, List, '$!items') 19:38
p6eval rakudo d9fd17: ( no output )
jnthn moritz: You could always do like ^
r: :DEFAULT.list.WHAT.say 19:39
p6eval rakudo d9fd17: OUTPUT«List()␤»
19:45 NamelessTee joined
dalek kudo/use-arglist: 7b98e2a | moritz++ | src/Perl6/Grammar.pm:
import according to arglist

does not break anything, but does not seem to get arglists working either
20:08
arnsholt "Doesn't break anything, but doesn't seem to work either." Wonderful commit message =) 20:12
moritz 'noop' 20:13
it's a "now it's backed up on teh internetz somewhere" commit :-) 20:15
jnthn It broke my dreams of working import arglist :P 20:16
nom: say |(:DEFAULT) 20:18
p6eval rakudo d9fd17: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Pair'␤ in block <anon> at /tmp/NtdhS5tfnK:1␤␤»
moritz the easy 20% are done, now I just need to debug and fix it :-)
jnthn grr
nom: say ~(:DEFAULT)
p6eval rakudo d9fd17: OUTPUT«DEFAULT True␤»
jnthn It may be that it's expecting Pair to stringify to DEFAULT there.
moritz oh
right
$ ./perl6 -e 'use Test "DEFAULT"; ok 1' 20:19
===SORRY!===
CHECK FAILED:
Undefined routine '&ok' called (line 1)
otoh that one should accidentally work if that was the problem
jnthn Well, there may be more than one problem ;) 20:20
moritz there's more than one way to break it :-) 20:21
moritz goes to bed, dreams of malicious arglists :-) 20:23
jnthn 'night, moritz 20:24
20:26 birdwindupbird left 20:28 birdwindupbird joined 20:45 birdwindupbird left 20:50 geekosaur joined 20:52 kaare_ left 20:53 kaare_ joined 20:57 kaare_ left 21:01 bip` is now known as geistteufel 21:03 bruges_ joined 21:05 bruges left 21:13 geistteufel left 21:15 geistteufel joined 21:16 erkan joined
sergot 'night! :) 21:38
21:38 sergot left 21:55 raiph left 21:59 cbass joined
cbass ? 22:03
22:04 sftp_ joined 22:06 sftp left
cbass quit 22:06
22:07 cbass left 22:11 PacoAir left 22:18 geekosaur left, eviltwin_b joined 22:19 eviltwin_b is now known as geekosaur 22:37 Chillance left 22:42 spaceships left, spaceships joined 22:44 Chillance joined
masak 'night, #perl6 22:56
sorear bye 22:59
23:07 NamelessTee left 23:10 dorlamm joined, thelazydeveloper left, lestrrat left 23:11 lestrrat joined 23:14 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 23:23 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 23:25 eviltwin_b joined, geekosaur left, eviltwin_b is now known as geekosaur 23:26 lestrrat left
jlaire p6: my %h; say (%h<k>:p).perl 23:27
p6eval niecza v17-2-gb8fcf85: OUTPUT«"k" => Any␤» 23:28
..rakudo d9fd17: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
..pugs: OUTPUT«*** ␤ Unexpected ":p"␤ expecting term postfix, operator or ")"␤ at /tmp/XeRw9M3rnM line 1, column 18␤»
23:28 lestrrat joined
jlaire niecza++ 23:28
23:32 tokuhirom joined 23:44 Radvendii joined
Radvendii does anyone know how to write a "top"-like command line program? That is, one which displays one updating screen? 23:45
or have a good tutorial for it?
printing \b a bunch of times seems not to work... 23:46
[Coke] have we no curses yet? 23:47
There's a module for me to work on.
Radvendii (if this is in response to my question) curses? 23:48
sorear Radvendii: try \x[1B][2J
Radvendii sorear: works like a charm, thanks 23:49
any way to center it though? it's ending up at the bottom of my terminal.. 23:50
23:51 mmol_saffron joined, geekosaur left 23:52 mmol_saffron is now known as mikemol 23:53 geekosaur joined 23:58 idlecuriosity joined
jlaire p6: class C { method m() { <a b> } }; my @cs = C.new xx 3; say @cs>>.m.elems; say @cs.map({.m}).elems; say @cs>>.m.perl; say @xs.map({.m}).perl 23:59
p6eval pugs: OUTPUT«*** ␤ Unexpected "."␤ expecting "::"␤ Variable "@xs" requires predeclaration or explicit package name␤ at /tmp/rSPdziky4N line 1, column 125␤»
..niecza v17-2-gb8fcf85: OUTPUT«===SORRY!===␤␤Variable @xs is not predeclared at /tmp/UI8tC7aUnK line 1:␤------> .map({.m}).elems; say @cs>>.m.perl; say ⏏@xs.map({.m}).perl␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.sett…
..rakudo d9fd17: OUTPUT«===SORRY!===␤Variable @xs is not declared␤at /tmp/eiI5KNQOMd:1␤»
jlaire p6: class C { method m() { <a b> } }; my @cs = C.new xx 3; say @cs>>.m.elems; say @cs.map({.m}).elems; say @cs>>.m.perl; say @cs.map({.m}).perl
p6eval pugs: OUTPUT«*** No such method in class Array: "&>>m"␤ at /tmp/lmrEuggrP3 line 1, column 60-73␤»
..niecza v17-2-gb8fcf85: OUTPUT«3␤3␤[$("a", "b"), $("a", "b"), $("a", "b")].list␤("a", "b", "a", "b", "a", "b").list␤»
..rakudo d9fd17: OUTPUT«3␤3␤(("a", "b"), ("a", "b"), ("a", "b"))␤(("a", "b"), ("a", "b"), ("a", "b")).list␤»