»ö« 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.
diakopter o/ 07:03
sorear o/ 07:10
sjohnson o/ 07:12
diakopter has been working with UnicodeData.txt the past few hours
well, things relating to it. 07:13
masak antenoon, #perl6 08:23
diakopter o/ 08:28
hoelzro hey Perl6 folk 08:49
I just built Parrot 4.6.0, latest NQP from Git, and latest Rakudo from Git, but I'm still encountering the crash bug I've been seeing
hoelzro this tarball contains the files needed to duplicate the crash: hoelz.ro/files/perl6-crash.tar.bz2 08:50
if someone more experienced with any of those projects could take a look, I'd really appreciate it! 08:51
(by the way, I'm on 64-bit Arch Linux)
masak hey, so am I ;) 08:56
masak makes a look 08:57
hoelzro thank you sir =)
masak ===SORRY!=== 09:00
Could not find NativeCall in any of: /home/masak/.perl6/lib, /home/masak/ours/nom-rakudo/install/lib/parrot/4.5.0-devel/languages/perl6/lib
so it seems I should install zavolaj, yes?
hoelzro yes 09:00
masak does so 09:01
here, it runs up to 999000 and then goes 'after loop'. 09:03
hoelzro dammit
masak I am unable to reproduce your crash, sir.
hoelzro it crashes at around 17000 for me
=/
could my version of Perl 5 impact anything?
masak sounds GC-related to me. 09:04
hoelzro yeah, it segfaults in my standalone example
but in my program, an assertion in the GC fails
hoelzro masak: where would be a good place to report this? 09:09
sergot hi o/ 09:11
masak hoelzro: [email@hidden.address]
sergocie! \o/ 09:12
sergot masaku \o/
hoelzro masak: thanks! 09:13
masak I've decided to implement lambda calculus in Perl 6, and to blog about it. 09:56
though it falls below a bunch of other things on the TODO list.
diakopter .. 10:00
masak oh, right. lue's pull request. :) 10:11
masak looks
uh, I won't pull merges. sorry. 10:12
so I'll reject this one. 10:13
but I can still review it on its actual code and give feedback on that, I guess :)
lue: I prefer to leave things out entirely rather than comment them out when they're NYI. 10:14
lue: my %hash = { ... }; # the braces there are bad style IMO 10:15
also, please put key/value pairs in such a hash on separate lines, indented one step, semicolon on its own line at the end, unindented. 10:16
rather than an expand_cmd, I'd like to see short when { ...; proceed } simplifications like at github.com/masak/crypt/blob/c2cab1...rypt#L1082 10:18
masak I think I'd prefer "verbs" and "directions" to be handled separately. 10:19
lue: the `gather for` is too big a weapon to attack the problem you're solving. 10:21
github.com/lue/crypt/commit/b765a7...450#L0R994 can be written simply `@expandedcmd = %synonyms{$_} // $_ for $syncmd.words`.
also, I think it's a bit too overeager to be doing synonym replacement on *all* words in the command. 10:22
I could just imagine an object called "x" which just became unreferrable in the game. :) 10:23
also, I'm not a fan of declaring variables at the top of a sub. prefer declaring them ALAP. 10:24
masak lue: I should've said at the start that I'm thankful for the pull request. thank you. it adds functionality that would improve the game. 10:24
modulo the above comments.
masak lue: ping 10:39
jnthn Good afternoon, #perl6 11:31
masak jnthn! \o/ 11:44
jnthn mmm....toqastuits 11:45
colomon \o/ 11:46
Coleoid Good morning, #perl6 folks. 12:10
I have some questions on comment forms.
The #< ... > form is no longer valid, superseded by #`< ... >, right?
And that form is allowed to begin a line? 12:11
R 12:12
Related question,
rn: say #`{ Nested embedded comments with different brackets chosen #`[ S02/Embedded Comments is silent on this point ] } 'Should this be specced? It works...' 12:13
p6eval rakudo 81328c, niecza v19-13-g442e075: OUTPUT«Should this be specced? It works...␤»
Coleoid rn: say #`{ Nested embedded comments with same brackets chosen #`{ S02/Embedded Comments is silent on this point } } 'Should this work?' 12:14
p6eval niecza v19-13-g442e075: OUTPUT«Should this work?␤»
..rakudo 81328c: OUTPUT«===SORRY!===␤Confused␤at /tmp/hRjeMWngnZ:1␤»
Coleoid std: say #`{ Nested embedded comments with same brackets chosen #`{ S02/Embedded Comments is silent on this point } } 'Should this work?'
p6eval std 3b49ac8: OUTPUT«ok 00:00 41m␤»
jnthn Rakudo doesn't count nested brackets in quoting constructs just yet, so yes, that should work also.
Coleoid Thanks! 12:15
masak submits rakudobug
jnthn masak: I suspect we already have that covered. :)
masak: I mean, maybe not in the comment case, but other related cases.
Coleoid Yep, I found it doing S02*\*.t cleanup. 12:16
So I doubt anything I ask about for a while will really be new.
masak jnthn: so, no use submitting? 12:18
jnthn masak: Well, I suspect the thing it's a manifestation of must already have been submitted, that's all 12:20
masak: Also the features page covers Rakudo's lacking in this area :)
masak I'll take that as a "yes, no use submitting". 12:21
Coleoid masak: Can you give me a link to the process of submitting (rakudo|neicza)bugs? I'm underwater in p6 pages right now. 12:26
masak Coleoid: rakudobug: step 1: send an email to [email@hidden.address] step 2: done. 12:27
Coleoid :D
masak Coleoid: nieczabug: github.com/sorear/niecza/issues
Coleoid . o (No wonder I don't recall seeing a tutorial on it...) 12:28
colomon Don't forget to include the version of rakudo/niecza which demonstrates the bug. 12:29
Demonstrating the bug in p6eval and then copy-n-pasting the IRC log is a popular approach. :) 12:30
masak heh.
Coleoid For which the ... That was my next question. :D 12:30
dalek p/toqast: 6ad982a | jnthn++ | src/QAST/Operations.nqp:
Get while/until loops able to handle next/last/redo control exceptions again. Also a fix to support the 3-operand version that loop wants.
12:32
kudo/toqast: cddd89c | jnthn++ | src/QPerl6/Actions.pm:
Fix loop.
masak r: say "Pretty robots!".comb(/<[\w]>/).lc 13:13
p6eval rakudo 81328c: OUTPUT«p r e t t y r o b o t s␤»
masak r: say "Pretty robots!".comb(/<[\w]>/).join.lc
p6eval rakudo 81328c: OUTPUT«prettyrobots␤»
masak \o/
Timbus what the.. you guys forked my awful bot on github?? 13:26
i was going to give up and move to event based instead of slot-based stuff but jnthn's fix seems preeetty good 13:27
masak Timbus: not just that -- we demoed it in a talk in Bristol :)
Timbus ohmigosh 13:28
masak :D 13:28
masak Timbus: masak.org/carl/bristol-mm-2012-flyi...r/talk.pdf 13:30
Timbus im a lot better at event based programming these days after having to make a data logger + json rpc server at work using anyevent+coro (and gtk+anyevent for the client stuff). maybe I should update it to work with muevent
Timbus masak, would you happen to know why the unsmith module doesn't work 13:59
Timbus Nominal type check failed for parameter ''; expected Net::IRC::Modules::ACME::Unsmith but got Cursor instead <- what even 14:00
masak Timbus: I think I hit upon that. no idea. :/ 14:01
Timbus the 8ball regex works
Timbus and <.ws> in the regex works. 14:02
raiph couple comments about jnthn+masak++'s "dude, where's my flying car?" 14:09
masak listening. 14:10
raiph the releases graphic has a smilie per month
raiph but there isn't one star per star release. in particular, only 2 stars in 2011 14:11
you did jan, apr (2 actually), and july 14:12
and i think in 2012 u did jan, feb, mar, apr (x2), jun, 14:13
masak oh! 14:14
I could change that, I think. 14:15
raiph in the adoption curve u point toward the end of the early adopter phase. i'd put at or near the start 14:16
raiph a few small lang examples. the examples are a weird choice -- until one sees why (card example). 14:18
perhaps u say so as u do the presentation, but as a pdf, until i figured that out, it made the examples feel anticimactic 14:20
*anticlimatic
Timbus i remember when net::irc used 150mb of ram and i was like woah thats alot 14:21
now it uses 350mb
raiph re: what's we're working on
s/what's/what/
(as in slide title had that error) 14:22
tesss Testing..... 14:23
raiph title sorta implies that you're working on is what's left
(title is actually "what's we're still working on")
tesss Works!
Timbus you ran 1 test(s), all returned ok
masak no, we're at the end of the early adopter phase. I insist. 14:24
Timbus another satisfied #perl6 visitor
raiph s/implies that you're/implies that what you're/
masak I've made that adoption curve earlier, in other talks. I put the arrow earlier then :)
raiph masak: in terms of adoption i'd say we're very much still in the early part of the early adopter phase 14:25
masak ok. prediction things is difficult, especially prediction the future. 14:26
predicting*, both time
s*
in what way were the examples a weird choice and anticlimatic? they feel like fairly normal examples to me. 14:27
raiph until i realized u picked those examples to set up the card example, i was assuming the examples would be chosen to showcase p6 at its best 14:29
masak I'm not aware that we *did* pick those examples particularly to set up the card example... 14:30
we're showing loops, subroutines, classes...
raiph they are cool; even v cool; but they didn't blow me away.
takadonet Hey masak
masak hey takadonet
takadonet Been a while
masak indeed.
welcome back! \o/
takadonet Never left. Been reading the logs mostly daily 14:31
raiph masak: was the target audience perl 5 users?
masak raiph: no, programmers in general.
takadonet: oh, ok. anyway, nice to talk to you again :) 14:32
raiph then showing me loops, subs, and classes is very underwhelming
takadonet You too
masak raiph: tell me what that section should have been. I'm still missing your point, I think. 14:33
I didn't get the feeling that the audience was underwhelmed during that part. 14:34
moritz back 14:35
raiph grammars, and a p6 grammar you can easily bend? ("wow!"),
i realize it's small examples, and you define the ! op, but still
masak true. we could've shown grammars there. 14:36
fwiw, we did in the two-hour walkthrough on the same conf.
raiph laziness. nice! (and not in other langs) 14:37
jnthn The talk was rather time constrained, though. Also it was very much aimed at attracting people to a longer 2-hour Perl 6 tutorial that came later in the day. Given the room for that one was totally full, I'd say this walk worked pretty fine. :)
And yes, the later session did include grammars. :)
raiph i should say it's a great, fun, quick intro. i guess what i'm saying was nits.
jnthn Sure, there's always things to tweak. Showing grammars woulda been cool too; they are a "killer feature". 14:38
masak next time we will :)
raiph i guess that was my problem. the slides say there's two presentations. i retract my concerns about the examples. 14:39
nice job! ;)
jnthn masak: Yes, but as I always tell people at $dayjob when they tell me, "why don't you inlcude X in the class": what do you want to replace with it to make time? :) 14:40
moritz
.oO( because I don't want the class to be X-rated )
14:41
jnthn :P 14:42
raiph jnthn, masak: maybe "a few small language examples" --> "couple examples of p6's take on common constructs"
jnthn raiph: That's quite a nice phrasing. 14:43
raiph jnthn, masak: my point was more about my expectation that what i was seeing was a quick intro to p6, but it was more a taster to set things up for the second presentation 14:44
anyway, to wrap, i thought it was great w/ the exception of being anticlimactic because i didn't anticipate another one 14:46
jnthn raiph: Yes, I can see if you don't have the context of "come see more later", it doesn't feel quite complete. 14:47
masak :)
masak .oO( "Perl 6 is less of a language and more of a full multisensory experience" )
raiph jnthn: right. that's all. and when i viewed it i didn't have that context. and the only clue was "this presentation and the next" the significance of which i didn't really take on 14:48
raiph so, let me try again: 14:50
jnthn++ masak++ : great slideshow! just about perfect! :)
masak ;) 14:52
masak .oO( suck-up ) :P 14:52
jnthn Ugh. Compiling CORE.setting with qperl6 gets up to Int (so, thousands of lines in), then hangs... 14:57
masak it probably tries to enumerate all the Ints or something... :) 15:00
jnthn My first guess was that it failed somewhere in composition, but no, that seems to work out OK... 15:06
dalek ast: e7b4100 | moritz++ | S03-operators/precedence.t:
remove outdated tests for prefix abs
15:52
kudo/nom: 5b56cfc | moritz++ | src/ (6 files):
remove abs as a prefix op, make it a normal sub instead
15:53
moritz r: enum A (b => 1 + 1);
p6eval rakudo 81328c: ( no output )
moritz r: enum A (b => 1 + 1); say A::b 15:54
p6eval rakudo 81328c: OUTPUT«b␤»
moritz r: enum A (b => 1 + 1); say A::b + 1
p6eval rakudo 81328c: OUTPUT«3␤»
moritz \o/
masak moritz! \o/ 15:59
dalek p/toqast: 0cf1ec5 | jnthn++ | src/QAST/Operations.nqp:
Handling for 2 and 3 arg version of substr.
16:00
p/toqast: 839ab97 | jnthn++ | src/QAST/Operations.nqp:
Re-instate nqp::die.
p/toqast: a3fbc99 | jnthn++ | src/QAST/Operations.nqp:
Add nqp::findmethod.
p/toqast: 1668e70 | jnthn++ | src/QAST/Compiler.nqp:
Make use of QAST::Want v when processing statement lists.
p/toqast: 74c1e10 | jnthn++ | src/QAST/ (2 files):
Contextual QAST::Want nodes when compiling ops.
dalek kudo/toqast: 7253071 | jnthn++ | src/QPerl6/Actions.pm:
Toss a needless check, which could cause problems.
16:06
kudo/toqast: edf1a73 | jnthn++ | src/core/ (2 files):
Pair/Whatever/WhateverCode need to be stubbed really early now.
kudo/toqast: 35d8ceb | jnthn++ | src/QPerl6/Actions.pm:
Couple of some AST building tweaks to enable better code-gen.
kudo/toqast: aff12ef | jnthn++ | src/QPerl6/ (2 files):
Fix up constant folder, thus fixing compilation of Order enum.
masak strangelyconsistent.org/blog/announ...ntest-2011 16:21
diakopter masak: is AZ a he? 16:25
masak diakopter: point taken. I actually thought about it when I wrote that. 16:28
A Z has chosen not to reveal full name or gender. I wrote "he" because Spivak pronounce are not standard English, and the assumption of "he" here is fairly safe.
that said, if I was wrong, I'll happily (1) change it to "she" and (2) apologise.
diakopter what is Spivak pronounce 16:29
masak er, pronouns.
en.wikipedia.org/wiki/Spivak_pronoun
diakopter meh
masak ;) 16:30
if you ask me for a preference, I think the Elverson variant is the sanest. but the fact remains; using them creates more confusion than clarity. 16:31
diakopter masak: you wrote "The flexibility of Perl 6 makes it easy to add container types with intuitive interfaces." example plz 16:35
I'm not challenging; I'm merely inquisitive 16:36
masak is that one of the reviews? 16:38
url?
diakopter strangelyconsistent.org/p6cc2011/t2/az5112/
masak example: say you wanted a "sorted hash" type. you could give it both a .{} method for keyed lookup and a .[] method for indexed lookup. 16:40
it's intuitive because from the outside it works just like you're used to with hashes and arrays, even though it's a user type.
diakopter I'm slow; how do you add .{} or .[] methods 16:44
masak r: class A { method postcircumfix:<[ ]>($n) { $n } }; my $a = A.new; say $a[42] 16:45
p6eval rakudo 5b56cf: OUTPUT«42␤»
UncleFester6 flussence: ping 16:55
seldon Can operators be overloaded that way outside classes? 16:58
I'm thinking of ops +, - and similar.
flussence hi
UncleFester6 flussence: it looks like I can put -G in just one step and get around the build problem. Have you done something similar? 16:59
flussence I needed to put -G in stage 1/2 NQPCORE.setting build commands
jnthn seldon: Yes 17:00
seldon \o/ 17:01
UncleFester6 it looks like most people fail in the same place ... Can I ask you to just put -G in the step that does "--output=$(STAGE1)/$(CORE_SETTING_PIR)" and see if runs? I am thinking that might be a patch.
flussence that's exactly what I did 17:02
(plus the stage2 one, since it failed too)
UncleFester6 My stage 2 didn't fail. I guess they objected to leaving -G in for those steps as a patch so I will document the workaround in the ticket. Thx. 17:05
flussence I wonder if low memory makes it more likely, how much RAM/swap is on your machine? Mine's 1GB/768MB. 17:06
UncleFester6 according to "top" I have 1GB RAM/3GB SWAP 17:08
flussence 4GB should be more than enough. doesn't seem like that's the cause either... very confusing. 17:09
dalek p/toqast: 212b72c | jnthn++ | src/QAST/Operations.nqp:
Add a couple of missing ops.
17:11
p/toqast: 876c9d5 | jnthn++ | src/QAST/Operations.nqp:
Fix some op signatures.
p/toqast: 818b756 | jnthn++ | src/QAST/Compiler.nqp:
Add to QAST::VM so we can handle pir::const::foo.
kudo/toqast: e6609f3 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Add a missing bit of circularity sawing for Str. This may well have been at the heart of many of the not-fun-to-track-down infinite recursions related to stringification when compiling CORE.setting.
kudo/toqast: 6f79391 | jnthn++ | src/core/control.pm:
Fix a bunch of incorrect pirop signatures that the slightly stricter processing in QAST catches.
kudo/toqast: b2aa14b | jnthn++ | src/QPerl6/Actions.pm:
Update pir::const compilation.
sorear good * #perl6 17:36
raiph "Type objects (other than Mu) can be compared for equality with the === identity operator: " 17:51
(from doc.perl6.org/language/objects)
is followed by use of "==" not === 17:52
gfldex moritz: ^^^
raiph aiui both the sentence and the code are correct but it reads strangely 17:54
raiph actually, scrap my last comment except the bit about it reading strangely. 17:55
gfldex the code is not correct 17:56
masak sorear! \o/ 18:08
masak r: my &x; say defined &x 18:54
p6eval rakudo 5b56cf: OUTPUT«False␤»
masak r: class A { has &!x; submethod BUILD() { say defined &!x } }; A.new; class B { has &!x; submethon BUILD(:&!x) { say defined &!x } }; B.new
p6eval rakudo 5b56cf: OUTPUT«===SORRY!===␤Variable &!x used where no 'self' is available␤at /tmp/_2UCRLzEfX:1␤»
masak r: class A { has &!x; submethod BUILD() { say defined &!x } }; A.new; class B { has &!x; submethod BUILD(:&!x) { say defined &!x } }; B.new 18:55
p6eval rakudo 5b56cf: OUTPUT«False␤False␤»
masak r: class B { has &!x; submethod BUILD (:&!x) { &!x //= { 'ook!' } }; method f { say "&!x = ", &!x; &!x() } }; say B.new.f 18:57
p6eval rakudo 5b56cf: OUTPUT«&!x = Callable()␤invoke() not implemented in class 'Callable'␤ in method f at /tmp/k7SKaa2kSO:1␤ in block <anon> at /tmp/k7SKaa2kSO:1␤␤» 18:57
masak WHAT DO YOU THINK CALLABLE MEANS THEN 18:58
masak hyperventilates
I feel better now.
r: class C { has &!x; method setup (:&!x) { &!x //= { 'ook!' } }; method f { say "&!x = ", &!x; &!x() } }; given C.new { .setup; say .f } 18:59
p6eval rakudo 5b56cf: OUTPUT«&!x = Callable()␤invoke() not implemented in class 'Callable'␤ in method f at /tmp/13ET4g8qAn:1␤ in block <anon> at /tmp/13ET4g8qAn:1␤␤»
masak r: class C { has &!x; method setup (:&!x) { &!x = { 'ook!' } }; method f { say "&!x = ", &!x; &!x() } }; given C.new { .setup; say .f }
p6eval rakudo 5b56cf: OUTPUT«&!x = Block.new()␤ook!␤»
masak so it's something to do with //= and callables. 19:00
jnthn r: my &x; &x //= { 42 }; x(42)
p6eval rakudo 5b56cf: ( no output )
jnthn r: my &x; &x //= { 42 }; say x(42)
p6eval rakudo 5b56cf: OUTPUT«42␤»
masak r: class C { has &!x; method setup (:&!x) { say defined &!x; &!x //= { 'ook!' } }; method f { say "&!x = ", &!x; &!x() } }; given C.new { .setup; say .f }
p6eval rakudo 5b56cf: OUTPUT«False␤&!x = Callable()␤invoke() not implemented in class 'Callable'␤ in method f at /tmp/v_9AsxihP2:1␤ in block <anon> at /tmp/v_9AsxihP2:1␤␤»
masak and private attributes.
r: class C { has &!x; method setup (:&!x) { say defined &!x; &!x //= { 'ook!' } }; method f { say defined &!x; &!x() } }; given C.new { .setup; say .f }
p6eval rakudo 5b56cf: OUTPUT«False␤False␤invoke() not implemented in class 'Callable'␤ in method f at /tmp/HMftU6NHmB:1␤ in block <anon> at /tmp/HMftU6NHmB:1␤␤»
masak oh, still undefined! 19:01
masak submits rakudobug
masak oh, but hm. 19:02
r: class C { has &!x; method setup () { say defined &!x; &!x //= { 'ook!' } }; method f { say defined &!x; &!x() } }; given C.new { .setup; say .f }
p6eval rakudo 5b56cf: OUTPUT«False␤True␤Null PMC access in get_pmc_keyed_str()␤ in block <anon> at /tmp/MjjEyWmq2h:1␤ in method f at /tmp/MjjEyWmq2h:1␤ in block <anon> at /tmp/MjjEyWmq2h:1␤␤»
masak ah. :)
masak sniggers for slightly too long
jnthn isn't at all sure what's going on. 19:04
masak r: class C { has &!x; method f { say defined &!x; &!x //= { 'ook!' }; say defined &!x; &!x() } }; C.new.f
p6eval rakudo 5b56cf: OUTPUT«False␤True␤Null PMC access in get_pmc_keyed_str()␤ in method f at /tmp/yMRhSSoY2h:1␤ in block <anon> at /tmp/yMRhSSoY2h:1␤␤»
masak r: class C { has &!x; method f { say defined &!x; &!x //= { 'ook!' }; say defined &!x; say &!x.arity } }; C.new.f
p6eval rakudo 5b56cf: OUTPUT«False␤True␤0␤»
dalek c: 75dc961 | moritz++ | lib/objects.pod:
fix thinko, raiph++
masak r: class C { has &!x; method f { say defined &!x; &!x //= { 'ook!' }; say defined &!x; say &!x.count } }; C.new.f
p6eval rakudo 5b56cf: OUTPUT«False␤True␤1␤»
masak r: class C { has &!x; method f { say defined &!x; &!x //= { 'ook!' }; say defined &!x; say &!x.^name } }; C.new.f 19:05
p6eval rakudo 5b56cf: OUTPUT«False␤True␤Block␤»
jnthn r: class C { has &!x; method f { say &!x.WHAT } } 19:06
p6eval rakudo 5b56cf: ( no output )
jnthn r: class C { has &!x; method f { say &!x.WHAT } }; C.new.f
p6eval rakudo 5b56cf: OUTPUT«Any()␤»
jnthn r: my &x; say &x.WHAT
p6eval rakudo 5b56cf: OUTPUT«Any()␤»
jnthn r: sub foo(&x?) { say &x.WHAT }; foo 19:07
p6eval rakudo 5b56cf: OUTPUT«Callable()␤»
masak r: sub foo(&x?) { &x //= { say "OH HAI" }; &x() }; foo 19:08
p6eval rakudo 5b56cf: OUTPUT«invoke() not implemented in class 'Callable'␤ in sub foo at /tmp/Ub_jkP6YNc:1␤ in block <anon> at /tmp/Ub_jkP6YNc:1␤␤»
jnthn ah, no private attr needed.
masak yeah, but only the private attr gives a Null PMC access so far.
jnthn r: sub foo(&x?) { &x() }; foo
p6eval rakudo 5b56cf: OUTPUT«invoke() not implemented in class 'Callable'␤ in sub foo at /tmp/iu6dt8RMri:1␤ in block <anon> at /tmp/iu6dt8RMri:1␤␤»
jnthn r: sub foo(&x?) { say defined &x; say nqp::defined(&x) }; foo
p6eval rakudo 5b56cf: OUTPUT«False␤No such method 'gist' for invocant of type 'Integer'␤ in sub say at src/gen/CORE.setting:6984␤ in sub foo at /tmp/QOQ8BDPLzr:1␤ in block <anon> at /tmp/QOQ8BDPLzr:1␤␤»
jnthn r: sub foo(&x?) { say defined &x; say nqp::p6box_i(nqp::defined(&x)) }; foo 19:09
p6eval rakudo 5b56cf: OUTPUT«False␤1␤»
jnthn Well. That goes some way to explaining things.
masak ah. yes.
masak r: class C { has &!x; method f { &!x() } }; C.new.f 19:10
p6eval rakudo 5b56cf: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤ in <anon> at src/gen/BOOTSTRAP.pm:804␤ in <anon> at src/gen/BOOTSTRAP.pm:801␤ in any <anon> at src/gen/BOOTSTRAP.pm:796␤ in method f at /tmp/pwhr4djeCI:1␤ in block <anon> at /tmp/pwhr4djeCI:1␤␤»
jnthn Ohhhh...
masak wut
jnthn It sees an invocation of a type object and thinks "oh, it's a coercin"
Since Any(...) is how you coerce. 19:11
masak that... isn't a syntactical thing?
jnthn No
masak huh.
jnthn Otherwise, how could you override coercion using postcircumfix:<( )>?
(Which the spec says you can.)
jnthn thought it was syntactic once too
masak ok. 19:12
anyway, I win a Null PMC access today. :)
Wayne++
masak r: class C { has &!x; method f { say defined &!x; &!x = { 'ook!' } unless defined &!x; say defined &!x; &!x() } }; C.new.f 19:12
p6eval rakudo 5b56cf: OUTPUT«False␤True␤» 19:13
masak workaround.
dalek ar: 0fe428e | moritz++ | skel/docs/announce/2012.07:
add some deprecation notices to the release announcement

maybe we need to find a better place for them as they grow larger
moritz facepalms at github.com/rakudo/rakudo/commit/e6609f3ff6 19:14
I mean, at the fact that we didn't have that before 19:15
jnthn moritz: Yes, it was only today, staring at those stack traces for the nth time, that I realized what was going on. 19:17
benabik Stash.HOW.publish_yadda(Str)? Shouldn't it be Str.HOW.yadda? 19:18
jnthn hm, yes. 19:19
moritz jnthn: what puzzles me is, how did vtably conversion from Str to parrot String ever work? 19:21
jnthn: through the Mu one?
jnthn moritz: Yes.
moritz that... explains a lot 19:22
jnthn moritz: So in the places we rely on the vtable conversion (hopefully few) it should be a little faster.
moritz jnthn: I once grepped src/gen/CORE.setting.pir for vtable usages, and found only a few, and removed most of them 19:24
but that's a while ago
brrt hey everybody, quick question, does NQP participate in compreg? 19:26
uvtc Hi #perl6. What are the remaining pieces of Rakudo that need to be re-written in order for Rakudo to more easily run on other VMs? Is QAST the last piece, or are there others?
jnthn uvtc: QAST is the last large piece. However, NQP also needs to be moved over to use QAST yet. 19:27
uvtc jnthn: Ah. I'm just looking at your most recent blog post, actuall.
actually.
moritz r: say pir::compreg__Ps('nqp') 19:28
p6eval rakudo 5b56cf: OUTPUT«Null PMC access in find_method('gist')␤ in sub say at src/gen/CORE.setting:6984␤ in block <anon> at /tmp/gdVJfKFrzk:1␤␤»
uvtc Any guesses as to the timetable for getting NQP moved over to use QAST?
moritz r: pir::say(pir::isnull(pir::compreg__Ps('nqp')))
p6eval rakudo 5b56cf: OUTPUT«1␤»
brrt yeah, thats what i'm all about 19:29
evidence of it is lacking
masak rn: say Bool.roll
p6eval rakudo 5b56cf, niecza v19-13-g442e075: OUTPUT«True␤»
masak \o/
uvtc jnthn: In your blog post, it says that you hope the August release will be QAST-based. Does that include moving NQP over to QAST?
jnthn uvtc: Moving NQP over isn't a pre-req for the August release of Rakudo being based on QAST. 19:30
uvtc: It *may* also happen in time for the August release.
uvtc: If not, I'd be surprised if it wasn't done by the September one.
uvtc jnthn: Ah. That's what I was wondering about. Thanks for the info/prognostication. :) 19:31
brrt (sidenote: does QAST even run on 'other vms'?)
jnthn np :)
moritz brrt: do you happen to know what a compiler has to do to be found by compreg? 19:32
brrt yes, there is another version of compreg 19:32
wait i find it
jnthn nqp: say(nqp::isnull(pir::compreg__Ps('nqp'))) 19:33
p6eval nqp: OUTPUT«0␤»
moritz so nqp can find itself :-) 19:34
jnthn r: say(pir::compreg__Ps('nqp'))
p6eval rakudo 5b56cf: OUTPUT«Null PMC access in find_method('gist')␤ in sub say at src/gen/CORE.setting:6984␤ in block <anon> at /tmp/5hozMhytFO:1␤␤»
jnthn nqp: say(pir::compreg__Ps('nqp'))
p6eval nqp: OUTPUT«multi_dispatch_over_lexical_candidates was unable to find a candidate list␤current instr.: 'Str' pc 5630 (src/stage2/gen/NQPCORE.setting.pir:2566) (src/stage2/NQPCORE.setting:138)␤»
jnthn Hm
:)
Anyway, it means NQP is registering itself.
It's just that Rakudo doesn't load NQP.
We don't need to have the NQP compiler in memory.
brrt ... load_language doesn't load nqp, iether
jnthn doesn't know exactly what load_language does. 19:35
brrt compreg(in STR, invar PMC) registers a compiler 19:35
r: pir::load_language_s("nqp") 19:36
p6eval rakudo 5b56cf: OUTPUT«(signal SEGV)»
benabik awesome 19:37
masak hey people, do you remember gist.github.com/1154298 ? 19:38
brrt it is isn't it
masak well, I just un-bitrotted farm.pl, so now there's nothing standing in your way for writing your own AI for the Little Animal Farm.
jnthn Getting the sig of the op correct may or may not help... 19:39
masak there's a kind of contest going on. lasts until YAPC::EU.
jnthn r: pir::load_language_vs("nqp")
p6eval rakudo 5b56cf: OUTPUT«use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤===SORRY!===␤error:imcc:syntax error, unexpected PREG, expecting …
jnthn r: pir::load_language_vs("nqp"); 1
p6eval rakudo 5b56cf: OUTPUT«use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤use of uninitialized value of type Mu in string context in any <anon> at src/gen/BOOTSTRAP.pm:104␤␤===SORRY!===␤error:imcc:syntax error, unexpected PREG, expecting …
jnthn r: pir::load_language__vs("nqp"); 1
p6eval rakudo 5b56cf: OUTPUT«"load_language" couldn't find a compiler module for the language 'nqp'␤ in block <anon> at /tmp/IPoqxv0z1n:1␤␤»
brrt wait wait wait!
r: pir::load_language__vs("NQP")
p6eval rakudo 5b56cf: OUTPUT«"load_language" couldn't find a compiler module for the language 'NQP'␤ in block <anon> at /tmp/E91fM7uuE5:1␤␤»
brrt grr 19:40
jnthn r: pir::load_bytecode__vs("nqp"); 1
p6eval rakudo 5b56cf: OUTPUT«"load_bytecode" couldn't find file 'nqp'␤ in block <anon> at /tmp/DgXeMx2Cqr:1␤␤»
jnthn r: pir::load_bytecode__vs("nqp.pbc"); 1
p6eval rakudo 5b56cf: OUTPUT«"load_bytecode" couldn't find file 'nqp.pbc'␤ in block <anon> at /tmp/Y73DoG2mH4:1␤␤»
jnthn hmm
I wonder where it looks.
moritz an strace can tell 19:45
everywhere
./nqp.{pbc,pir,pasm,pbc} # yes, it looks for nqp.pbc twice 19:46
$installdir/./nqp.{pbc,pir,pasm,pbc}
$installdir/lib/parrot/4.5.0-devel/library/nqp.blah
nqp.blah 19:47
I don't know what the difference between ./nqp.blah and nqp.blah is supposed to be
dalek p/toqast: e688001 | jnthn++ | src/QAST/Operations.nqp:
A few more missing nqp:: ops.
kudo/toqast: f9b1ed7 | jnthn++ | src/core/ (4 files):
We need to provide explicit signatures for pir::ops now; this was mostly happening, and this tweaks the rest, hopefully.
19:48
kudo/toqast: 8fb3afe | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Fix copy-pasto; benabik++.
kudo/toqast: ed9292f | jnthn++ | src/QPerl6/World.pm:
Fix a leftover PAST::Op usage.
moritz where nqp is installed in $install/lib/parrot/4.5.0-devel/languages/nqp/lib/nqp.pbc
but it searches in $installdir/lib/parrot/4.5.0-devel/library/nqp.pbc 19:49
so, mismatch
and rakudo is installed in $install/lib/parrot/4.4.0-devel/languages/perl6/perl6.pbc 19:50
so, all three (nqp, rakudo and what parrot searches for) are inconsistent
masak .oO( at least all three are inconsistent, so none of the other two feels left out... ) 20:13
masak r: class Outer { has $.a is rw; class Inner { has Outer $.o; method foo { $.o.a = 42 } }; method inner { Inner.new } }; given Outer.new { .inner.foo; say .a } 20:28
p6eval rakudo 5b56cf: OUTPUT«Cannot look up attributes in a type object␤ in method a at src/gen/CORE.setting:1522␤ in method foo at /tmp/Uy3FFOEioE:1␤ in block <anon> at /tmp/Uy3FFOEioE:1␤␤»
masak oh, right.
r: class Outer { has $.a is rw; class Inner { has Outer $.o; method foo { $.o.a = 42 } }; method inner { Inner.new(:o(self)) } }; given Outer.new { .inner.foo; say .a }
p6eval rakudo 5b56cf: OUTPUT«42␤»
masak is this the appropriate way for an inner class to refer to its outer class? or is there a better way I don't see? 20:29
i.e. does the connection have to be explicit through an attribute in the inner class?
jnthn Think so. 20:32
The nesting just gets you the inner being installed as Outer::Inner.
And lexical scope visibility.
It doesn't imply anything at the object level.
masak right. 20:33
in Java, you can do the equivalent of Outer::self.
maybe we... shouldn't do that, though. :)
jnthn I could never remember the rules for doing that stuff. 20:34
I'm not sure that it encourages the right decisions either. 20:35
masak .oO( language design according to what stuff jnthn could never remember the rules of ) 20:36
jnthn: right. it feels like the compiler/runtime take on an extra burden. implicitly, every time.
masak pupoque: hi. 20:36
jnthn masak: I more meant from the perspective of the programmer doing it. 20:37
masak yes, that's how I read you.
well, in Java, that's how inner classes are used, most of the time. 20:38
pupoque masak: hi :)
masak they mediate decisions with the outer class.
like, a HashMap will have a HashMapIterator inside of it, that does things for the HashMap.
jnthn Oh...is this partly desired because of that inline interface implementation trick too?
masak sometimes.
but it's not directly related, as far as I can see.
but yes, that's one of the places where I've been using Outer::self in Java. 20:39
(which is spelled Outer.this, of course)
masak r: say 23.base(15) 21:08
p6eval rakudo 5b56cf: OUTPUT«18␤»
masak r: for 2..22 -> $b { say "23 and 32 are palindromic in base $b" if 23.base($b) eq 32.base($b).flip } 21:09
p6eval rakudo 5b56cf: OUTPUT«23 and 32 are palindromic in base 10␤»
masak :)
masak r: sub operate_under_transform(&op, &transform, &inverse = &transform) { -> $a, $b { &inverse(&op(&transform($a), &transform($b))) } }; say operate_under_transform(&[~], &flip)("foo", "bar") 21:16
p6eval rakudo 5b56cf: OUTPUT«barfoo␤»
masak \o/
r: sub operate_under_transform(&op, &transform, &inverse = &transform) { -> $a, $b { &inverse(&op(&transform($a), &transform($b))) } }; say operate_under_transform(&[*], &prefix:<->)(6, 7) 21:17
p6eval rakudo 5b56cf: OUTPUT«-42␤»
masak r: sub operate_under_transform(&op, &transform, &inverse = &transform) { -> $x { &inverse(&op(&transform($x))) } }; say operate_under_transform(&say, { say "Opening file" }, { say "Closing file" })("OH HAI") 21:18
p6eval rakudo 5b56cf: OUTPUT«Opening file␤True␤Closing file␤True␤»
masak hm :) 21:19
lue hello world o/ 21:21
jnthn hellue o/
masak lue! \o/
lue: thanks for your pull request!
lue: it's a step in the right direction. but I had to reject it for various reasons. see backlog. 21:22
lue masak: I just thought that's how you were supposed to initalize hashes (either that or a list (my %h = key, value, key, value))
masak lue: right.
lue: I always do it the list way.
lue (and looking at %opposites I see what you meant about how you like to format hashes) 21:23
masak aye.
it favors line reordering, basically.
lue I didn't know you could do %h = key => value, key => value though. Good to know.
masak lue: thanks for putting up with my formatting rules :)
lue that's alright. 21:25
.oO(in a move that surprises no-one, cperl-mode isn't playing nice with masak's hash formatting rules)
21:26
masak :)
turn it off temporarily. 21:27
lue That actually would be better. Although I lose color, I gain just about everything else (including speed at which emacs prints to screen what I type o.o) 21:28
lue Oh, and about commenting stuff out: in case you couldn't tell, I tend to be more verbose in my comments (especially the more important the project). :) 21:31
So I tend to keep code that doesn't work commented out, just in case I need it for reference or something (or in this case, for when it would work) 21:32
masak right. 21:36
I sometimes put in XXX comments for things I want to add later.
but mostly I try to steer things so that I stub my toe on stuff that should be added.
one of my favorite kinds of development is when I have a large existing corpus of inputs that a program needs to be able to recognize and handle somehow. and then I just have it die on the first unrecognized thing. 21:37
often it makes sense to sort things on length, too, so I get to handle the easy cases first :) 21:38
lol, I blogged! \o/ strangelyconsistent.org/blog/july-2...rk-in-here
lue oh, what does when {... proceed; } do? 21:40
masak it's the opposite of 'break;' in C :) 21:44
geekosaur *eyeroll*
masak (that is, it nullifies the usual tendency of a when {} block to exit its surrounding topicalizer block)
r: given 42 { when 42 {}; say "is this run? no." } 21:45
p6eval rakudo 5b56cf: ( no output )
masak r: given 42 { when 42 { proceed }; say "is this run? yes!" }
p6eval rakudo 5b56cf: OUTPUT«is this run? yes!␤»
lue oh, duh.
:)
geekosaur ah
geekosaur was parsing that as a bit more meta than intended 21:46
masak see? opposite of 'break' :)
lue masak++ on the blog post
masak flashlights are tricky. 21:47
lue but, it's Adventure::Engine, not Game::Engine
masak oh!
fixing.
lue++
lue although it is faster to type. Maybe IFGame::Engine , to be a bit more descriptive (and still shorter)? :) 21:48
masak it's only more descriptive IF you know what IF stands for ;) 21:49
lue Hm. I wonder if access to the AST of Perl 6 code would help in translating a P6 adventure game to Zcode (and if so, if macros help in dealing with said AST) 21:54
masak I think it's safe to say that Perl 6 is wider than Zcode. 21:55
so in translating, there will always be the problem of what to do with lossy translation.
lue Of course. It depends greatly on how you create the game in P6 (how the tool you use to make the game has you make the game) 21:57
masak lue: I think when I extract Adventure::Engine from bin/crypt, you will be one of the first to write a small game in it :) 21:59
(yes, I will put it on modules.perl6.org)
lue Probably. Even though I like Inform 6 (the last version to not use natural language by the way), I like *Perl* 6 more :) 22:00
masak :) 22:01
yeah.
let's make Adventure::Engine great.
I had this idea to also provide lots of standard objects, materials, effects, etc. that one could use to populate an adventure game. 22:02
lue Sure. (Inform *7* comes with a whole bunch of nifty toys, IIRC) 22:03
Here's a feature: allow an object to be a container *and* a supporter! 22:04
masak oh, that should already work. 22:05
the fire in the cave will be like that.
"put water in fire", "put water on fire". 22:06
lue oh! what would happen if someone tried to jump over the fire? 22:09
masak it wouldn't work because there is no "jump" verb implemented. 22:12
lue someone might try though. "As you prepare to leap, the fire grows in height, as if it knows what you're trying to do. It calms down as you abandon the idea." 22:15
masak :) 22:18
lue You forget to mention the leaves in the "Hill" room (either that or I somehow missed it) 22:23
dalek p/toqast: 653152e | jnthn++ | src/QAST/Operations.nqp:
Fix a couple of signatures; v is bad.
22:27
p/toqast: aa9f9e7 | jnthn++ | src/QAST/Compiler.nqp:
Add some missing coercion cases.
p/toqast: 366f84f | jnthn++ | src/QAST/Operations.nqp:
A bunch of op additions and signature fixes.
p/toqast: 939c9ff | jnthn++ | src/QAST/Operations.nqp:
index and ord also work with varying numbers of arguments.
p/toqast: 60afa48 | jnthn++ | src/QAST/ (2 files):
Fix yet more incorrect op signatures.
p/toqast: e179076 | jnthn++ | src/QAST/Operations.nqp:
Add can and rindex.
kudo/toqast: 605574c | jnthn++ | src/QPerl6/Actions.pm:
Detect and complain about missing pir::op signature.
kudo/toqast: e3f8021 | jnthn++ | src/core/terms.pm:
Fix a missing pirop sig.
kudo/toqast: c02c86d | jnthn++ | src/QPerl6/Ops.pm:
Toss an op that's now in the default set.
kudo/toqast: c0ca5a3 | jnthn++ | src/core/Str.pm:
Eliminate a double boxing spotted while bug hunting.
masak lue: no, they're implicit, so they don't show up in "look" commands. 22:29
that's by design.
the grass and the bushes also don't show up.
lue Not even the description mentions it, though 22:30
masak no, but if you do 'examine trees', they're mentioned there. 22:33
subtle, I know.
maybe a bit too subtle.
jnthn++ # commits 22:34
lue There is no tree. Maybe that's why I had to guess where the leaves were.
masak jnthn++ # short first lines in commit messages
lue: 22:35
> examine trees
Autumn trees are just so lovely. They look like they're just about to drop
all their leaves -- red, yellow, brown ones -- to the ground.
but if you're saying 'tree' should be a synonym with 'trees', you might just have a point. 22:36
lue > examine tree
You see no tree here. # this is why I thought there was no tree
masak right.
so that seems to be what you're saying.
feel free to submit an issue about it at github.com/masak/crypt/issues 22:37
lue Well, I wouldn't worry too much about playability until you have a complete adventure game and engine, though :) (that would seem to be mroe important). 22:38
I will submit an issue in a minute, though.
masak \o/ 22:42
well, there's 8 days left. then the game is supposed to be completely rebuilt again.
dalek p/toqast: b6049ef | jnthn++ | src/QAST/Compiler.nqp:
Better diagnostics.
22:43
p/toqast: de65b03 | jnthn++ | src/QAST/Operations.nqp:
CAPITALS FOR RESULT TYPES. *sigh*
masak jnthn: prepared to be sued for IP voilation... 22:45
jnthn They can shove their patents up their ass...ociate attorney 22:46
lue why would he get sued? 22:47
jnthn lue: See the commit 22:48
masak .oO( making people review commits by punning on their contents ) 22:53
'night, #perl6 22:56
dalek kudo/toqast: bb7a618 | jnthn++ | src/ (2 files):
Fix some pir::op sigs.
23:00
dalek p/toqast: 6c19396 | jnthn++ | src/QAST/Operations.nqp:
Add qlist, findnotcclass.
23:04
raiph "An instance of a class is also called an object in some other programming languages. It has a storage for attributes, and is often the return value of a class to a method called new, or a literal." 23:17
dalek kudo/toqast: 34ad03b | jnthn++ | src/core/ (2 files):
Last couple of tweaks needed to get CORE.setting compilation to PIR to complete. The generated PIR doesn't quite work yet.
raiph (from doc.perl6.org/language/glossary)
s:2nd/class/call/ ? 23:18
jnthn raiph: I'd guess so.
raiph or even s/a class to a method called new/a .new method call/ 23:19
jnthn 'night, #perl6 23:21
raiph night jnthn
moritz: see above and below. then i'll try to set things up so i can offer patches or pulls or whatever i can figure out using jolios 23:26
raiph "my Str $str = "hello"; ## this is with native types. Str " 23:26
i don't understand the comment. (first, i thought native type names were all lowercase, but even then) 23:28
in fact i don't see how the code helps explain "instance". seems to focus on types/defined 23:31
lue there's no native str in the first place, so that's really interesting 23:34
lue oh! maybe native means "a core Perl6 datatype" 23:35
colomon no, it means "a low level type"
lue in the example in the p6doc glossary, I mean (see raiph above) 23:36
colomon like a C int (instead of like a Perl 6 Int)
raiph "3 # literal s "
s/literal s/literals/
lue raiph: would you like me to fix the stuff you've found so far? 23:37
raiph lue: yes. also, could you help me provide proper patches or whatever? 23:39
lue there's a way to make patches in git, I'm trying to find a suitable tutorial so I can remember and explain it :) 23:43
gfldex raiph: you may want to get yourself setup with github and provide pull requests
raiph i've got a github account. difference is i'm on an odd OS, jolios, so i think i need to do it all via web 23:45
gone to the p6doc rep. selected objects.pod. clicked edit. 23:47
gfldex raiph: help.github.com/articles/using-pull-requests
raiph oops. glossary.pod 23:48
dalek c: 5867c7b | lue++ | lib/glossary.pod:
[glossary.pod] Fixed a couple of errors spotted by raiph++

Fixed two typos and s/native/builtin/ in an example, because there are no native 'str's.
23:50
japhb What's the state of the Rakudo IO refactor? Mostly settled down right now? 23:53
raiph lue, gfldex: just tried to send patch (pull request). if that worked, well, it's totally trivial to do via web 23:55