»ö« 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.
tadzik offby1: on the eqv note, I have no idea :) 00:00
00:00 felineiron is now known as f00li5h, [Coke] joined 00:01 envi joined
offby1 ah well! 00:04
another day's troublemaking.
00:06 [Coke] left 00:07 [Coke] joined
tadzik jnthn: sorry, but I can't find any docs on that. How does nqp treat named params, like :foo<bar>, accepts a slurpy hash? 00:10
I stumbled upon that when trying to determine what has actually been passed to the function. It can't be just an array of Pairs, for nqp doesn't know about Pair 00:11
jnthn tadzik: It just compiles down to a named parameter call 00:12
tadzik: At PIR level
tadzik which makes me wonder whether we'll need a special case of add_constant
00:12 [Coke] left
jnthn Maybe 00:12
Or extract the new_type part of it
And add a *%args 00:13
tadzik jnthn: okay, but in case in which we're passing a named params to our add_constant. We can do foo([:a<b>, :c<d>])
but then we need to something in sort of @values[0].WHAT in nqp
jnthn tadzik: Yes, I'm suggesting you pass named params
No, use a slurpy hash
tadzik as an alternative to slurpy array?
jnthn or use hash(a => $obj, b => $obj) and pass a hash
00:13 [Coke] joined
jnthn Well, new_type needs both 00:13
tadzik okay
jnthn But it takes a slurpy array at the moemnt 00:14
tadzik but, at the same time?
jnthn So may as well give it a slurpy hash too
sure
Then we keep it nice and general
tadzik mhm
I see
jnthn it's used for Rat.new(1,2) today
So we can't break that case
tadzik nqp: sub foo(*@a, *%b) { say %b<foo> }; foo(:foo<bar>); 00:15
p6eval nqp: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'foo' pc 242 ((file unknown):61850768)␤»
tadzik what's wrong? 00:16
jnthn er...wow :/ 00:17
tadzik hmm
jnthn wtf.
tadzik it's ok, say(), not say
00:17 franek joined
tadzik LTA error though 00:17
jnthn oh
nqp: sub foo(*@a, *%b) { say(%b<foo>) }; foo(:foo<bar>);
p6eval nqp: OUTPUT«bar␤»
tadzik so I'm extendind add_constant with a slurpy hash, and then I'll process positional, then named 00:18
jnthn well, it already processes positional, so you just add named :)
tadzik yep :)
jnthn Isn't it 2am there? ;-) 00:20
tadzik it is :)
00:20 franek left
tadzik But now you're in range :P 00:20
00:20 dorlamm left
jnthn :) 00:21
tadzik and my report is due to tuesday, you know :)
. o O ( Insomnia considered useful )
00:22 [Coke] left
tadzik okay, I did it, and it didn't even break the spectest :) 00:23
00:24 [Coke] joined
tadzik so now it's quite easy. The PAST of the arguments is produced inside add_constant, with get_object_sc_ref_past(). I assume this won't work for Pod::Nodes, but should be fine for the rest of the things 00:24
and since add_constant returns a past, I can feed that past into another new_type kind of add_constant, right? 00:25
jnthn tadzik: Well, really you want the actual object when you call new_type 00:26
So $what_add_constant_returned<compile_time_value>
tadzik hmm 00:27
jnthn And yes, if you add your Pod::Nodes instances to the SC you can have those reference each other too
I guess you need to do that to build up the tree
tadzik yes 00:28
jnthn tadzik: See code for Rat handling in dec_number 00:29
00:29 cooper left
tadzik oh, good 00:30
yay, I think I get all it :)
just poking you one more time: Each of my action methods will return a past created by add_constant. Now the upper ones will just pass $children<compile_time_value> to their add_constant()s, and this gets upper... if you know what I mean :) 00:32
00:32 [Coke] left, Qiang joined
jnthn tadzik: Sounds right 00:32
tadzik: You just then also need a :my @*POD_BLOCKS array to push the top level things on to, I guess
tadzik exciting is that once I understand all this, I'll be the second person who understands this :P
jnthn: yeah, I think so
jnthn And then in comp_unit you can do
00:33 Chillance joined
jnthn $*ST.add_constant('List', 'type_new', |@*POD_BLOCK_COMPILE_TIME_VALUES) or some such 00:33
00:33 [Coke] joined
tadzik yeah, that looks right 00:33
jnthn or just phush the compile time values into @*POD_BLOCK
tadzik then I need to register that topmost constant as $*POD or so 00:34
or maybe just $POD
jnthn: or, I can work out a method which takes an object and, with a depth-first algorithm serializes it all. Would it be worthwhile? 00:35
jnthn Well, that'[s what I need to do for implementing full-blown serialization 00:36
So, I'd just do it the "easy way" for now :)
You can use $*ST.install_lexical_symbol($*UNIT, ... ) to install it
Isn't it @?POD or some such?
tadzik $=POD, should be. But... 00:37
jnthn has no idea really :)
tadzik rakudo: $=POD
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$=POD"␤»
tadzik oh, whatever
jnthn std: $=POD
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
tadzik it thinks it's $ = POD()
:)
jnthn nom: $=POD
p6eval nom: OUTPUT«Non-declarative sigil is missing its name at line 1, near "$=POD"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
jnthn tadzik: I bet we're just missing token twigil:sym<=> { <sym> } 00:38
00:38 [Coke] left
tadzik mebbe 00:38
I'll first put $POD in place
00:40 [Coke] joined 00:42 Qiang left
TimToady phenny: tell masak just noticed that both multi fibs are missing a right paren 00:53
phenny TimToady: I'll pass that on when masak is around.
01:01 cxreg joined
tadzik jnthn: sorry to bother you again, but I can't seem to be able to build list or anything in Actions.pm. I 01:02
'm trying my $pod := $*ST.add_constant('Array', 'type_new', $*POD_BLOCKS);, I tried 'List' too, and i get "Could not locate compile-time value for symbol Array" 01:03
01:03 [Coke] left
jnthn tadzik: odd 01:04
01:04 wolfman2000 left
jnthn tadzik: Where are you putting this cal? 01:04
*call
01:04 cooper joined, Chillance left
tadzik just after my $mainline := $<statementlist>.ast; 01:04
part of a patch: wklej.org/id/556883/ 01:05
01:05 Chillance joined, [Coke] joined 01:06 Chillance left
jnthn tadzik: oh... 01:06
tadzik: Yeah, I see what's going on 01:07
comp_unit is popping the setting in the grammar, before calling the action 01:08
$*ST.pop_lexpad(); # UNIT_OUTER
tadzik oh
jnthn Unlucky :)
Well, you could always stick the S*ST calls in Grammar.pm :) 01:09
Or add a <.install_pod> or some such
tadzik maybe that's why there are so many of them here :)
but I need this whole bunch of action methods before I add_constant 01:10
01:10 cognominal left
jnthn tadzik: That's fine 01:10
01:10 [Coke] left
jnthn tadzik: You add it *after* statementlist 01:10
But before the pop
tadzik oh, ok
jnthn *pos
*pops
gah, typing is hard :)
tadzik oh, but... ah, I'll just try 01:11
01:12 cognominal joined, [Coke] joined 01:17 wolfman2000 joined 01:19 JimmyZ joined
dalek kudo/nom: 9928a0d | jonathan++ | src/Perl6/ (3 files):
First cut at constant. Only handles simple cases so far (e.g. literal on the RHS, and non-twigil variable or identifier with our/my scope).
01:26
01:28 Chillance joined
jnthn if anyone fancies re-fudging S04-declarations/constant.t that'd be great. 01:28
tadzik yay, segfault :)
running through gdb
jnthn tadzik: I assume that you actually are flattening the POD block array you pass to add_constant, BTW? 01:29
tadzik em
jnthn You weren't in the code you pasted
tadzik ^C
thanks jnthn :)
jnthn :)
tadzik that's ok, it 01:31
's still segfaulting :)
and it's not under gdb. Great 01:34
01:41 woosley joined 01:42 fhelmberger_ joined 01:43 fhelmberger left
tadzik jnthn: $*POD_PAST := $*ST.add_constant(bla, bla); $*ST.install_lexical_symbol($*UNIT, '$POD', $*POD_PAST); -- would that be correct? 01:44
jnthn You need $*POS_PAST<compile_time_value) when calling install_lexical_symbol 01:45
tadzik thank you
01:49 daniel-s joined
tadzik > say $POD.perl 01:51
().list
close enough :)
I can now go to sleep hoping I won't forget everything I learned today 01:52
jnthn \o/ 01:55
tadzik++
tadzik now everything will be easy. I can create an empty List, then I can create a full Pod__Block too :P 01:56
I hope :)
jnthn :D
jnthn -> sightseeing 01:57
tadzik zsh: segmentation fault ./perl6 t/spec/S12-class/self-inheritance.t 01:58
that's the downside :)
jnthn: have fun!
tadzik -> sleeping
02:19 JimmyZ left 02:21 cognominal left 02:27 cbk joined 02:55 envi left
soh_cah_toa does perl6 still have special variables like $| and $/ etc? in particular, i'm looking for $^O. i can't seem to find any docs on this 02:56
02:57 envi joined
soh_cah_toa oh wait, it's in S28. how did i miss that? :/ 02:58
03:01 perlhack joined
soh_cah_toa although $*OSNAME does not seem to contain anything 03:02
perlhack i'm back.... 03:03
03:05 JimmyZ joined
perlhack JimmyZ:yw 03:06
:-) what are you doing? 03:12
03:14 perlhack left, perlhack joined 03:24 Su-Shee_ joined 03:27 JimmyZ left, Su-Shee left
soh_cah_toa is it possible to define a sub at compile time inside a BEGIN block and call it at runtime? i'm trying to but i'm getting an error. i'm just wondering if there's some new p6 way for this 03:31
TimToady more likely to work in nom or niecza than in rakudo 03:35
soh_cah_toa ok
TimToady but why do you need BEGIN when sub defs already happen at compile time? 03:36
soh_cah_toa oh really? did not know that
TimToady perl6: sub foo { say "bar" }; BEGIN foo
p6eval niecza v7-11-g9ba8284: OUTPUT«bar␤» 03:37
..rakudo 72d158: OUTPUT«===SORRY!===␤Could not find sub &foo␤»
..pugs: OUTPUT«*** No such subroutine: "&BEGIN"␤ at /tmp/rbhXRQGRL_ line 1, column 24 - line 2, column 1␤»
TimToady perl6: sub foo { say "bar" }; BEGIN { foo }
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Could not find sub &foo␤»
..pugs, niecza v7-11-g9ba8284: OUTPUT«bar␤»
TimToady nom: sub foo { say "bar" }; BEGIN { foo }
p6eval nom: OUTPUT«Could not find sub &foo␤current instr.: '_block1005' pc 5 ((file unknown):29994341)␤»
TimToady looks like nom still has issues there too 03:38
probably just losing track of the lexical scope
anyway, pugs and niecza have it right, though pugs doesn't know about curly-less BEGIN 03:39
soh_cah_toa ok, i'll see if i can work around it
TimToady nom: our sub foo { say "bar" }; BEGIN { foo } 03:40
p6eval nom: OUTPUT«Could not find sub &foo␤current instr.: '_block1005' pc 5 ((file unknown):41362637)␤»
TimToady nom: our sub foo { say "bar" }; BEGIN { OUR::foo }
p6eval nom: OUTPUT«Could not find sub &die␤current instr.: '_block1005' pc 27 ((file unknown):67993283)␤»
TimToady nom: our sub foo { say "bar" }; BEGIN { MAIN::foo } 03:41
p6eval nom: OUTPUT«Could not find sub &die␤current instr.: '_block1005' pc 27 ((file unknown):57069251)␤»
TimToady nom: say $?PACKAGE
p6eval nom: OUTPUT«No method cache and no find_method method in meta-object␤current instr.: 'say' pc 282016 (src/gen/CORE.setting.pir:0) (:2586)␤»
TimToady nom: sub foo { say "bar" }; BEGIN { UNIT::foo } 03:42
p6eval nom: OUTPUT«Could not find sub &die␤current instr.: '_block1005' pc 27 ((file unknown):19)␤»
03:42 JimmyZ joined
TimToady ah well 03:42
soh_cah_toa that's alright :) 03:43
03:43 kaare_ joined
perlhack that's alright :-) 03:49
03:50 Trashlord left 04:04 Eevee left
TimToady sleep & 04:04
perlhack :-) 04:05
04:06 Eevee_ joined 04:12 Sarten-X left 04:18 Sarten-X joined 04:19 Bzek joined
JimmyZ BJPW videos was uploaded, v.ku6.com/playlist/index_4350502.html 04:28
Please tell me if it cann't be visited 04:30
04:57 Eevee_ is now known as Eevee
jnthn TimToady: I've got the "run in correct context" for BEGIN time stuff stubbed, just didn't actually finish that up yet. nom will handle BEGIN much better than master, anyways. 05:13
05:19 birdwindupbird joined 05:20 koban joined 05:24 birdwindupbird left 05:25 birdwindupbird joined, daniel-s left 05:37 perlhack left 05:54 wamba joined 06:05 wamba left
jnthn nom:P say +Any 06:10
nom: say +Any
p6eval nom: OUTPUT«Method 'Numeric' not found for invocant of class 'Any'␤current instr.: 'prefix:<+>' pc 272899 (src/gen/CORE.setting.pir:67157) (:726)␤»
06:10 soh_cah_toa left
jnthn perl6: say +Any 06:11
p6eval rakudo 72d158: OUTPUT«Use of uninitialized value in numeric context in 'Any::Numeric' at line 1498:src/gen/core.pm␤0␤»
..pugs, niecza v7-11-g9ba8284: OUTPUT«0␤»
06:17 Su-Shee_ is now known as Su-Shee 06:22 Vlavv left
moritz good morning 06:26
jnthn morning, moritz 06:28
moritz $ ./perl6 t/spec/S02-builtin_data_types/parsing-bool.t 06:30
Object of type 'Bool' cannot be referenced without having been assigned a serialization context
that looks like a regression 06:31
jnthn I'm mostly confused why that test keeps getting added back
It's never passed for me.
moritz oh
jnthn It ended up uncommented in spectest.data once before but failed for me too.
06:32 wtw joined
jnthn I highly doubt it's going to work until I actually do enums :) 06:32
moritz I'll comment it out again
jnthn Thanks 06:33
I plan to look at enums in the near future
Since a lot of things want Bool::True and Bool::False
06:33 Vlavv joined 06:34 drbean left
dalek ast: a58918d | moritz++ | S02-literals/misc-interpolation.t:
fudge misc-interpolation.t for nom
06:36
jnthn moritz: If you have time for a couple of test twiddles today: constant.t (S04-declarator) could bere-fudged. We never ran it in master.
afaik
moritz: Also, imo binding-attributes.t is wrong in thinking that public attrs through the accessor can be bound 06:37
They can't; only $!foo form can
moritz makes sense
jnthn I suspect that one passes if we toss the public binding tests.
Another win over master - that file ain't even in spectest.data :)
dalek kudo/nom: c4d4a74 | moritz++ | t/spectest.data:
run three more spectest files, remove one that never passed
06:38
ast: 6c80155 | jonathan++ | S03-operators/equality.t:
Untodo 3 tests that nom handles that master didn't.
06:39
ast: d294b31 | jonathan++ | S12-methods/submethods.t:
Correct a test that made a bad assumption about attribute inheritance.
kudo/nom: 0562684 | jonathan++ | src/core/IO.pm:
Get print and say to use $*OUT; add note which uses $*ERR.
kudo/nom: d586e07 | jonathan++ | src/core/Mu.pm:
Add warning to use of uninitialized value in string context, and make uninitialized value in numeric context warn and give back 0.
kudo/nom: 34c2983 | jonathan++ | t/spectest.data:
We now pass S03-operators/equality.t.
ast: 092ab84 | moritz++ | S03-operators/binding-attributes.t:
fudge binding-attributes.t for nom
06:45
kudo/nom: 23f5fbd | jonathan++ | LHF.markdown:
Add a LHF.
06:46
jnthn nom: (1 + 2i) ~~ (1 + 2i)
p6eval nom: OUTPUT«maximum recursion depth exceeded␤current instr.: 'Numeric' pc 300357 (src/gen/CORE.setting.pir:81212) (:710)␤»
jnthn ew :)
dalek kudo/nom: 157e4f8 | jonathan++ | LHF.markdown:
Another (hopefully) LHF.
06:49
moritz I think that's LHF indeed 06:52
perl6: say (1 + 0i) == 1 06:54
p6eval rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«Bool::True␤»
..pugs: OUTPUT«1␤»
dalek kudo/nom: abd6769 | moritz++ | t/spectest.data:
we pass a (highly fudged) binding-attributes.t
06:56
kudo/nom: 8b36d09 | moritz++ | / (3 files):
infix == for Complex, wins us back any-complex.t. jnthn++
06:59
kudo/nom: 78388ab | moritz++ | t/spectest.data:
run constant.t
07:05
moritz jnthn++
evalbot rebuild nom
p6eval OK (started asyncronously)
jnthn moritz: I'm guessing constant.t had to be fudged a good bit? 07:06
moritz jnthn: yes
jnthn: it doesn't like all literals (example: lists and hashes) 07:07
jnthn They're not really literal enough :)
moritz :-)
jnthn tries to improve the state of Bool without doing enums
moritz turns out I can't use 1i in the setting 07:08
so I can't write constant i = 1i; either 07:09
jnthn nom: constant i = 1i;
p6eval nom: ( no output )
jnthn nom: constant i = 1i; say i
p6eval nom: OUTPUT«0 + 1i␤»
mathw o/
jnthn oh
in the setting
right
o/ mathw
moritz it complains about missing infix:<~>
07:09 birdwindupbird left 07:10 birdwindupbird joined
mathw Semi-random query: does nom allow (or does it provide the basis for allowing) the Setting to be made as individual files which don't have to be concatenated together and compiled in one huge memory-guzzling multicore-unfriendly lump? 07:10
jnthn mathw: no 07:11
mathw: Rather, we plan to make compiling CORE.setting be less of a headache :)
moritz mathw: it's still a big, concatenated file, but it's not quite as memory hungry as it was before
mathw okay
jnthn mathw: Match and Cursor objects are already a bunch lighter in terms of memory
moritz nom: constant e = 2.71828183e0; say e
p6eval nom: OUTPUT«2.71828183␤»
jnthn PAST nodes are going to get 3 times lighter in terms of GCables. 07:12
mathw nice
I've been following the performance wins, it's very exciting
jnthn So I'm hopeful we'll get to the point where compiling it as one big file ain't painful any more.
mathw that'll do 07:13
jnthn aha, seems I can get us to *really* pass parsing-bool.t at last :)
nom: say Bool::True
p6eval nom: OUTPUT«Object of type 'Bool' cannot be referenced without having been assigned a serialization context␤current instr.: 'nqp;HLL;Compiler;SerializationContextBuilder;get_object_sc_ref_past' pc 45261 (src/stage2/gen/NQPHLL.pir:15581)␤»
jnthn That works locally
dalek kudo/nom: add464b | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Fix Bool up a bit more; now Bool::True, Bool::False, True and False can all be mentioned.
07:18
kudo/nom: 2ddc07d | jonathan++ | t/spectest.data:
Now we *really* pass parsing-bool.t. :-)
moritz :-) 07:19
jnthn I bet we get a few spectests back from this 07:20
moritz I'm running update_passing_test_files now
jnthn excellent
dalek kudo/nom: b2b27f6 | jonathan++ | NOMMAP.markdown:
Few nommap updates.
07:23
07:26 mj41 joined 07:29 ab5tract joined 07:31 Eevee left 07:50 daniel-s joined 07:54 birdwindupbird left, birdwindupbird joined 07:55 donri left
dalek kudo/nom: edef5dc | moritz++ | src/core/Num.pm:
add pi and e constants
07:59
kudo/nom: 11972a9 | moritz++ | t/spectest.data:
3 more passing test files
kudo/nom: 179d411 | moritz++ | / (2 files):
implement Int.Rat, pass unpolar.t
jnthn moritz: (pi and e constants) suggest my constant ... - this is the setting, and constant defaults to our-scoped. 08:04
moritz jnthn: right, will fix 08:05
jnthn moritz: Did you push re-fudged constant.t? 08:09
dalek kudo/nom: dff16a7 | jonathan++ | / (3 files):
Add Whatever.pm with an ACCEPTS that accepts everything, plus its own new.
08:10
kudo/nom: 362947a | jonathan++ | src/core/Mu.pm:
Turn new into a multi. Add a candidate that dies if you try to give positional arguments. Update bless so it can take * as an initial parameter and create a candidate; inline this rather than calling .CREATE and use it in .new, thus saving a method invocation per .new call.
moritz nom: say log(1 + 2i) 08:28
p6eval nom: OUTPUT«0.80471895621705 + 1.10714871779409i␤»
08:30 drbean joined 08:34 wamba joined 08:35 kst` joined 08:37 stepnem_ joined, satyavvd joined 08:38 BinGOs_ joined 08:40 dakkar joined
dalek kudo/nom: 3cae1b4 | moritz++ | src/core/Num.pm:
constants should be "my", jnthn++
08:42
kudo/nom: c14785b | moritz++ | / (2 files):
make log.t pass again
08:43 kst left, stepnem left, dju left, stepnem_ is now known as stepnem, BinGOs_ is now known as BinGOs, BinGOs left, BinGOs joined
daniel-s is a little confused 08:43
when you're creating a class with a non-default constructor 08:44
does the constructor have to be called BUILD
or is it any method that returns a self.bless()
or rather, returns an object using that method
moritz BUILD is not a constructor 08:45
BUILD is automatically by (I think) bless
perlgeek.de/blog-en/perl-6/object-c...ation.html 08:46
jnthn By BUILDALL
daniel-s thanks, moritz++
08:47 agentzh joined 08:48 daxim joined
dalek ast: b35368d | moritz++ | S04-declarations/constant.t:
fduge constant.t for rakudo
08:53
ast: 217021a | moritz++ | S02-builtin_data_types/num.t:
fudge num.t for rakudo
ast: 4a43fe3 | moritz++ | S (5 files):
random rakudo unfudges
daniel-s how do multi-dimensional arrays work in perl6 08:55
I don't think I've seen any documentation for that
eg. in Java, a 10 by 10 grid could be created using "int[][] grid = new int[10][10];" 08:56
I find it difficult to put arrays inside arrays in perl 08:57
dalek kudo/nom: a2aea3d | moritz++ | t/spectest.data:
pass num.t
daniel-s because they just get turned into one long array
08:57 birdwindupbird left 08:58 birdwindupbird joined
jnthn (arrays inside arrays) how are you trying to do it? 08:59
nom: my @x = [1,2,3], [4,5,6]; say @x[1][1]
p6eval nom: OUTPUT«5␤»
arnsholt daniel-s: The parens for list construction have some fiddly semantics, like auto-flattening 09:01
(Which I'm guessing is how you tried to make a 2D array)
09:02 pnu left 09:03 birdwindupbird left 09:04 birdwindupbird joined 09:05 pnu joined
dalek ast: 2a3437e | moritz++ | S32-str/uc.t:
fudge uc.t for rakudo
09:05
daniel-s nom: my @a = [1,2,3], [4,5,6]; say @a[1][1]; 09:06
p6eval nom: OUTPUT«5␤»
daniel-s my @a = (1,2,3), (4,5,6); say @a[1][1];
nom: my @a = (1,2,3), (4,5,6); say @a[1][1]; 09:07
p6eval nom: OUTPUT«.[1] out of range for type 2␤current instr.: 'rethrow' pc 334635 (src/gen/CORE.setting.pir:95721) (:3118)␤»
daniel-s I was using round brackets
dalek ast: 8b36d58 | moritz++ | S32-str/lc.t:
fudge lc.t for rakudo
tadzik good morning #perl6 09:13
jnthn morning, tadzik
moritz \o 09:14
dalek kudo/nom: 1f421d3 | moritz++ | t/spectest.data:
more passing tests
moritz tadzik: FYI I will be travelling from Tuesday to Sunday. I exepct to have OK-ish internet from Wednesday to Saturday; if not, and during the commute days, I'll defer you to jnthn++ and masak++ 09:15
tadzik moritz: okay, have fun :) 09:17
moritz tadzik: you too :-)
tadzik oh I have :)
have you see $POD working
?
moritz tadzik: no, which branch is that?
tadzik moritz: podparser, but not pushed. Still has some funny issues, as in random segfaults and so ;) 09:18
moritz tadzik: ah, no wonder I didn't see it :-)
tadzik moritz: so far I can create a List in compile time, and expose it to runtime
now I only have to fill it with data :)
moritz tadzik: I did backlog and see that you've made some progress...
tadzik aye :) 09:19
exciting times
moritz tadzik: if you push your changes (even if not perfect), others might be able to help you
so, push early, push often
tadzik I will
jnthn: 5:20 PM in Beijing, right?
jnthn tadzik: yes 09:20
09:21 woosley left
jnthn for me, S06-signature\unspecified.rakudo has TODO passed: 15 09:22
Anyone else got that?
moritz yes
09:23 birdwindupbird left, birdwindupbird joined
dalek kudo/podparser: e44bddd | tadzik++ | src/Perl6/SymbolTable.pm:
[SymbolTable] Allow named parameters to type_new in add_constant()
09:26
kudo/podparser: 836c553 | tadzik++ | src/Perl6/ (2 files):
Install $POD into the $*UNIT scope as an List (empty so far)
tadzik oh, chromatic++ is optimizing Parrot again :) 09:29
09:29 envi left
moritz indeed :-) 09:29
jnthn Wow, we're around 2000 tests again :) 09:31
09:34 envi joined
tadzik the podparser branch segfaults on t/spec/S12-class/self-inheritance.t 09:35
I'll look into that in a second
dalek kudo/nom: a0d429e | jonathan++ | src/ (3 files):
First cut of support for automatically calling BUILD and initializing public attributes based on named arguments to .new/.bless. Doesn't yet handle default values or auto-vivifying type objects.
09:37
tadzik moritz: btw, the Exception case won't work for me, for I'll have a class Block {}, and that (so far) conflicts with the toplevel Block class. I've added it to NOMMAP for jnthn++ 09:39
moritz nom: my namespace Pod { class Block { } }; say Pod::Block 09:40
p6eval nom: OUTPUT«Malformed my at line 1, near "namespace "␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
moritz nom: my package Pod { class Block { } }; say Pod::Block
p6eval nom: OUTPUT«Illegal redeclaration of class 'Block' at line 1, near "{ } }; say"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
moritz tadzik: ok, I'm convinced :-)
dalek ast: 8bb65b5 | moritz++ | S29-conversions/ord_and_chr.t:
correct ord_and_chr.t (precedence, calling positionals by name), and fudge for rakudo
09:41
ast: 6bb9d97 | moritz++ | S32-array/kv.t:
start to fudge kv.t for rakudo. Not runnable yet
09:43
09:45 Trashlord joined 09:48 birdwindupbird left, birdwindupbird joined, sftp left
jnthn heh 09:49
S12-attributes/undeclared.t fails to compile now 09:50
Because nom detects the failure at compile time rather than runtime :)
moritz so it needs to be eval_dies_ok
09:51 sftp joined
moritz should I fix that? 09:52
rakudo: my @a; say @a ~~ Positional 09:56
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
moritz nom: my @a; say @a ~~ Positional 09:57
p6eval nom: OUTPUT«Bool::True␤»
moritz nom: sub push(@a, *@args) {@a.push: @args }; push my @a, 1
p6eval nom: ( no output )
moritz nom: sub push(@a, *@args) {@a.push: @args }; push my @a, 1; say @a
p6eval nom: OUTPUT«1␤»
moritz nom: proto sub push(|$) {*}; multi sub push(@a, *@elems) { @a.push: @elems }; push my @a, 1; say @a 09:58
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'push'. Available candidates are:␤:(Positional @a, Positional @elems)␤␤current instr.: 'push' pc 454 ((file unknown):162) (:1)␤»
moritz jnthn: that looks a bit botched up
work for single dispatch, but not for multi
also Positional @a in the signature is RONG 09:59
10:02 wamba left
jnthn Signature.perl is gnerally RONG 10:04
Not sure why the multi dispatch is failing though 10:05
dalek ast: d417a87 | jonathan++ | S12-class/lexical.t:
Update a test for latest stringification semantics.
10:07
tadzik funny t/spec/S12-class/self-inheritance.t, stopped segfaulting after nom merge 10:08
jnthn Heisenbug :/
dalek kudo/nom: 478a82d | jonathan++ | t/spectest.data:
Two more passing test files.
kudo/podparser: 7bec705 | tadzik++ | / (25 files):
Merge branch 'nom' into podparser
10:09
10:14 am0c joined 10:18 masak joined
masak ahhai. 10:19
phenny masak: 03 Jul 23:59Z <lue> tell masak in your 26 June post, the last two code examples are missing a ) on the last line.
masak: 00:53Z <TimToady> tell masak just noticed that both multi fibs are missing a right paren
masak thanks, both of you :)
will fix when I get home.
people, I came here to say that this 'nom' thing is really big. people know that Perl 6 is the underdog, and they'd love for it to succeed. 10:20
so let's make the Rakudo nom release a splash. it might yield a bigger response than Star.
just think about that :)
jnthn Success means hard work :) 10:21
er
10:21 birdwindupbird left
jnthn comes from hard work :) 10:21
moritz masak: right, there's a lot of things in LHF.markdown. Your patches are very welcome! :-)
jnthn masak: I suspect the big splash will want to come when we land the optimizer. 10:22
10:22 _twitch joined
masak moritz: I want to contribute. but I also want to finish the June blogging properly. 10:22
most of my tuits are going there currently.
jnthn masak: Plus the fact that by then we'll have had chance for the nom fallout to settle :) 10:23
masak jnthn: right. we have to be careful to point out that the optimizer is coming a bit after nom lands.
jnthn (which, yes, should be less than the alpha => ng fallout...)
masak jnthn: maybe even undersell nom and wait with the splash till the optimizer lands.
jnthn masak: I'd say so.
masak jnthn: you keep saying that :)
jnthn masak: btw, today an alpha but not ng feature returned :) 10:24
nom: constant answer = 42; say answer
p6eval nom: OUTPUT«42␤»
masak \o/ 10:25
10:25 donri joined
masak when nom lands, I can retroactively change some of my June blog posts. 10:25
jnthn makes nom null pmc access 10:27
That's...not common these days :)
moritz but not too hard either
just trigger some action method that hasn't been nomified yet
jnthn oh, yes 10:30
that'll do it :)
10:36 mj41 left
flussence nom: say qx(echo "G'morning, #perl6!"); # :) 10:36
p6eval nom: OUTPUT«Could not find sub &echo␤current instr.: '_block1002' pc 75 ((file unknown):86780934) (:1)␤»
flussence (well, I wasn't expecting *that*...) 10:37
rakudo: say qx(echo "doesn't qx autoquote?")
p6eval rakudo 72d158: OUTPUT«Could not find sub &echo␤ in main program body at line 22:/tmp/5FS9ViUyrF␤»
flussence oh, just me then
10:38 birdwindupbird joined
masak I'm so proud that perlhack is using the greetings I gave him when he enters the channel :) 10:41
jnthn I hope they weren't rude ones :P
dalek kudo/nom: a0c28ce | jonathan++ | src/ (3 files):
First cut of defaults for attributes. Still to do is only to do this to untouched attributes.
10:42
kudo/nom: abdcbc3 | jonathan++ | src/Perl6/Actions.pm:
Fix attributes refering to others in default value.
10:48 awoodland joined
masak rude greetings? in #perl6? :) 10:51
jnthn It's kinda too nice for them here, I guess :) 10:52
masak .oO( "it's an affectionate term for 'female dogs'! surely you know that!" ) 10:54
jnthn yo dawg, I heard you like being greeted
Su-Shee YOH BITCHES WAZZ UP? ;)
10:55 Mowah joined 10:56 Trashlord left
masak Su-Shee: it's "whoz op" :P 10:56
Su-Shee damn, I failed the ghetto slang exam.. ;) 10:57
dalek ast: c850dd5 | jonathan++ | S12-attributes/inheritance.t:
Fully unfudge S12-attributes/inheritance.t; nom gets attribute access correct.
10:58 am0c left, am0c joined
dalek kudo/nom: 91077bf | jonathan++ | src/core/Mu.pm:
Implement $obj.Parent::bar().
10:59
kudo/nom: 2302959 | jonathan++ | t/spectest.data:
We now fully (unlike master) pass S12-attributes/inheritance.t.
kudo/nom: 4dd86c6 | jonathan++ | NOMMAP.markdown:
Update nommap.
tadzik hey, I won't merge nom every 5 minutes! :P 11:02
11:02 mj41 joined
jnthn nom: say 1 === 1 11:04
p6eval nom: OUTPUT«Bool::True␤»
jnthn nom: say [===] 1, 2
p6eval nom: OUTPUT«invoke() not implemented in class 'Failure'␤current instr.: '_block1002' pc 104 ((file unknown):28114338) (:1)␤»
jnthn nom: say [==] 1, 2
p6eval nom: OUTPUT«invoke() not implemented in class 'Failure'␤current instr.: '_block1002' pc 104 ((file unknown):30141858) (:1)␤»
jnthn nom: say [+] 1, 2 11:05
p6eval nom: OUTPUT«3␤»
jnthn phenny: tell pmichaud seems there's something not quite right with reduction ops... [===] 1,1 don't work
phenny jnthn: I'll pass that on when pmichaud is around.
11:06 JimmyZ left, Trashlord joined 11:11 whiteknight joined
dalek ast: 17a10d0 | jonathan++ | S12-methods/submethods.t:
A couple of corrections to submethods.t, plus unfudge another couple.
11:13
tadzik jnthn: how do I make "bacon" a valid SixModelObject? get_object_sc_ref_past complains about it 11:15
dalek kudo/nom: c3d1dcf | jonathan++ | t/spectest.data:
Run S12-methods/submethods.t.
11:16
jnthn you don't make something one 11:17
you should just have one in the first place 11:18
tadzik I run add_constant with :name<bacon>. Then for %named { say("Adding", $_.value, " as ", $_.key); ...} says "Addingbacon as name". But then the stacktrace, Can only use nqp_get_sc_for_object with a SixModelObject on my $x := self.get_object_sc_ref_past($_.value); 11:19
jnthn Right 11:20
You passed a Parrot string
You neded to $*ST.add_constant('Str', 'str', 'bacon')
tadzik I see
jnthn And pass the compile_time_value from that as :name(...)
tadzik makes sense, thanks jnthn 11:21
jnthn np
Files=122, Tests=2234 :) 11:22
tadzik awesome
jnthn oh, that exludes the one I just added too :)
tadzik all this moves too fast
when I run 'make', it should pass the spectest, but when I run 11:23
'make spectest' after that, the roast already changes :)
jnthn makes life easier for tadzik++ by going for dinner :) 11:25
tadzik :)
look, look
wklej.org/id/557009/ 11:26
I'm on the right track :)
but the name is not what it should be, it seems
moritz evalbot rebuild nom 11:29
p6eval OK (started asyncronously)
dalek ast: 77ce764 | moritz++ | S06-signature/unspecified.t:
unfudge S06-signature/unspecified.t for rakudo
11:33
11:33 dju joined 11:34 mj41 left
masak tadzik++ 11:36
11:40 cognominal joined
dalek ast: ab99d48 | moritz++ | S02-builtin_data_types/type.t:
fudge and fix type.t
11:44
kudo/podparser: c3c1aba | moritz++ | t/spectest.data:
we pass ord_and_chr.t
11:47
kudo/podparser: f13f52b | moritz++ | t/spectest.data:
two more passing test files
11:47 satyavvd left
moritz \o/ double karma! 11:47
11:50 JimmyZ joined
tadzik moritz: was the push to podparser intentional? :) 11:50
moritz tadzik: oh no, wrong branch
tadzik :)
moritz tadzik: sorry for messing with your stuff 11:51
tadzik moritz: hey, you're welcome :)
I now have to merge nom :P
moritz I'll cherry-pick those two commits to nom 11:52
dalek kudo/nom: 1b7e7f3 | moritz++ | t/spectest.data:
we pass ord_and_chr.t
11:59
kudo/nom: 1f659be | moritz++ | t/spectest.data:
two more passing test files
ast: a4c0620 | moritz++ | S12-class/anonymous.t:
(un)fudge anonymous.t for rakudo
12:01
ast: 2e90102 | moritz++ | S02-whitespace_and_comments/minimal-whitespace.t:
refudge minimal-whitespace.t
12:06
moritz jnthn: t/spec/S12-attributes/recursive.t fails in an interesting way 12:11
jnthn: the exception (hidden in the lives_ok) is "Type check failed in assignment to '$!attr'; expected 'A' but got 'Scalar'"
it seems the type check should decontainerize the LHS, or some such 12:12
12:14 mj41 joined
dalek ast: 8433461 | moritz++ | S03-operators/autoincrement.t:
fudge autoincrement.t for rakudo
12:16
kudo/nom: 939629a | moritz++ | t/spectest.data:
5 more passing test files
12:17
moritz Files=132, Tests=2868 12:21
flussence wow
that was ~1000 the other day
12:23 woosley joined
tadzik yep 12:23
moritz jnthn++ made a lot of progress, I pimped up the numerical part of the setting, and there were lots of LHFs
masak jnthn++ moritz++ 12:25
12:28 icwiener joined
JimmyZ nom++ 12:45
12:49 pernatiy joined 12:57 Mowah left 13:02 bluescreen10 left 13:03 bluescreen100 left 13:05 cognominal left 13:06 agentzh left 13:07 cognominal joined 13:15 bluescreen100 joined, bluescreen10 joined 13:20 wamba joined, wamba left 13:24 JimmyZ_ joined
pmichaud good morning, #perl6 13:26
phenny pmichaud: 11:05Z <jnthn> tell pmichaud seems there's something not quite right with reduction ops... [===] 1,1 don't work
pmichaud 13:26 <phenny> pmichaud: 11:05Z <jnthn> tell pmichaud seems there's something not quite right with reduction ops... [===] 1,1 don't work
chained reductions nyi.... although it's supposed to tell you that :)
checking.
masak morning, pm 13:27
13:27 JimmyZ left, JimmyZ_ is now known as JimmyZ
pmichaud say [===] 1,1 13:31
nom: say [===] 1,1
p6eval nom: OUTPUT«invoke() not implemented in class 'Failure'␤current instr.: '_block1002' pc 104 ((file unknown):74631386) (:1)␤»
pmichaud ah, yes. It's giving a NYI failure, which then can't be invoked. 13:32
I suppose I can change the fail to a die.
13:33 wamba joined, drbean left
pmichaud > say [===] 1,1 13:35
chaining reduce NYI
dalek kudo/nom: df1de50 | pmichaud++ | src/core/metaops.pm:
Change the NYI metaops to die instead of fail.
13:37
13:39 wamba left 13:40 wamba joined 13:46 PacoLinux joined
jnthn back from nom + beer 13:47
First night here that I could actually bear to sit out on the roof terrace and enjoy some beers :) 13:48
(Others have been too hot/humid.)
pmichaud \o/
jnthn pmichaud: oh, it's a NYI rather than a bug 13:49
13:50 am0c left
jnthn pmichaud: We seem to have a weird double-containerization problem. 13:50
pmichaud: So far as I can tell it shows up in slurpy hashes. 13:51
masak today's autopun: twitter.com/carlmasak/status/87868045225242625
jnthn nom: my $a = 42; sub x(*%h) { say %h<a>.WHAT }; x(:$a) 13:52
p6eval nom: OUTPUT«Rebuild in progress␤»
jnthn hm
pmichaud jnthn: gist.github.com/1063355 # proposed slight improvement to BUILDALL
jnthn no, that won't expose it
pmichaud: Avoding the iterator was deliberate. 13:53
13:53 bbkr_ left
pmichaud why is that? 13:53
jnthn pmichaud: It's an extra object that has to be allocated
We already allocate a bunch more than would be desirable in the proces of doing .new
I remember doing a iterator => index transition in master in a similar code path (as part of new) a while ago. 13:54
pmichaud okay. I will say that my tests on lists showed that iterating was quite a bit faster than going through VTABLE_get_pmc_keyed_int
even with the cost of the pmc alloc
jnthn That...would be worrying if right. :S 13:55
pmichaud maybe it's only for large lists that it makes a difference though, for small lists the cost of the PMC might be more than the cost of the indexing
so, we can leave the index.
jnthn When I did he iterator => index thing with this similar code area in master, it was a several percent (or maybe better) win 13:56
masak maybe do both and measure?
jnthn Benchmarks welcome :) 13:57
pmichaud does "my int $i" actually do the right thing, now?
jnthn Depends what you mean by the right thing :) 13:58
pmichaud avoid the box/unbox ?
jnthn It uses a I register for storage. 13:59
pmichaud I mean, that's been implemented already? I missed that commit.
jnthn Beyond that, it depends how you use it.
Yes, that works
if you have $a and $!b where both are natively typed, then $a = $!b never boxes, for example.
Using it in a nqp::.... tends to work out fine too 14:00
pmichaud > my $i = 0;
jnthn Using natively typed things with infix operators tends to end badly.
pmichaud find_lex $P101, "$i"
nqp_get_sc_object $P102, "1309787981.22907", 5
perl6_container_store $P101, $P102
jnthn in terms of performance
pmichaud looks like it's still using PMCs to me.
jnthn huh?
pmichaud oh,w ait.
duh
wow, it does work 14:01
jnthn++
jnthn We need the inlining to really take care of those.
Generally, you *can* get better performance out of the natives today. But you have to know what's going on.
pmichaud my int $i; $i = nqp::add_i($i, 1) 14:02
find_lex $I1012, "$i"
perl6_box_int $P101, $I1012
find_lex $I1013, "$i"
add $I100, $I1013, 1
store_lex "$i", $I100
(fyi)
jnthn Right :)
pmichaud still, very impressive.
jnthn wait what...
14:03 am0c joined
jnthn where did that perl6_box come from? 14:03
pmichaud it's boxing because we don't know about sink context on the "my int $i"
jnthn wtf, it boxed it but didn't use it?
oh!
pmichaud when that's fixed, it'll be okay.
jnthn ok :)
pmichaud and native lexicals work in nqp, too? 14:04
or just in nom?
jnthn Just nom for now 14:05
14:05 thou joined
jnthn I can do it in NQP too if needed. 14:05
14:05 Mowah joined
jnthn Well, I expect to in the end. 14:05
pmichaud it could be really helpful at some point for the project I'm working on :)
jnthn It's just a matter of how soon :)
pmichaud but no rush needed yet
jnthn Yeah, somebody wanting it will help bump it up :)
pmichaud ...however, I suspect that $i = nqp::add_i($i, 1) is also creating a PMC 14:10
oh, maybe not. depends on how smart the block calls are. 14:11
checking.
jnthn pmichaud: Out of a lack of sink working properly?
pmichaud jnthn: because it's the last statement in a block, and the block has to return a value.
(in the BUILDALL code)
Util rakudo: my @a = grep { $_ %% 2 }, ( 1, 2, 3 ... 8 ); say @a.perl;
p6eval rakudo 72d158: OUTPUT«[2, 4, 6, 8]␤» 14:12
Util rakudo: my @a = grep { $_ %% 2 }, 1, 2, 3 ... 8 ; say @a.perl;
p6eval rakudo 72d158: OUTPUT«[]␤»
Util How is that second attempt getting its '...' parsed, such that not even the '2' is passing the grep?
pmichaud grep is tighter than ..., perhaps? 14:13
jnthn pmichaud: ah, can easily move it
pmichaud i.e., maybe (grep { %_ %% 2 }, 1, 2, 3) ... 8
not sure, checking.
no, that's not it. 14:14
nom: my @a = grep { $_ %% 2}, 1, 2, 3 ... 8; say @a.perl;
p6eval nom: OUTPUT«Array.new()␤»
pmichaud nom: my @a = grep { $_ %% 2}, (1, 2, 3 ... 8); say @a.perl;
14:14 xinming_ left
p6eval nom: OUTPUT«Could not find sub &infix:<%%>␤current instr.: '_block1011' pc 440 ((file unknown):16518653) (:1)␤» 14:14
pmichaud nom: my @a = grep { $_ % 2 == 0 }, (1, 2, 3 ... 8); say @a.perl; 14:15
p6eval nom: OUTPUT«Array.new(2, 4, 6, 8)␤»
pmichaud nom: my @a = grep { $_ % 2 == 0 }, 1, 2, 3 ... 8; say @a.perl;
p6eval nom: OUTPUT«Array.new()␤»
pmichaud nom: say grep { $_ % 2 == 0 }, 1, 2, 3 ... 8;
p6eval nom: OUTPUT«␤»
Util .say
pmichaud nom: (grep { $_ % 2 == 0 }, 1, 2, 3 ... 8).say; 14:16
Util (missing the dot)
p6eval nom: OUTPUT«␤»
Util Doh! nm the say comments
pmichaud nom: say 3...8
p6eval nom: OUTPUT«3 4 5 6 7 8 ␤»
pmichaud nom: say grep { $_ % 2 == 0 }, 1...8 14:17
p6eval nom: OUTPUT«␤»
14:17 xinming joined
pmichaud nom: say (grep { $_ % 2 == 0 }, 1...8).eager 14:17
p6eval nom: OUTPUT«␤»
pmichaud nom: say (1...8).grep({$_ % 2 == 0})
p6eval nom: OUTPUT«2 4 6 8␤»
pmichaud looks like a problem with sub grep 14:18
looking
nom: say grep { $_ % 2 == 0 }, 1, 2, 3..8 14:20
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'grep'. Available candidates are:␤:(Mu $test, Positional @values)␤␤current instr.: 'grep' pc 279979 (src/gen/CORE.setting.pir:68523) (:572)␤»
pmichaud huh?
nom: say grep { $_ % 2 == 0 }, (1, 2, 3..8) 14:21
p6eval nom: OUTPUT«2 4 6 8␤»
pmichaud nom: sub xyz($x, *@v) { say @v }; xyz { $_ * 2 == 0 }, 1, 2, 3..8
p6eval nom: OUTPUT«1 2 3 4 5 6 7 8␤»
pmichaud nom: proto sub xyz(|$) { * }; multi sub xyz($x, *@v) { say @v }; xyz { $_ * 2 == 0 }, 1, 2, 3..8 14:22
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'xyz'. Available candidates are:␤:(Any $x, Positional @v)␤␤current instr.: 'xyz' pc 465 ((file unknown):74991828) (:1)␤»
pmichaud jnthn: ^^^^^
(that's probably not the source of the bug in Util's case, but it's a big bug) 14:23
jnthn nom: proto x(|$) { * }; multi x(*@a) { }; x(); say 1 14:27
p6eval nom: OUTPUT«1␤»
jnthn nom: proto x(|$) { * }; multi x(*@a) { }; x(1,2,3); say 1
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'x'. Available candidates are:␤:(Positional @a)␤␤current instr.: 'x' pc 418 ((file unknown):9526769) (:1)␤»
jnthn nom: proto x(|$) { * }; multi x(*@a) { }; x(1); say 1
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'x'. Available candidates are:␤:(Positional @a)␤␤current instr.: 'x' pc 408 ((file unknown):38850031) (:1)␤»
14:29 mj41 left, wtw left
pmichaud ok, I see what's wrong with grep. 14:33
oh, wait, no I don't.
hrm.
14:33 Moukeddar joined
jnthn Definite multi bug. 14:33
pmichaud that's part of it, yes, but I think there's also a bug with the sequence generation. 14:34
jnthn spectesting multi fix. 14:36
pmichaud oh! 14:37
Util: here's the problem: the block is one of the arguments to ...
14:37 JimmyZ_ joined
pmichaud nom: my @a = grep { $_ * 2 == 2 }, 1, 2, 3, ... 8 14:37
p6eval nom: OUTPUT«Comma found before apparent series operator; please remove comma (or put parens␤ around the ... listop, or use 'fail' instead of ...) at line 1, near " ... 8"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤» 14:38
pmichaud parses as
my @a = grep ({ $_ * 2 == 0 }, 1, 2, 3 ... 8)
i.e., the first argument to grep is the entire sequence
and there are no values to grep.
14:40 PhatEddy joined, JimmyZ left 14:41 JimmyZ_ is now known as JimmyZ
PhatEddy nom: my num $n = NaN; 14:41
p6eval nom: OUTPUT«error:imcc:undefined identifier 'NaN'␤␤ in file '(file unknown)' line 29986791␤»
PhatEddy nom: my Num $n = NaN; 14:42
p6eval nom: ( no output )
14:42 jimmy1980 joined
jnthn nom: say NaN 14:42
p6eval nom: OUTPUT«NaN␤»
PhatEddy nom: my int $i; say $i +2;
p6eval nom: OUTPUT«56746946␤»
jnthn nom: say Inf
p6eval nom: OUTPUT«Inf␤»
jnthn nom: my int $i; say $i 14:43
p6eval nom: OUTPUT«65054792␤»
jnthn heh :)
PhatEddy nom: my num $n; say $n +2;
p6eval nom: OUTPUT«2␤»
jnthn Guess we don't promise much about initial value of a native at the moment :)
PhatEddy from yesterday - should I think be NaN
looks like good progress though ... 14:44
14:44 Moukeddar left, am0c left
jnthn Or we just say that if you're dealing with natives you do your own initialization :) 14:44
Not sure if the spec has an opinion on that :)
PerlJam jnthn: that would be LTA IMHO :)
PhatEddy spec does have opinion - one moment ... 14:45
see perlcabal.org/syn/S02.html#Native_types near bottom of section 14:46
pmichaud S02: "Since native types cannot represent Perl's concept of undefined values, in the absence of explicit initialization, native floating-point types default to NaN, while integer types (including bit) default to 0."
jnthn ah, it does want us to
tadzik I wonder how much can I rip of the setting just to make the compilation faster 14:47
14:47 koban left 14:48 dju left
tadzik Method 'exists' not found for invocant of class 'Hash' -- could that be a Parroty hash leaking through? 14:48
14:49 lichtkind joined
dalek kudo/nom: 6c013c1 | jonathan++ | src/core/Mu.pm:
Move a statement to avoid an accidental boxing every time around a loop (pmichaud++ for noticing).
14:49
kudo/nom: 18fe583 | jonathan++ | src/binder/multidispatch.c:
Fix multi-dispatches involving slurpy args.
jnthn tadzik: sounds like
pmichaud: ^^ fix
tadzik dang
pmichaud note that if you're in NQP, hashes aren't "leaking" through.
Parrot hashes are normal in nqp (which includes Actions.pm)
jnthn Yes, true :) 14:50
pmichaud tadzik: you can always do "make perl6" if you're not interested in having an up-to-date setting.
tadzik I'm adding named parameters to Past, see github.com/rakudo/rakudo/commit/e44bddd65 14:51
pmichaud: oh, thanks
Util pmichaud: Thanks!
14:52 Mowah left, [Coke] left
pmichaud tadzik: changing "nqp::push($des," to $des.push looks Evil. 14:52
tadzik also, it occures in say %h<name>;, in a sub with a *%h as a parameter
pmichaud: does it?
pmichaud you're changing a low-level operation into a higher-level method call.
tadzik oh 14:53
should it cause any problems besides the performance penalty?
pmichaud depends on what $des is, underneath.
jnthn PAST node
tadzik PAST::Op
14:54 [Coke] joined
pmichaud if it's a PAST node, then .push is probably more correct. 14:54
jnthn I've tended to use .push
tadzik .push is usually used, that's why I changed that
jnthn So in a way tadzik has made it some consistent with other stuff in SymbolTable.pm
pmichaud yes, tadzik is correct... he converted some Evil into some Good. tadzik++
jnthn :) 14:55
14:55 leprevost joined
tadzik :) 14:55
that still leaves my slurpy hash broken somehow
pmichaud jnthn: btw, I did a quick check, and you're correct, using VTABLE_get_pmc_keyed_int is slightly faster than the iterator. 14:59
14:59 whiteknight left
pmichaud (the overall difference in time isn't significant, although the creation of the short-lived iterator object might be) 14:59
15:00 whiteknight joined
pmichaud get_pmc_keyed_int is probably faster only as long as you can guarantee that the index isn't being boxed somewhere, though. Once that happens, the iterator likely wins (by a fair margin) 15:03
jnthn Yes, if you're paying boxing penalties it'll quickly get expensive
pmichaud looks like the index version gets 4x slower than the iterator version if the index is boxed even once per iteration. 15:04
so, iterator is the "safe bet", index version is the "we really know what we're doing here" bet. :)
and have to be wary of native variables leaking out into other others that might do boxing (such as at the end of a block, or as an argument to an opcode that wants a PMC) 15:05
masak "Polymorphism in Perl is inherently straightforward to write because of the language's use of sigils and references." -- huh? en.wikipedia.org/wiki/Polymorphism_...mming#Perl 15:07
what do sigils and references have to do with polymorphism? 15:08
jlaire what do wikipedia articles have to do with facts? ;) 15:10
15:11 daniel-s left
jlaire I can't even guess what that's supposed to mean... 15:12
15:14 perlhack joined
perlhack hi all 15:14
Util masak: mystery to me as well. Introduced in oldid=244794648 by Draegtun. Perhaps ask on his talk page? 15:15
Hi, perlhack
perlhack hi Util
Util Working on subfactorials: a(n) = (n-1)( a(n-1) + a(n-2) oeis.org/A000166 15:16
rakudo: my $c; my @A000166 := 1, 0, { ++$c * ($^a + $^b) } ... *; say @A000166[7];
p6eval rakudo 72d158: OUTPUT«1854␤»
Util Is there any way to get rid of $c ?
perlhack Util, i first met you
masak Util: I will. thanks.
Util In other words, is the iteration count of a sequence available to its code block, perhaps in some special var?
jlaire the whole article is a bit of a mess
as the talk page shows
Util jlaire: Ah, yes! The talk page for the *article* is better. 15:17
JimmyZ rakudo: my @A000166 := 1, 0, { ++$_ * ($^a + $^b) } ... *; say @A000166[7]; # get rid of $c ? 15:18
p6eval rakudo 72d158: OUTPUT«1854␤»
tadzik jnthn: I'm sorry to bother you again, but something is still not right about handling the named params to new_type. Does any of the modifications in wklej.org/id/557173/ look more correctish to you, given the usecase above?
15:18 dakkar left
JimmyZ rakudo: my @A000166 := 1, 0, ++$_ * ( * + * ) ... * ; say @A000166[7]; 15:20
p6eval rakudo 72d158: OUTPUT«1854␤»
15:20 dakkar joined
JimmyZ rakudo: my @A000166 := 1, 0, ++(my $a) * ( * + * ) ... * ; say @A000166[7]; # or this? 15:21
p6eval rakudo 72d158: OUTPUT«1854␤»
masak left a question on Draegtun's talk page 15:24
Util JimmyZ: That last one is an improvement, although I question whether it *should* work, as opposed to `state` 15:25
Using ++$_ actually gets in the way
Thanks! 15:26
perlhack: Did you mean "this is the first time we have spoken"? If so, yes I agree, but I have seen you interacting with others in the channel over the last few days. 15:27
jlaire the article says "an object that has more than one form", which feels fundamentally wrong to me
should be something like, a variable can refer to objects of different types 15:29
jnthn tadzik: You also need to update the line $constant := $type_obj.new(|@value);
perlhack Util, haa this is the first time we have spoken. 15:30
jnthn And pass |%named too
tadzik jnthn: and the first patch was correct?
jnthn yes, correct but not sufficient
tadzik okay, I get it 15:31
I think :)
jnthn you handled the deserialize/pre-compiled case
but not the immediate run case
tadzik okay
JimmyZ Util: I think it likes C: for( int i; i<10; i++ ) { int a; ++a; }
tadzik OH WOW IT WORKS! 15:32
jnthn++
jnthn yay :)
tadzik OH WOW :) 15:33
okay, now I need a piece of paper and a pencil 15:34
JimmyZ rakudo: my $a = 10; my $b; while $a++ < 20 { say ++($b) }
p6eval rakudo 72d158: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
15:34 felliott joined
JimmyZ rakudo: my $a = 10; while $a++ < 20 { say ++(my $b) } 15:34
p6eval rakudo 72d158: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
JimmyZ rakudo: my @A000166 := 1, 0, ++(my $a) * ( * + * ) ... * ; say @A000166[7]; # so it's a bug? 15:35
p6eval rakudo 72d158: OUTPUT«1854␤»
jlaire JimmyZ: $b is local to the while block, but ++(my $a) isn't surrounded by {} so it's global
JimmyZ rakudo: my @A000166 := 1, 0, { ++(my $c) * ($^a + $^b) } ... *; say @A000166[7]; 15:36
p6eval rakudo 72d158: OUTPUT«8␤»
15:36 zby_home joined
JimmyZ well, I'm confused 15:36
felliott Hello, #perl6! 15:37
tadzik hello felliott!
JimmyZ looks like they are different
masak hi felliott! 15:38
felliott I've taken another stab at implementing flipflops, this time as a macro.
masak tadzik: I'm happy to see you so happy :)
felliott Hey, tadzik, masak!
github.com/felliott/rakudo/commit/826cc997
Do you mind taking a look at it?
masak looks, curious
felliott I'm especially unsure about the pir part.
(line 2578) 15:39
I worked through the parrot pct tutorial, but I'm not sure I grok PAST.
masak yeah, just noticed the PIR. 15:40
I must say it looks like solid craftsmanship, though.
felliott Thank you!
masak I've given some thought to how to implement the flipflops, and your code reflects the things I had concluded.
felliott I need a way to save the state of the flipflop, but I'm not sure where to store it.
masak (for example, that a hidden variable is needed)
jlaire rakudo: say ++(my $a) for ^5; { say ++(my $b) } for ^5 15:41
p6eval rakudo 72d158: OUTPUT«1␤2␤3␤4␤5␤1␤1␤1␤1␤1␤»
masak felliott: what happens if you have several flipflops in the same lexical scope?
felliott: is the name of the state variable gensym'd somehow?
felliott Shouldn't be a problem. They get different names.
masak \o/
felliott ...I think. (Woosh, off to test ...)
masak :) 15:42
15:42 perlhack left
moritz that's what the .unique calls (should) do, right? 15:42
masak felliott: test, and then make sure to check with pmichaud. after that, I'd say we should merge your commit into master.
moritz: um, yes. :)
pmichaud implementing ff in Actions seems Very Wrong 15:43
I don't think they should be macro-ized.
masak I knew there was something I'd probably overlooked! :)
pmichaud: how would you do them?
15:43 woosley left
masak pmichaud: in particular, where would you put the internal state of the op? 15:44
pmichaud have &infix:<ff> keep track of a state variable based on the identity of the caller
masak (you can't put it as a state variable, because it's local to the *individual* flipflop in the code)
jnthn you could have a state hash keyed on the location of the caller
pmichaud right
masak conceivably. 15:45
jnthn or even just a hash in the scope outside of infix:<ff> for now.
pmichaud that's what I mean by "identify of the caller" - use the caller location as the key
moritz do we have the caller location sufficiently precise?
felliott double checked. two ffs in the same scope use different states.
pmichaud we should be able to get it somehow.
jnthn It's obtainable.
May need a dynop 15:46
pmichaud or a method on the CallContext
it might also be available in the RetContinuation
felliott pmichaud: where should ff be implemented? I did it as a class originally.
pmichaud felliott: it should be an operator.
like &infix:<+> and the like. 15:47
jnthn Time for sleep here
pmichaud looks to me like we can get the return continuation from the interpreter 15:48
masak felliott: while you were gone testing, your patch was rejected, basically, and the proper solution was drawn up.
felliott ah, okay
pmichaud and we can use get_pointer to get the address from the return continuation
masak see above.
felliott I saw, I was just confused where it should go. I found it now. I can do that.
pmichaud let's see if I can put together a proof of concept
just a sec
15:49 frew joined
JimmyZ rakudo: say ++(my $a) for ^5; { say ++(my $b) } for ^5 # i wonders whether it's a bug or not 15:49
p6eval rakudo 72d158: OUTPUT«1␤2␤3␤4␤5␤1␤1␤1␤1␤1␤»
jnthn JimmyZ: It's correct
jlaire JimmyZ: what output did you expect? 15:50
jnthn JimmyZ: If you want a fresh scope you need the curlies
15:50 frew left
masak felliott++ # rolling with it 15:50
felliott :)
pmichaud in the first one you're incrementing the same $a each time. In the second you get a new $b with each block invocation. 15:51
(rebuilding nom) 15:52
masak decommute &
15:53 masak left
jlaire 'my $a' doesn't reset the state every time, if that's what you were thinking 15:53
moritz pmichaud: should the sub forms of push etc. be multis? 15:54
pmichaud moritz: use whatever S32/containers says :) 15:55
JimmyZ but SYN said * + * is equal to { $^a + $^b } 15:56
moritz JimmyZ: it's not very precise when it says that
it says multi method ... is export 15:57
so I guess upon export it will be a multi sub too
jlaire hm, LHF "Add .Rat method to Int" seems to be done already? 15:59
pmichaud gist.github.com/1063533 # proof of concept of obtaining location of call 16:00
16:00 JimmyZ left
pmichaud oh, wait 16:00
let me show the output also
16:01 tadzik_kindle joined
pmichaud gist.github.com/1063536 # obtaining location of call, with output 16:01
tadzik_kindle oh hai
pmichaud each ftest invocation has its own unique call location.
Util How close are we to having `state` vars in rakudo or nom? 16:02
pmichaud probably won't happen in master
probably very close to happening in nom
Util So master gets them when nom merges into master? 16:03
pmichaud when nom becomes master
Util Got it. Thanks!
pmichaud (we're unlikely to do an actual merge)
oh. 16:12
looks like ff *has* to be a macro.
moritz does it short-circuit?
pmichaud it doesn't pre-evaluate its operands 16:13
if we do a plain &infix:<ff>($a, $b), both $a and $b are evaluated prior to the call
it's the same logic by which && and || can't be simple &infix operator calls.
I would really like to see Perl 6 definitions for things like || and &&. 16:14
It would clear up a lot of confusion if we knew how short-circuiting is to be defined.
16:14 Mowah joined 16:16 tadzik_kindle left
pmichaud felliott: see note immediately above -- looks like you may have had it correct. I'm re-evaluating your patch now. 16:17
felliott drat. I was almost done making it into an operator. :)
pmichaud sorry about that. 16:18
the patch feels too long to be correct, fwiw. 16:19
felliott no problem. everytime I implement it, I learn something new
pmichaud I mean, it's likely correct, but it really should be a lot shorter.
felliott the basic flipflop logic isn't too complicated, but handling the exclude_first, excludes_last, and sedlike complicates it. 16:20
here's the logic in perl6: gist.github.com/1063566
(taken from when it was a class) 16:21
pmichaud .match ?
I thought it just tests the bool of each side? 16:22
16:23 _twitch left
felliott I may be misunderstanding match 16:23
pmichaud .match is typically for regexes
felliott I'm trying to smartmatch $_ against the lhs 16:24
pmichaud I don't see anything in the spec for ff about smartmatching, though. I thought it just evaluated its operands in boolean context.
felliott ff takes regexes
pmichaud sure, a bare regex in boolean context performs a match
but that's because of the .Bool method on regex, not because of the ff operator
felliott Ah! 16:25
That makes sense.
pmichaud (and, fwiw, smart matching is .ACCEPTS :-) 16:26
felliott There may have been a certain amount of cargo-culting going on...
\me looks shifty
I'll fix that. 16:27
pmichaud I'm thinking the basic logic is 16:28
$state ?? ($lhs && $state++) !! ($rhs && $state--)
(note $state is a Bool)
oh, backwards
$state ?? ($rhs && $state--) !! ($lhs && $state++) 16:29
felliott ff can flip and flop on the same input
fff doesn't
pmichaud okay.
so what I gave above is fff-like, I guess. 16:30
felliott yep.
pmichaud $lhs && $state++ unless $state; $rhs && $state-- if $state;
or, to avoid the if/unless 16:31
$state || $lhs && $state++; $state && $rhs && $state--
felliott Yes, but we also need to make note of when we flop, so we can exclude the last for ff^ and fff^. 16:32
pmichaud I don't quite understand the ^'s yet.
felliott ^ff returns false on flip. ff returns true on flip
ff returns true on flop, ff^ returns false on flop 16:33
pmichaud okay
so
felliott there's a Dr. Seuss book in that...
16:33 sivoais left
pmichaud ^ff: $state || $lhs && $state++; $state && $rhs && --$state; 16:33
ff: $state || $lhs && ++$state; $state && $rhs && --$state; 16:34
ff^: $state || $lhs && ++$state; $state && $rhs && $state--;
^ff^: $state || $lhs && $state++; $state && $rhs && $state--;
felliott looks right.
pmichaud the ^'s just change prefix/postfix 16:35
felliott but will that be shorter than doing it all in one method?
pmichaud you can still do it all in one method
felliott Oh, yeah.
pmichaud but you don't need all of the if/then/else cases
regardless, returning values like 0 is almost certainly wrong, because it's not a Bool 16:36
felliott Is there a better way to do if and else than using PAST nodes?
ff returns empty string on false, and the state value on true.
pmichaud in p5, yes. in p6 I suspect it returns a Bool 16:37
re-reading spec.
felliott spec says "do it like p5"
I asked TimToady about it in Feb. 16:39
pmichaud okay.
felliott Here the link: irclog.perlgeek.de/out.pl?channel=p...2011-02-05
The advantage to ff returning the state value is that you can do things like skip every other line inside the condition. I think brian d foy posted about that on the Effective Perler
pmichaud okay 16:40
so, (2 ff Bool::False) should return 2, yes?
felliott That's where it gets weird. 16:41
16:41 stephanmg left, birdwindupbird left
felliott A literal num is supposed to match the input line number. (my patch does not yet do this) 16:41
16:41 stephanmg joined, stephanmg left
pmichaud okay, non-literal num then 16:42
my $a = 2; ($a ff Bool::False)
16:42 stephanmg joined, stephanmg left
felliott should return 1 16:42
pmichaud 1? not the value of $a ?
16:42 stephanmg joined, stephanmg left
felliott nope. it returns the value of $state 16:42
pmichaud that would be True then.
felliott True? 16:43
pmichaud in the page you just posted, TimToady says $secret = True
irclog.perlgeek.de/perl6/2011-02-05#i_3257429
True and False, not 0 and 1 16:44
16:44 stephanmg joined, stephanmg left
pmichaud (or 1 and "") 16:44
felliott farther down: irclog.perlgeek.de/perl6/2011-02-05#i_3257532
16:44 stephanmg joined, stephanmg left 16:45 stephanmg joined, stephanmg left
felliott "TimToady: but returning the sequence number is useful" 16:45
16:45 stephanmg joined, stephanmg left
pmichaud yes 16:46
16:46 stephanmg joined, stephanmg left
pmichaud reading. 16:46
16:46 stephanmg joined, stephanmg left 16:47 stephanmg joined, stephanmg left
pmichaud okay, ignore everything I said about Bools. 16:47
yes, using PAST nodes for 'if' and 'unless' is the way to do ??, &&, and ||
16:47 stephanmg joined
pmichaud :pirop('inc') # pretty much guaranteed to fail 16:48
felliott I wasn't sure how else to incr it. 16:49
pmichaud easiest is call &prefix:<++> on it. :-)
(or &postfix:<++>, depending on what you want)
felliott I think I tried that and it didn't work. I'll give it another go.
Maybe I was calling that on a parrot int. 16:50
16:53 awoodland left
felliott Thanks, pmichaud++! 16:53
16:59 tokuhirom left
pmichaud felliott: gist.github.com/1063619 # pretty close to complete 17:02
complete for the ff case, at any rate. I suspect the same code can be used for fff with a tweak or two. 17:03
17:05 dakkar left
pmichaud gist.github.com/1063630 # code handling both ff and fff 17:07
felliott wow. 17:08
I'll test it here.
pmichaud gist.github.com/1063633 # return '' instead of 0 for false 17:09
the state variable needs to always be an Int
i.e., it's initialized to zero.
17:09 noganex_ joined 17:12 noganex left
pmichaud hmmm, that generates an extra test on $state, could probably factor that out a bit better as well. 17:21
moritz perl6: say -9 div 4
p6eval pugs: OUTPUT«*** ␤ Unexpected "div"␤ expecting operator, ":" or ","␤ at /tmp/63Uo8Fvvm_ line 1, column 8␤»
..rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«-3␤»
moritz perl6: say -9 div -4
p6eval rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«2␤» 17:22
..pugs: OUTPUT«*** ␤ Unexpected "div"␤ expecting operator, ":" or ","␤ at /tmp/yTJkrvw0hp line 1, column 8␤»
moritz perl6: say (-9) div -4 17:23
p6eval rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«2␤»
..pugs: OUTPUT«*** ␤ Unexpected "div"␤ expecting operator, ":" or ","␤ at /tmp/jjqTm7xZkb line 1, column 11␤»
lichtkind all: o/ 17:24
thou: cheers
thou hello, lichtkind! 17:27
moritz nom: say (0 + 1i) ** 2
p6eval nom: OUTPUT«0 + 11.6067021786817i␤»
moritz WTBH?
nom: say (0.7071067811865476 + -0.7071067811865475i)**4, 17:28
p6eval nom: OUTPUT«0 - 42.8812867609298i␤»
moritz nom: say exp(2) 17:29
p6eval nom: OUTPUT«7.38905609893065␤»
moritz nom: say log(1i)
p6eval nom: OUTPUT«0 + 1.5707963267949i␤»
moritz nom: say exp(2) * log(1i)
p6eval nom: OUTPUT«0 + 11.6067021786817i␤»
moritz I haz math fail
I though a ** b == exp(a) * log(b) 17:30
but in fact
I though a ** b == exp(a * log(b))
erm
It is a ** b == exp(a * log(b))
nom: say exp(2 * log(1i))
p6eval nom: OUTPUT«-1 + 1.22464679914735e-16i␤»
felliott $*ST nom-only? I couldn't grep it anywhere in master.
moritz nom-only
felliott ah-ha.
thank you 17:31
17:32 dju joined
moritz considering all the fails I introduce in nom math, maybe somebody who actually knows math should take over from here :-) 17:33
daxim needs moar rageguy operators. fffuuu
17:34 masak joined
masak evening, fellow symbionts. 17:34
17:35 daxim left 17:36 Jackneill joined
Jackneill hi 17:37
can i install perl6 next to perl ? 17:38
perl6: say "perl6: \"say perl6!\""; 17:40
p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«perl6: "say perl6!"␤»
Jackneill very slow:/:(
sjohnson course
17:41 pernatiy left 17:42 mj41 joined 17:43 Tedd1 joined
masak Jackneill: yes, you can run both 'perl' and 'perl6' alongside just fine. 17:43
Jackneill: as to speed, that is our current focus. the Rakudo branch 'nom' is already quite a bit faster. 17:44
Jackneill thanks, masak. How? 17:49
masak how will it be faster? well...
Jackneill i just install perl6 in terminal with apt?
masak ah.
yes.
Jackneill no no, how can i install.
masak or build from source.
Jackneill sudo apt-get install perl6 ?
masak I'll check.
Jackneill and perl and perl6 will be works fine?
pmichaud I don't believe there are any up-to-date debian packages yet.
masak oh :/ 17:50
pmichaud (there are some out-of-date ones).
17:50 cookys_ joined 17:51 ingyfoo joined, estrai joined, Krunch_ joined, barika_ joined, MOAR-f00li5h joined, Su-Shee left, bluescreen__ joined 17:52 cosimo_ joined, moritz_ joined, dual left, ingy left, wamba left, barika left, f00li5h left, bluescreen100 left, Vlavv left, cosimo left, moritz left, Woody2143 joined, frodwith joined
Jackneill so build from source: cd to dir, ./configure, make, make install ? 17:52
17:52 dual joined, wamba joined, Vlavv joined
masak well, 'perl Configure.pm --gen-parrot', but yes :) 17:52
pmichaud .pl, I think.
masak and you'll probably want to 'sudo make install'.
ah yes, .pl of course
moritz_ no
17:52 Su-Shee joined
pmichaud if you --gen-parrot, no sudo needed 17:53
moritz_ not sudo
masak oh, right. 17:54
that's why I don't --gen-parrot :P 17:55
17:57 Mowah left 18:00 barika_ is now known as barika 18:07 Mowah joined 18:12 bluescreen__ left, bluescreen10 left 18:13 bluescreen10 joined
felliott I'm getting: 'Cannot modify readonly value in "&infix:<=>"' when I compile and run: gist.github.com/1063742 18:21
the infix:<=> is on line 59
masak looks 18:22
pmichaud this is in master?
felliott I tried adding a :lvalue(1) to the Op, nodice.
yes.
pmichaud your state variable declaration is binding it to a constant 0 18:23
PAST::Var.new( :name($state_var), :scope('lexical'), :isdecl(1), :viviself(0) ),
felliott hmmm.
pmichaud try removing the :viviself(0)
felliott okay. 18:24
<compiling...>
18:24 Instil left
felliott So if I :viviself(0), I can modify it via PIR, but not by the HLL? 18:24
I was able to :pirop('inc') on $state_var in the previous version. 18:25
pmichaud I didn't realize you were working in master.
Still, that's bad form because it ends up incrementing what should be a constant.
18:25 am0c joined
felliott Gotcha. Thanks! 18:26
pmichaud also, the use of &prefix:<++> gives the ^ semantics
i.e., return the value before incrementing, return the value after incrementing
felliott If I wanted to declare a variable and initialize it to some value but have it be mutable, should I use PAST::Op.new(:name('bind')) instead? 18:28
pmichaud ah, to use a scalar variable, will need to mark the variable with a "rw" property.
felliott s/name/pasttype/
pmichaud elsewhere we do: PAST::Op.new( $cont, 'rw', $true, :pirop('setprop') 18:29
)
&infix:<=> refuses to write to an object that doesn't have the 'rw' property set.
felliott I see. 18:30
I found an example of 'rw', I'll try that now.
thanks!
dalek ast: 50a0687 | moritz++ | S02-builtin_data_types/flattening.t:
fudge flattening.t for rakudo
18:39
kudo/nom: d9d8c49 | moritz++ | src/core/Complex.pm:
fix Complex exponentation
18:41
kudo/nom: ce2882f | moritz++ | src/core/Real.pm:
add infix mod
kudo/nom: d2a8943 | moritz++ | / (2 files):
sub forms of pop, shift, push
moritz_ nom: my @a = <a b c d>, [<e f g h>]; say "@a[]" 18:46
p6eval nom: OUTPUT«a b c d e f g h␤»
dalek ast: 2895952 | moritz++ | S02-literals/array-interpolation.t:
fudge array-interpolation.t
18:48
18:53 Instil joined
dalek kudo/nom: 97e5710 | moritz++ | t/spectest.data:
nine more passing test files
19:01
19:01 slavik1 left, wamba left
[Coke] how close are we getting to master? 19:05
19:05 wamba joined
masak "mastering nom in 20 days" :) 19:05
[Coke] nom: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl 19:06
p6eval nom: OUTPUT«(1,).list.item␤»
[Coke] nom: 5. 19:07
p6eval nom: OUTPUT«Confused at line 1, near "5."␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
masak that's how I feel about Haskell.
"Confused at line 1" :P
jlaire :D 19:08
line 1: 'module Main where'
or just, 'main = print 42'
masak aaaugh confused
;) 19:09
Util In a temp dir, I did this: GIT_SSL_NO_VERIFY=true git clone github.com/sorear/niecza.git 19:11
then `cd niecza; git status`.
It shows changes not staged for commit! How is this possible?
lue hello world! o/
masak \o
Util: that's what you get for turning off SSL :P
flussence that's bizarre, it doesn't do it for me 19:12
masak hacked immediately.
sjohnson hax0r 19:13
jlaire Util: what changes? 19:14
(and why NO_VERIFY?)
works fine for me 19:15
Util Hmmm. actually, it works for me too on Linux with Git 1.7.1. Failing on OS X 10.5, Git 1.7.5.1 19:16
jlaire: NO_VERIFY because of old certificates on my laptop
OK, I can pursue it since I have a known-good to work from. 19:17
Thanks, all!
jlaire: Large patch to hoopl/Nam.hs is the uncommitted change.
sjohnson nom nom noms 19:18
jlaire Util: huh, bizarre indeed...
19:18 envi left 19:25 birdwindupbird joined 19:31 birdwindupbird left 19:37 cooper left, wamba left 19:47 kaare_ left
lue rakudo: say 2.Rat 19:47
p6eval rakudo 72d158: OUTPUT«2␤»
lue I see the Int.Rat method is there in nom (contrary to what LHF.markdown says) 19:51
masak nom: say 2.Rat 19:53
p6eval nom: OUTPUT«2␤»
masak nom: say 2.Rat.WHAT
p6eval nom: OUTPUT«Rat()␤»
masak so it seems.
lue: feel free to take it out of LHF.markdown 19:54
lue I wouldn't be able to commit it though.
pmichaud anyone besides me want to do s/\.markdown/.md/ ooc ?
masak the thought has occurred to me :)
but it's not that important 19:55
lue: ok, I'll do it, then.
lue How do I get rakudo commit privileges, again? Last I remember, it involved going through some (relatively) big process. 19:56
dalek kudo/nom: a2b9926 | masak++ | LHF.markdown:
[LHF.markdown] Int.Rat implemented
19:57
lue nom: say Mu ~~ 0
p6eval nom: OUTPUT«No applicable candidates found to dispatch to for 'ACCEPTS'. Available candidates are:␤:(Numeric, Any $a)␤:(Mu, Mu $topic)␤␤current instr.: 'ACCEPTS' pc 304115 (src/gen/CORE.setting.pir:80419) (:227)␤»
pmichaud looks like a bug in Int.ACCEPTS
ACCEPTS should always have a Mu $topic
nom: say '3' ~~ 0 19:58
p6eval nom: OUTPUT«Bool::False␤» 19:59
lue so there should be a ACCEPTS method defined in Int.pm?
pmichaud no, wait
it's using Numeric accepts
masak makes sense.
pmichaud but it seems like it ought to fall back to Mu.ACCEPTS
looking
I guess we need multi method ACCEPTS(Mu:D: Mu \$topic) { Bool::False } 20:00
(in Mu.pm)
that gives all of the ACCEPTS methods something to fall back to
masak +1
lue nom: say 0 ~~ Mu; # this works though 20:01
p6eval nom: OUTPUT«Bool::True␤»
pmichaud sure, because Mu is undef
so Mu.ACCEPTS(Mu:U, Mu \$topic) is able to handle it
we're missing a Mu:D: case 20:02
(the object is concrete, but the type didn't define a matching .ACCEPTS method)
lue Does the spec detail the meaning of Mu:D: Mu:U: and so on?
pmichaud yes
Mu:D only matches "concrete" objects -- i.e., things that aren't types 20:03
Mu:U only matches "abstract" objects -- i.e., types
masak S12:1528
the :D and :U specifiers are basically waterbed kickback from unifying types and their instances. 20:04
lichtkind masak++ for that expression 20:05
lue So (if I got this right), Mu:U means any undefined Mu value (e.g. Mu), while Mu:D is for clearly defined Mu values (e.g. 42) 20:06
pmichaud in principle, yes. 20:07
it's really "abstract" versus "concrete", instead of "undefined" versus "defined"
some concrete objects can be undefined if they override the .defined method
but still won't match :D
masak lichtkind: nah, I'm just being high-falutin' :P 20:08
pmichaud
.oO( what kind of high-falutin' language is "high-falutin'", anyway?)
20:10
(almost an autopun)
masak yes :)
dalek p: 8557631 | pmichaud++ | src/core/NQPMu.pm:
Add a version of __dump() to NQPMu so that NQP objects can
20:14
lue
.oO(Drive-by punning.)
20:15
pmichaud afk for a bit
lue here's a question: when nom becomes master, will the current master become 'ng' [like it was before] or something else (maybe 'beta')? 20:16
masak yes. 20:17
:)
moritz_ "ug"
erm, "og"
dalek kudo/nom: 59ec8c6 | moritz++ | / (2 files):
infix cmp for Pairs
masak "pg" 20:18
(previous)
masak read "infix cmp for Paris", probably due to TimToady's recent deliberate confusion of the two 20:19
rakudo: subset Paris; subset Berlin; say Paris ~~ Berlin 20:20
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
masak Peris, Berlin... wassedifference? :P
20:20 s1n left
masak er, Paris* 20:20
moritz_ perl6: say -13 mod 4
p6eval rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«3␤»
..pugs: OUTPUT«*** ␤ Unexpected "mod"␤ expecting operator, ":" or ","␤ at /tmp/kyc7uC34i4 line 1, column 9␤»
jlaire rakudo: say -(13 mod 4); say (-13) mod 4 20:21
p6eval rakudo 72d158: OUTPUT«-1␤3␤»
masak pugs: say -13 % 4
p6eval pugs: OUTPUT«3␤»
masak there are two schools of thought with % and mod.
I'm glad we're adhering to this one :)
oh wait. 20:22
no, it's what happens when you negate the rhs that's the difference.
perl5: say 13 mod -4
perl6: say 13 mod -4
p6eval pugs: OUTPUT«*** ␤ Unexpected "mod"␤ expecting operator, ":" or ","␤ at /tmp/ATrAMz4s5g line 1, column 8␤»
..rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«-3␤»
masak pugs: say 13 % -4
p6eval pugs: OUTPUT«-3␤»
masak consistency across the board, at least. 20:23
lue rakudo: say 5 mod 2.5 20:24
p6eval rakudo 72d158: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤ in 'infix:<mod>' at line 3803:src/gen/core.pm␤ in main program body at line 22:/tmp/89dWAKkNrR␤»
jlaire perl6: sub f($x, $y) { $x - floor($x / $y) * $y }; say f(13, -4) 20:25
p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«-3␤»
lue rakudo: sub f($x, $y) { $x - floor($x / $y) * $y }; say f(5, 2.5) 20:26
p6eval rakudo 72d158: OUTPUT«0␤» 20:27
dalek ast: 674bf37 | moritz++ | S03-operators/arith.t:
fudge arith.t for rakudo
jlaire perl6: sub f($x, $y) { $x - floor($x / $y) * $y }; say f(pi + 3i, e - i)
p6eval niecza v7-11-g9ba8284: OUTPUT«Unhandled exception: floor is only defined for Reals, you have a Complex()␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE floor @ 0) ␤ at /tmp/vFHR6rnJR8 line 1 (MAIN f @ 2) ␤ at /tmp/vFHR6rnJR8 line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza…
..rakudo 72d158: OUTPUT«floor is only defined for Reals, you have a Complex()␤Method 'Bridge' not found for invocant of class 'Failure'␤ in 'infix:<*>' at line 3783:src/gen/core.pm␤ in 'infix:<*>' at line 4593:src/gen/core.pm␤ in 'f' at line 22:/tmp/z2u0sm9GVB␤ in main program body at…
..pugs: OUTPUT«*** No such subroutine: "&e"␤ at /tmp/OcUYq6OsNb line 1, column 60-65␤»
jlaire lol
moritz_ hey, niecza and rakudo agree 20:28
dalek kudo/nom: 535395f | moritz++ | t/spectest.data:
run arith.t
jlaire yeah, that's nice
moritz_ nom: say <a b c>.sort
p6eval nom: OUTPUT«Method 'sort' not found for invocant of class 'Parcel'␤current instr.: '_block1002' pc 96 ((file unknown):20812801) (:1)␤»
moritz_ nom: say <a b c>.list.sort
p6eval nom: OUTPUT«Method 'sort' not found for invocant of class 'List'␤current instr.: '_block1002' pc 108 ((file unknown):23698851) (:1)␤»
moritz_ ENOSORTYET
pmichaud I can add it. 20:29
moritz_ $ ack -lw sort t/spec| wc -l
55
might be worthwhile
jlaire nom: say <a b c>.list.pick(*)
p6eval nom: OUTPUT«Method 'pick' not found for invocant of class 'List'␤current instr.: '_block1002' pc 121 ((file unknown):205) (:1)␤»
moritz_ nom: say ~Int 20:30
p6eval nom: OUTPUT«Use of uninitialized value in string context␤␤»
moritz_ nom: say Int.Str
p6eval nom: OUTPUT«Use of uninitialized value in string context␤␤»
dalek ast: e0f3ae7 | moritz++ | S14-roles/lexical.t:
correct and fudge S14-roles/lexical.t
20:32
kudo/nom: 8f1d810 | moritz++ | t/spectest.data:
two more passing test files
20:33
20:34 s1n joined, bluescreen10 left
lue how do I get a commit bit for rakudo? I'd like to start contributing to nom before all the easy stuff is gone :) ['cos then when the hard stuff is left, I'll be familiar enough with the code to work on those 'HHF'] 20:36
moritz_ lue: first you submit a few good patches / pull request 20:37
lue: and submit a CLA
20:37 soh_cah_toa joined
moritz_ www.perlfoundation.org/contributor_..._agreement 20:37
20:38 mj41 left
dalek kudo/nom: 56a1e10 | moritz++ | / (2 files):
Complex.sqrt, tests
20:39
[Coke] with git (+github) it's really easy to fork an existing project and submit pull requests. 20:40
lue (the snail-mail-only part surprised me for a second)
moritz_ pmichaud: t/spec/S04-statements/for-scope.t seems to be mostly changed stringification semantics, would appreciate if you could take a look at your convenience
20:41 donri left
pmichaud moritz_: will do 20:43
masak rakudo: { our sub foo { say "OH HAI" } }; foo
p6eval rakudo 72d158: OUTPUT«OH HAI␤»
masak nom: { our sub foo { say "OH HAI" } }; foo
p6eval nom: OUTPUT«Could not find sub &foo␤current instr.: '_block1002' pc 84 ((file unknown):33653897) (:1)␤»
masak nomds solemnly
er, nods*
pmichaud almost done with sort 20:44
20:44 am0c_ joined
Util perl6: sub nnn ( @a ) { @a.perl.say }; nnn( [1,2,3] ); 20:44
p6eval niecza v7-11-g9ba8284: OUTPUT«[1, 2, 3].list␤»
..pugs, rakudo 72d158: OUTPUT«[1, 2, 3]␤»
Util perl6: sub nnn ( @a is copy ) { @a.perl.say }; nnn( [1,2,3] );
p6eval pugs: OUTPUT«[[1, 2, 3],]␤» 20:45
..rakudo 72d158: OUTPUT«[1, 2, 3]␤»
..niecza v7-11-g9ba8284: OUTPUT«[[1, 2, 3]].list␤»
Util "is copy" makes niecza mis-handle the array?
pmichaud looks like it. and pugs also.
Util should be [1,2,3] not [[1,2,3]], right? 20:46
pmichaud I'm pretty sure it should be [1,2,3], yes.
Util Thanks
20:46 bluescreen10 joined
pmichaud > say <the quick brown fox>.sort 20:46
brown fox quick the
masak \o/ 20:47
moritz_ \o/
20:47 am0c left
dalek kudo/nom: 3e5c741 | pmichaud++ | src/core/ (2 files):
Add List.sort and Any.sort.
20:47
thou \o/ 20:50
20:50 mj41 joined
pmichaud fix for for-scope.t coming. 20:51
20:52 [Coke] left 20:54 [Coke] joined
[Coke] anyone see an issue with copying over IO's "unlink" sub directly from master to nom? 20:54
dalek kudo/nom: ca93c8a | pmichaud++ | src/core/Any.pm:
Fix Any.join -- default separator should be '' and not ' '. pmichaud-- S04-statements/for-scope.t now passes. moritz++
20:55
pmichaud we're thinking the IO API should change, but I don't have a problem with it for now.
20:55 dorlamm joined
pmichaud so, +1 from me. 20:55
dalek kudo/nom: 2cac886 | pmichaud++ | t/spectest.data:
Add S04-statements/for-scope.t to spectest.data.
20:56
pmichaud nom now passing 148 files and 3205 tests. 20:57
moritz_ that's good progress
pmichaud I'm working on regexes 20:58
but that one is going to be a 2-day project or so
(to do "right", that is)
moritz_ regex integration in nom?
pmichaud yes. 20:59
I suspect that will win us a bunch of tests.
moritz_ I'm surprised it'll be so much effort
pmichaud the way we do regexes in master is quite different 21:00
moritz_ after all the wrapping layer isn't too much code
pmichaud if we try to do the same thing in nom, we'll end up with a bunch of Parrot objects in our data
moritz_ so what's the plan?
pmichaud I'm working on some fundamental regex engine changes 21:01
this will also get us some big speed wins, I suspect.
masak \o/
pmichaud it will also lay the groundwork for true LTM
(which will give us still more speed wins)
21:02 am0c_ is now known as am0c
moritz_ that will make all of us and the spectest runs happy :-) 21:02
21:02 am0c is now known as Guest88135
pmichaud anyway, I figure it's better to get the core regex changes in now, rather than try to patch something in to nom just to "get it working" and then have to re-do it all again later. 21:02
if it looks like the regex engine changes will take more than two days, I'll suspend and go with the "patch something in" approach. 21:03
21:03 Guest88135 left, am0c_ joined, Instil left
pmichaud (more details: in master, Regex/Cursor/Match objects were all based on P6object, and thus had the same metamodel at their base. In nom, the regex engine objects are based on NQPMu while the Perl 6 objects are based on Rakudo's Mu class. Getting all of the mappings correct will be expensive and prone to mistakes. 21:04
it's much better if we just make clean mappings out the outset. ) 21:05
[Coke] pmichaud++
21:05 takadonet left
masak yay clean mappings 21:05
21:05 takadonet joined
tadzik hello 21:06
pmichaud and as I said, after studying the problem over the weekend I've found some big optimizations, I think.
masak tadzik! \o/
tadzik masak: o/
21:06 aindilis left 21:08 dolmen joined
[Coke] bah. adding in unlink causes t/spec/integration/say-crash.t to crash instead of report a failure. ;) 21:08
arnsholt crosses fingers for LTM
[Coke] (segfault) 21:09
21:15 takadonet left 21:18 MayDaniel joined
moritz_ nom: pir::new__PS('OS').rm("rakudo/README") 21:20
p6eval nom: OUTPUT«Class 'OS' not found␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
[Coke] in master, unlink has "try {}\n $! ?? fail($!) !! True" ... is there a better way to write this in NOM? 21:22
moritz_: yah, needs to add "os" to the list of things loaded in...
src/Perl6/Actions.pm
moritz_ look pretty standard to me 21:23
21:24 Jackneill left 21:25 MayDaniel left 21:30 Instil joined
[Coke] #0 0x000000010164e3f9 in Rakudo_cont_decontainerize () 21:33
gist.github.com/1063975 #add unlink 21:34
gist.github.com/1063976 #segfault 21:35
21:38 Util left, thou left, pmichaud left, hugme left, PerlJam left 21:42 Psyche^ joined
masak blog post! strangelyconsistent.org/blog/june-2...11-classes 21:44
dalek p: de23ea5 | pmichaud++ | src/core/NQPMu.pm:
Make NQPMu.__dump aware of native types in attributes.
21:46 Patterner left, Psyche^ is now known as Patterner 21:48 pmichaud joined
pmichaud looks like feather died or otherwise became disconnected. :)( 21:48
:(
masak aww 21:49
(that's why you all missed my blog post announcement)
pmichaud correct
masak blog post! strangelyconsistent.org/blog/june-2...11-classes
:P
pmichaud there's a "The the" in the post
masak thanks, fixing. 21:50
pmichaud I did see the announcement, thanks to irclog :)
masak yes, but I know how much people like to click on links in their IRC clients :P 21:51
pmichaud "collect" feels like the wrong sub/method name somehow.
21:51 MOAR-f00li5h is now known as f00li5h
pmichaud "Every class gets a (default) .new method for free" 21:52
might add "default" in there.
masak aye.
pmichaud: "give_ticket"?
pmichaud or "get_ticket" 21:53
masak doesn't that have the same problems as "collect"?
maybe just "dispense_ticket"? 21:54
pmichaud that works too
masak makes it so
pmichaud "collect" is also an adjective and a noun so it might be a little ambiguous.
masak ah -- I didn't know that :) 21:55
pmichaud well, we have "collect calls"
and "collect" is also a form of prayer
masak in Sweden it's the money you give during service.
though I guess that might be a derived meaning... :) 21:56
pmichaud wonders about Platonic Programming after reading masak++ 's post 21:57
flussence typo! s/pretict/predict/
masak thank you. fixing.
pmichaud yes, instead of one dispenser giving an infinite number of tickets, we now have infinite dispensers. :) 21:58
masak Oops. :-)
pmichaud The heat death of the universe will undoubtedly follow shortly, all because everyone is greedy for a free lunch. :)
masak bastards.
pmichaud (insert pity state of Greek economy quote here.)
*pithy
masak well, pity as well :P
and keep in mind that the Greeks *invented* platonism! 21:59
pmichaud lol... I didn't quite make that connection. masak++
time for me to change locations -- bbiaw
21:59 pmichaud left
jlaire masak: before "Oops.", the last .collect should be on $d2 22:00
it's $d1
oh, F5 and it's fixed 22:02
masak yes, but thanks :) 22:03
22:03 drbean joined 22:09 felliott left 22:10 felliott joined 22:11 am0c_ left, tadzik joined, pmichaud joined 22:12 Util joined, PerlJam joined 22:16 amkrankruleuen left, Mowah left, hatseflats joined
pmichaud \o/ feather back 22:20
masak well, that's it for me. 'night, #perl6. 22:23
22:23 masak left 22:26 amkrankruleuen joined 22:31 kst` is now known as kst, Eevee joined 22:35 Tedd1^ joined 22:37 Tedd1 left 22:42 ab5tract left
TimToady pugs: macro add'em($a,$b) { "($a + $b)" }; say add'em(3,4); 22:43
p6eval pugs: OUTPUT«*** ␤ Unexpected "'"␤ expecting "::", "handles", "is", bare trait, subroutine parameters, trait or block␤ at /tmp/uLfxdP92dL line 1, column 10␤»
TimToady pugs: macro addem($a,$b) { "($a + $b)" }; say addem(3,4);
p6eval pugs: OUTPUT«7␤»
TimToady pugs: macro add-em($a,$b) { "($a + $b)" }; say add-em(3,4);
p6eval pugs: OUTPUT«*** ␤ Unexpected "-"␤ expecting "::", "handles", "is", bare trait, subroutine parameters, trait or block␤ at /tmp/7EmN3i6ceS line 1, column 10␤»
22:44 rlb3 joined 22:47 mj41 left 22:49 dorlamm left, Chillance left 23:04 rlb3 left 23:05 rlb3 joined, cooper joined 23:15 [Coke] left 23:17 [Coke] joined 23:26 Moukeddar joined 23:29 orafu left, orafu joined 23:32 [Coke] left, Moukeddar_ joined 23:33 Moukeddar left, [Coke] joined 23:34 Moukeddar_ is now known as Moukeddar 23:39 [Coke] left, dolmen left, tokuhirom joined 23:40 [Coke] joined 23:42 Moukeddar left, molaf_ left 23:45 drbean left 23:48 cooper left 23:51 [particle]1 joined 23:53 leprevost left 23:54 [particle] left