Camelia, the Perl 6 bug

IRC log for #perl6, 2010-03-28

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:01 arnsholt In protoregexes, is the stuff after the colon required to be sum<whatever>?
00:01 jnthn :foo<whatever> generally
00:01 hercynium joined #perl6
00:01 jnthn But we use :sym<whatever> generally, not sure how far nqp supports doing otherwise.
00:02 jnthn But then you can use <sym> inside the regex
00:02 arnsholt Only one way to find out, I suppose
00:03 arnsholt nqp: grammar T { proto token foo { <...> }; token foo:x<y> { a }; token TOP { foo+ } }; say(T.parse("aaa"));
00:03 p6eval nqp: OUTPUT«␤»
00:03 am0c joined #perl6
00:03 arnsholt nqp: grammar T { proto token foo { <...> }; token foo:x<y> { a }; token TOP { <foo>+ } }; say(T.parse("aaa"));
00:03 p6eval nqp: OUTPUT«␤»
00:03 arnsholt nqp: grammar T { proto token foo { <...> }; token foo:sym<y> { a }; token TOP { <foo>+ } }; say(T.parse("aaa"));
00:03 p6eval nqp: OUTPUT«aaa␤»
00:04 arnsholt I guess that's a no
00:46 alester joined #perl6
01:04 arnsholt nqp: grammar T { proto token foo { a }; token foo:sym<b> { b }; token TOP { <foo>+ } }; say(T.parse("abab"));
01:04 p6eval nqp: OUTPUT«Proto regex body must be <...> at line 1, near "{ a }; tok"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
01:12 arnsholt nqp: grammar T { token foo-bar { foobar }; token TOP { <foo-bar> } }; say(T.parse("foobar"));
01:12 p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)␤»
01:13 arnsholt Doesn't look like nqp likes subrule calls with - in them. Known issue?
01:13 jnthn Not sure if known. Looks odd.
01:14 jnthn oh
01:14 jnthn I think I ran into that one before actually...
01:14 jnthn But not with regex
01:14 jnthn But a named arg instead
01:14 jnthn Must be the identifier rule in general.
01:14 jnthn huh...how is it 3am...oh...daylight savings...whoa.
01:28 lichtkind joined #perl6
01:30 lichtkind perl 6 has no references, is it possible to have in one variable a complex data structure and pointing with another deep inside that?
01:40 espadrin` joined #perl6
01:41 gfx joined #perl6
01:42 molaf_ joined #perl6
01:54 Psyche^ joined #perl6
03:14 baest joined #perl6
03:25 hatseflats joined #perl6
04:34 agentzh joined #perl6
04:51 eternaleye joined #perl6
04:51 gfx joined #perl6
04:55 envi^home joined #perl6
05:09 sorear joined #perl6
05:17 cotto joined #perl6
05:48 Trashlord joined #perl6
05:48 thowe joined #perl6
06:19 unixbomber joined #perl6
06:34 vamped joined #perl6
06:34 vamped .u ␤
06:34 phenny U+2424 SYMBOL FOR NEWLINE (␤)
06:44 molaf joined #perl6
06:48 vamped joined #perl6
06:48 vamped .u ␣
06:48 phenny U+2423 OPEN BOX (␣)
07:35 cotto joined #perl6
07:38 hercynium joined #perl6
07:54 eternaleye joined #perl6
08:44 |Jedai| joined #perl6
08:46 hanekomu_ joined #perl6
09:07 baest_ joined #perl6
09:18 pugssvn r30224 | moritz++ | [t/spec] test for RT #72960, Null PMC access when doing [].WHAT.say
09:24 moritz_ rakudo: say 2 Z 3
09:24 p6eval rakudo db0f85: OUTPUT«No applicable candidates found to dispatch to for 'infix:<Z>'. Available candidates are:␤:(Iterable $a-iterable, Iterable $b-iterable)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
09:28 moritz_ p6eval's rakudo build is a bit behind, because parrot added a file to their repo which was previously a generated file
09:28 moritz_ so 'svn up' failed
09:32 yahooooo joined #perl6
09:36 snarkyboojum joined #perl6
09:42 moritz_ rakudo: say (hash a => 3 ).perl
09:42 p6eval rakudo db0f85: OUTPUT«push_pmc() not implemented in class 'FixedPMCArray'␤current instr.: 'perl6;Perl6Role;!add_variant' pc 9861 (src/gen/RoleToClassApplier.pir:566)␤»
09:42 moritz_ rakudo: say (hash(a => 3) ).perl
09:42 p6eval rakudo db0f85: OUTPUT«push_pmc() not implemented in class 'FixedPMCArray'␤current instr.: 'perl6;Perl6Role;!add_variant' pc 9861 (src/gen/RoleToClassApplier.pir:566)␤»
09:45 Su-Shee joined #perl6
09:45 yahooooo joined #perl6
09:48 M_o_C joined #perl6
10:00 moritz_ rakudo: say (hash(a => 3) ).perl
10:01 p6eval rakudo cddc8a: OUTPUT«{"a" => 3}␤»
10:01 moritz_ oh
10:02 Chillance joined #perl6
10:05 yahooooo joined #perl6
10:12 Su-Shee joined #perl6
10:16 yahooooo joined #perl6
10:46 yahooooo joined #perl6
10:57 niros joined #perl6
11:16 xomas joined #perl6
11:16 xomas joined #perl6
11:32 frettled joined #perl6
12:00 jnthn o/
12:12 mberends hi jnthn!
12:13 * mberends is breaking nearly everything in proto today, to rebuild it "better", fsvo better
12:16 jnthn :-)
12:17 wknight8111 joined #perl6
12:17 mberends one of the planned proto improvements will be Windows compatibility
12:17 yahooooo joined #perl6
12:18 jnthn mberends: Yay!
12:18 jnthn mberends: I'll be able to use it at last. :-)
12:18 mberends exactly. proto needs a Windows guine^W early adopter
12:29 jnthn http://en.wikipedia.org/wiki/Protostar ;-)
12:36 yahooooo joined #perl6
12:37 jaldhar joined #perl6
12:40 rgrau_ joined #perl6
12:58 moritz_ rakudo: use Test; plan 1; isa_ok hash("a", 1), Hash
12:58 p6eval rakudo cddc8a: OUTPUT«1..1␤not ok 1 - The object is-a 'Hash()'␤# Actual type: Hash()␤# Looks like you failed 1 tests of 1␤»
12:59 moritz_ are there two Hash() types? on parrot, one rakudo?
13:02 jnthn moritz_: yes, but the problem there is that Hash in Rakudo is currently a role, not a class.
13:02 moritz_ oh.
13:03 jnthn rakudo: say hash("a", 1) ~~ Hash
13:03 p6eval rakudo cddc8a: OUTPUT«1␤»
13:03 pugssvn r30225 | moritz++ | test for the hash() list operator
13:09 hugme joined #perl6
13:11 hugme joined #perl6
13:12 dalek rakudo: 0577068 | moritz++ | Test.pm:
13:12 dalek rakudo: [Test.pm] give better diagnostic output in isa_ok()
13:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​5770683ef9b7d0e9790886622c6f5895cc19123
13:12 dalek rakudo: 8f7d293 | moritz++ | t/spectest.data:
13:12 dalek rakudo: run S04-statement-parsing/hash.t
13:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​f7d293a6ba3a9ce4efea3278c58a5edf0210edc
13:13 cotto joined #perl6
13:14 cotto joined #perl6
13:16 am0c joined #perl6
13:18 moritz_ jnthn++ # subs-n-sigs.pod
13:18 moritz_ "From the output of this program, you can observe that doing the YMCA dance in
13:18 moritz_ ASCII art looks just about as bad as doing it in real life."
13:20 yahooooo joined #perl6
13:20 moritz_ jnthn: however you confused 'is rw' with 'is capture' or \
13:20 moritz_ jnthn: Marking a parameter as C<is rw> means that you are allowed to modify the
13:20 moritz_ argument that was passed in. Doing so modifies the original thing that was
13:20 moritz_ passed. If a literal or some other constant value was passed in, then this
13:20 moritz_ will fail.
13:20 moritz_ actually with 'is rw' the binding of a read-only value should already fail
13:20 jnthn Ah, hmm..
13:21 jnthn Yeah, that wants a tweak to make it clear that it fails to bind, not that it fails to assign.
13:22 jnthn btw, "is parcel" is the synonym for \ rather than "is capture", iirc.
13:22 moritz_ I can add that
13:22 moritz_ ah, ok
13:22 jnthn Go aheaed. :-)
13:22 jnthn But I think we keep "is rw" for now.
13:22 jnthn And just explain what it does.
13:22 moritz_ aye
13:22 jnthn The situations when you want to defer the failure until later are less common.
13:24 jnthn moritz_++ # reviewing my scribblings
13:25 moritz_ jnthn: could you please convert the file to UTF-8?
13:26 moritz_ jnthn: the name of the beer doesn't display correctly as-is
13:26 dalek book: 2261e8a | moritz++ |  (2 files):
13:26 dalek book: [subs-n-sigs] some small improvments; clarify that binding a constant to an rw-parameter fails
13:26 dalek book: review: http://github.com/perl6/book/commit/22​61e8aec1657921d0e3370859fc5f4b55fc0496
13:26 meppl joined #perl6
13:28 jnthn moritz_: Oops
13:28 jnthn moritz_: I'm...not sure what it's ended up being. :-/
13:29 moritz_ jnthn: neither am I. One of the characters look fine in Latin-1, the other... not
13:29 jnthn Will do that next time I write some more (maybe this evening :-))
13:29 moritz_ jnthn: looks like some windows-blah
13:29 jnthn Suspect the ž
13:31 colomon mberends++ # proto work
13:35 moritz_ jnthn: I've done the conversion, now that I know what it should say :-)
13:37 moritz_ jnthn: any objections to moving 'Returning Results' a bit up within the chapter? The examples get a bit weird without returns
13:38 dalek book: f4b0b90 | moritz++ | src/subs-n-sigs.pod:
13:38 dalek book: [subs-n-sigs] optional parameters; convert to UTF-8
13:38 dalek book: review: http://github.com/perl6/book/commit/f4​b0b9088993574bb3c9101770c654947a625edc
13:40 jnthn moritz_: I was pondering that, yeah.
13:40 yahooooo joined #perl6
13:41 jnthn moritz_: Probably it can go before the types section.
13:42 jnthn order-steak('through');
13:42 jnthn through? :)
13:43 * jnthn thought the choices were rare, medium and well done :-)
13:43 jnthn Nice example though. :-)
13:49 dalek joined #perl6
13:49 yahooooo joined #perl6
13:51 moritz_ probably a bad translation
13:56 dalek book: aba047d | moritz++ | src/subs-n-sigs.pod:
13:56 dalek book: [subs-n-sigs] improve example, jnthn++; also move "Returning Results" section a bit up
13:56 dalek book: review: http://github.com/perl6/book/commit/ab​a047d9552322613b1ed12a13799a06d2e20aaf
13:59 yahooooo joined #perl6
14:09 yahooooo joined #perl6
14:10 TiMBuS joined #perl6
14:18 titan_ joined #perl6
14:19 yahooooo joined #perl6
14:30 yahooooo joined #perl6
14:40 yahooooo joined #perl6
14:40 mssm joined #perl6
14:49 nihiliad joined #perl6
14:49 TimToady maybe it means "cooked-through", aka well done?
14:50 yahooooo joined #perl6
15:00 yahooooo joined #perl6
15:03 colomon joined #perl6
15:05 payload joined #perl6
15:10 yahooooo joined #perl6
15:20 yahooooo joined #perl6
15:29 hanekom__ joined #perl6
15:31 justatheory joined #perl6
15:32 moritz_ it does
15:32 moritz_ see last diff
15:40 dual joined #perl6
15:40 yahooooo joined #perl6
15:42 lichtkind joined #perl6
15:42 lichtkind mberends: hai
15:43 lichtkind jnthn: ping
15:53 mberends lichtkind: hoi
16:00 hercynium joined #perl6
16:01 yahooooo joined #perl6
16:07 justatheory_ joined #perl6
16:20 moritz_ rakudo: sub a (:b($c = 5)) { say $c }
16:21 p6eval rakudo 8f7d29:  ( no output )
16:21 yahooooo joined #perl6
16:24 Trashlord joined #perl6
16:36 sundar joined #perl6
16:39 payload joined #perl6
16:42 yahooooo joined #perl6
16:42 mathw joined #perl6
16:43 justatheory joined #perl6
16:44 jnthn joined #perl6
16:44 meppl joined #perl6
16:44 cotto joined #perl6
16:44 niros joined #perl6
16:44 sorear joined #perl6
16:44 Patterner joined #perl6
16:44 sunnavy joined #perl6
16:44 Sarten-X joined #perl6
16:44 mberends joined #perl6
16:44 mj41 joined #perl6
16:44 cognominal joined #perl6
16:44 Gothmog_ joined #perl6
16:44 Trey joined #perl6
16:44 jrockway joined #perl6
16:44 renormalist joined #perl6
16:44 bkeeler joined #perl6
16:44 LionMadeOfLions joined #perl6
16:44 f00li5h joined #perl6
16:44 PZt joined #perl6
16:44 ascent_ joined #perl6
16:44 felipe joined #perl6
16:44 eiro joined #perl6
16:44 constant joined #perl6
16:44 arnsholt joined #perl6
16:44 huf joined #perl6
16:44 yves joined #perl6
16:44 mdxi_ joined #perl6
16:44 rhr joined #perl6
16:44 araujo joined #perl6
16:44 jql joined #perl6
16:44 tomaw joined #perl6
16:44 ewilhelm joined #perl6
16:44 s1n joined #perl6
16:44 buu joined #perl6
16:44 c1sung joined #perl6
16:44 BinGOs joined #perl6
16:54 hicx174_ joined #perl6
16:54 takadonet1 joined #perl6
16:54 mathw_ joined #perl6
16:54 broquain1 joined #perl6
16:54 astinus_ joined #perl6
16:54 elmex joined #perl6
16:54 cj joined #perl6
16:55 dual joined #perl6
16:55 hudnix joined #perl6
16:55 astinus_ joined #perl6
16:58 silug joined #perl6
16:59 athomaso1 joined #perl6
16:59 ingy joined #perl6
16:59 Exodist joined #perl6
16:59 wasy joined #perl6
17:00 jjore joined #perl6
17:00 Helios joined #perl6
17:00 Sarten-X2 joined #perl6
17:00 ascent__ joined #perl6
17:02 sunnavy joined #perl6
17:02 m6locks joined #perl6
17:02 betterwosld joined #perl6
17:04 arnsholt_ joined #perl6
17:05 niros joined #perl6
17:09 dual joined #perl6
17:09 buubot joined #perl6
17:09 dj_goku joined #perl6
17:09 moritz_ joined #perl6
17:09 Tene joined #perl6
17:09 sjohnson joined #perl6
17:09 spinclad joined #perl6
17:09 baest joined #perl6
17:13 Khisanth joined #perl6
17:15 xinming_ joined #perl6
17:16 wolverian joined #perl6
17:17 Damn3d joined #perl6
17:18 justatheory joined #perl6
17:22 PacoLinux joined #perl6
17:22 p6eval joined #perl6
17:22 mantovani joined #perl6
17:22 lestrrat joined #perl6
17:22 szabgab joined #perl6
17:22 IRSeekBot joined #perl6
17:24 gfldex_ joined #perl6
17:25 hejki_ joined #perl6
17:25 pnu_ joined #perl6
17:27 allbery_b joined #perl6
17:28 betterworld joined #perl6
17:28 christine joined #perl6
17:32 yahooooo joined #perl6
17:34 nsh joined #perl6
17:35 sbp joined #perl6
17:42 charsbar_ joined #perl6
17:43 yahooooo joined #perl6
17:44 skyheights joined #perl6
17:49 skyheights moritz_++     #  http://perlgeek.de/en/article/5-to-6
17:50 skyheights Can't--but can--wait for Rakudo *
17:51 felipe joined #perl6
17:54 M_o_C joined #perl6
17:56 astinus joined #perl6
17:58 nihiliad joined #perl6
17:58 synth joined #perl6
17:58 niros joined #perl6
18:12 lisppaste3 joined #perl6
18:27 Pavithra joined #perl6
18:59 jql joined #perl6
19:01 hercynium joined #perl6
19:14 moritz_ std: my $foo; :!$foo
19:15 p6eval std 30225:  ( no output )
19:18 spinclad that shouldn't parse i think?  as it's both :foo(1) and :foo($foo)
19:18 spinclad *:foo(0)
19:20 moritz_ spinclad: I don't think it should, but I thought it would be better to check
19:21 spinclad i'm surprised std got lost on it.
19:22 yahooooo joined #perl6
19:23 moritz_ I think it's a problem with p6eval, not with STD.pm
19:23 moritz_ locally it says "Bogus statement"
19:23 jnthn I don't expect it to parse also.
19:24 jnthn iirc only an identifier can follow a !
19:24 arnsholt jnthn: I think I know why nqp-rx doesn't like - in grammar stuff
19:25 iblechbot joined #perl6
19:25 arnsholt You can use + and - to do set arithmetic with character classes, so that might confuse it
19:26 dalek book: 30c4f59 | moritz++ | src/subs-n-sigs.pod:
19:26 dalek book: [subs] named parameters
19:26 dalek book: review: http://github.com/perl6/book/commit/30​c4f594fffd01a2b65d87a9406fd66a010aee15
19:30 yahooooo joined #perl6
19:48 moritz_ std: 1
19:49 dalek book: 0d66bb8 | moritz++ | src/subs-n-sigs.pod:
19:49 dalek book: [subs] returns
19:49 dalek book: review: http://github.com/perl6/book/commit/0d​66bb8d7edd8cdd2e98bc82a41ad2cfe8d76447
19:50 p6eval std 30225:  ( no output )
19:50 moritz_ what should 'our %*foo' do?
19:51 moritz_ installing a contextual variable in the symbol table looks...weird
19:53 jnthn Though in a sense, you're really declaring a lexical alias to that thingy in the symbol table.
19:55 moritz_ aye
19:56 pugssvn r30226 | moritz++ | [t/spec] test our %*var
20:12 moritz_ rakudo: package A {}; A.foo
20:12 p6eval rakudo 8f7d29:  ( no output )
20:13 jnthn Locally, Method 'foo' not found for non-object
20:13 colomon joined #perl6
20:16 wknight8111 joined #perl6
20:19 pugssvn r30227 | moritz++ | [t/spec] fudge S10-packages/basic.t for rakudo
20:19 moritz_ jnthn: here too
20:20 eternaleye joined #perl6
20:24 astrojp left #perl6
20:25 ash_ joined #perl6
20:36 dalek rakudo: 534afd8 | moritz++ | t/spectest.data:
20:36 dalek rakudo: we pass S10-packages/basic.t, now with quite different fudging than before
20:36 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​34afd83e364da0c17c5ea7f806845a0e2d1d7ce
20:36 colomon " now with quite different fudging than before"  :)
20:37 pugssvn r30228 | moritz++ | [t/spec] tests for use'ing classes inside classes and modules
20:40 pugssvn r30229 | moritz++ | [t/spec] add the test packages that I forgot before, moritz--
20:42 ash_ rakudo* is going to be nice when it is released
20:45 jnthn colomon: Having fun? :-)
20:45 colomon yes!
20:46 colomon The games I ran went well, the games I've played in were good fun.
20:46 colomon One more tonight, after a mass outing for Japanese noms.
20:47 jnthn \o/
20:48 pmurias joined #perl6
20:50 ash_ so... anyone know how P6Opaque objects look under the hood? basically are the a map of names to properties?
20:51 moritz_ they are like a locked hash of attribute names => attribute containers
20:53 ash_ in my nq-nqp i am trying to figure out how to make my objects, under the hood, and i was thinking of simply a hash, but there may be some attributes that need special treatment (like the id?) figured rakudo's already made the right design decision on this one
20:54 moritz_ you might need some additional meta data, unless you store that in some other part of an object
20:54 moritz_ like "what type do I belong to?"
20:55 moritz_ which is basically .WHAT
20:55 moritz_ bed &
20:55 colomon o/
20:56 jnthn ash_: I don't particularly regard Rakudo as having it right.
20:58 ash_ the hash I was thinking of storing things like "&foo" for methods, and "$a" for an attribute, since they are all generic objects
20:58 ash_ well, really that would be $!a
21:00 pmurias joined #perl6
21:01 bkeeler Afternoon!
21:04 bkeeler > my @f = ("bar", rx/ qu+x /); say "abarfooquuuuxbazbarb" ~~ /^a [ 'foo' | 'baz' | @f ] + b$/
21:04 bkeeler abarfooquuuuxbazbarb
21:04 jnthn whoa!
21:04 jnthn That's insane. :-)
21:05 jnthn bkeeler++
21:05 arnsholt Awesome!
21:05 ash_ how does a @f work in a regex? does it get translated to @f[0] | @f[1] ?
21:05 bkeeler Yep
21:05 ash_ neat
21:05 ash_ wow
21:05 arnsholt bkeeler: I think you're my new hero =D
21:05 ash_ man, regex's in perl 6 are awesome
21:05 bkeeler Yeah, they are
21:06 ash_ i wonder if i'll ever get them implemented in my nq-nqp... probably not ><
21:09 ash_ bkeeler: is your work on github?
21:09 ash_ is it a branch of nqp? or is it in rakudo?
21:09 bkeeler Will be soon
21:09 ash_ got ya
21:10 bkeeler Rakudo
21:11 bkeeler I thought I was going to have to make changes to nqp, but it looks like I'll get away without
21:11 nihiliad joined #perl6
21:12 ash_ should any of them be ported into nqp? just curious, or are they to much ingrained into rakudo and/or outside of nqp's scope?
21:12 bkeeler Could probably be backported
21:13 jnthn Just because it could be doesn't mean it should be though. :-)
21:13 jnthn There's value in NQP being small.
21:14 bkeeler There might be value in being able to use @foo in a grammar though
21:14 jnthn Yeah
21:14 jnthn I guess it's on a "do we have a use for it" basis.
21:15 jnthn Thing is, porting NQP is the first step to adding another backend to Rakudo.
21:15 jnthn Everything you add to NQP potentially makes that step harder.
21:15 bkeeler True
21:16 ash_ hey, if i get my nqp working, then i could maybe run parts of rakudo (the ones without pir)
21:16 jnthn ash_: You'd have a decent shot at Grammar.pm and, if the PAST node types were defined, Actions.pm too.
21:16 jnthn But yes, the rest of the glue is another matter.
21:17 bkeeler PAST could certainly use being more abstract than it actually is
21:17 bkeeler There's rather a lot of pirops and inlines
21:18 ash_ my goal is to, when I am done, have my nq-nqp run the nqp Grammar.pm and some of the nqp Actions.pm (it uses pir in it a bit, so i'd have to re-do that)
21:19 jnthn inlines are a problem
21:19 jnthn pirops less so
21:19 ash_ i don't know if i'll get to that anytime soon, but hey, its a goal :P
21:19 jnthn If you read pirop as "vmop" or some such, it's not so bad.
21:19 am0c joined #perl6
21:19 jnthn I guess we'll only really know how hard it is once somebody's managed to do it. :-)
21:20 bkeeler It would be nice to see perl6 run on the JVM sometime
21:21 bkeeler They did a pretty good job with JRuby
21:21 bkeeler Apparently it runs faster than the regular Ruby for most things
21:21 sorear ash_: P6Opaque represents 5 memory blocks
21:21 ash_ if i get my stuff done, it will be nqp running on the LLVM (i know its not the same, but still)
21:21 espadrine joined #perl6
21:21 bkeeler That would be great too
21:21 bkeeler And someone was talking about getting it running on the DLR
21:21 sorear bkeeler: if memory serves, the "regular Ruby" is just an AST walker
21:22 sorear like P5
21:22 jnthn ash_: That'd be cool to have.
21:22 ash_ sorear: "5 memory blocks" meaning...? (just curious)
21:22 jnthn sorear: (5 memory blocks) Huh?
21:22 sorear jnthn: first line of a multi-line explanation
21:23 sorear ash_: P6Opaque is a PMC header + attributes; the attributes reference a ResizablePMCArray -> attribute record -> PMC* array
21:23 sorear the P6Opaque also references the class, which references a name->offset mapping
21:23 sorear so
21:23 sorear $object.!slotname
21:23 sorear 1. Get the class from $object
21:24 sorear 2. Look up !slotname in $class's layout hash
21:24 sorear 2. Get the storage pmc array from $object
21:24 sorear 3
21:24 sorear 4. $storage[$index]
21:24 jnthn fwiw, that's liable to change.
21:24 bkeeler 5. PROFIT!!!
21:25 sorear jnthn: "Opaque" kindof implies that
21:25 jnthn Aye.
21:25 jnthn I specifically meant in Rakudo though.
21:25 jnthn :-)
21:25 jnthn After R*, mind.
21:25 snarkyboojum joined #perl6
21:26 jnthn P6opaque today is basically a thin veneer on Parrot's Object / Class PMCs.
21:26 jnthn It's good enough for now.
21:26 jnthn But throws away too much stuff we statically know in Perl 6.
21:27 jnthn If I was starting from scratch, I'd not copy what Rakudo does today.
21:27 jnthn Attribute storage wants to be some first level, per-class structure
21:27 jnthn And that structure has the attributes
21:27 jnthn Most accesses can be done by offset
21:27 jnthn With a hash to offset as a fallback.
21:28 snarkyboojum guten morgen #perl6
21:28 jnthn dober utro
21:28 jnthn er, jutro? :-)
21:28 jnthn :-)
21:29 snarkyboojum dobro jutro jnthn :)
21:29 jnthn lol
21:29 jnthn Fail.
21:29 snarkyboojum definitely understood :)
21:34 jnthn Ouch. Trying to write an abstract for a Perl 6 talk to be given in *November* is hard!
21:37 snarkyboojum does that involve some crystal ball gazing?
21:37 jnthn Just a bit...
21:37 jnthn I guess it's going to really have to be...well...abstract. :-)
21:37 snarkyboojum :D
21:38 snarkyboojum is that the "November before Christmas"? :)
21:38 jnthn November before *this* Christmas. ;-)
21:38 snarkyboojum oh :| heh
21:40 rgrau joined #perl6
21:42 araujo joined #perl6
21:43 pmichaud joined #perl6
21:43 christine joined #perl6
21:43 jnthn pmich\o/d!
21:46 pmichaud good afternoon, #perl6
21:46 phenny pmichaud: 27 Mar 10:34Z <moritz_> tell pmichaud that I started the refactor_mob_generation branch of nqp-rx. It changes the actualy generation of a match object to a call to single constructor - which can easily be re-implemented in HLLs
21:46 phenny pmichaud: 27 Mar 10:35Z <moritz_> tell pmichaud the plan is to provide nqp-rx with a single typo object on which this constructor is called - though I don't know how that should be done (named param somewhere, dynamic variable, ...)
21:47 pmichaud hmmm.  I still think it should be the cursor that does it.
21:47 jnthn afternoon, Pm.
21:49 masak joined #perl6
21:49 masak ahoy, #perl6!
21:49 * masak is just stopping by before going to bed
21:49 bkeeler Heyas pmichaud !
21:49 jnthn ahej, masak!
21:49 masak if I understand this Russian blog post correctly http://onperl.ru/onperl/2010/03/for-vs-given.html -- given can't modify a string in $_ in Perl 5.10.
21:50 pmichaud hello, masak++
21:50 masak hi pmichaud++!
21:51 jnthn rakudo: my $foo = 'rofl harris'; given $foo { .=subst(/rofl/, 'rolf'; }; say $foo
21:51 masak rakudo: my $foo = 'rofl'; given $foo { s/fl/lf/; .=uc }; $foo.say
21:52 jnthn Locally it whines about $_ being readonly.
21:52 jnthn I'm not sure if that's a bug.
21:52 masak I thought the default setting was '<-> $_'
21:53 masak i.e. '-> $_ is rw'
21:53 jnthn probably is parcel rather than is rw
21:53 jnthn But yes
21:53 p6eval rakudo 8f7d29:  ( no output )
21:53 p6eval rakudo 8f7d29:  ( no output )
21:53 lue joined #perl6
21:53 jnthn Provided that applies to given, which I guess it should...
21:53 lue ololitsme o/
21:53 masak so...? submitarakudobug?
21:53 masak hi, lue! \o
21:53 jnthn yesithinkyoushouldindeeddothat.
21:54 * masak submitsarakudobughoworiginal
21:54 lue stringingwordstogetherisfun.ohhowimissdoingthis.
21:54 jnthn maybethechinesehaveapointthatspacesarepointless
21:55 bkeeler heya lue
21:55 masak yousaythatbutwaituntilyougetyourfirstchi​nesesentencethatcanbeparsedinseveralways :/
21:56 * masak .oO( hm... 'several ways', 'sever always'... )
21:56 jnthn jaghavenkassaapparat
21:56 masak *lol*
21:56 masak s/v/r/, but otherwise fine :)
21:56 lue It's a pain translating a string of katakana/hiragana when you can't see the spaces... (Wind Waker is a prime example :/)
21:57 lue rakudo: say 2 Z 3
21:57 jnthn masak: btw, I submitted some talks for NPW. :-)
21:57 masak nice!
21:57 jnthn 3 of them, so they have some choice.
21:57 masak ooh
21:57 jnthn Either that or I have a lot of slides to write... ;-)
21:58 masak 哈哈
21:58 lue rah-koo-dou seems to be failing :/
21:58 jnthn I'm currently trying to work out how on earth to write an abstract for a Perl 6 talk to be given in November.
21:58 jnthn Who knows what we'll have done by November!
21:59 masak assume that we made things work, and we'll have something to strive towards :P
21:59 p6eval rakudo 8f7d29:  ( no output )
21:59 lue finally!
21:59 lue erm...
21:59 masak p6eval is having a slow day, it seems.
21:59 lue rakudo: say "I work!"
21:59 p6eval rakudo 8f7d29:  ( no output )
22:00 lue *cough* someone broke say, it seems *cough*
22:00 jnthn rakudo: say " ( no output )"
22:00 p6eval rakudo 8f7d29:  ( no output )
22:00 jnthn wfm
22:00 lue ha ha :)
22:01 lue rakudo: say something
22:01 p6eval rakudo 8f7d29:  ( no output )
22:01 jnthn masak: OK, I'll write about how I'll do live demos of Rakudo running on multiple backends, with some awesome examples of parallemism, and an installer that has now also won the Nobel Prize for Physics, to make up for the confusion with the whole Peace Prize...
22:01 lue ...not even errors O.o
22:02 masak jnthn: :D
22:02 sorear Isn't it a bug that p6eval likes to nondeterministically say no ouput?
22:02 lue rakudo: die('with dignity!');
22:02 p6eval rakudo 8f7d29:  ( no output )
22:02 masak sorear: I don't see anything nondeterministic about it.
22:02 jnthn sorear: Akshually I think it's just kanckered.
22:02 jnthn *knackered
22:03 lue it's not nondeterminitsic, it's dumb coding :D
22:03 masak it hasn't given any output since I stepped in here a few minutes ago.
22:03 sorear jnthn: it should at least say $?139 or something
22:03 lue std: diagnose rakudo # please work please work please work
22:04 p6eval std 30229:  ( no output )
22:06 lue pugs: is still hanging in there # i hope
22:06 p6eval pugs: OUTPUT«*** No such subroutine: "&is"␤    at /tmp/MSF8tF2wdP line 1, column 1 - line 2, column 1␤»
22:07 lue alpha: is great # not
22:07 p6eval alpha 30e0ed:  ( no output )
22:07 lue /o\
22:07 * masak gently nudges lue to do something productive instead of spamming p6eval ;)
22:09 masak mberends: nice to hear you're working on proto. let me know if I can be of help/assistance/support somehow.
22:10 lue I am! But I has to update my own copy since p6eval isn't working :(
22:10 masak that's not bad in itself. you're meant to use your own copy rather than p6eval. :)
22:11 masak programming by bot is extremely inefficient.
22:11 lue I is trying to find rakudobugs that have been solved already. I don't need my own copy of rakudo :D
22:12 masak lue: oh! then we work a bit differently, it seems. I often try things out locally, and then just paste them here if they're interesting in some way.
22:12 masak less clutter that way.
22:13 masak it's not a hard-and-fast rule, mind you. but it helps to keep noise down.
22:14 lue Anyway, er... what year is this? Perl 8 has been finished, right?
22:14 masak oh, long ago.
22:14 masak in fact, it's closer to 2199 than 1999.
22:15 * masak lets that one sink in
22:15 pugssvn r30230 | bkeeler++ | A couple tweaks
22:15 lue OK. No wonder p6eval is broken. I thought is was 2010, but all the time-travelling lately...
22:15 masak bkeeler: by the way, you're my new hero too! that array interpolation stuff is dynamite!
22:16 lue Cool. I can stay here for a while. :)
22:17 bkeeler :)
22:17 masak well, that's it for tonight.
22:17 lue gnight o/
22:17 masak I'll be back with the usual inanities tomorrow.
22:17 jnthn o/
22:17 masak see you, peeps.
22:18 jnthn .oO( I think he missed an s back there... )
22:18 lue jnthn --fixspelling --target="masak" --2ndlastmessage # :)
22:20 sorear jnthn: Today's puzzle is Parrot_pmc_register
22:21 sorear I'm trying to implement tiebacks.  I've got all the association stuff worked out, except for the minor issue where the PMC side gets garbage collected
22:22 sorear I'm imagining I want something like - void Parrot_pmc_register(PARROT_INTERP, void *cookie, PMC *target);  void Parrot_pmc_unregister(PARROT_INTERP, void *cookie);  PMC *Parrot_pmc_get_registered(PARROT_INTERP, void *cookie);
22:23 jnthn I'm trying to remember the exact function name, but it may well have been renamed since I last used it.
22:23 jnthn I don't remember it having a kinda "cookie" though.
22:25 sorear It doesn't, that's the problem
22:25 jnthn Why does it need one?
22:26 sorear It doesn't.  I do.
22:26 lue should C<say 2 Z 3> come out 23?
22:26 lue rakudo: say 2 Z 3
22:27 jnthn lue: think so
22:27 sorear In order to hold references to arbitrary PMCs, I need a way to hold references to PMCs that doesn't assume ownership
22:27 sorear Parrot_pmc_register doesn't nest, so I can't use it on 3rd party PMCs
22:27 arnsholt Is there a list of what stuff I can save with nqp-rx's HLL::Grammar.O() somewhere?
22:28 jnthn arnsholt: No, but it's just a hash.
22:28 jnthn arnsholt: You can stick what you like in it.
22:28 arnsholt Wrong question I suppose. Which arguments does the operator precedence parser work with?
22:28 jnthn sorear: Yeah, I was just looking at how it's implemented...I thought it kept a kinda count of how many registrations and decrement it...
22:28 jnthn sorear: But it doesn't. :-/
22:29 jnthn sorear: OTOH, it is just a hash table
22:29 p6eval rakudo 8f7d29:  ( no output )
22:29 jnthn sorear: Currently it just sticks a null PMC in there.
22:29 arnsholt I know there's :assoc and :prec, but I was curious what else there might be
22:29 jaldhar joined #perl6
22:29 bkeeler I think there's :chain or similar
22:30 jnthn sorear: So I guess it's patchable...
22:30 jnthn sorear: If not, you may just have to invent your own, but since it's essentially a hash...
22:30 jaldhar joined #perl6
22:31 jnthn arnsholt: Those two but iirc also :nextterm and :reducecheck
22:32 * arnsholt goes digging in the code
22:37 pmichaud operator precedence parser uses :assoc and :prec, iirc
22:38 jnthn pmichaud: Does it trigger the reducecheck, or is that something else?
22:38 pmichaud yes, opp triggers reducecheck when reducing a node
22:38 jnthn OK
22:38 * jnthn has been reading that area of the code and trying to grok it. :-)
22:39 pmichaud :assoc, :prec, and :uassoc
22:39 pmichaud and :reducecheck
22:42 arnsholt :uassoc is for unassociative operators?
22:43 pmichaud unary, I think
22:44 arnsholt Right. That makes sense
22:48 ruoso joined #perl6
22:49 sundar joined #perl6
22:56 arnsholt :assoc<list> is the same as unassociative I suppose?
22:56 lue .oO(under S03/List Infix Precedence: "($a[0] min $b[0], $a[1] max $b[1])". Someone's P5 muscle memory acted up)
22:56 lue .oO(fixing...)
22:58 ash_ thats not wrong... per say
22:59 lue before that @a and @b are "defined", and so it's natural they are linked together.
23:00 ash_ ah, well in that case ya
23:00 sorear jnthn: I'm not sure how to invent my own.  The basic version is privleged - I have nothing like interp->gc->registry to use
23:04 jnthn sorear: iiuc it's not so special though
23:04 jnthn sorear: So long as your hash that you're storing PMCs and counts in is itself marked, all the things in it will be marked for as long as they're in the hash.
23:05 jnthn I guess your P5Interpreter PMC can just hold it, since I'd imagine that's going to stay around.
23:07 pugssvn r30231 | lue++ | [docs/Perl6/Spec] Fixed a P5 muscle-memory error
23:08 pmichaud :assoc<list> means that the operator takes a variable number of operands
23:09 jnthn e.g. @a Z @b Z @c is invoked as infix:<Z>(@a, @b, @c)
23:09 arnsholt Ah, right. Not the same
23:09 pmichaud unassociative is :assoc<none>, iirc
23:10 pmichaud or perhaps that's  non-associative, and :assoc<non>.  See STD.pm.
23:10 arnsholt Mmm. Good idea
23:12 pmichaud constant %structural      = (:dba('structural infix'), :prec<n=>, :assoc<non>, :diffy);
23:13 arnsholt Yeah, I was looking at that same line of code meself =)
23:14 pugssvn r30232 | bkeeler++ | few more variable interpolation tests
23:17 pmichaud afk, fetching dinner
23:20 colomon joined #perl6
23:36 lue belated hello colomon o/
23:36 colomon o/
23:36 colomon gaming now.  ;)
23:39 lue eating & watching Phoenix Wright YouTube videos, not much time spent on this window :)
23:42 jnthn Gotta sleep. Meeting tomorrow morning. Thankfully, not a terrifyingly early one, so I might actually be useful in it.
23:42 jnthn o/
23:42 lue o/
23:47 colomon o/
23:48 lue .oO(if you're too useful, then you'll seem ready for action and be given all the work...)
23:49 sorear jnthn: chromatic says registration is actually reference counted with magic overrides from AddrRegistry
23:49 sorear cleverness--
23:58 astrojp joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs