Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 diakopter r: print (my ::A $).^methods # masak, this seems relevant
00:00 p6eval rakudo ba5e04: OUTPUT«No such method 'methods' for invocant of type 'Perl6::Metamodel::GenericHOW'␤  in block  at /tmp/kLb5KNz5Ct:1␤␤»
00:03 diakopter r: class A {}; print (my ::A $).^methods.elems
00:03 p6eval rakudo ba5e04: OUTPUT«0»
00:03 diakopter heh
00:03 diakopter r: class A {}; print (my ::A $) ~~ Any
00:03 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $) variable; in Perl 6 please use $*EGID�at /tmp/cudONEVlPb:1�------> [32mclass A {}; print (my ::A $)[33m�[31m ~~ Any[0m�»
00:03 diakopter uh.
00:03 diakopter now it complains?
00:04 diakopter r: class A {}; print (my ::A $ ) ~~ Any
00:04 p6eval rakudo ba5e04: OUTPUT«True»
00:04 diakopter r: class A {}; print (my ::A $ ) ~~ Mu
00:04 lichtkind good night
00:04 p6eval rakudo ba5e04: OUTPUT«True»
00:04 diakopter r: print (my ::A $ ) ~~ Mu
00:04 p6eval rakudo ba5e04: OUTPUT«True»
00:04 diakopter hm
00:06 jeffreykegler joined #perl6
00:07 pjcj joined #perl6
00:07 pjcj joined #perl6
00:08 pjcj joined #perl6
00:11 timotimo how do i declare types at compile time without "class"?
00:12 diakopter r: print 1.HOW.^methods
00:12 p6eval rakudo ba5e04: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NQPRoutine instead␤  in method REIFY at src/gen/CORE.setting:6424␤  in method reify at src/gen/CORE.setting:5557␤  in method gimme at src/gen/CORE.setting:5936␤  in method print at src/gen/CORE.se…
00:12 diakopter heh
00:12 diakopter masak: ^^
00:13 diakopter r: print try .name for 1.HOW.^methods
00:13 p6eval rakudo ba5e04: OUTPUT«set_invoke_forwarderarchetypesnewnew_typeparameterizeadd_fallbackcomposerolesrole_typecheck_listconcretizationis_composedcansetup_junction_fallbackfind_method_fallbackhas_fallbacksset_namenameset_docsdocsverauthset_verset_authset_stash_typeadd_stashadd_attributecom…
00:15 masak diakopter: I think that one is submitted.
00:16 diakopter r: print (gather { take try .name for 1.HOW.^methods }).grep: { /add/ }
00:16 p6eval rakudo ba5e04: OUTPUT«add_fallbackadd_stashadd_attributeadd_methodadd_private_methodadd_multi_methodadd_roleadd_parentadd_trusteeadd_parrot_vtable_mappingadd_parrot_vtable_handler_mapping»
00:17 diakopter r: print (gather { take try .name for 1.HOW.^methods }).grep: { /create/ }
00:17 p6eval rakudo ba5e04: OUTPUT«create_BUILDPLAN»
00:17 diakopter r: print (gather { take try .name for 1.HOW.^methods }).grep: { /new/ }
00:17 p6eval rakudo ba5e04: OUTPUT«newnew_typenew»
00:17 diakopter timotimo: ^^
00:22 timotimo r: say (gather { take try .name for 1.HOW.^methods }).grep: { /new/ }
00:22 p6eval rakudo ba5e04: OUTPUT«new new_type new␤»
00:31 thou joined #perl6
00:36 cognominal joined #perl6
00:40 jeffreykegler joined #perl6
00:41 thou joined #perl6
00:42 masak 'night, #perl6
00:49 cognominal joined #perl6
00:54 jeffreykegler left #perl6
01:01 thou_ joined #perl6
01:08 rindolf joined #perl6
01:13 colomon joined #perl6
01:15 ikrs joined #perl6
01:16 pmurias joined #perl6
01:19 [Coke] can someone privmsg me colomon's email address?
01:19 colomon why?
01:19 colomon it's that at gmail.com
01:20 timotimo aaw, there's no iup package on debian sid
01:20 * colomon is a little worried about why [Coke] needs his address.
01:21 [Coke] ah, it's in CREDITS
01:21 * [Coke] was just looking in parrot.
01:21 thou joined #perl6
01:22 cognominal joined #perl6
01:25 * [Coke] fails to find diakopter's
01:26 diakopter :P
01:26 diakopter same as colomon
01:28 pmurias joined #perl6
01:38 cognominal__ joined #perl6
01:42 thou_ joined #perl6
01:52 pterygota joined #perl6
01:53 am0c joined #perl6
01:54 cognominal__ joined #perl6
02:03 thou joined #perl6
02:04 drbean joined #perl6
02:05 preflex_ joined #perl6
02:08 pmurias joined #perl6
02:13 [Coke] diakopter: I don't see you in either CREDITS file.
02:15 diakopter yeah
02:15 diakopter I never submitted a CLA
02:16 diakopter [let alone contributed patches earning a commit bit]
02:18 [Coke] ah. I thought by "same as colomon", you mean "that's where to find my email address".
02:18 diakopter that is what I meant - what colomon said about gmail
02:23 thou joined #perl6
02:27 timotimo what's a CLA?
02:30 FROGGS__ joined #perl6
02:32 sorear contributor license agreement
02:33 sorear "I, $NAME, warrant that I grant the Perl6 license on all code I contribute and that legally authorized to do so"
02:38 timotimo ah, right
02:43 thou_ joined #perl6
02:59 flussence I got an email from PaFo asking me to sign one of those once, still have no idea why, I don't recall writing any rakudo code...
03:00 orafu joined #perl6
03:00 flussence (but if I did, I just consider everything without a license file public domain anyway)
03:01 timotimo that's not right, though
03:01 sizz joined #perl6
03:03 flussence eh, I know how © works, but I'm not going to impose all that rigamarole on anyone using a few dozen lines I uploaded to gist.gh.com
03:04 thou joined #perl6
03:04 labster Where do you get one of those CLAs anyway?  I figure at least part of my work on File::Spec and IO::Path is going to end up in Rakudo, so I might as well do one.
03:07 anant_ joined #perl6
03:22 sorear http://www.perlfoundation.org/contributor_license_agreement
03:22 sorear that's hte one Rakudo uses
03:23 sorear PaFo has/had a different one
03:24 thou joined #perl6
03:44 thou_ joined #perl6
04:04 awwaiid joined #perl6
04:05 thou joined #perl6
04:18 thou joined #perl6
04:30 leprevost joined #perl6
04:39 thou joined #perl6
04:59 thou_ joined #perl6
05:04 dmol joined #perl6
05:20 thou joined #perl6
05:40 thou_ joined #perl6
05:56 anant_ joined #perl6
06:00 thou joined #perl6
06:01 kaare__ joined #perl6
06:21 thou_ joined #perl6
06:41 thou joined #perl6
07:02 thou_ joined #perl6
07:18 drbean joined #perl6
07:20 anant_ joined #perl6
07:22 anant joined #perl6
07:23 thou joined #perl6
07:39 p5eval joined #perl6
07:44 thou_ joined #perl6
07:49 rindolf joined #perl6
07:51 FROGGS good morning
07:51 sorear o/ FROGGS
07:51 nwc10 happy summertime
07:51 nwc10 (for more people than last night)
07:54 sorear :/
07:54 diakopter oh, what happened?
07:55 sorear diakopter: UK daylight savings last night
07:55 diakopter oh, heh.
07:56 sorear you'd think that the country that contains Greenwich would use Greenwich time year-round as a matter of national pride, but no.
07:56 SunilJoshi joined #perl6
08:00 rindolf joined #perl6
08:03 thou joined #perl6
08:04 drbean joined #perl6
08:10 dalek v5: b4cd6ff | (Tobias Leich)++ | t/spectest.data:
08:10 dalek v5: added fudged version of base/term.t
08:10 dalek v5: review: https://github.com/rakudo-p5/v5/commit/b4cd6ff30a
08:20 rindolf joined #perl6
08:23 thou joined #perl6
08:30 rindolf joined #perl6
08:44 thou_ joined #perl6
08:47 moritz good morning and happy
08:47 moritz eastern
08:47 moritz *Easter
08:47 * moritz clearly not awake yet
08:47 sorear o/ moritz
08:48 nwc10 EU-wide daylight savings last night
08:48 nwc10 (and possibly a bit further east)
08:48 sorear FROGGS: curious what your plans are in re merging v5.  just noticed you've made merge-unfriendly changes to README and t/spectest.data
08:48 diakopter .tell TimToady welcome back! :) \o/
08:48 yoleaux diakopter: I'll pass your message to TimToady.
08:49 sorear nwc10: Further northwest too!
08:49 sorear But not in .us, we switched two weeks ago
08:50 FROGGS sorear: what do you mean?
08:50 FROGGS sorear: I think we should keep v5 as a module
08:50 sorear I thought you were modifying rakudo itself
08:51 FROGGS that is what I started with yes
08:51 sorear .help
08:51 yoleaux sorear: I'm yoleaux. Type .commands to see what I can do, or see http://dpk.io/yoleaux for a quick guide.
08:51 sorear .commands
08:51 yoleaux Commands are divided into categories: general, services, admin, api, demos. Use .commands <category> to get a list of the commands in each.
08:51 FROGGS but we dont have to put this in "core", right?
08:51 FROGGS so we can have v5, COBOL and PHP modules :o)
08:52 sorear I'm skeptical v5 can function without tight integration, but if you can make it work, yay
08:52 sorear how are you handling wantarray?
08:53 FROGGS sorear: well, what I currently do does work as if it where within the rakudo repo, but yes, if rakudo changes some stuff internally I would suffer from it
08:53 FROGGS sorear: no idea yet
08:58 sorear ->sleep
08:59 FROGGS gnight
09:04 thou joined #perl6
09:17 am0c joined #perl6
09:25 thou_ joined #perl6
09:31 isBEKaml joined #perl6
09:39 snearch joined #perl6
09:39 rindolf joined #perl6
10:08 rindolf joined #perl6
10:25 am0c joined #perl6
10:25 rindolf joined #perl6
10:26 rindolf joined #perl6
10:33 rindolf joined #perl6
10:41 rindolf joined #perl6
10:52 crab2313 joined #perl6
11:05 drbean joined #perl6
11:30 erkan joined #perl6
11:38 asogani joined #perl6
12:24 rindolf joined #perl6
12:42 timotimo good day *
12:42 FROGGS hi timotimo
12:43 timotimo i think i made a mistake when i asked for "how to create a new class in the current context at compile time", what i should probably have asked is "how to install a symbol as a class properly"
12:44 timotimo my \Tree = %result<Tree> doesn't work, but maybe i can do something crazy like my class Tree is %result<Tree>, but i doubt it
12:45 tgt joined #perl6
12:48 FROGGS timotimo: method package_def in Perl6::Actions calls $*W.pkg_compose($*PACKAGE); for example
12:48 FROGGS dunno if that helps or not
12:48 SamuraiJack joined #perl6
12:51 timotimo hm, don't think it does
12:51 timotimo i'm not sure i can, or want to, handle $*W
12:51 FROGGS ahh, okay
12:52 timotimo it feels to me as if ClassHOW and friends are more public api/specced (are they?) than $*W is (which i'm pretty sure is a rakudo internal detail)
12:52 FROGGS it is, right
12:55 PacoAir joined #perl6
12:59 spider-mario joined #perl6
13:13 SunilJoshi joined #perl6
13:16 colomon joined #perl6
13:26 dayangkun joined #perl6
13:31 moritz also ClassHOW is available at runtime, $*W isn't
13:32 rindolf joined #perl6
13:39 timotimo hm, but creating the class alone, that won't be enough, i need to properly install it in the package .. hmm
13:39 timotimo there's something i'm missing, i'm sure.
13:43 moritz r: BEGIN my %h = ( a => class { } ); constant Tree = %h<a>; say Tree.^name
13:43 p6eval rakudo ba5e04: OUTPUT«<anon>␤»
13:44 moritz r: BEGIN my %h = ( a => class { method foo { 42 }} ); constant Tree = %h<a>; say Tree.foo
13:44 p6eval rakudo ba5e04: OUTPUT«42␤»
13:49 Chillance joined #perl6
13:51 dalek v5: d946b26 | (Tobias Leich)++ | lib/Perl6/P5 (2 files):
13:51 dalek v5: dispatch /, &, ^ to +/, +&, +^
13:51 dalek v5: review: https://github.com/rakudo-p5/v5/commit/d946b26171
13:55 colomon joined #perl6
14:03 timotimo oh, "constant", that's what i should try
14:04 timotimo and of course it immediately works. great m)
14:04 timotimo the simplest solution and i failed for days to stumble upon it
14:04 timotimo now i can build a macro that turns a string into a call to create_adt and a bit of unpacking code
14:07 timotimo but i still don't know how to make a macro that contains one part multiple times, or compose multiple ASTs into a bigger AST properly
14:08 timotimo i suppose i could insert a tail call to the macro in the resulting AST :D
14:08 aindilis joined #perl6
14:10 timotimo that's so bad :)
14:11 FROGGS timotimo: no, it is awesome that this is possible :o)
14:12 timotimo *hopefully* i can properly do this with macros
14:12 timotimo r: macro test(Str $name) { quasi { BEGIN { my {{{ $name }}} = 10; } } }; test("$foobar"); say $foobar;
14:12 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Malformed my�at /tmp/W4iNPG2Z_6:1�------> [32mro test(Str $name) { quasi { BEGIN { my [33m�[31m{{{ $name }}} = 10; } } }; test("$foobar[0m�    expecting any of:�        scoped declarator�»
14:13 timotimo eh, apparently not yet
14:13 moritz you can only use {{{ }}} where an expression is expected
14:14 pmurias joined #perl6
14:14 timotimo ah, that's a good hint
14:14 xinming joined #perl6
14:14 timotimo i guess i can make the macro create a call to eval :D
14:14 timotimo oh, but eval doesn't leak symbols, as we recently discussed
14:16 timotimo FROGGS: it would be awesome that this were possible, if it were possible :P
14:16 timotimo or i'm just not sciencing hard enough
14:17 leprevost joined #perl6
14:17 FROGGS timotimo: I'm just trying to say that with rakudo there is very much possible
14:17 moritz maybe you have to let the user write   cosntant Tree = magic 'your expression here';
14:18 moritz and then your sub 'magic' returns an anonymous type
14:19 dalek perl6-roast-data: 073ebdc | coke++ | / (4 files):
14:19 dalek perl6-roast-data: today (automated commit)
14:19 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/073ebdc9ed
14:20 timotimo that doesn't sound too bad. i'll have to check if Tree::Branch and such work in that case
14:22 timotimo doesn't seem to be the case
14:22 timotimo how about constant (Tree, Branch, Leaf) = magic "..."?
14:25 moritz if it works, why not?
14:28 Psyche^ joined #perl6
14:28 timotimo std: constant (Foo, Bar) = 1, 2;
14:28 p6eval std 86b102f: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing symbol in constant declaration at /tmp/kWmkJgemsf line 1:�------> [32mconstant [33m�[31m(Foo, Bar) = 1, 2;[0m�Missing initializer on constant declaration at /tmp/kWmkJgemsf line 1:�------> [32mconstant [33m�[31m(Foo, Bar)…
14:28 timotimo nope, that doesn't work unfortfunately
14:31 FROGGS timotimo: might be a bug
14:31 timotimo i can see a reason why it should work. should i open up a ticket?
14:32 isBEKaml joined #perl6
14:32 FROGGS there might be already a ticket
14:32 timotimo i'll have a look
14:33 kaare__ joined #perl6
14:33 FROGGS because we had that issue within the last weeks
14:34 timotimo https://rt.perl.org/rt3/Ticket/Display.html?id=69740 this seems like is
14:36 timotimo the resolution is: this should not be allowed
14:36 timotimo so rakudo and std implement this correctly
14:36 FROGGS hmmm, sad
14:38 timotimo hahaha, i could create a macro using string manipulation and eval and return a quasi that calls that new macro
14:39 timotimo r: macro say-n-times(Str $text, Int $n) { return eval "macro ::() { quasi { " ~ "say '$text'" x $n ~ "} }" }; say-n-times("foo", 5);
14:39 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/LXH9nCGCGR:1�------> [32m return eval "macro ::() { quasi { " ~ "[33m�[31msay '$text'" x $n ~ "} }" }; say-n-times[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-inf…
14:40 timotimo r: macro say-n-times(Str $text, Int $n) { return eval ("macro ::() { quasi { " ~ ("say '$text'" x $n) ~ "} }") }; say-n-times("foo", 5);
14:40 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/FPKDQYkxjZ:1�------> [32meturn eval ("macro ::() { quasi { " ~ ("[33m�[31msay '$text'" x $n) ~ "} }") }; say-n-tim[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-inf…
14:40 timotimo um, huh?
14:49 FROGGS r: macro say-n-times(Str $text, Int $n) { return eval 'macro ::() { quasi { ' ~ 'say "$text"' x $n ~ '} }' }; say-n-times("foo", 5);
14:49 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Nominal type check failed for parameter '$text'; expected Str but got AST instead�at /tmp/7AoqIMyvOo:1�------> �»
15:00 timotimo oops, that's right
15:00 timotimo macros get their arguments passed as AST objects
15:00 dmol joined #perl6
15:08 isBEKaml joined #perl6
15:08 isBEKaml joined #perl6
15:16 am0c joined #perl6
15:18 anant msg p6eval r: say $?OS
15:21 isBEKaml anant: /msg
15:21 isBEKaml r: say $?OS
15:21 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$?OS' is not declared�at /tmp/uK_3mvxe4l:1�------> [32msay $?OS[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
15:21 isBEKaml r: say $*OS
15:21 p6eval rakudo ba5e04: OUTPUT«linux␤»
15:21 isBEKaml pugs: say $?OS
15:21 p6eval pugs: OUTPUT«darwin␤»
15:24 anant isBEKaml: Thanks, was a typo. Was actually checking to see if some of those output chars can be printed properly, especially in the web log http://irclog.perlgeek.de/perl6/2013-03-30
15:24 moritz well, private messages won't show up in the web log :-)
15:26 FROGGS std: use v5; print time 7
15:26 p6eval std 86b102f: OUTPUT«ok 00:00 52m␤»
15:31 ggoebel joined #perl6
15:33 dalek v5: 9d346be | (Tobias Leich)++ | lib/Perl6/P5Grammar.pm:
15:33 dalek v5: add term:sym<time>
15:33 dalek v5: review: https://github.com/rakudo-p5/v5/commit/9d346bea4d
15:36 dalek v5: 0d24b2c | (Tobias Leich)++ | t/spectest.data:
15:36 dalek v5: run op/sleep.t
15:36 dalek v5: review: https://github.com/rakudo-p5/v5/commit/0d24b2c012
15:50 anant moritz: Why does p6eval throw up some strange chars (like '[31m') when none exist in the actual command output (I checked on my rakudo installation)
15:51 timotimo anant: it's Term::ANSIColor
15:51 timotimo it should be translated to IRC colors, though
15:51 moritz anant: if you look at http://irclog.perlgeek.de/perl6/2013-03-31#i_6650682, all the "strange" characters are from rakudo's attempt to produce color through ANSI escape sequences
15:52 moritz I guess I should configure p6eval to disable rakudo's output coloring
15:52 moritz (translating ANSI escape sequences back to colors is a nasty job, because we otherwise assume that stuff is in UTF-8)
15:52 arnsholt I have realized that my vmarray-list branch is wildly misleadingly named
15:53 arnsholt It should probably be named sixmodelize or something instead
15:53 timotimo :)
15:54 isBEKaml arnsholt: WHAT HAVE YOU DONE? :P
15:54 thou joined #perl6
15:54 timotimo so currently on one project i'm being blocked by not being able to properly supply an outer context to eval for my ipython kernel and on another project, macros are holding me back. hmm. i seem to kind of snuggle the bleeding edge a bit.
15:55 moritz timotimo: eval does have a way to supply an outer context
15:55 arnsholt isBEKaml: I started tugging at one loose end (using the VMArray REPR), and suddenly have my hands full with replacing Parrot objects with sixmodel objects =)
15:56 isBEKaml arnsholt: parrotize sixmodel? :)
15:56 timotimo moritz: that's true. i was trying to copy the way Rakudo's own Perl6::Compiler does it and that's impossible due to nqp/perl6 interactivity problems :(
15:56 moritz timotimo: you can say    eval($code, context => CALLER::) for example
15:57 timotimo is it that easy? o_O
15:57 moritz wel, maybe not if nqp and rakudo mix
15:57 moritz but in pure perl 6 code, it is
15:57 timotimo how can i create a custom context for that?
15:57 isBEKaml arnsholt: There's this thing that some of us start with a presumption only to realise that we were so way off the mark when actually doing it. :)
15:58 moritz timotimo: CALLER:: just returns a PseudoStash, which in the end is a Hash with extra functionality
15:58 moritz timotimo: you know how to manipulate hashes, no? :-)
15:59 timotimo r: say PseudoStash.new();
15:59 p6eval rakudo ba5e04: OUTPUT«PseudoStash.new("GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\$_", Any, "\$/", Any, "\$!", Any, "\$=pod", Array.new(), "!UNIT_MARKER", !UNIT_MARKER, )␤»
15:59 timotimo is that how?
16:00 moritz it probably makes more sense to start with the copy of an existing context
16:00 moritz or maybe not, depends on what you want to be visible
16:00 timotimo well, this is for the ipython kernel thing, so i want to give the same context that you'd get when you just start up an interpreter
16:01 moritz r: say CORE::.keys
16:01 p6eval rakudo ba5e04: OUTPUT«&default-formatter DateTime-local-timezone EXPORTHOW Pod Set &set &infix:<(elem)> &infix:<(cont)> &infix:<(|)> &infix:<(&)> &infix:<(-)> &infix:<(^)> &infix:<(<=)> &infix:<(<)> &infix:<(>=)> &infix:<(>)> Baggy &bag &infix:<(.)> &infix:<(+)> Version Cursor &infix:<=…
16:01 moritz maybe start with this one :-)
16:01 timotimo r: my PseudoStash $ctx; push $ctx, CORE::; # will this create a shallow copy?
16:01 p6eval rakudo ba5e04: OUTPUT«Type check failed in assignment to '$ctx'; expected 'PseudoStash' but got 'Array'␤  in sub infix:<=> at src/gen/CORE.setting:12667␤  in method push at src/gen/CORE.setting:1362␤  in method push at src/gen/CORE.setting:1360␤  in sub push at src/gen/CORE.setting:6247…
16:02 timotimo mhm, no it won't
16:02 moritz you might have to look at the source for how to create a shallow copy
16:02 moritz maybe you even have to implement your own method for that
16:02 moritz or maybe .clone does it
16:03 timotimo r: my PseudoStash $ctx; for CORE::.kv -> ($k, $v) { $ctx{$k} = $v; }
16:03 p6eval rakudo ba5e04: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤current instr.: '' pc 164 ((file unknown):186403193) (/tmp/MJCWYHstt4:1)␤called from Sub '' pc 274014 (src/gen/CORE.setting.pir:120247) (src/gen/CORE.setting:5643)␤called from Sub 'reify…
16:03 timotimo r: my PseudoStash $ctx; for CORE::.kv -> $k, $v { $ctx{$k} = $v; }
16:03 p6eval rakudo ba5e04: OUTPUT«Cannot look up attributes in a type object␤current instr.: 'at_key' pc 303977 (src/gen/CORE.setting.pir:133658) (src/gen/CORE.setting:7019)␤called from Sub 'postcircumfix:<{ }>' pc 184155 (src/gen/CORE.setting.pir:80328) (src/gen/CORE.setting:1555)␤called from Sub …
16:03 moritz timotimo: you should create a .new PseudoStash
16:03 timotimo oh, yes i definitely should
16:03 moritz and not try to assign to elements of the type object
16:03 timotimo r: my PseudoStash $ctx .= new; for CORE::.kv -> $k, $v { $ctx{$k} = $v; }
16:03 p6eval rakudo ba5e04: OUTPUT«Cannot modify an immutable value␤current instr.: 'throw' pc 350791 (src/gen/CORE.setting.pir:153082) (src/gen/CORE.setting:9365)␤called from Sub '' pc 111263 (src/gen/CORE.setting.pir:50008) (src/gen/CORE.setting:10569)␤called from Sub '' pc 226 ((file unknown):114…
16:04 timotimo hmm, i'll experiment more in private
16:04 moritz r: my PseudoStash $a = MY::.clone; say $a.keys;
16:04 p6eval rakudo ba5e04: OUTPUT«!UNIT_MARKER GLOBALish EXPORT $?PACKAGE ::?PACKAGE $_ $/ $! $a $=pod␤»
16:04 timotimo hehe, check this :)
16:04 timotimo r: CORE::.clone.say
16:04 p6eval rakudo ba5e04: OUTPUT«No such method 'perl' for invocant of type '!CORE_MARKER'␤  in method perl at src/gen/CORE.setting:6603␤  in method perl at src/gen/CORE.setting:906␤  in method gist at src/gen/CORE.setting:904␤  in method gist at src/gen/CORE.setting:902␤  in sub say at src/gen/CO…
16:05 diakopter r: CORE::.clone.print
16:05 p6eval rakudo ba5e04: OUTPUT«&default-formatter        3787DateTime-local-timezone     3791EXPORTHOW   3795Pod 3799Set 3803&set        3807&infix:<(elem)>     3811&infix:<(cont)>     3815&infix:<(|)>        3819&infix:<(&)>        3823&infix:<(-)>        4107&infix:<(^)>        4111&infix:<(<=)>
16:05 p6eval ..4115&infix:<(<)>        4119&infix:<(>=)>       4123&infix:<(>)>        4…
16:05 diakopter yourmom
16:05 arnsholt timotimo: I wouldn't be surprised if the PseudoStash is mostly an NQP object
16:05 arnsholt That'd explain the lack of .perl (and other Perl 6 stuff like .gist)
16:06 moritz I think it's a real Perl 6 object, but some of the objects contained in it are not
16:06 diakopter r: say PseudoStash ~~ Any
16:06 p6eval rakudo ba5e04: OUTPUT«True␤»
16:07 diakopter r: say PseudoStash ~~ Mu
16:07 p6eval rakudo ba5e04: OUTPUT«True␤»
16:07 timotimo PseudoStash does have a .perl
16:07 timotimo it's the core marker inside the CORE package that doesn't
16:07 arnsholt Oh, right. That's an NQP object then =)
16:09 timotimo r: class A { has $.ctx; method new { $.ctx = CORE::.clone; } } A.new(); # huh?
16:09 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/Z9rfTXnW0x:1�------> [32m method new { $.ctx = CORE::.clone; } } [33m�[31mA.new(); # huh?[0m�    expecting any of:�        method arguments�        statement end�        statement modifier�        statem…
16:09 timotimo r: class A { has $.ctx; method new { $.ctx = CORE::.clone; } }; A.new(); # huh?
16:09 diakopter r: try .say for CORE::.clone.keys
16:09 p6eval rakudo ba5e04: OUTPUT«Cannot look up attributes in a type object␤  in method ctx at src/gen/CORE.setting:1868␤  in method new at /tmp/WumrKL74_p:1␤  in block  at /tmp/WumrKL74_p:1␤␤»
16:09 p6eval rakudo ba5e04: OUTPUT«&default-formatter␤DateTime-local-timezone␤EXPORTHOW␤Pod␤Set␤&set␤&infix:<(elem)>␤&infix:<(cont)>␤&infix:<(|)>␤&infix:<(&)>␤&infix:<(-)>␤&infix:<(^)>␤&infix:<(<=)>␤&infix:<(<)>␤&infix:<(>=)>␤&infix:<(>)>␤Baggy␤&bag␤&infix:<(.)>␤&infix:<(+)>␤Version␤Cursor␤&infix:<=…
16:09 timotimo i don't understand why i'm getting a type object there to be honest
16:09 timotimo r: say CORE::.clone.WHAT;
16:09 p6eval rakudo ba5e04: OUTPUT«(PseudoStash)␤»
16:10 timotimo r: try .say for CORE::.clone.keys;
16:10 p6eval rakudo ba5e04: OUTPUT«&default-formatter␤DateTime-local-timezone␤EXPORTHOW␤Pod␤Set␤&set␤&infix:<(elem)>␤&infix:<(cont)>␤&infix:<(|)>␤&infix:<(&)>␤&infix:<(-)>␤&infix:<(^)>␤&infix:<(<=)>␤&infix:<(<)>␤&infix:<(>=)>␤&infix:<(>)>␤Baggy␤&bag␤&infix:<(.)>␤&infix:<(+)>␤Version␤Cursor␤&infix:<=…
16:10 arnsholt timotimo: Anyways, have a look at src/code/{EnumMap,PseudoStash}.pm and src/Perl6/Metamodel/BOOTSTRAP.pm if you wanna peek at the implementation
16:10 timotimo but more interestingly:
16:10 timotimo r: class A { has $!ctx; method new { $!ctx = CORE::.clone; } }; A.new(); # huh?
16:10 p6eval rakudo ba5e04: OUTPUT«Cannot look up attributes in a type object␤  in method new at /tmp/_8wBQHsSFP:1␤  in block  at /tmp/_8wBQHsSFP:1␤␤»
16:11 timotimo oh, it could very well be that the clone implementation doesn't do everything needed for PseudoStash.
16:11 arnsholt r: class A { has $!ctx; method new { $!ctx = nqp::clone(CORE::); } }; A.new(); # Maybe?
16:11 p6eval rakudo ba5e04: OUTPUT«Cannot look up attributes in a type object␤  in method new at /tmp/tNeKgxakVN:1␤  in block  at /tmp/tNeKgxakVN:1␤␤»
16:12 moritz in method new, the new object hasn't been created
16:12 moritz so the error is exactly what the error message says :-)
16:12 arnsholt Oh, right =)
16:12 arnsholt r: class A { has $!ctx; submethod BUILD() { $!ctx = CORE::.clone; } }; A.new(); # Maybe?
16:12 p6eval rakudo ba5e04:  ( no output )
16:12 timotimo m)
16:13 arnsholt There we go. moritz++ =)
16:13 timotimo i have no business trying to create such advanced things when i stumble upon such elementary concepts
16:13 timotimo however, the further i fall, the more i learn on the way down! :)
16:13 arnsholt That's what happened to me =)
16:14 timotimo you fell far and learnt much?
16:14 arnsholt I just wanted to wrap ZMQ, and suddenly I'm doing all kinds of compiler guts hackery \o/
16:14 arnsholt Compilers are deep holes, if you want to continue with the metaphor =)
16:14 timotimo :D
16:17 timotimo so after i eval my $foo = 10; in my cloned context, it doesn't get a $foo key. do i have to do something more magical to make sure those changes stick?
16:18 timotimo do i have to go back to $*CTXSAVE and the other variable i forgot the name of right now?
16:19 arnsholt Oooooh, right. It's the mythical "lexical variables in the REPL" problem
16:20 timotimo "mythical"? this is very real!
16:20 timotimo oh, i guess that's not what mythical means
16:21 arnsholt Sorry, weird phrasing
16:21 arnsholt It's just something that took a certain amount of time before we got working in the "normal" NQP/Rakudo REPL
16:21 arnsholt I'm digging to see if I can't find the appropriate bits of code you can look at
16:22 arnsholt But yeah, I think you want the CTXSAVE stuff
16:23 arnsholt timotimo: The relevant method is HLL::Compiler.interactive, line 196 here (might be a few lines off due to non-master branch)
16:23 timotimo right
16:24 timotimo i copied that mechanism and got stuck on some point, hold on i'm reconstructing the code now
16:24 timotimo ah, yes, the ctxsave method on the object that's passed to $*CTXSAVE
16:24 timotimo $*MAIN_CTX = nqp::ctxcaller(nqp::ctx()); is the original code. that won't work in perl6 code, because nqp::ctxcaller(nqp::ctx()) returns a nonperl6 object
16:24 timotimo however, i think i can just say $*MAIN_CTX = PseudoStash.new() or something
16:25 timotimo because that has exactly that assignment in the new method
16:25 arnsholt You'll probably have to bind, not assign
16:25 moritz I fear you're mixing parrot/nqp contexts and Perl 6 contexts
16:25 arnsholt Try $*MAIN_CTX := nqp::ctxcaller(...)
16:25 timotimo but it's not exactly the same
16:25 timotimo Cannot use bind operator with this left-hand side, arnsholt
16:26 arnsholt Oh, dang
16:27 timotimo moritz: i'm very open for suggestions of course ;)
16:27 timotimo the "write the repl part in nqp" attempt i had before wasn't particularly successful
16:28 mjwhitta joined #perl6
16:30 arnsholt From rakudo-debugger, it looks like that's what you're gonna have to do, though =)
16:31 timotimo that's where i looked and i failed to replicate the success of causing the perl6 module to run >_<
16:31 arnsholt Heh
16:32 arnsholt But this is the ipython backend part, right?
16:33 timotimo indeed it is
16:33 timotimo i wish i could build it in perl6, that would make things 1000x easier
16:33 arnsholt Hehe
16:34 timotimo i wouldn't have to do awkward things like create (and, more importantly, design) an object to pass from perl6 to nqp that has all the right methods and behaviors to accomodate the ipython protocol
16:34 arnsholt But I suspect the hard part here is actually getting data off the ZMQ socket and into the NQP bits
16:34 timotimo hell, it would even be less awkward to regcomp a nqp and do it *inside* perl6 as nqp code >_>
16:35 anant joined #perl6
16:35 timotimo that way the flow of control isn't broken in two, bent over backwards, squeezed into corkscrew form and arranged along the surface of a klein bottle.
16:35 arnsholt Yeah, now I see what is the problem
16:36 timotimo :D
16:36 timotimo by way of amazing metaphor
16:36 arnsholt Indeed =D
16:37 arnsholt Ugly hack solution: Perl 6 program reads off the ZMQ socket and writes to a filehandle attached to a subprocess's STDIN
16:38 timotimo oh god, not again
16:38 arnsholt Better solution would be a Perl 6 program that reads off the socket and munges it into an NQP-friendly format and dispatches off to NQP
16:38 arnsholt Not that, then =)
16:39 timotimo the first approach was to write a python wrapper around an STDIN/STDOUT based protocol
16:39 arnsholt Hang on. Lemme get some paper to think with (my brain is paper-powered =)
16:40 timotimo :)
16:40 timotimo bon appetit
16:40 arnsholt I think you're going to want something subprocess-y, though
16:41 arnsholt But what you really want is actually fork-and-exec, I think
16:42 timotimo well, i will have to think about how to best capture stdout/stderr and how to interact with stdin properly
16:42 arnsholt The tricky part is managing that on Parrot
16:43 arnsholt Yeah, you'll need some kind of wrangling there too
16:44 timotimo the more i think about it, the less i like about it :|
16:45 arnsholt Well, the good news is that now that I see more or less what you want/need, it's not an intrinsically evil problem to tackle
16:45 timotimo maybe i should have explained in more detail much earlier
16:45 arnsholt The wrangly part is implementing it on Perl 6/Parrot
16:46 arnsholt Nah, communicating this kind of thing is pretty hard
16:46 arnsholt I just needed a bit of time to assimilate the information into my brain
16:46 arnsholt Human IPC is message-passing, not shared memory. And the message-passing is noisy and laggy =)
16:46 timotimo :)
16:48 arnsholt moritz: You know if fork/exec is possible from Parrot code?
16:48 timotimo i believe it is.
16:49 timotimo wait. ... no?
16:49 arnsholt I'm not sure how fond the Parrot interpreter is of forking. In theory it might work, but I'm not at all sure
16:51 moritz I gues it works, but you have to take of file handles, sockets etc. yourself
16:51 colomon joined #perl6
16:56 arnsholt moritz: Yeah, if that's all it shouldn't be impossible
16:59 tgt joined #perl6
17:10 anant joined #perl6
17:16 census joined #perl6
17:16 census happy holiday!
17:20 diakopter howdy
17:27 colomon_ joined #perl6
17:30 anant joined #perl6
17:32 xenoterracide joined #perl6
17:33 PacoAir joined #perl6
17:37 tgt joined #perl6
17:42 dalek v5: ec6022f | (Tobias Leich)++ | lib/Perl6/P5Actions.pm:
17:42 dalek v5: dispatch >>, << to +>, +<
17:42 dalek v5: review: https://github.com/rakudo-p5/v5/commit/ec6022fd0d
17:46 * moritz blug: http://perlgeek.de/blog-en/perl-6/2013-rakudos-abstract-syntax-tree.html
17:52 diakopter TimToady (also featuring anocelot) this morning: http://youtube.com/watch?v=aU_XQah2s8k  sorry for the horrifically bad videography... :S
17:53 adu_ joined #perl6
17:53 timotimo oh, larry drums
17:54 timotimo i myself have a cheap electronic drumkit that unfortunately doesn't fit into my apartment properly since the last rearrangement of furniture :|
17:55 colomon moritz++
17:55 timotimo diakopter: number one tip: rotate the phone 90 degrees before starting to shoot a video :D
17:56 adu_ how do I run all tests in the t directory?
17:56 FROGGS moritz: the first example should be QAST::Op.new( :op('call'), :name('add')..., no?
17:56 thou joined #perl6
17:57 FROGGS nvm
17:57 arnsholt moritz++ # QAST rundown
17:57 FROGGS I should carry on reading before telling stuff :o)
17:58 diakopter timotimo: :D now I know!
17:58 diakopter what? youtube doesn't fix that for me?!?
17:58 moritz adu_: in a module?
17:59 moritz ufo && make test
17:59 timotimo diakopter: no, youtube will not turn your 3:4 video into a 4:3 video :D
17:59 moritz or PERL6LIB=lib prove -e perl6 -r t/
17:59 timotimo or is that 6:19? i can hardly tell
17:59 diakopter dunno; iphone
18:00 diakopter 4s
18:01 tadzik merry christmas, #perl6!
18:01 diakopter o_O
18:01 tadzik (snow battles)++
18:02 FROGGS tadzik: here too
18:02 colomon adu_: I tend to use prove -e "perl6 -Ilib" t/
18:04 diakopter btw, anocelot is the person playing bass, not the person who walks by
18:04 * colomon likes living in the future, where he can IRC while zooming down I-75
18:04 adu_ colomon: nice, that prints the filename too
18:05 adu_ colomon: that's dangerous
18:05 tadzik moritz++ # blog post
18:06 colomon adu_: I'm not driving.
18:06 adu_ haha ok
18:06 adu_ where is moritz's blog post?
18:07 colomon http://perlgeek.de/blog-en/perl-6/2013-rakudos-abstract-syntax-tree.html
18:09 tadzik I-75 sounds like a fighter jest to me, like F-16 or such
18:10 tadzik ironically, colomon just disconnected. I hope he's not hit by an ground-air missile :)
18:12 thou joined #perl6
18:14 kivutar joined #perl6
18:16 adu interesting
18:17 adu I remember some of that AST structure from Parrot
18:17 diakopter tadzik: haha; ground-to-air missle hitting a car on an interstate highway
18:17 adu wouldn't that be air-to-ground?
18:18 tadzik isn't highway "high" because of flying cars? :)
18:23 _sri and what about hover cars?
18:24 colomon joined #perl6
18:29 diakopter colomon: welcome back to the non-information superhighway
18:30 colomon o/
18:32 thou joined #perl6
18:33 colomon One of these days I'm going to have to drive to Miami, because that last little stretch of I-75 in southern Florida is the only bit of the road I've not been on.  :)
18:38 timotimo i wonder why the perl nntp server (or whatever it is) is sooooo slooooow
18:52 thou joined #perl6
18:56 woolfy1 joined #perl6
18:57 colomon joined #perl6
19:00 att__ joined #perl6
19:07 SamuraiJack joined #perl6
19:11 tgt joined #perl6
19:12 countley joined #perl6
19:13 thou joined #perl6
19:15 lue moritz: you talk about the 'add' operation holding two floating-point values and returning a floating-point, despite the sample code showing use of IVals. Am I missing something?
19:16 moritz lue: oh right, I meant to talk about that. There's automatic type conversion going on
19:17 lue I suspected that somewhere "behind the scenes" integers were being converted to floating point when I read that, but I wasn't sure.
19:17 countley rindolf: whats up!!!
19:18 rindolf countley: hi.
19:18 moritz lue: updated.
19:18 countley long time
19:18 rindolf countley: started working on http://www.shlomifish.org/humour/Summerschool-at-the-NSA/ .
19:18 rindolf countley: yes.
19:19 lue moritz++
19:19 rindolf countley: it's a new screenplay I've started to write after http://www.shlomifish.org/humour/Selina-Mandrake/ .
19:19 countley rindolf ok im ill check it out now
19:19 atta_ joined #perl6
19:20 rindolf countley: thanks.
19:29 kst` joined #perl6
19:30 adu yey it has a home
19:30 adu https://github.com/andydude/c2drox
19:35 thou joined #perl6
19:39 kst`` joined #perl6
19:40 arnsholt timotimo: Speaking of the ipython stuff, I wonder if Rakudo/JVM won't be an interesting thing to wait for
19:41 arnsholt I think the parallelism stuff may have a better chance of getting worked out there
19:41 timotimo it's not really parallelism that's important (except for the heartbeat thing, but that seems to work with a ZMQ device, which i have no idea about)
19:41 arnsholt Well sort of. But fork/exec is sort of parallelism as well
19:42 arnsholt The traditional Unix way to do it, anyways =)
19:42 timotimo ah, right.
19:42 arnsholt But threads might work as well
19:42 timotimo i'd prefer to get this "out there" relatively soon
19:42 arnsholt OTOH, you might end up blocking on NativeCall in NQP/JVM via the ZMQ stuff
19:42 timotimo especially if i end up doing that talk for GPN, which is in ~3 months
19:43 arnsholt Indeed =)
19:43 arnsholt In that case, I'd try to get the fork/exec stuff working
19:43 arnsholt Might have better luck getting help once the Easter holidays are over
19:43 timotimo i'm not sure i follow. what problem exactly does this solve?
19:44 arnsholt Fork/exec?
19:45 timotimo yes, that
19:46 arnsholt It separates concerns. The top-level process handles the ZMQ stuff, while the inferior process is the actual REPL stuff
19:47 arnsholt No need to worry about the two stepping on each others' toes as well, that way
19:47 timotimo do we already have a decent ipc?
19:47 tadzik we don't have a decent p
19:47 arnsholt We have a halfway done ZMQ module? O:)
19:48 timotimo because i don't like the thought of communicating over stdin/out to the subprocess, because the parent process needs to gobble up all stdin/stdout data, too
19:50 arnsholt Yeah, it is a bit nasty (but very traditionally Unix). But it's not a terrible way to do it
19:50 arnsholt I've done it in Perl 5, and it's pretty straightforward. A bit of filehandle juggling is all
19:51 timotimo i don't feel good pushing data from the executing kernel as well as data from the executed program code through stdout to the parent process
19:53 thou_ joined #perl6
19:53 arnsholt Why not? It's very in the spirit of Unix, if it's any consolation =)
19:54 timotimo i'd have to devise some wicked envelope scheme that prevents the executed program to interfere
19:54 timotimo the point is that the kernel that executes the user code doesn't necessarily have the opportunity to watch or preprocess the output of the program code that's being executed in it
19:55 arnsholt Well, the subprocess would essentially be a REPL, so the executed program will never see the data coming in on the filehandle
19:56 arnsholt You don't have to attach the program code input to STDIN, for that matter
19:56 arnsholt It's just a convenient way to do it
19:56 timotimo well, STDIN is a tricky situation anyway
19:57 timotimo the ipython protocol envisions a request that goes out one of the three sockets whenever an input request happens
20:01 arnsholt I'll try to put down my idea in writing tomorrow or something =)
20:02 dmol joined #perl6
20:03 timotimo that'll help me, i guess :)
20:03 timotimo thank you for your interest
20:06 moritz arnsholt: I have a smallish example program that reads a file, and imports each line into a postgres database, using DBIish and NativeCall. It reliably segfaults after line 173.
20:07 moritz arnsholt: if you want to help debugging, I can give you the code and test input
20:07 moritz running under gdb now
20:07 moritz segfaults in gc_gms_mark_pmc_header
20:08 moritz http://perlpunks.de/paste/show/515897cb.597b.63 as non-telling as a backtrace can be, I fear
20:08 timotimo that's similar to where the repeated tests from 08-callbacks.t segfaults, iirc
20:08 timotimo have you seen the ticket on zavolaj about that?
20:09 moritz en passant, yes
20:09 timotimo have you tried it on a different parrot version yet?
20:09 timotimo 4.something was mentioned in the ticket
20:10 moritz this is parrot 5.2.0-devel
20:10 moritz (which I need for the socket stuff that I'm also using)
20:10 timotimo ah, that makes it more tricky
20:14 thou joined #perl6
20:34 dalek v5: 23e88cf | (Tobias Leich)++ | t/spectest.data:
20:34 dalek v5: run op/cond.t
20:34 dalek v5: review: https://github.com/rakudo-p5/v5/commit/23e88cf808
20:34 thou joined #perl6
20:56 thou joined #perl6
21:02 dmol1 joined #perl6
21:06 dmol joined #perl6
21:07 cibs joined #perl6
21:15 arnsholt moritz: After an initial look, I agree with timotimo: Until proven innocent, I think I'd assume this to be the same bug as the one triggered in the callback tests
21:15 thou_ joined #perl6
21:15 arnsholt moritz: Oh. Does the NativeCall bits (DBDish::pg, I guess?) use any callbacks?
21:22 * arnsholt builds NQP with Parrot 5.2.0
21:25 labster joined #perl6
21:30 labster r: say ().item.perl
21:30 p6eval rakudo ba5e04: OUTPUT«$()␤»
21:30 labster r: $(); say 'alive';
21:30 p6eval rakudo ba5e04: OUTPUT«No such method 'ast' for invocant of type 'Any'␤  in block  at /tmp/NfLCUG7Yhw:1␤␤»
21:30 labster r: $( ); say 'alive';
21:30 p6eval rakudo ba5e04: OUTPUT«alive␤»
21:31 colomon joined #perl6
21:31 labster hello #perl6
21:34 mtk joined #perl6
21:35 thou joined #perl6
21:36 woolfy1 left #perl6
21:44 arnsholt Hmm. No bug there. Let's try 5.1.0...
21:47 timotimo is there moderation or something on perl.perl6.users?
21:50 arnsholt No idea
21:50 timotimo when i'm subscribed via nntp, do i have to do something special to be able to post?
21:50 arnsholt Also, thinking more about that iperl6 thing, I'm starting to agree that my idea is a bad idea =)
21:50 timotimo hehehe
21:50 arnsholt I'm sure I'll have a new and interesting view on things tomorrow ^_^
21:51 arnsholt But I do think that iperl6 would be an awesome showcase for what we can do with Perl 6
21:51 timotimo "can almost do"
21:51 arnsholt "Look, REPL with tabcompletion!"
21:51 arnsholt Oh, hush =p
21:51 arnsholt Anyways, I'd love to help make it happen
21:51 timotimo well, we still need a python process to do the heartbeat
21:52 timotimo or you could figure out zmq devices for me ;)
21:52 diakopter I'll complete your tab
21:52 arnsholt I don't have oodles of time to spare, but this is a good place to spend it
21:52 arnsholt It's useful to have users for NativeCall as well
21:56 thou_ joined #perl6
22:01 bruges_ joined #perl6
22:12 sizz_ joined #perl6
22:14 FROGGS rn: { our $var = 42 }; say $var
22:14 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/b68BCuWzvv:1�------> [32m{ our $var = 42 }; say $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
22:14 p6eval ..niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $var is not predeclared at /tmp/Gf3cFo1cLq line 1:�------> [32m{ our $var = 42 }; say [33m�[31m$var[0m��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) �  at…
22:16 diakopter FROGGS: yeah... I don't know what our does
22:16 thou joined #perl6
22:16 FROGGS obviously not the right thing :o)
22:17 timotimo rn: { our $var = 42 is export }; say $var
22:17 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/d23GqRBY9z:1�------> [32m{ our $var = 42 [33m�[31mis export }; say $var[0m�    expecting any of:�        postfix�        infix stopper�        infix or meta-infix�        statement end�        statement …
22:17 p6eval ..niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/yfRYkQZ7H1 line 1:�------> [32m{ our $var = 42 [33m�[31mis export }; say $var[0m��Parse failed��»
22:17 timotimo rn: { our $var is export; $var = 42 }; say $var
22:17 p6eval rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/ca1JsfE39T:1�------> [32mur $var is export; $var = 42 }; say $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
22:17 p6eval ..niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Trait export not available on variables at /tmp/YE0OyUjTM9 line 1:�------> [32m{ our $var is export[33m�[31m; $var = 42 }; say $var[0m��Variable $var is not predeclared at /tmp/YE0OyUjTM9 line 1:�------> [32m{ our $var …
22:17 timotimo nope.
22:17 timotimo carry on
22:17 FROGGS timotimo: you're not importing, arn't you?
22:17 FROGGS rn: class A; { our $var = 42 }; say A::
22:17 p6eval niecza v24-35-g5c06e28: OUTPUT«Stash.new(...)␤»
22:17 p6eval ..rakudo ba5e04: OUTPUT«("\$var" => 42).hash␤»
22:17 FROGGS rn: class A; { my $var = 42 }; say A::
22:18 p6eval niecza v24-35-g5c06e28: OUTPUT«Potential difficulties:�  $var is declared but not used at /tmp/z_VCumLcZT line 1:�------> [32mclass A; { my [33m�[31m$var = 42 }; say A::[0m��Stash.new(...)�»
22:18 p6eval ..rakudo ba5e04: OUTPUT«().hash␤»
22:18 FROGGS hmmm
22:18 FROGGS rn: class A; { our $var = 42 }; say $var
22:18 p6eval niecza v24-35-g5c06e28: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $var is not predeclared at /tmp/zdKRdskI_D line 1:�------> [32mclass A; { our $var = 42 }; say [33m�[31m$var[0m��Unhandled exception: Check failed��  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @…
22:18 p6eval ..rakudo ba5e04: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$var' is not declared�at /tmp/ebeVe14cb_:1�------> [32mclass A; { our $var = 42 }; say $var[33m�[31m<EOL>[0m�    expecting any of:�        postfix�»
22:18 diakopter rn: class A; { our $var = 42 }; say A::.keys
22:18 p6eval rakudo ba5e04: OUTPUT«$var␤»
22:18 p6eval ..niecza v24-35-g5c06e28: OUTPUT«0␤»
22:18 FROGGS rn: class A; { our $var = 42 }; say $A::var
22:18 p6eval rakudo ba5e04, niecza v24-35-g5c06e28: OUTPUT«42␤»
22:19 FROGGS ahhh, I think I know what's wrong...
22:20 FROGGS it only checks for lexical vars and that is wrong...
22:21 FROGGS but I have to be careful so that there doesn't pop up a redeclaration error when fixing it
22:21 diakopter rn: class A; class B { our $var = 42 }; say $A::B::var; say $B::var
22:21 p6eval rakudo ba5e04, niecza v24-35-g5c06e28: OUTPUT«42␤42␤»
22:21 diakopter okay..
22:21 FROGGS rn: class A; class B { our $var = 42 }; say $A::B::var; say $B::var; say $A::var
22:21 p6eval rakudo ba5e04, niecza v24-35-g5c06e28: OUTPUT«42␤42␤(Any)␤»
22:21 FROGGS good
22:21 FROGGS rn: class A; class B { our $var = 42 }; say $A::B::var; say $B::var; say $A::hurz
22:22 p6eval rakudo ba5e04, niecza v24-35-g5c06e28: OUTPUT«42␤42␤(Any)␤»
22:22 diakopter rn: class A; my class { class B { our $var = 42 } }; say $A::B::var; say $B::var
22:22 p6eval rakudo ba5e04, niecza v24-35-g5c06e28: OUTPUT«(Any)␤(Any)␤»
22:24 FROGGS want to turn on 'no strict' for -e too, is it still called 'no strict' ?
22:26 s0rear joined #perl6
22:28 thou_ joined #perl6
22:30 adu joined #perl6
22:30 FROGGS I guess "6;" will should it on at least
22:34 diakopter will should it on?
22:34 FROGGS err, I guess "6;" should turn it on at least
22:42 BenGoldberg joined #perl6
22:48 thou joined #perl6
22:48 adu .u ☃
22:48 yoleaux U+2603 SNOWMAN [So] (☃)
23:08 thou_ joined #perl6
23:24 pjcj joined #perl6
23:27 moritz arnsholt: no callbacks involved
23:29 thou joined #perl6
23:49 thou_ joined #perl6
23:49 moritz nr: say $*CWD
23:49 p6eval niecza v24-35-g5c06e28: OUTPUT«/home/p6eval/niecza␤»
23:49 p6eval ..rakudo ba5e04: OUTPUT«/home/p6eval␤»
23:50 dalek doc: 6c6928a | moritz++ | lib/variables.pod:
23:50 dalek doc: remove X<> where they are probably wrong
23:50 dalek doc: review: https://github.com/perl6/doc/commit/6c6928a900
23:57 dalek rakudo/nom: 2441b01 | moritz++ | src/core/Pod.pm:
23:57 dalek rakudo/nom: fix signature of Pod::Block.gist
23:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2441b0139a

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

Perl 6 | Reference Documentation | Rakudo