»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:06 mjk joined 00:09 quietfanatic left 00:12 snarkyboojum left, lest_away is now known as lestrrat 00:14 snarkyboojum joined 00:17 mjk left
lichtkind thanks 00:18
00:19 meppl left 00:38 payload joined
cj can someone recommend a book or document on compiler engineering? 00:39
m-locks A. Aho, R. Sethi, J. Ullman: Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. 00:42
cj thanks, m-locks
m-locks np
diakopter cj: PLP3 (Programming Language Pragmatics 3rd edition) 00:44
cj m-locks: you prefer the first edition?
diakopter five stars
cj thanks, diakopter :)
m-locks they seem to have lotsa additional materials, PLP CD and stuff 00:46
00:48 kfo left 00:56 colomon joined 00:58 xabbu42 left 01:01 snarkyboojum left 01:11 payload left
colomon rakudo: my Int $x = Mu; 01:11
p6eval rakudo b348b3: OUTPUT«Type check failed for assignment␤current instr.: '&die' pc 16803 (src/builtins/Junction.pir:347)␤»
01:16 jaldhar left
pugssvn r29950 | colomon++ | [t/spec] Fudge S14-roles/basic.t (some very disturbing errors here). 01:19
01:19 jaldhar joined 01:22 wknight8111 joined 01:24 lestrrat is now known as lest_away
pugssvn r29951 | lwall++ | [S32/IO.pod] put back :s, remove :z, :T, :B, :M, :A, :C 01:42
r29951 | note that these all end up calling methods on IO, not strings
01:48 dual left
k23z__ can I get a rakudo commit bit ? 01:48
I'm wsdookadr on github
dalek kudo: 974d9a8 | (Solomon Foster)++ | t/spectest.data:
Turn on S14-roles/basic.t.
01:49
diakopter k23z__: I think they want an individual to build up a history of submitting good patches before one gets one of those 01:50
k23z__ ah ok sorry
can I write some tests for Perl6 ?
01:50 quietfanatic joined
diakopter yes :) 01:50
you can have a commitbit to pugscode 01:51
k23z__ what tests could I write and what would I need ? (I have a compiled rakudo right here)
diakopter if you don't have one already
the tests are stored in pugscode svn
re "what tests could I write", that's a difficult question 01:52
it requires a certain familiarity with the language, or a precise reading of the Synopses (the language specification) 01:53
really, both
colomon Though you don't need to read the full spec, by any means -- just find a nice corner of it.
diakopter and a knowledge of how the test suite is organized, so you can determine that the feature for which you're considering writing tests hasn't already been thoroughly covered. 01:54
k23z__ do you have guides for new devs ? 01:58
so the road is read the synopsis, the perl6 book on github -> write tests ? 02:00
diakopter depends from where you're coming, and where you think you're going. :D (what languages you've used previously; what kinds of software you expect to write)
Perl 5 experience might help; it might not. The changes/additions (from 5->6) are numerous and varied in size (small,large) enough that existing Perl knowledge might hinder, since it might be more difficult to keep the languages distinct in your mind. 02:02
that's the case for me, anyway. It seems that those who have a thorough mastery of Perl 5 have a much easier time keeping them straight than someone like me, who isn't a Perl 5 expert. 02:04
TimToady we all already know where Perl 5 ought to be different :) 02:05
course, there are still parts of Perl 6 that ought to be different (I'm looking at you IO.pod) 02:07
diakopter k23z__: msg TimToady with your desired username & email address for pugscode svn (if you don't already have an account and you want to commit to the spec/testsuite) 02:08
I seem to have forgotten my commitbit password, otherwise I would add it 02:09
02:10 wknight8111 left
TimToady do you still have a mail account at veradox? 02:11
02:14 _jaldhar joined
diakopter ohhh that's the username 02:14
02:18 jaldhar left
diakopter considers how to design an API for codegen routines that generate codegen routines 02:26
02:31 lue joined
lue oi! 02:32
02:33 lichtkind left
lue ...chirp 02:43
colomon hey all.
PerlJam greetings colomon 02:44
lue hello o/
colomon submethods.t defines two classes in a... closure? in braces.
lives_ok {
class Foo { has $.foo_build; submethod BUILD() { $!foo_build++ } }
class Bar is Foo { has $.bar_build; submethod BUILD() { $!bar_build++ } }
}, "class definitions were parsed/run/compiled";
when the tests try to use those classes, they're not there. 02:45
any clue if they should be? Or are they local to those brackets?
lue maybe because it's contained in the braces. That's my first guess :)
PerlJam classes used to be package-scoped and I think they're lexical by default now.
colomon (If I take the braces away, the next twenty tests run fine...)
PerlJam (check the spec obviously :) 02:46
02:46 szabgabx left
PerlJam oh no, they're still package scoped (or should be) 02:48
S12:109
02:50 chenfengyuan joined
diakopter std: package bar { class baz { class foo { }; say foo; }; say foo; } 02:50
p6eval std 29951: OUTPUT«Undeclared routine:␤ 'foo' used at line 1␤ok 00:01 105m␤»
02:50 chenfengyuan left
diakopter chenfengy didn't like what p6eval had to say 02:50
lue how would you tell if a number is odd or even?
02:50 szabgabx joined
m-locks even: number % 2 == 0 02:51
TimToady % or !%
colomon PerlJam: adding our doesn't even help.
diakopter TimToady: see p6eval above
(I don't know whether that's correct) 02:52
lue rakudo: say 15 % 2 == 0
p6eval rakudo 974d9a: OUTPUT«0␤»
colomon rakudo: { class Foo { method bar() { say "bar"; }; }; }; my $a = Foo.new; $a.bar
PerlJam lue: you monkey patch .odd and .even methods :)
p6eval rakudo 974d9a: OUTPUT«Could not find non-existent sub &Foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady rakudo: say 15 !% 2
p6eval rakudo 974d9a: OUTPUT«Confused at line 11, near "say 15 !% "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
lue those are supposed to exist!?
TimToady alpha: say 15 !% 2 02:53
p6eval alpha 30e0ed: OUTPUT«0␤»
diakopter alpha: say 15 % 2 ?? "odd" !! "even" 02:54
TimToady class foo is visible only inside baz
p6eval alpha 30e0ed: OUTPUT«odd␤»
diakopter oh
PerlJam Hmm. .odd is actually mentioned in S04:332
lue alpha: say 15.odd
TimToady std: package bar { class baz { class foo { }; say foo; }; say baz::foo; }
p6eval alpha 30e0ed: OUTPUT«Method 'odd' not found for invocant of class 'Int'␤in Main (file src/gen_setting.pm, line 324)␤»
std 29951: OUTPUT«ok 00:01 105m␤»
PerlJam I guess I'm not the only one who channels his inner ruby programmer occasionally.
TimToady std: package bar { class baz { class foo { }; say foo; }; say bar::baz::foo; }
p6eval std 29951: OUTPUT«ok 00:01 105m␤» 02:55
diakopter std: package bar { { class foo { }; say foo; }; say foo; }
p6eval std 29951: OUTPUT«ok 00:02 105m␤»
03:02 stephenlb left 03:03 new_perl6_hacker joined
TimToady it's quite ironic that when an Olympic skier falls on the course, it's called DNF 03:04
m-locks haha
03:05 lest_away is now known as lestrrat
new_perl6_hacker How does rakudo diffrentiate between a $string = "some string" and $code = "Code inside a string" 03:05
m-locks well gotta sleep, gn y'all
colomon o/ 03:06
new_perl6_hacker @m-locks its morning here
k23z__ !tell garu test
m-locks it's 5am, about my bedtime ;P
new_perl6_hacker Good night
TimToady I have to get up at 5am to see if I'm in a panel discussion...
Tene new_perl6_hacker: rakudo does not differentiate at all. Strings are strings, and there's no type for "a string that happens to incidentally look like Perl 6 code". 03:07
m-locks yoink ->
colomon new_perl6_hacker: but if you have { } inside a double-quote string, it is executed and the result inserted into the string.
PerlJam new_perl6_hacker: what makes you think rakudo does differentiate those things?
colomon++ ah, good point 03:08
lue I was going to program a little something featured in today's XKCD comic (xkcd.com/710/), but I think programming .odd and .even first'd be more fun
(and in P6 this time)
new_perl6_hacker @PerlJam how will then find what methods I can invoke on strings and what methods I can invoke code objects
Tene lue: make sure you generate graphviz output so you can graph your results. :) 03:09
new_perl6_hacker: the same way you discover what methods you can invoke on any type.
PerlJam rakudo: "string".^methods.sy
er ...
rakudo: "string".^methods.say
p6eval rakudo 974d9a: ( no output ) 03:10
rakudo 974d9a: OUTPUT«maximum recursion depth exceeded␤current instr.: 'perl6;Seq;!fill' pc 13790 (src/builtins/Multi.pir:22)␤»
Tene rakudo: {say "hi"}.^methods.perl.say
p6eval rakudo 974d9a: OUTPUT«maximum recursion depth exceeded␤current instr.: 'perl6;Seq;!fill' pc 13790 (src/builtins/Multi.pir:22)␤»
Tene ah, looks like that's broken ATM
alpha: {say "hi"}.^methods.perl.say
p6eval alpha 30e0ed: OUTPUT«[{ ... }, { ... }]␤»
PerlJam heh
Tene anyway, it's in the class.
lue graphviz...?
PerlJam alpha: "String".^methods.say
p6eval alpha 30e0ed:
..OUTPUT«sprintfScalarComplexStrpredsuccencodeperlACCEPTSWHICHatanminacosmaxbytesevalchopsinrindextanhIntvaluesasinhacosechabsendceilingp5chompkeyskvfloorasechordcapitalizepickroundevalfileintsplitmatchacoshwordsp5choplcjoinsinhcotanacotanatan2reducesrandtrimasecreversecotanhisapolar:d:eucf…
PerlJam alpha: "String".^methods.join(" ").say 03:11
p6eval alpha 30e0ed: OUTPUT«encode succ WHICH ACCEPTS perl sprintf Scalar Complex Str pred map :d cis :e :f log sech log10 min rand max :l truncate bytes sort sin sqrt asin Int cosh :s grep asinh acosech abs end uc ceiling p5chomp samecase floor substr asech ord round flip does int split match acosh
..acosec wo…
Tene lue: graphviz.org/
lue: a simple text format for describing and rendering graphs.
03:12 athenot left
new_perl6_hacker And I will be able to execute that as &"string" or $string = "some code" ; &$string 03:12
TimToady not like that 03:13
Tene lue: upload.wikimedia.org/wikipedia/comm...0-no27.svg looks like it was generated with graphviz.
new_perl6_hacker: if you have code in a string that you want to execute, you'll need to use the 'eval' function, which invokes the compiler on the text.
TimToady you have to work harder to do symbolic lookups in Perl 6
but then there's no strict refs anymore 03:14
new_perl6_hacker Then all strings must ideally have 'eval' invokable on them 03:15
TimToady eval is never ideal :)
lue Tene: aah. I thought you were talking about P6 testing results :)
Tene new_perl6_hacker: That's completely true, in exactly the same way as "all files can have the perl6 compiler run on them" 03:16
new_perl6_hacker @tene , @TimToady thanks, got it now 03:17
lue .oO(bah. I wish I could upload whatever to wordpress.com . That'd make my life easier...)
Tene new_perl6_hacker: No problem. Was there a specific task you were trying to perform or problem you were trying to solve, or just general curiosity? 03:18
new_perl6_hacker I was looking at metaprogramming aspects
reflection basically 03:19
PerlJam alpha: my @a = "a".."z"; @a."join"(" ")."say" # :)
p6eval alpha 30e0ed: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
new_perl6_hacker But the example quoted by PerlJam earlier didn't show a 'eval' method, is that in the base class of string 03:20
Tene You keep talking about classes. It's a function, not a method. 03:21
PerlJam new_perl6_hacker: What other languages are you familiar with?
new_perl6_hacker Ruby and Python
colomon Tene: I think we added an eval method a while back, too. 03:22
PerlJam I was getting a strong ruby vibe from you :)
03:22 mj41_ joined
PerlJam (either that or smalltalk or something, but those are rared) 03:22
er, rarer
03:23 mj41 left, mj41_ is now known as mj41
new_perl6_hacker I think I'm getting confused, because I'm thinking everything from OOperspective . 03:23
colomon rakudo: "say 'hello'".eval
p6eval rakudo 974d9a: OUTPUT«hello␤»
PerlJam alpha: "blah".^methods.map(*.name).sort.join(" ").say 03:24
p6eval alpha 30e0ed: OUTPUT« :d :e :f :l :s ACCEPTS Array BUILD BUILDALL CREATE Capture Complex Hash Int Iterator PARROT REJECTS Scalar Scalar Str Str WALK WHENCE WHERE WHICH WHICH abs acos acosec acosech acosh acotan acotanh asec asech asin asinh atan atan2 atanh bless bytes can capitalize ceiling chars
..cho…
PerlJam alpha: "blah".^methods.map(*.name).grep({ $_ ~~ /^e/ }).join(" ").say
p6eval alpha 30e0ed: OUTPUT«encode eval elems evalfile exp end eigenstates␤»
PerlJam there you go 03:25
Tene alpha: say "foo".^can('eval') 03:26
p6eval alpha 30e0ed: OUTPUT«eval␤»
Tene alpha: say "foo".^can('eval').WHAT
p6eval alpha 30e0ed: OUTPUT«␤»
PerlJam hmm 03:28
why did WHICH appear in the list twice?
and Scalar and Str
lue there's a WHENCE option? (001 ! 03:30
rakudo: say 4.WHENCE
p6eval rakudo 974d9a: OUTPUT«␤»
PerlJam lue: WHENCE autovivifies an object 03:31
it's a closure from whence the object cometh
lue 'tis a closure whencefrom thy object cometh. (Old English translation free of charge :D ) 03:34
new_perl6_hacker :) just got a feeling that all programs(The mail program) go into a eval function inside the compiler. 03:36
*The main program* 03:37
Tene That's right.
The compiler reads the program text into a string, invokes the compiler on it to get back a Code object, and then invokes that Code object.
new_perl6_hacker This is great, so we basically have a compiler which we can use any where inside our program. This is a killer feature :) 03:38
lue Our main goal is having the P6 interpreter run itself (be written in P6 code). 03:40
The key, IMO, is recursive definition :)
TimToady well, it was a killer feature in Perl 3 or so
colomon and in Lisp, Ruby, etc. 03:41
still, it's an awesome feature.
TimToady but usually it's an escape valve indicating a missing feature elsewhere
we treat BEGIN the same say 03:43
03:43 Sarten-X joined
PerlJam Why do we think all languages must be self-describable? 03:44
TimToady and eval, in general, opens you up to all sorts of security problems, just like SQL injection
xkcd.com/327/ 03:46
lue TimToady: love that one :) 03:48
TimToady PerlJam: we don't, just the good ones. 03:49
I blame Gödel...
PerlJam and Escher and Bach ;)
lue Don't forget Thought. That guy takes forever to figure things out. :) 03:50
.xkcd(fun with chess: xkcd.com/249/) 03:52
rakudo: say chr(0xFDD0) 03:54
p6eval rakudo 974d9a: OUTPUT«﷐␤»
lue .u �
phenny U+FFFD REPLACEMENT CHARACTER (�)
PerlJam you could do a good meta comic on photoshopping the chess board in that one
TimToady don't photoshop the chess board, just photoshop me into xkcd :) 03:55
lue WIN! (quick, somebody get Larry's head off of Yahoo Images!!!) 03:57
colomon Woah, I knew the Gathering was in process, but I didn't know someone had already taken Larry's head! 03:58
lue xkcd.com/365/ yet another conference the poor guy can't go to :)
03:59 rgrau left
lue I think XKCD ought to do a comic about Perl for once (with guest appearance by TimToady of course :) ) 04:01
colomon what do you mean "for once"? There are at least two classic comics about Perl.
I have the t-shirt for one... 04:02
PerlJam colomon: yeah, but one of them is called "lisp"
lue I honestly cannot remember if there werl Perl comics on XKCD :)
s/werl/were/
colomon xkcd.com/224/ 04:03
xkcd.com/208/
new_perl6_hacker If an exception happen inside an eval, should the main program see it? 04:04
TimToady no, it's trapped in $!
lue according to number 224, Larry has tight (if possibly indirect) connections with God (all hail!) 04:06
04:06 rv2733 left
lue .xkcd(xkcd.com/18/ we need more of these jokes) 04:07
lue will paste a bunch of xkcd comic links to pastebin instead of flooding the channel 04:09
lisppaste3 lue pasted "XKCD comic links" at paste.lisp.org/display/95996 04:21
04:22 justatheory left 04:23 mj41 left, mj41_ joined 04:24 mj41_ is now known as mj41
lue heelooo-oooh 04:42
04:44 rv2733 joined 04:45 abra joined 04:46 lestrrat is now known as lest_away
lue saluton? Hello? Bonjour? anyone? 04:56
TimToady is hiding behind a cricket 04:59
lue ah, that's where you are. 05:01
05:11 quietfanatic_ joined
new_perl6_hacker What is the maximum value of anything Inf can hold? 05:12
diakopter -Inf
TimToady how much memory do you have? 05:13
05:13 quietfanatic left
new_perl6_hacker :) 05:13
lue rakudo: say 0..3; say [0,3]; say [0,4)
diakopter sprixels along
p6eval rakudo 974d9a: OUTPUT«Confused at line 11, near "say [0,4)"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
lue
.oO(interval notation would be interesting for the "official P6 module" (as well as set-builder, possibly))
05:14
TimToady no need
0..^4 is already there
and doesn't use up two (count 'em *two*) brackets 05:15
lue ah well, that's why I didn't say "...interesting project for implementation in Rakudo" :)
TimToady mathematicians do many unforgiveable things as far as computers are concerned, and that's one of 'em 05:16
lue rakudo: say 0..Inf
p6eval rakudo 974d9a: ( no output )
lue rakudo: say 0..^Inf
p6eval rakudo 974d9a: ( no output ) 05:17
TimToady rakudo: say (0..Inf).batch(10)
p6eval rakudo 974d9a: OUTPUT«Method 'batch' not found for invocant of class 'Range'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady rakudo: say (0..Inf).iterator.batch(10)
p6eval rakudo 974d9a: OUTPUT«0123456789␤»
TimToady oughta do that automatically, methinks
rakudo: say (0...*).batch(10) 05:18
p6eval rakudo 974d9a: OUTPUT«0123456789␤»
TimToady that one works 05:19
lue I can't help but think about the possibility of built-in SDL/OpenGL support (thru Parrot). The upside is that it'd be a MAJOR perk over other languages.
The downside is probable bloatedness
new_perl6_hacker diakopter why does perlcabal.org/~fglock/perlito.html give an error message to say 'hello,word!'; 05:20
japhb lue: OpenGL support is just waiting on Tene to reenable the 'use OpenGL:from<parrot>;' notation (lost during the branch switch). kthakore++ is working on SDL 05:21
lue \o/ Get ready for the flood of awesome (no doubt to be recorded by XKCD ;) ) 05:22
Tene japhb: I've currently got nothing scheduled tomorrow. I'll try to fit it in then.
japhb: although I should probably also look at the pcc refactor branch.
japhb Tene, \o/
aww. I hate tuit conflicts. :-/ 05:23
lue I got a Norweigan Blue Parrot for the occasion (of OpenGL/SDL implementation) :) 05:24
japhb :-)
Tene japhb: with any luck, I'll feel conflicted and not work on either of them. :)
japhb :-P
lue Beautiful plumage, the Norweigan Blue. 05:25
japhb Just to make you feel guilty, I'm writing WebGL code in JavaScript, because I can't have my OpenGL in Perl 6.
That reminds me, I need to throw some tuits at plumage
lue Tene: if you don't work on anything parrot-related (due to conflict), then you're the pet shop owner :) 05:26
05:38 gfx joined
new_perl6_hacker Is perlcabal.org/~fglock/perlito.html the sprixel project? 05:44
TimToady no 05:46
lue goodbye, see you during the hackathon tomorrow 05:49
06:08 athenot joined 06:12 perlster joined 06:15 perlster left 06:30 quietfanatic_ left 06:33 quietfanatic joined 06:42 athenot left 07:05 arlinius left, szabgabx left 07:24 aesop left 07:38 new_perl6_hacker left 07:53 uniejo joined
uniejo All Perl6 speaks today are moved into room 4A16 07:54
07:55 aesop joined 08:06 abra left 08:07 gfx left 08:10 jonasbn joined 08:16 new_perl6_hacker joined 08:41 meppl joined 08:43 iblechbot joined 09:06 Su-Shee joined 09:17 krakan left 09:18 uniejo left 09:20 uniejo joined
k23z__ err .. 09:32
room 4A16 ?
09:33 kfo joined 09:35 arlinius joined
arnsholt k23z__: That's where we are, yes 09:35
The Copenhagen hackathon =) 09:36
Su-Shee good morning 09:37
arnsholt 'morning Su-Shee
k23z__ hmm 09:38
09:40 iblechbot left 09:45 cotto left 09:51 mberends joined
jonasbn k23z__: where are you at? 09:52
k23z__: did you make it here or do you require guidance? 09:53
mberends heehee, the Copenhagen Perl 6 Hackathon has a good turnout, about 25 people :-)
jnthnandmasakbot++ is giving what would have been moritz_++'s grammar and regex talk 09:56
Su-Shee 25 people? nice. you can do a lot with 25 people in 48 hours. 09:57
mberends Yet Another Example of JIT talk preparation
baest :) 09:58
jonasbn Su-Shee: we are not contribution right now, we are in the brainwash phase
contributing even
10:00 cotto joined, xabbu42 joined 10:04 payload joined 10:05 rv2733 left
Su-Shee well I hope you've got fun and it's a great weekend. :) 10:08
mberends :) 10:09
k23z__ jonasbn: sorry for confusing you, I am not there , I am maybe 2000km away 10:18
10:21 rv2733 joined 10:26 orafu left, orafu joined 10:30 new_perl6_hacker left, pochi left 10:32 eternaleye left 10:35 lest_away is now known as lestrrat 10:42 eternaleye joined 10:47 fridim joined 10:48 xinming_ joined 10:51 krr joined 10:52 xinming left 10:56 uniejo left
jonasbn ah 10:57
hehehe
lisppaste3 baest pasted "Patch which ensures === returns bool not int" at paste.lisp.org/display/96001
10:57 jonasbn left
baest based on github.com/rakudo/rakudo/commit/d4b...55845517e5 and github.com/rakudo/rakudo/commit/fd2...7e10487525 10:58
10:59 fod joined, fod left
mberends nom & 11:02
11:03 mberends left 11:06 Su-Shee left 11:12 z3ndrag0n joined 11:30 kidd joined 11:36 payload left 11:43 uniejo joined, cognominal left, snarkyboojum joined 11:46 fridim left 11:49 Su-Shee joined 11:51 clintongormley joined 11:56 snarkyboojum_ joined 11:57 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum 11:59 krr left 12:03 masak joined
masak oh hai from Copenhagen, #perl6! 12:03
arnsholt Oh hai from the next row, masak!
12:04 quester joined, mberends joined
masak mberends: lol I can see you both on- and offline! :D 12:05
jnthn++ is on now, by the way.
giving his famous "solved in Perl 6" talk.
mberends masak: stop chattering and pay attention to the talk! 12:06
masak obliges :) 12:07
12:07 cognominal joined, payload joined 12:08 payload left
Su-Shee oO(live from the benches in copenhagen.. ;) 12:09
12:09 payload joined
arnsholt Su-Shee: Peanut gallery, more like ;) 12:09
pugssvn r29952 | mberends++ | [docs/talks/p6.imp.2010.03.odp] slides of "Perl 6 Implementations in March 2010" from the Dutch Perl Workshop and the Copenhagen Perl 6 Hackathon 5th and 6th March 2010 (OpenOffice Presentation format) 12:10
ned so jealous. 12:13
colomon o/ 12:23
12:30 wknight8111 joined
quester rakudo: augment class Int { method even { ? ( self % 2 ) } }; 42.even.say; 12:33
p6eval rakudo 974d9a: OUTPUT«Method 'even' not found for invocant of class 'Integer'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
quester rakudo: augment class Integer { method even { ? ( self % 2 ) } }; 42.even.say;
p6eval rakudo 974d9a: OUTPUT«Can't augment something that doesn't exist␤current instr.: 'perl6;Perl6;Grammar;add_name' pc 34122 (src/gen/perl6-grammar.pir:242)␤»
quester wonders what class 42 really is... 12:34
masak my talk is online now. it's linked at the bottom of feather.perl6.nl/~masak/ 12:35
thanks to all the people on the channel who helped yesterday with the slides :) 12:36
mberends rakudo: say 42.WHAT # for quester
p6eval rakudo 974d9a: OUTPUT«Int()␤»
colomon rakudo: say PARROT(42) 12:37
p6eval rakudo 974d9a: OUTPUT«Integer␤»
colomon rakudo: say PARROT(1+41)
p6eval rakudo 974d9a: OUTPUT«Integer␤»
arnsholt Ah, there are some issues with augmenting classes that come from Parrot, no?
colomon Might be more accurate to simple say there are issues with classes that come from Parrot. 12:39
I don't know if the augmenting is bad too or just a window into the problems.
masak the latter, methinks. 12:40
quester mberends, colomon, masak: I think I've seen augments in some of the Rakudo internals. Hmm... can anyone suggest a good way of converting Integer to Int offhand? 12:41
masak quester: what you're seeing is some kind of Parrot/Rakudo discrepancy that shouldn't really be visible. 12:42
colomon rakudo: say pir::box__PI(42)
p6eval rakudo 974d9a: OUTPUT«42␤»
colomon rakudo: say PARROT( pir::box__PI(42)) 12:43
p6eval rakudo 974d9a: OUTPUT«Integer␤»
colomon blast, that doesn't help.
quester rakudo: pir::box__PI(42).perl.even.say;
p6eval rakudo 974d9a: OUTPUT«Method 'even' not found for invocant of class 'String'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
quester ...String...? 12:44
colomon .perl returns Str
well, String maybe.
you're finding all the cracks this morning.
quester colomon: Thank you. Brain fail.
colomon and my fuddled brain isn't remembering how to work around them.
masak quester: 'String' is also a Parrot type. 12:45
quester rakudo: "42".even.say; 12:46
p6eval rakudo 974d9a: OUTPUT«Method 'even' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
12:46 iblechbot joined
quester masak: Isnt Perl6Str supposed to be, um... hiddien away inside of Rakudo, too? 12:47
uniejo rakudo: say (+pir::box__PI(42)).WHAT
quester s/hiddien/hidden/
p6eval rakudo 974d9a: OUTPUT«Num()␤»
masak quester: yes, I think so.
quester: sometimes error messages leak through.
colomon rakudo: say PARROT(42.Num.Int) 12:48
p6eval rakudo 974d9a: OUTPUT«Int␤»
colomon aha!
rakudo: augment class Int { method even { ? ( self % 2 ) } }; 42.Num.Int.even.say 41.Num.Int.even.saty 12:49
p6eval rakudo 974d9a: OUTPUT«Confused at line 11, near "42.Num.Int"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
masak copypaste fail.
colomon rakudo: augment class Int { method even { ? ( self % 2 ) } }; 42.Num.Int.even.say; 41.Num.Int.even.say;
p6eval rakudo 974d9a: OUTPUT«0␤1␤»
TimToady good morning
colomon So augment works, but .even is backwards.
TimToady: o/
TimToady who's winning?
pmichaud hello, #perl6 12:50
colomon \o
masak pmichaud! \o/
TimToady hah, I beat pmichaud
quester colomon: Thank you. Err... yes, that would be another brain failure on my part, sorry...
masak pmichaud, TimToady: all the peeps here say OH HAI
you'll soon be on-screen, I expect.
pmichaud OH HAI PEEPS!
TimToady OH HAI PEEPS!!!
pmichaud (hah, I beat TimToady) 12:51
TimToady hah, beat pmichaud++ again on !!!