»ö« 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.
00:17 scottp left
sorear *whew* 00:18
dalek ecza/immediate: 077e4c9 | sorear++ | src/niecza:
Fix our-sub compilation
ecza/immediate: 74027a9 | sorear++ | lib/ (3 files):
Make the unit loader tolerant of classes arriving out of preorder
sorear that was a lot of lovely firefighting 00:19
00:23 mtk left 00:33 mtk joined 00:34 Chillance left 00:36 Ali_h left
sorear /immediate is at the point where is can run fairly involved fragments like 'say [ 1,2,4 .. *>1000 ].perl' 00:41
known TODOs are regexes, subset, and "use" 00:42
TimToady I missed the point of the /immediate refactor somewhere in the backlog 00:44
sorear eliminating NieczaPassBegin
TimToady ah 00:45
jnthn oh, duh
jnthn finally finds why attributes with type parameters don't work
well, and why my fix for why they didn't work didn't work, which was far more confusing... :)
sorear niecza: augment class Int { has $!oops } # Point 1: semantic errors are caught early enough that they now can be reported with location info and as part of SORRY!ing 00:46
p6eval niecza v6-89-ge849cf7: OUTPUT«===SORRY!===␤␤Cannot augment class Int without MONKEY_TYPING at /tmp/8Iep9CMIWS line 1:␤------> augment class Int ⏏{ has $!oops } # Point 1: semantic error␤␤Unhandled exception: Check failed␤␤ at
../home/p6eval/niecza/boot/lib/CORE.setting line 4…
sorear niecza: use MONKEY_TYPING; augment class Int { has $!oops } # Point 1: semantic errors are caught early enough that they now can be reported with location info and as part of SORRY!ing
p6eval niecza v6-89-ge849cf7: OUTPUT«Unhandled exception: attribute oops declared in an augment␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/NieczaPassBegin.pm6 line 276 (NieczaPassBegin Attribute.begin @ 11) ␤ at
../home/p6eval/niecza/src/NieczaPassBegin.pm6 line…
sorear later, after /immediate is merged, I will modify niecza's copy of STD to use niecza's internal symbol table 00:50
this will eliminate all bugs where the two symbol tables get out of sync 00:51
01:00 noganex_ joined
jnthn Ah, found the issue. Too tired to fix it now though... 01:01
Anyway, means role Foo[::T] { has T $.x } is almost working. 01:02
01:02 bitpart left
jnthn sleep & 01:03
01:04 noganex left
dalek kudo/nom: 15dd8b9 | jnthn++ | src/binder/container.c:
Improve assignment failure errors.
01:06
ecza/immediate: 7ed0712 | sorear++ | src/ (2 files):
Actions mergeback
01:15 benabik left
sorear wonders what conclusion to draw from the process surrounding Parrot#1589 01:16
dalek ecza/immediate: da7bcf9 | sorear++ | src/niecza:
Reimplement subset
01:26
01:26 benabik joined 01:42 tonginbox joined
tonginbox hi 01:42
01:45 tonginbox left
sorear people are so impatient these days 01:48
dalek kudo/nom: ac99523 | pmichaud++ | / (71 files):
git mv src/CORE.setting src/core
01:58
02:00 bluescreen10 left
dalek kudo/nom: 69a2ecc | pmichaud++ | src/Perl6/Actions.pm:
Restore term:<*> constructing an instance of Whatever.
02:08
02:09 whiteknight left
dalek kudo/nom: e86292d | pmichaud++ | src/core/List.pm:
Enable List.gimme to understand Whatever argument.
02:13
kudo/nom: 73b522e | pmichaud++ | src/core/ (2 files):
Eliminate temporary Parcel.rpa message now that attribute access works again.
sorear I thought GIMME was dead 02:14
02:14 kid51 left 02:22 wamba left
Util rakudo: my @a = <a b>; my @x = <x y>; .say for map { @($_).Str }, (|@a, |@x); 02:37
p6eval rakudo 4a6d21: OUTPUT«a b␤x y␤»
sorear | probably isn't doing what you think it is there 02:38
Util I want @a and @x to maintain their separate identity as they pass through the map 02:39
sorear try $(@a), $(@x) 02:40
Util I wanted to ask if @($_).Str is really they most concise way to dereference the capture.
sorear oh
you can just write ~$_
er no
@$_ is the shortest way
Util But I welcome your thoughts on how to better pass the arrays in.
sorear $(@a), $(@b) is the most direct way to pass arrays as items 02:41
Util thanks; will play with that 02:42
pmichaud I searched the #perl6 logs for "gimme" and didn't see anything that indicated it was dead.
and it seems to be working out well 02:43
sorear what's your gimme do? 02:46
pmichaud it's taken the place of master's !fill
sorear or ... I'll just check the code
02:46 envi_laptop joined
sorear gimme is perhaps an unfortunate name; it's the Perl 5 primitive underlying wantarray() 02:46
pmichaud I'm open for another name; "gimme" is the only name that TimToady said was "fine" :) 02:47
sorear what was wrong with "fill"?
pmichaud anyway, gimme reifies the first $n items, and returns the number of reified items.
gimme(*) reifies as many as it can consistent with "mostly eager" semantics 02:50
Util sorear: thanks, that was what I needed! 02:53
02:57 jaldhar joined 02:58 kanishka joined
dalek kudo/nom: f17f312 | pmichaud++ | src/core/Array.pm:
Add a preliminary Array.STORE.
03:10
kudo/nom: 0e64691 | pmichaud++ | src/Perl6/Actions.pm:
Include io_ops in the list of dynops loaded (for printerr).
pmichaud afk, sleep or something like that 03:20
dalek kudo/nom: 71c3f79 | pmichaud++ | src/core/ (2 files):
Add List.shift. Write better cheating versions of &say and &print.
03:21
03:21 hudnix left 03:24 Su-Shee_ joined 03:25 furryfishy left, furryfishy joined, fish|ipad left, fish|ipad joined, furryfishy left, furryfishy joined, fish|ipad left, fish|ipad joined
dalek kudo/nom: f2c0012 | pmichaud++ | src/core/List.pm:
Add List.elems.
03:26
03:27 Su-Shee left 03:28 [particle]1 joined 03:29 [particle] left, woosley left 03:30 woosley joined 03:32 wooden joined, wooden left, wooden joined
dalek ecza/immediate: e7ca1ee | sorear++ | src/niecza:
Reimplement regex_def
03:33
kudo/nom: 4df27a3 | pmichaud++ | src/core/List.pm:
Add List.Bool.
03:36
03:59 woosley left
dalek ecza/immediate: 23625e7 | sorear++ | / (2 files):
One more fix to signature handling, can now compile entire setting
04:03
04:06 f00li5h left, awwaiid joined, f00li5h joined 04:07 ymasory left 04:08 ymasory joined
dalek ecza/immediate: 18298ce | sorear++ | src/niecza:
Reimplement use
04:13
sorear that was anticlimatic. I thought I was saving the hardest for last...
04:20 kanishka left 04:22 ewemoa joined 04:23 donri left 04:29 kaare_ joined 04:34 gbacon_ left 04:43 furryfishy left
sorear nom: say "hello" 04:44
p6eval nom: OUTPUT«sh: ./perl6: not found␤»
sorear pfff
moritz!
dalek ecza/immediate: 6b88f1d | sorear++ | src/niecza:
More regex fixes, embedded blocks
05:08
ecza/immediate: 9e7781a | sorear++ | / (2 files):
Fix shadowing of lexical classes, computed name scoping
05:26 donri joined 05:32 Tedd1 joined 05:33 Tedd1^ left 05:36 daniel-s joined 05:40 molaf joined
sorear TimToady: I am wondering if it makes sense to have something like <commit> in newlex and friends 05:47
backtracking over a MOP operation ... causes problems.
dalek ecza/immediate: fa1e13c | sorear++ | src/niecza:
Avoid .newlex (via embeddedblock) in <foo> parsing, give LTM more info
05:50
05:57 ChrisDennis left 06:01 ymasory left
dalek ecza/immediate: 3b8127a | sorear++ | src/niecza:
Parametric role bodies do not need to be run immediately
06:02
sorear at this point /immediate can compile the test suite 06:03
it runs up to test 635/1008... just a few more yaks...
moritz std: # just testing 06:04
p6eval std 37a0cdd: OUTPUT«ok 00:01 115m␤»
06:06 Tedd1^ joined, Tedd1 left
moritz sorear: nom in evalbot doesn't work because the build fails 06:06
irclog.perlgeek.de/perl6/2011-06-10#i_3897806 06:07
I'll try a perl-5.14.0 once it has finished to compile
06:07 ChrisDennis joined
dalek ecza/immediate: 835b5da | sorear++ | test.pl:
Fiddle two tests for tightened pad rules
06:14
ecza/immediate: 6ad299e | sorear++ | src/niecza:
Only real signatures should set :noinit
sorear test.pl now runs to completion 06:15
moritz what about spectest?
sorear (Failed 10/1008)
moritz: not going to try until internal tests pass
moritz somehow perlbrew on p6eval server is busted 06:16
even after perlbrew switch perl-5.14.0 the output of perl -v says it's 5.12.something 06:17
btw the patches to rakudo/nqp did not significantly decrease compilation time of the setting 06:18
from ~55s to ~53s on my machine 06:19
sorear seems most of the failing tests are just fallout from the fact that bare blocks are no longer considered "global" blocks for protolexpad purposes
(btw, yesterday I got jjore++ to explain to me how this used to work) 06:20
moritz I'm going to nuke the perlbrew dir on the p6eval server, and start a new one 06:22
so for maybe a few hours p6eval won't work really well
std: 1 06:24
06:24 p6eval left
sorear I could get very close to the Perl 5 semantics, at the cost of requiring an atomic memory operation on the first entry to any sub 06:27
heh. now that I say that it sounds almost reasonable. 06:28
06:29 woosley joined 06:32 Tedd1 joined 06:34 Tedd1^ left
sorear hrm! 06:39
once settings are factored in ... Perl 5's semantics aren't all that hard
dalek kudo/nom: 2a50310 | moritz++ | src/core/operators.pm:
add a lot of coercive numeric operators
06:43
06:44 wamba joined
dalek kudo/nom: 5361de1 | moritz++ | src/core/operators.pm:
add infix:<div>, and cheat on infix:</>(Int, Int) until we get Rats going again (mostly needs object construction)
06:59
07:00 thou left 07:07 fish|ipad left 07:08 fish|ipad joined, fish|ipad left, fish|ipad joined
dalek ecza/immediate: 7e0f5d9 | sorear++ | / (3 files):
More test fiddling, fix {} type, fix Junction.perl
07:09
albot: 76c56f6 | moritz++ | evalbot.pl:
remove syntax that is deprecated in perl 5.14
07:12
07:13 p6eval joined, ChanServ sets mode: +v p6eval 07:17 fish|ipad left
moritz std: 1 07:19
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
dalek ecza/immediate: 510cdfd | sorear++ | src/niecza:
Fix prefix:sym<temp>
07:21
sorear All tests successful.
sorear starts the spectester going and wanders off for a walk 07:22
07:28 scottp joined
moritz perl6: say 41 + 1 07:31
p6eval pugs, rakudo , niecza v6-89-ge849cf7: OUTPUT«42␤»
07:48 araujo left 07:49 mj41 joined
sorear failed to parse 3 test files, failed 1-5 tests in 6 others 07:51
out of 119 files, 2084 tests... not too bad
failed to parse STD outright... 07:52
agenda for the next few days:
07:52 JimmyZ joined
sorear * fix remaining regressions as found by make spectest and make reboot 07:52
* merge branch 07:53
* optimization tweak: {YOU_ARE_HERE} can be treated as a run-once sub
* kill NieczaPassBeta, run it during the parse too 07:54
* try to kill NieczaPassSimplifier
* at this point the only passes in the compiler are 1. parse 2. write to disk
* start modifying STD to use Niecza's own symbol tables. Gut $*CURLEX. (This could be a measurable speedup) 07:55
JimmyZ just curious, what's the difference between $a.Int and $a as Int
sorear * port tryfile/STD to current Niecza, to see how much closer it can be when not supporting Niecza :) If sufficiently close, try to lure TimToady.
EOA 07:56
JimmyZ: $a.Int is a valid expression, $a as Int is a valid parameter
they cannot be used in any of the same syntactic contexts
how do you want them compared?
JimmyZ sorear: just saw recent nom commits, some times they use $a as Int as parameter, sometimes they use $a as parameter, but use $a.Int in the method 08:01
08:02 daniel-s left
sorear JimmyZ: I think those are the same 08:02
using $a.Int in the method will be significantly faster currently
JimmyZ I thought $a as Int is faster 08:03
sorear $a as Int requires the binder to call the Int method
but the binder is written in C, so an inferior runloop is needed
those are quite slow ATM
08:03 woosley left
JimmyZ I see, that is what whiteknight++ said, pir is faster than C 08:05
08:08 mj41 left 08:10 mishnik joined
mishnik Hi has anybody realize SOAP::LITE on Racudo? 08:11
08:12 mtk left 08:13 mishnik left
dalek ecza/immediate: c4eed9f | sorear++ | lib/CORE.setting:
make Bool.Int DTRT
08:15
ecza/immediate: 32dd320 | sorear++ | src/niecza:
Fudge {YOU_ARE_HERE} handling so MAIN's UNIT:: can be a global block
sorear nom: say 2 08:16
p6eval nom: OUTPUT«2␤»
sorear nom: class Foo { ... }; say Foo 08:17
p6eval nom: OUTPUT«The following packages were stubbed but not defined:␤ Foo␤␤current instr.: 'nqp;Perl6;SymbolTable;assert_stubs_defined' pc 2767 (src/gen/perl6-symboltable.pir:778)␤»
sorear nom: my class Foo { }; if 1 { my class Foo { } }
p6eval nom: ( no output )
sorear nom: my class Foo { }; my class Foo { }
p6eval nom: OUTPUT«Illegal redeclaration of class 'Foo' at line 1, near "{ }"␤current instr.: 'nqp;HLL;Grammar;panic' pc 26397 (src/stage2/gen/NQPHLL.pir:7039)␤»
sorear nom: package Foo { ... }; class Foo { method bar() { } }
p6eval nom: OUTPUT«Cannot add a method to a class at line 1, near "}"␤current instr.: 'nqp;HLL;Grammar;panic' pc 26397 (src/stage2/gen/NQPHLL.pir:7039)␤»
sorear nom: class Foo { method bar() { } }
p6eval nom: ( no output )
sorear phenny: tell jnthn NOMBUG: package Foo { ... }; class Foo { method bar() { } } 08:18
phenny sorear: I'll pass that on when jnthn is around.
sorear phenny: tell jnthn S12-class/stubs.t line 15
phenny sorear: I'll pass that on when jnthn is around.
08:19 molaf left 08:21 mtk joined
sorear nom: my $x = 0; class Foo { method bar() { $x++ } }; Foo.bar; say $x 08:21
p6eval nom: OUTPUT«Could not find sub &postfix:<++>␤current instr.: 'bar' pc 931 ((file unknown):341) (:1)␤»
sorear nom: my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x
p6eval nom: OUTPUT«1␤»
sorear nom: { my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x }
p6eval nom: ( no output )
sorear nom: { my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x }() 08:22
p6eval nom: OUTPUT«Lexical '$_' not found␤current instr.: '_block18' pc 1060 ((file unknown):353) (:1)␤»
sorear nom: if 1 { my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x }
p6eval nom: OUTPUT«1␤»
sorear nom: BEGIN { say 2 }
p6eval nom: OUTPUT«Could not find sub !UNIT_OUTER␤current instr.: 'nqp;Perl6;Actions;_block3887' pc 37258 (src/gen/perl6-actions.pir:12496)␤»
sorear phenny: tell jnthn Could you explain to me how my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x; # is made to work in nom? 08:25
phenny sorear: I'll pass that on when jnthn is around.
dalek ast: 1b51b3a | sorear++ | S12-class/stubs.t:
Fudge for a regression that needs jnthn feedback
08:30
ast: a2ccce2 | sorear++ | S03-junctions/autothreading.t:
[S03-junctions/autothreading] Use our to avoid testing unrelated protolexpad handling
ecza/immediate: 89d19ed | sorear++ | lib/CORE.setting:
prefix:<so> needs to take Mu
08:33
08:36 Trashlord joined 08:43 JimmyZ left 08:47 wamba left
dalek ecza/immediate: 819cf4a | sorear++ | src/niecza:
Fix metaop compilation
08:56
08:59 jfried joined 09:04 scottp left 09:09 Tedd1^ joined 09:10 Tedd1 left
sorear two more failing spetest files for the morning 09:13
sorear out
09:14 Su-Shee_ is now known as Su-She, Su-She is now known as Su-Shee 09:31 daniel-s joined 09:40 Trashlord left 09:41 masak joined
masak morning, #perl6 09:41
wow, it's great to see pmichaud++ back-n-hackin', and not only jnthn++ engaging him in conversation, but sorear++ too!
tadzik like a family reunion :) 09:42
good morning masak
masak it's the weekend! \o/ 09:43
tadzik today is gsocday :) 09:44
09:44 Trashlord joined
tadzik as soon as I wake up properly 09:45
masak pours a bucket of ice-cold water over tadzik
better? :P
tadzik gah!
masak oh, not good?
tadzik I saw it a bit too late
masak did I mess up...?
that's kinda the point.
tadzik prfrfrbrbt 09:46
masak sorry, sorry...
tadzik ;)
masak ;)
I would like to say "it won't happen again"... but... :P
Juerd sorear: No
tadzik now I'm scared to go to YAPC with you guys
masak :P 09:47
09:47 breatharian joined
breatharian howdy 09:47
masak breatharian: hi!
breatharian Good morning! :-)
tadzik imagines a herd of zebras stumbling into random rooms with buckets of water screaming "commit flood!"
masak breatharian: "breatharian" sounds like a political party. I'm in!
tadzik: next hit on Youtube, clearly. 09:48
breatharian So, I got some pretty good help on this question: stackoverflow.com/questions/6300674...40#6303440
From tadzik for example. :-)
tadzik masak: I can see those comments on youtube "so that's why Perl 6 is taking so long"
breatharian: oh, hi :)
masak rakudo: my @a = 1, 2, 3; my @b = 10, 20, 30; for @a Z @b -> $a, $b { say $a + $b } 09:49
p6eval rakudo 4a6d21: OUTPUT«11␤22␤33␤»
masak breatharian: like that, for example.
breatharian moritz mentions that the official spec version of 'zip' can handle more than 2 lists. Are there any examples of this somewhere?
tadzik I guess in the spec :)
masak breatharian: the infix:<Z> interleaves the two arrays, and '-> $a, $b' pulls out two at a time.
breatharian hehe
moritz I think pugs implements it 09:50
tadzik <a b> Z~ 1,2 Z+ 3,4
masak breatharian: infix:<Z> is s'posed to handle more than two lists too. it just doesn't in Rakudo.
tadzik for egg sample
oh, I think I see a spectypo
(<a b>; 1,2; 3,4).zip.lol.map { .reduce({$^a ~ $^b + $^c}) }
masak alpha: my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = 7, 8, 9; .say for @a Z @b Z @c
p6eval alpha : OUTPUT«1␤4␤7␤2␤5␤8␤3␤6␤9␤»
tadzik doesn't that miss a colon after 'map'?
masak alpha did it.
tadzik: yes.
tadzik or a bunch of parns 09:51
tadzik fixes
masak right.
now it's TTIAR.
tadzik rakudo: (<a b>; 1,2; 3,4).zip.lol.map({ .reduce({$^a ~ $^b + $^c}) }).perl.say 09:52
p6eval rakudo 4a6d21: OUTPUT«Method 'zip' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/8MDNvYnl2Q␤»
masak aww.
dalek ecs: 62b8b39 | tadzik++ | S03-operators.pod:
[S03] Fix ttiars in Zip operators
masak tadzik: also, we don't support the ';' in the slice correctly yet.
moritz pugs: for <a b> Z 1, 2 Z <FOO BAR> -> $a, $b, $c { say "$a$b$c" }
p6eval pugs: OUTPUT«a 1 FOOb 2 BAR␤»
breatharian I wonder if zip is really the most idiomatic way? I mean, for N lists, you'll have to list N-1 operators. 09:53
(or so it seems)
tadzik breatharian: you can [Z+] @a, @b, @c or whatever
like with any other op, see:
breatharian tadzik, Aha
tadzik rakudo: say [+] 1, 2, 3, 4
p6eval rakudo 4a6d21: OUTPUT«10␤»
breatharian Oh wow, rakudo gives "Cannot resume dead coroutine." for [Z+] @a, @b, @c 09:55
and exits
tadzik many things in Perl 6 make you avoid writing lotsa loops
breatharian: I guess that's Rakudorian for "not yet implemented, sorry" 09:56
masak breatharian: what version of Rakudo is that?
breatharian It's rakudo from git from a few days ago.
moritz rakudo: say [Z+] (1, 2), (3, 4), (5, 6)
p6eval rakudo 4a6d21: ( no output )
masak rakudo: my @a = 1, 2, 3; say [Z+] @a, @a, @a
p6eval rakudo 4a6d21: ( no output )
masak tries locally
tadzik same thing locally
masak tadzik: with which one-liner? 09:57
tadzik masak: my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = 7, 8, 9;[Z+] @a, @b, @c
masak can't reproduce it locally
masak submits rakudobug
breatharian So Z can apply to an operator. Can I apply it to an anonymous sub as well?
tadzik I guess so
masak tadzik: strangely, I don't get it over here.
tadzik oh?
masak maybe I need to update my Rakudo :) 09:58
tadzik oh, I'm on gsoc-podparser btw
masak tadzik: yes, but breatharian likely isn't.
tadzik For the general form, any existing, non-mutating infix operator may be used.
masak hm, I was just some Configure.pl and build/ changes behind... 09:59
tadzik rakudo: (<a b>; 1,2).zipwith(&[~]).perl.say
p6eval rakudo 4a6d21: OUTPUT«Method 'zipwith' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/I1u1owxQ_s␤»
breatharian www.breatharian.com
;-)
(I'm not really into that stuff) :-D
masak tadzik: could you please nopaste your local dead-coroutine error? along with your local rakudo version?
breatharian But you gotta love it!
tadzik breatharian: nick-coincidence? 10:00
10:00 ewemoa left
tadzik masak: wklej.org/id/544470/ 10:00
masak tadzik: dz.
tadzik masak: prsz
masak :P 10:01
tadzik: hm, is that a compile-time error? what happens if you 'say "alive"' at the *beginning* of the program?
tadzik tadzik.com is quite more pleasant to look at :)
erm, nuts 10:02
> say 'alive'; my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = 7, 8, 9;[Z+] @a, @b, @c
alive
no other errors
masak hah! :)
breatharian brb
10:02 breatharian left
masak this all goes into the ticket. tadzik++ 10:02
tadzik weird
masak++ for actual work :)
masak no worries, I really like this job :) 10:04
10:05 breatharian joined
breatharian Hmm... If I do: say 'alive'; my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = 7, 8, 9; say ([Z+] @a, @b, @c) 10:06
I don't see the second 'say' result.
tadzik, Not really a nick-coincidence. :-) 10:08
masak breatharian: I don't see the result there either.
breatharian: but we know that 'say' sometimes swallows errors.
breatharian: maybe try without 'say'.
oh! 10:09
breatharian masak, Right, in that case the output of the Z+ is not listed.
But at least it doesn't crash. :-)
masak I got it here on the REPL.
masak kicks the REPL, hard
breatharian :-( Be nice to your REPL.
masak my REPL isn't nice to me. :(
breatharian I just introduced mine to rlwrap. :-) 10:10
It's not the REPLs fault! It's just talking to rakudo. :-)
masak what lib must Parrot find for history to work in the REPL?
tadzik readline I think
masak breatharian: you're a very reasonable person.
please stick around ;) 10:11
tadzik: oh, natch. thanks.
breatharian haha
I met dukeleto in Portland back in 2008 at mini Factor meetup.
(hi dukeleto) 10:12
masak auto::readline - Does your platform support readline..................no.
tadzik masak: libreadline-dev or something
on debianesque systems
masak tadzik++
aye.
10:13 jimmy1980 joined
breatharian What is the 'alpha' bot running? 10:13
masak breatharian: an older Rakudo strain.
breatharian aha
Funny that alpha can handle it then. 10:14
masak "ha ha" :P
10:14 woosley joined
masak breatharian: I was the last alpharian, I think. :) 10:14
for reasons like that.
and because I was lazy and didn't want to translate oodles of module code... 10:15
moritz you could have patched master to do what alpha was capable of :-)
masak but that's *hard*...
breatharian So with "[Z+] @a, @b, @c" I'm zipping with +. What's the syntax to zip with an anonymous sub? 10:18
masak breatharian: zipwith(sub { ... }), something like that. 10:19
breatharian aha
masak you can only do Z with operators; with other kinds of Code you have to use &zipwith
breatharian kewl
10:20 whiteknight joined
masak token longname { <name> {} [ <?before ':' <[ a..z A..Z _ \< \[ \« ]>> <colonpair> ]* } 10:22
TimToady: some guy called tchrist told me that doing A..Z in today's Unicode world is always wrong... :P
well, he didn't exactly tell me. I could hear him shouting it through the massive missive of his on Stackoverflow. 10:23
10:24 awoodland joined 10:26 Mowah joined
masak breatharian: ah; the actual syntax is (<a b>; 1,2).zipwith( sub($a, $b) { $a + $b } ) 10:27
breatharian: (but (<a b>; 1,2) doesn't work yet)
breatharian masak, Aha, thanks. 10:29
So in theory this should be OK: (100,200,300 ; 10,20,30 ; 1,2,3).zipwith( sub ($a,$b,$c) { $a + $b + $c } ) 10:31
and yield 111 222 333
alpha: (100,200,300 ; 10,20,30 ; 1,2,3).zipwith( sub ($a,$b,$c) { $a + $b + $c } )
p6eval alpha : OUTPUT«Method 'zipwith' not found for invocant of class 'List'␤in Main (file src/gen_setting.pm, line 324)␤»
breatharian (don't worry alpha, I won't kick you) ;-) 10:32
tadzik turns out our Z is less than speccy 10:33
masak breatharian: I'm not sure how zipwith is meant to work with subs of arity other than 2.
breatharian masak, ok
masak breatharian: either the above will work without a hitch, or you're meant to provide an arity-2 thingy, and it'll do the addition twice.
breatharian Where's TimToady when you need him? :-) 10:34
masak oh, he's around :)
but likely asleep right now.
breatharian I guess I'm wondering what Perl 6's answer is to Scheme's 'for-each' is. for-each works with 2 or more lists.
www.r6rs.org/final/html/r6rs/r6rs-Z...e_sec_11.9 10:35
Scheme's 'map' also works with 2 or more lists. 10:36
masak things are factored slightly differently in Perl 6, I'd say. 10:37
breatharian There's also vector-map and vector-for-each
masak but I believe we still cover the same semantic territory, what with pointy blocks and infix-prefix Z.
10:39 araujo joined, araujo left, araujo joined
breatharian Hmm, this appears to work with 2 or more lists: cpan.uwinnipeg.ca/htdocs/Operator-U.../Util.html 10:39
E.g. zipwith(',', ['a','b'], [1,2], ['x','y']) 10:40
(I know, it's Perl 5) :-)
sorear tadzik: if it makes you feel any better, I won't be at YAPC::EU this year :( 10:41
tadzik :( 10:42
masak awww
breatharian Ah, but Operator::Util zipwith doesn't work with subs...
masak odd. 10:43
seems like that would be easier than strings.
sorear wait
this is actually quite easy :p
niecza: say ((100,200,300) Z+ (10,20,30) Z+ (1,2,3)).perl
p6eval niecza v6-89-ge849cf7: OUTPUT«(111, 222, 333).list␤»
moritz sorear++ 10:44
tadzik nice
sorear breatharian: [Z+] @x, @y, @z won't work because [] forgets where one array stops and the next begins
tadzik oh 10:45
breatharian sorear, Nice. However, with that form, for N lists, you must have N-1 operators. What's the form where you only list the operator *or* anonymous sub once and use it for all the lists?
jnthn morn....afternoon, #perl6
phenny jnthn: 08:18Z <sorear> tell jnthn NOMBUG: package Foo { ... }; class Foo { method bar() { } }
jnthn: 08:18Z <sorear> tell jnthn S12-class/stubs.t line 15
jnthn: 08:25Z <sorear> tell jnthn Could you explain to me how my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x; # is made to work in nom?
masak we need '{Z+} (@a; @b; @c)' or something :)
sorear niecza: say zipwith({ $^a + $^b + $^c }, (100,200,300), (10,20,30), (1,2,3)).perl # NOT PORTABLE 10:46
breatharian maybe I should install niecza :-)
p6eval niecza v6-89-ge849cf7: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'zipwith' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1146 (STD P6.comp_unit @ 31) ␤ at
masak jnthn: morning, sömntuta :)
p6eval ../home/p6eval/niecza…
moritz what's wrong with [Z+] @a; @b; @c ?
masak oh!
moritz++
sorear niecza: say zipop({ $^a + $^b + $^c }, (100,200,300), (10,20,30), (1,2,3)).perl # NOT PORTABLE
p6eval niecza v6-89-ge849cf7: OUTPUT«(111, 222, 333).list␤»
breatharian niiiice
masak moritz: but I thought [op] worked by replacing commas with op
sorear moritz: mainly the fact that the ; ends the statement :) 10:47
masak moritz: at least conceptually :)
moritz sorear: modulo parens
10:47 jimmy_ joined
sorear moritz: the problem with that is that nobody here has the foggiest clue how slicelists are supposed to work 10:47
moritz niecza : my @a = 1, 2, 3; my @b = 10, 20, 30; say [Z+](@a; @b).perl
niecza: my @a = 1, 2, 3; my @b = 10, 20, 30; say [Z+](@a; @b).perl 10:48
p6eval niecza v6-89-ge849cf7: OUTPUT«[10, 20, 30].list␤»
masak case in point.
like Rakudo, it picks the last list.
jnthn nom: say "om nom nom!" 10:49
p6eval nom: OUTPUT«om nom nom!␤»
jnthn \o/
breatharian Well, I've got to run for now. Latar. 10:50
10:50 breatharian left
masak breatharian: thank you for reminding us all to breathe! 10:51
dalek ecza/immediate: 9f4b95c | sorear++ | src/niecza:
Fix our-enum alias generation, anonymous enums
11:03
sorear all spectests fixed
11:10 Shozan joined
jnthn sorear: Ah, the NOMBUG is a known "didn't get to that yet". :) 11:12
sorear: Thanks for the reminder :) 11:13
11:13 MayDaniel joined
jnthn nom: my $x = 0; class Foo { method bar() { $x = $x + 1 } }; Foo.bar; say $x 11:13
p6eval nom: OUTPUT«1␤»
11:14 araujo left
jnthn sorear: I'm...not sure how to answer your question. I don't really do anything special to make that work. 11:14
sorear: Just make sure all the blocks are in the correct lexical scopes.
And then it "just works"
dalek kudo/nom: 825da2b | moritz++ | src/core/operators.pm:
add prefix:<so>
11:18
kudo/nom: d0d51dc | moritz++ | / (2 files):
add simplistic Rat; no literals yet
jnthn moritz: Note that it'll be "does Real" soonish 11:19
But yes, I need to fix MI :) 11:20
Well
MI with attributes
:)
masak waitwhat does MI have to do with attributes? 11:22
jnthn masak: er? :) 11:23
masak: Has quite an impact on attribute storage, potentially.
masak oh!
yeah. 11:24
masak un-asks question
jnthn And P6opaque is -OSI :)
With "jnthn, remember to do MI" hooks here and there :)
jnthn mostly hates MI
masak doesn't plan on using MI in Perl 6, ever 11:25
well, maybe for finding bugs :P
jnthn Well, I don't really advocate removing it, but I don't feel a need to make it especially efficient either.
It's not like we don't have roles. :) 11:26
masak implement a one-in-a-hundred error message saying "SORRY: You're using multiple inheritance. And it's 2011! Just thought we'd let you know." 11:32
jnthn Heh. I just looked at why compiling CORE.setting.pir to PBC takes so long. 11:33
According to the profile, we spend almost all the time in register allocation...
tadzik fun with infinite registers 11:34
jnthn Computing the du-chain is O(2 * num_symbols * num_instructions)
Which basically means that the time to compile that file is going to grow as a square. 11:36
Well, to compile the deserialization thingy.
sorear jnthn: well, if you didn't do anything "special" to make it work, could you please still explain *how* it works? :) 11:42
masak-- # C3 Multiple inheritance has been very good to me, it doesn't need senseless hating
masak sorear: glad to hear that. I'm still on the lookout for good examples of where MI is useful and roles can't be used instead. 11:43
sorear well sure you CAN use roles instead, but why? 11:44
niecza's current factoring of enums using MI would be marginally trickier with roles
masak oh, and even I, as the senseless MI hater I am, can see that C3 is a big improvement over most other schemes.
sorear (if niecza had roles, which it doesn.t) 11:45
masak sorear: why? because roles find collisions at composition time.
jnthn sorear: The method's outer points to the class block, whose outer points to the main body.
nom: my $x; my $y = 1; { $x = sub { $y = $y + 1 } }; $x(); say $y; 11:47
p6eval nom: OUTPUT«get_pmc_keyed() not implemented in class 'Integer'␤current instr.: 'nqp;Perl6;Actions;_block7293' pc 61636 (src/gen/perl6-actions.pir:0)␤»
jnthn er, what...
sorear nom: if 1 { my $x; class A { method b () { $x = 5 }; }; A.b; say $x }
p6eval nom: OUTPUT«5␤»
sorear doesn't the if { } generate a sub?
wait, I think I get this 11:48
if must not be using pir::clone
jnthn sorear: If you mean Parrot sub, yes
No, we take some care over when to clone
Not just blindly cloning all over :)
That'd be slow and get stuff wrong. :)
sorear Where is the care? 11:49
jnthn I suspect some of it's in PAST::Compiler
Oh, maybe part of it is calling block_closure in the actions, or whatever we called it.
11:50 gbacon_ joined
sorear nom: sub foo($x) { if 1 { sub () { $x }; }; }; my $a = foo(5); my $b = foo(6); say $a(); say "alive" 11:50
p6eval nom: ( no output )
sorear I THINK I BROKE IT
jnthn nom: say 1; { say 2 }; say 3;
p6eval nom: OUTPUT«get_pmc_keyed() not implemented in class 'Integer'␤current instr.: 'nqp;Perl6;Actions;_block7293' pc 61636 (src/gen/perl6-actions.pir:0)␤»
jnthn oh, heh
11:50 scottp joined
sorear nqp: sub foo($x) { if 1 { sub () { $x }; }; }; my $a := foo(5); my $b := foo(6); say($a()); say("alive") 11:52
p6eval nqp: OUTPUT«5␤alive␤»
sorear nqp: my $x; class A { method b () { $x := 5 }; }; A.b(); say($x); 11:53
p6eval nqp: OUTPUT«5␤»
jnthn pmichaud++ # sorted a bunch of this stuff out :)
sorear nqp: if 1 { my $x; class A { method b () { $x := 5 }; }; A.b(); say($x); }
p6eval nqp: OUTPUT«5␤»
sorear you'll need to be more patient with me 11:54
I still do not get how this is possible
jnthn sorear: I'm still trying to work out what you're missing.
sorear jnthn: why isn't there more than one copy of "$x"? 11:55
one per sub invocation, plus one for statics?
jnthn In the above? 11:56
sorear yes
jnthn Where's the sub invocation?
sorear if 1 { }
11:56 daniel-s left 11:57 daniel-s joined
jnthn Ah, maybe what's missing is that the class body (and in turn the method) are lexically captured. 11:57
So they see the correct $x
sorear "lexically captured"?
jnthn capture_lex
masak as opposed to what?
sorear jnthn: when are they captured? 11:58
jnthn sorear: Outer block entry, IIRC.
jnthn didn't actually implement these bits, fwiw :)
pmichaud++ can probably give more detailed answers.
I'm mostly just happy that they work. :)
11:59 envi_laptop left
sorear ok. 11:59
I'll talk to pmichaud if he shows up again this month
jnthn sorear: Maybe try --target=pir'ing the code you did above too. It may make things more clear.
(Or less clear... :))
sorear jnthn: I'm building a newer nom now for that purpose 12:00
can't --target=pir on p6eval/nom yet :)
(or can you?)
(probably with some Q:PIR...)
jnthn I don't know of a way. 12:01
sorear you used to be able to explicitly call Perl6::Compiler with :target<pir> on rakudo/ng in p6eval 12:02
with some other fudges
jnthn Ah, OK
That was more by Parrot namespaces being global rather than design, I suspect. :) 12:03
jnthn gets back to the bug he didn't manage to fix last night
sorear nom is kinda infuriating, I feel like I've lost so much ground :p 12:04
12:04 araujo joined
jnthn sorear: Being able to do nom took a LOT of effort designing and building a new set of primitives. 12:05
It's basically what I've done since Rakudo *.
I never imagined it'd take until June 2011 to actually start on nom itself...
Well, May, but... 12:06
sorear nom pir is unreadable 12:09
masak don't think of it as losing ground. think of it as Rakudo becoming an implementation more worthy of comparing oneself against. ;) 12:10
jimmy_ parrot -- if nom.pir is not readable; 12:11
sorear jnthn: How does the .lex "$?PACKAGE", $P25 stuff work?
12:13 jimmy_ is now known as JimmyZ
sorear jnthn: why do your thaw subs use control flow? 12:15
jnthn sorear: .lex "$?PACKAGE", $P25 declares a register to use for storage of $?PACKAGE 12:16
sorear: Control flow is just "are we building the world" vs "are we fixing up"
Yes, nom PIR is a horrible read.
masak I'm not buying the sequel.
jnthn :P
sorear: It only emits both because it was, in theory, helpful for me when tracking down problems. 12:17
sorear: It could really emit one or the other.
Since I never really ran into the sort of problems it's dealing with... 12:18
sorear goes to read perl6lexpad and perl6lexinfo
12:18 kid51 joined 12:20 Fuad joined
sorear jnthn: how much of those did you write? 12:20
Fuad hello
sorear hello, welcome, Fuad 12:21
Fuad sorear, hello, thanks
jnthn sorear: The lot, though it's mostly copies NQPLexPad and NQPLexInfo 12:22
sorear: They really just add static lexpad functionality.
sorear: Other than that they do what the Parrot LexPad and LexInfo do.
dalek ecza/immediate: dd266aa | sorear++ | src/niecza:
Fix nontrivial protoregex signature check
12:23
sorear hopes to still be relevant by YAPC::EU 12:24
12:24 araujo left
masak sorear: I think you worry too much. 12:24
12:24 araujo joined
jnthn sorear: fwiw, the lexpad situation in nom still annoys me. 12:25
They're one of the fewish things we have left that aren't 6model objects 12:26
12:31 awoodland left
sorear masak: sorry, that was meant as a joke but I forgot to apply the :) 12:32
masak happy to hear that.
12:33 araujo left
masak if nothing else, niecza provides an invaluable second data point. 12:33
speed is in many ways secondary to that.
12:33 araujo joined
sorear jnthn: do you want to see lexpads as SixModelObject, or as P6opaque? 12:33
wheee, /immediate can compile itself 12:34
...incorrectly
JimmyZ wheee, so I should be happy or unhappy? 12:35
masak ('sides, I still think niecza will be relatively fast.) 12:36
sorear that was genuinely unexpected. niecza's self-compilation fails on... the option parser 12:38
there are so many nastier bits of code to catch on, but no... 12:39
12:49 Chillance joined 12:50 gbacon_ left
masak :) 12:53
dalek kudo/nom: 0f9c79f | jnthn++ | src/ (2 files):
Have a shot at .VAR.
12:56
kudo/nom: 08316ac | jnthn++ | src/Perl6/Metamodel/ContainerDescriptor.pm:
Little optimization and bugfix all in one.
kudo/nom: 55eb27d | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Fix attributes in roles typed with role type parameters.
sorear jnthn: does nom use the binder to populate $/,$!,$_? 12:57
I notice an absense of code to populate them
jnthn sorear: We don't populate them at all yet.
sorear: NYI
(on nommap :)) 12:58
dalek ecza/immediate: 344f801 | sorear++ | / (2 files):
Fix "is export" on subs in modules that did not also contain classes/etc
13:12
sorear cute bug.
13:18 scottp left 13:36 lichtkind joined
sorear \o/ \o/ \o/ \o/ \o/ 13:48
make reboot finished without error. the phase 1 refactor is done. 13:49
moritz \o/ indeed
sorear tidies up a bit before merging
14:05 Fuad left 14:06 woosley left
dalek ecza/immediate: 9fe8af9 | sorear++ | src/niecza:
Fix augment cur_pkg setting
14:13
ecza/immediate: e72e1b6 | sorear++ | src/ (9 files):
Mergeback augments
14:16 JimmyZ left
dalek ecza/immediate: 2510693 | sorear++ | / (8 files):
Kill off Body, Unit, and NieczaPassBegin for real
14:32
14:32 jimmy1980 left
dalek Heuristic branch merge: pushed 60 commits to niecza by sorear 14:33
14:33 JimmyZ joined
sorear final balance: 21 files changed, 1075 insertions(+), 1463 deletions(-) 14:33
TimToady \o/ 14:34
jnthn It's nice when improvements remove code. :)
14:36 JimmyZ_ joined 14:38 JimmyZ left, JimmyZ_ is now known as JimmyZ
TimToady お疲れ様でした! 14:38
jnthn JimmyZ: I submitted BJPW talks \o/ 14:39
JimmyZ jnthn: Great! what's the subject? 14:41
jnthn JimmyZ: Submitted two, which the organizers can choose one or both of. One about Rakudo, one about Perl 6 more generally. 14:42
JimmyZ I'd like choose both ;) 14:43
*like to
seems that there will be two subject about Perl 6 and on about rakudo ;) 14:44
*one
14:44 kid51 left
jnthn :) 14:46
14:51 [particle]1 is now known as [particle]
dalek kudo/nom: 7ecee52 | jnthn++ | / (6 files):
Role summation, so class C does R1 does R2 { ... } now (at least somewhat) works. Composes methods, reports collisions. Also composes attributes from the role.
15:00
15:00 lateau joined
tadzik cool :) 15:00
jnthn Getting there, bit by bit :) 15:01
tadzik moritz: do you have a moment? 15:02
moritz tadzik: yes 15:03
tadzik or to all you friendly zebras: list item in pod6 can be any kind of block, as long as it's indentified by /^item [\d+]?/. Having a rule pod_block:sym<delimited>, also :sym<paragraph> and so on, I'm looking for some gentle way to do something like token list { <pod_block :where($<identifier> ~~ /^item/)> } 15:04
I could roll 3 new block types as I did for code and comment blocks, but I wonder if I can avoid code repetition this time 15:05
I could also distinguish between them in the action methods not in the grammar 15:06
moritz maybe have a $.is-list-item attribute or some such 15:07
doing that in the actions seems sensible
TimToady <podblock("item")>
tadzik moritz: so no treating the list as a whole, in the grammar at least? 15:08
TimToady: would that work?
TimToady it's just a method call, so you can pass arguments
jnthn We use that in Rakudo's grammar in various places.
tadzik looks around the grammar
moritz tadzik: is a list delimited in pod? 15:09
tadzik oh, no 15:10
Lists in Pod are specified as a series of contiguous C<=item> blocks. No special "container" directives or other delimiters are required to enclose the entire list
that makes lists really easy to parse :)
TimToady it seems a bit fragile if you might want to stick something else in the middle of a list 15:11
tadzik but Damian has Pod6::Block::List in his implementation, iirc
moritz if we stick to that spec, it seems like a post-processing step would be appropriate to get from list items to a list 15:12
tadzik yes
TimToady what kind of list does it default to?
TimToady hasn't read the Pod6 spec in too long... 15:13
tadzik no idea, but Perl6::Perldoc has separate Block::List and Block::Item blocks
15:13 whiteknight left
tadzik oh, it says there's an implicit =list block 15:14
15:14 MayDaniel left
tadzik reads the spec more carefully 15:14
15:15 daniel-s left
tadzik I don't see anything like this mentioned 15:15
dalek kudo/nom: 21a686e | jnthn++ | src/Perl6/Metamodel/ParametricRoleHOW.pm:
Allow roles doing roles to work.
15:16 Trashlord left
TimToady [Z+] @a, @b, @c is not going to work, since it's a listop, which flattens 15:23
you need something more like [Z+] \@a, \@b, \@c 15:25
15:26 envi_laptop joined
TimToady hmm, we don't seem to have a good way to specify a list of items on the caller's end 15:27
I don't think [Z+] \(@a,@b,@c) will work
but maybe reducing with list infixes can automatically switch to "loi" context and dwym 15:29
or use scalars as arrays as a workaround 15:32
perl6: my $a = [1,2,3]; my $b = [4,5,6]; my $c = [7,8,9]; say [Z+]($a,$b,$c).perl
p6eval pugs: OUTPUT«*** ␤ Unexpected "["␤ expecting bare or pointy block construct, ":", identifier or operator␤ at /tmp/BTV65rzUDO line 1, column 56␤»
..niecza v6-89-ge849cf7: OUTPUT«(timeout)piling setting]␤»
..rakudo 4a6d21: OUTPUT«No applicable candidates found to dispatch to for 'zipwith'. Available candidates are:␤:(&op, Any $lhs, Any $rhs)␤␤ in 'reducewith' at line 1␤ in main program body at line 1␤»
TimToady
.oO(If you can't convince 'em, confuse 'em. --Harry S Truman)
15:33
jnthn afk for a bit & 15:36
TimToady oh, yeah, we're supposed to use semicolons for that
TimToady looks for more coffee...
15:39 alyx joined, alyx is now known as Guest96628
TimToady oh, and sorear already covered all this; TimToady should finish backlogging before opening his trap, esp when insufficiently caffienated... 15:40
masak TimToady: to Truman's credit, he said that while distancing himself from the idea: search.cpan.org/dist/autodie/
er, link fail. en.wikiquote.org/wiki/Harry_S._Truman
15:40 Tedd1 joined
TimToady well, he was just trying to confuse people then. :) 15:41
masak how autopunny. :)
TimToady some autopuns autodie
masak "Truman's mention of an "old political trick" is often quoted alone as if it were a strategy he was advising rather than one he was criticizing."
15:42 Tedd1^ left
masak this problem arises often enough on Twitter, when people quote a thing they don't like, and get flamed because they didn't explicitly say they didn't like it. 15:42
by default, quoting is consenting. 15:43
TimToady if you're a politician, you can criticize something in an opponent and still be perfectly happy using the same trick yourself.
.oO(after all, we're right, and they're wrong.)
masak oh, sure.
the fact that you know the trick is quite telling. :) 15:44
TimToady as we say, takes one to know one
masak blog post! strangelyconsistent.org/blog/fail-firmly
(non-edublogging this time)
TimToady is that allowed? 15:45
masak apparently.
the edublogging post will come later this evening. 15:46
tadzik my Pod6::Items are Junctions 15:49
any(Pod6;Item.new(level => Mu, content => ["Happy"]))
oh my
I thought |$_ flattens, apparently it doesn't, although the effect is what I wanted it to be 15:50
rakudo: use Test; my $a = 5 | "foo"; isa_ok $a, Int; isa_ok $a, Str; 15:51
p6eval rakudo 4a6d21: OUTPUT«ok 1 - The object is-a 'Int()'␤ok 2 - The object is-a 'Str()'␤»
TimToady .flat flattens, |$_ just strips off a scalar container to get at something that might be list interpolatable
tadzik I'm using it in @content.push: |$_ 15:52
TimToady @$_ would probably be clearer
though I think rakudo still requires @($_)
tadzik but seems that | is not the issue
lichtkind TimToady: can i have at least an official no? :) 15:53
masak yes, Rakudo still requires @($_)
TimToady lichtkind: huh?
masak lichtkind: you didn't ask anything! :P
huf no reason to deny him an official no 15:54
i know it doesnt quite fit in with the perl6 culture, but you could get into the habit of handing those out randomly
TimToady no
masak :P
everyone knows the secure thing to do is default-deny. 15:55
huf ooooh, i'll frame it and hang it above my bed
masak of course then there are entire movies, like "Yes Man", that promote saying "yes" to life :P
tadzik defaulting to yes gives you more tea
masak ooh
tadzik when you're very busy, someone asks you a question, you answer, then tea appears. I have it all the time 15:56
pmichaud good morning, #perl6 15:57
TimToady o/
tadzik good morning pmichaud
lichtkind pmichaud: good morning
masak morning, pmichaud 15:58
JimmyZ morning everyone
16:00 thou joined, mtk left
pmichaud moritz: ping 16:00
moritz pmichaud: pong 16:01
pmichaud in commit 2a50310, should we be doing things like +$a >= +$b instead of $a.Numeric >= $b.Numeric ? 16:02
masak what's the difference?
in fact, wouldn't >= enforce Numeric context?
pmichaud masak: that's what commit 2a50310 is doing -- enforcing numeric context :) 16:03
moritz pmichaud: I thought the two where synonymous
masak pmichaud: ah, circularity chainsaw :)
I agree that both would work. but one might have a shorter call chain.
moritz and that is .Numeric at the moment
pmichaud .Numeric has a shorter call chain, yes. 16:04
moritz pmichaud: if we use prefix:<+>, we'd have to lift it
pmichaud If we consider +$a to be equivalent to $a.Numeric, I'm fine with using that
the spec explicitly says +$a though.
masak do we plan to let the user override prefix:<+>, so that it matters whether we use +$a > +$b or $a.Numeric >= $b.Numeric ? 16:05
I think that's the question we need to ask.
pmichaud S03:3342 16:06
(talking about <leg> and <cmp>, but likely can be extrapolated to the other stringy/numeric operators)
tadzik wklej.org/id/544696/ -- what may cause such behaviour?
masak pmichaud: I agree.
pmichaud: but (as moritz points out) we don't have lift.
moritz pmichaud: I think you are interpreting too much into a detail of the spec 16:07
pmichaud moritz: that's my job. :)
masak pmichaud++
moritz: fwiw, I think pmichaud has it right. 16:08
pmichaud my brain is still starting up... why is lift important here?
masak tadzik: re the 'somehow' comment: you can use ::Pod6::Block::Named::$type, I think. (not implemented in Rakudo yet, though)
pmichaud oh, never mind, I know why.
masak tadzik: there's always eval :)
pmichaud (because we need the infix:<+> of the caller context)
tadzik masak: well, I think I'm waiting for the NYI thing :)
16:08 mtk joined
pmichaud even if we don't have lift, that's not necessarily a reason to not use prefix:<+> now, to future-proof the code a bit) 16:09
masak tadzik: don't wait past the deadline :)
moritz except performance, of course
masak: you want to call eval from within the compiler? evil!
tadzik masak: oh, I'll do it anyway if it will get implemented after the deadline ;)
masak tadzik: your paste... it doesn't make sense. :/ 16:10
pmichaud it might be worthwhile to implement 'lift' as a no-op
16:10 Trashlord joined
tadzik masak: yeah, that's the point of it 16:10
pmichaud so that we can at least write 'lift'
masak tadzik: you need to show the whole code. the most likely situation right now is that you've mis-analyzed the situation.
moritz tadzik, masak: easier workaround would be a hash with type objects as values
tadzik funny thing is that everything works fine, besides everything being a one-element any()
masak moritz: ooh, nice.
together, hashes and eval can do everything :P 16:11
tadzik masak: wklej.org/id/544700/ the patch against gsocmess master
moritz /^item [\d+]?/
pmichaud okay, we can stick with .Numeric for now (for performance). maybe it's worth adding a comment in each that says # should be "lift +$a >= +$b"
jnthn back
tadzik also, test: wklej.org/id/544701/
moritz should that contain a \s* or \s+ or :s or so?
tadzik moritz: I don't think so 16:12
that's to catch =item, =item1, =item172 etc
moritz hm, ok
pmichaud: I can add those comments in later, I hope
dalek kudo/nom: 53ee68f | pmichaud++ | src/core/ (2 files):
Make sure a List constructed from Parcel.list gets its own RPA. Add Any.list method.
16:16
kudo/nom: 9a3e6fc | pmichaud++ | / (12 files):
Merge branch 'nom' of github.com:rakudo/rakudo into nom
kudo/nom: 8d79b38 | pmichaud++ | src/core/ (2 files):
Rat.Str method must be multi and only for defined Rats.
jnthn wonders how hard it'd be to actually do lift. 16:18
tadzik rakudo: say any(Mu).defined
p6eval rakudo 4a6d21: OUTPUT«Bool::True␤»
tadzik ...great
jnthn tadzik: .defined is a method that Junction has 16:19
It only auto-threads the ones it doesn't have.
tadzik yeah, I see
jnthn: have you seen this? wklej.org/id/544696/
pmichaud tadzik: I don't see the problem (not enough context, I think) 16:20
TimToady rakudo: say defined any Mu
p6eval rakudo 4a6d21: OUTPUT«Bool::True␤»
TimToady jnthn: why isn't that one false? 16:21
pmichaud defined has a Mu parameter?
(maybe)
jnthn tadzik: Looks odd
TimToady: Why would it be?
tadzik pmichaud: basically, the function is returning Pod6::Item, but when I assign a result to a variable, the variable is a Junction, any($result) 16:22
TimToady just trying to figure out how you would workaround it
jnthn TimToady: Are you expecting Junction to override .defined?
TimToady I called a function, not a method
jnthn TimToady: At the moment it's falling back to Mu.defined
TimToady: I'd expect the defined function just delegates to the .defined method.
If it's not the same thing anyway (exported multi) 16:23
TimToady why does Junction need .defined?
pmichaud I think it inherits it from Mu
jnthn TimToady: It doesn't, it's jsut falling back to the one pmichaud mentioned. 16:24
TimToady hmm
jnthn And Mu.defined goes on "is this a type object or not".
pmichaud jnthn: 16:25
> my @a = <red green blue>;
Cannot assign to a non-container
:(
jnthn Thus why I suggested that we could define .defined differently in Junction if we want it to behave in a different way.
TimToady I think having some way to autothread .defined would be nice to the poor user 16:26
jnthn pmichaud: Ah, worth discussing that one...
TimToady so maybe Junction's .defined should force auto-autothreading :)
jnthn pmichaud: In master I think we have various overrides of infix:<=> 16:27
pmichaud: e.g. to handle list assignment
pmichaud: Should we have something other than the "simple case" being hit in the above example? 16:28
pmichaud actually, we don't for that one.
jnthn pmichaud: OK.
TimToady well, it could have an override since it's officially a pseudo-assignment
pmichaud the array and list case still go through the standard &infix:<=> in master
TimToady even if it ends up looking a lot like ordinary assignment
pmichaud I think the multis in master are fossils 16:29
jnthn pmichaud: OK. I can either
s/I/we/ :)
1) Make it so that anything that's not a known scalar container calls .STORE on the thingy 16:30
2) Add multi candidates
pmichaud I think we still need to check rw-ness, though.
16:30 kid51 joined
jnthn pmichaud: That'd be Array.STORE's job, I guess? 16:31
pmichaud Array.STORE knows about itself, not its container declaration
jnthn pmichaud: $!descriptor
pmichaud I guess it could look there
jnthn pmichaud: if $!descriptor.rw { ... }
pmichaud I'm not sure if it's .STORE that should check rw or &infix:<=> though. 16:32
jnthn pmichaud: Not sure. Doing it in infix:<=> may be making the op know too much about the container
pmichaud I'm fine with doing it in .STORE for now 16:33
TimToady sounds like the declarator should be delegating to the array
and introspection is almost always a smell
pmichaud TimToady: it's also present in my @a; @a = <red green blue>
16:33 hudnix joined
TimToady or "extrospection" in this case 16:33
pmichaud (which doesn't involve the declarator)
anyway, "delegate to the array' sounds like "let .STORE do it"
jnthn understood it that way 16:34
TimToady k
pmichaud let's go that way. #2 definitely sounds like a rat's nest to me
jnthn Trust in thy dispatcher! :P
I agree it could get hairy in places though :)
pmichaud it's not the dispatch, it's the candidate set that concerns me :) 16:35
jnthn ah :)
TimToady though most other pseudo-assignments have to rewrite the tree
jnthn pmichaud: OK, I'll go twiddle.
pmichaud thanks
is there a file or place where I can put "ABC needs XYZ capability" items? 16:36
or I can just mention them here :)
jnthn pmichaud: Should @a = <foo bar> work once I fix this issue? 16:39
pmichaud no, I'll need to update Array.STORE
well, I guess it should work since I don't check.
so, yes.
jnthn pmichaud: OK, patch compiling now.
pmichaud: If it's an easy case of ABC needs XYZ then LHF file is a good place. 16:40
pmichaud: Otherwise mention here and/or NOMMAP
pmichaud on some of them I'm not sure they're easy cases
jnthn OK
pmichaud sometime I probably need an explanation of how multis work in nom
the one I'm currently missing is &block.count 16:41
jnthn pmichaud: In terms of nested lexical scopes, "they don't yet" :)
Ah, OK
I need to do various Signature things.
pmichaud no, I just mean "how are they stored"
jnthn Oh
Code has a $!dispatchees
If it's a dispatcher then this list is the candidate list.
I suspect I can use the same mechanism for wrappers. 16:42
pmichaud ah, I see
so, the multi itself can have a signature, and its dispatchees also have signatures?
or something like that?
anyway, $!dispatchees was the piece I was missing. 16:43
(I saw it but didn't recognize what it meant.)
jnthn pmichaud: Correct
> my @x = <foo bar baz>; say @x[0]
foo
\o/
pmichaud \o/
I'll work on Hash.STORE next. 16:44
well, I actually have a fairly long task list atm :)
jnthn pmichaud: Me too!
pmichaud: oh btw, last night I did...
> my Int $x = 42; $x = "hi";
Type check failed in assignment to '$x'; expected 'Int' but got 'Str'
pmichaud \o/
jnthn Better error
also
nom: role R1 { method m() { } }; role R2 { method m() { } }; class C does R1 does R2 { }; # if p6eval is up to date... 16:45
p6eval nom: OUTPUT«# XXX todo role summation␤current instr.: 'apply' pc 30868 (src/gen/perl6-metamodel.pir:8635)␤»
jnthn darn, it's not
> role R1 { method m() { } }; role R2 { method m() { } }; class C does R1 does R2 { }; 16:46
Method 'm' must be resolved by class 'C' because it exists in multiple roles (R2, R1)
It lists the class name and the names of the roles the method came from :)
pmichaud excellent
jnthn Errors. I improves them.
tadzik I miss a git feature to commit a few lines of changes :)
pmichaud jnthn: gist.github.com/1020741 # can I apply this to start working on gather/take ?
jnthn looking 16:47
dalek kudo/nom: 0cb7000 | jnthn++ | src/binder/container.c:
Fix up container store handling (pmichaud++).
pmichaud master's gather/take implementation uses .yield (and I don't have another idea how to handle it in nom yet)
jnthn pmichaud: That patch doesn't look problematic to me.
pmichaud I didn't think it would be. My preliminary code for gather/take looks awfully funky, though -- grabbing things out of the $!do property :-P 16:48
(funky but not long or too complex)
jnthn :)
I thought I added a .do method... 16:49
pmichaud I suspect we'll need to revisit gather/take at some point, especially as we target other VMs, but this will get us going
oh, perhaps you did
I didn't look for one
jnthn czechs
pmichaud ("TimToady slovaks" :-)
jnthn :D 16:50
TimToady
.oO(equal time)
jnthn pmichaud: No, I didn't.
Well, what you have is probably faster anyway :)
pmichaud a "do" method could be handy, but I also don't mind grabbing the attribute
"do" might be tricky since what it returns isn't a 6model object
jnthn I'm a little scared of what happens if we let the Parrot sub escape the Code object :)
pmichaud exactly 16:51
jnthn Do maybe it's best if only trusted things can do taht.
*that
16:51 thou left
jnthn Giving people a method that'll just result in "OMG it exploded!!!" rakudobugs is probably not so valuable... :) 16:51
pmichaud right, or we shouldn't make it easy for people t.... right
if you're mucking around with $!do, you should know what you're doing. :)
TimToady
.oO(use MONKEY_SEE_MONKEY_DO)
16:52
tadzik <.a> means "<a> but don't call an action method"?
jnthn
.oO( know what you're $!doing )
16:52 thou joined
jnthn tadzik: No 16:52
16:52 thou left
jnthn tadzik: It means "don't caeate a named capture" 16:52
pmichaud action methods are always called
jnthn *create
tadzik okay I see
jnthn pmichaud: Any particular "XYZ needs ABCs" that you're liable to block on soon? 16:53
TimToady should work on one of his other five full-time jobs, sigh...
pmichaud &block.count was one... but I might be able to implement that one
jnthn pmichaud: Ah, I can take that one.
pmichaud: I need to do some other bits in that area to unbust multi error reporting anyway.
We could kinda do with it to work. 16:54
pmichaud jnthn: I'll let you do it then. I don't mind implementing some of these so I can become familiar with the internals
but this one isn't terribly important at the moment
jnthn *nod*
The roles are coming on quite well. I've done the first 80% and have the other 80% left.
pmichaud oh, I noticed that perl6_current_args_rpa op includes the invocant if used within a method 16:55
jnthn Yes, it will
pmichaud that's not necessarily a problem... just something a method writer has to be aware of if using it
jnthn Since the invocant is just an argument.
Well, it's only for limited, guts-y usage, I hope. :)
pmichaud agreed
and I simply shifted the invocant off of the RPA in the case where I chea.... used it.
jnthn Fixing it would be harder than ignoring the first arg.
er, I mean, taking off the first one 16:56
Though it's not so performant I guess...
pmichaud it's no problem
I just wanted to make sure the current implementation with your expectations for it (and it sounds like it is)
jnthn The best way if we want performance is to add a second version of the op that drops the first arg.
pmichaud "current implementation is concistent"
*consistent
pir::shift isn't that expensive
jnthn er
:)
Oh, it's unshift that mallocs every time. 16:57
pmichaud right
jnthn shift "just" memcpys...
Anyway, at this point it'd be a micro-optimization.
pmichaud do we have private methods yet? 16:58
or submethods?
jnthn No
I think private methods need to look very different than we're traditionally done them anyway
And we kinda need to implement trusts.
So I put them off for now. 16:59
Do you need them?
Submethods are an easier ask.
pmichaud well, I can continue to do ALL_CAPS for private methods for now
jnthn THAT'LL BE FINE.
pmichaud so I don't really *need* them
jnthn :)
OK, we can just grep for method [A-Z] later :) 17:00
pmichaud there are some places where submethods would be useful
jnthn OK
pmichaud but it's not a high priority
let me see what's in NOMMAP and see if I can use that for a list of "things I've come across that I said 'gee I wish that was available now'" :-)
jnthn puts submethods on his "todo soon" list
sure
pmichaud oh, "our" is very high on the list. 17:01
jnthn In theory that'll be easy.
tadzik oh, first S26 bug foung :)
pmichaud either that or we should change t/00-parrot to use 'my' instead of 'our'
tadzik erm, found
pmichaud so we can start passing those tests
jnthn pmichaud: I'll do our.
I cna do "our" and submethods later today.
pmichaud I think I might want to create src/core/cheats.pm 17:02
jnthn ohnoes :) 17:03
pmichaud as a place where we can put cheating operators
jnthn OK
pmichaud e.g., some of the metaops might go there temporarily until we have them working
jnthn How much do we want lift?
pmichaud we've lived without 'lift' for quite a while, so it's not a huge priority for me
jnthn OK
pmichaud if we had a dummy 'lift' it might be nice, though, so we could future-proof some of the operators
moritz jnthn: I'd like to change Real and Numeric to be roles... should I update BOOTSTRAP.pm with something like Real.HOW.add_role(Real, Numeric)? 17:04
instead of add_parent
jnthn moritz: Not yet
moritz: I think Real and Numeric themselves have been defined in BOOTSTRAP
pmichaud will we just be able to define Real and Numeric in src/core/Real.pm anyway? 17:05
dalek ecs: 19a64f5 | tadzik++ | S26-documentation.pod:
[S26] Fix an example in List section
pmichaud (and src/core/Numeric.pm)
jnthn Which is...sorta OKish...for classes but maybe a bit hairy for roles.
pmichaud as opposed to defining them in BOOTSTRAP?
jnthn pmichaud: Yeah, probably
pmichaud: That's what I want
moritz I'll try that
pmichaud me tooo.
jnthn But I didn't implement type checking against roles yet
So any place you use Real and Numeric in a multi-dispatch at the moment will be FAIL.
moritz oh, so I'd better way
jnthn moritz: Right, thus "not yet" :) 17:06
pmichaud moritz: for now, you could do "role MyReal { ... }"
jnthn moritz: I wasn't just spoiling the fun ;-)
pmichaud and then test it with "class Int does MyReal { ... }"
moritz it's not a pressing issue
pmichaud and when it works, then it's safe to migrate Numeric/Real from BOOTSTRAP
jnthn I'll put in at least that much of the type checking soon.
I just don't want to cause problems for folks hacking on setting stuff with a roles implementation that's not quite there yet. :) 17:07
pmichaud
.oO("problems for folks hacking on setting with other pieces that aren't quite there yet is okay, however." :-)
moritz btw for BackTrace I'll need to access interp["annotations"; level] - is that syntax accessible with pir:: things?
pmichaud nope... have to use Q:PIR for that 17:08
jnthn eww, two level keys
pmichaud is, sadly, correct.
pmichaud it's another place where pir syntax doesn't lend itself to hll-like handling 17:09
I have been thinking about adding a pir::const:: namespace, though, for things like pir::const::CONTROL_RETURN 17:10
jnthn rakudo: say Submethod ~~ Method 17:12
p6eval rakudo 4a6d21: OUTPUT«Bool::False␤»
jnthn rakudo: say Submethod ~~ Routine
p6eval rakudo 4a6d21: OUTPUT«Bool::True␤»
pmichaud or maybe it really wants to be pir::const<CONTROL_RETURN> 17:13
a hash with the parrot constants already defined could be reallllllly handy 17:14
instead of doing the Q:PIR { .include 'whatever.pasm' } trick all over the place
jnthn ooh, yes
moritz agreed
pmichaud maybe %pir::const<CONTROL_RETURN> then
JimmyZ pir::%const<CONTROL_RETURN> 17:16
pmichaud %pir::defines<CONTROL_RETURN> # better, maybe?
JimmyZ: that's not really good syntax for p6
bbiab 17:17
JimmyZ sleeps
moritz crontab for p6eval nom rebuild installed 17:18
jnthn nom will be served regularly!
moritz nom: say '\o/'
p6eval nom: OUTPUT«\o/␤»
17:19 JimmyZ left
masak nom: say 'nom: say \'nom\'' 17:20
p6eval nom: OUTPUT«nom: say 'nom'␤»
masak \o/
moritz any nom LHFs? 17:21
moritz doesn't feel ready yet to attack CalLFrame and BackTrace
hm, maybe more Rat ops 17:22
tadzik gsocmess now has lists 17:23
now the hard part: implicit code blocks 17:24
jnthn moritz: Could start to put Complex back too
moritz come to think of it, there are probably lots of mostly-LHF options 17:26
jnthn moritz: Feel free to put ideas on the LHF list also 17:27
pmichaud actually, I think I'll do both %pir::const<NAME> and pir::const::NAME. The former will be a runtime lookup while the latter will be a compile-time constant value. 17:34
dalek kudo/nom: 5ed4f6a | moritz++ | LHF.markdown:
new LHFs: Rat operators and Complex
kudo/nom: 39b7782 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Add Submethod type.
kudo/nom: f4bb33f | jnthn++ | src/Perl6/Metamodel/ClassHOW.pm:
Update ClassHOW.find_method and method dispatch cache generation to know about submethods; they now work.
kudo/nom: 275ab3d | jnthn++ | src/Perl6/Metamodel/MethodContainer.pm:
Implement submethod handling in MethodContainer role (so it's available to all HOWs that do that role).
jnthn huh, out of order commit reporting.
pmichaud "order" sometimes doesn't mean what you think it does in git. :)
jnthn ;) 17:35
pmichaud it's like "Perl 6 has no 'length'"
jnthn is quite liking having the metamodel factored in terms of roles :)
17:35 Mowah left
moritz actually it's more like "Perl 6 has no SUPER" :-) 17:36
jnthn pmichaud: I guess slurpies are possible now? 17:37
pmichaud jnthn: should be possible, yes 17:38
jnthn k
dalek kudo/nom: d9dd006 | moritz++ | src/ (3 files):
add lcm and gcd infix ops
17:39
pmichaud we can hotpath it a bit later, but simplest might be to invoke &infix:<,>() on the slurpy args, invoke ".list" on that, and bind the slurpy parameter to the resulting list
TimToady would have to be pir::<%const> to be good p6
jnthn pmichaud: sub foo(*@a) { @a.WHAT.say } # Array? 17:40
pmichaud or, you can just create a List object and bind $!rest to the slurpy arg rpa
jnthn Or List?
pmichaud jnthn: I'm not sure it's an Array there.... I don't remember getting a ruling on whether one can modify the arguments via the slurpy 17:41
17:41 mj41 joined
jnthn pmichaud: Can do List for now. Like the "bind to $!rest" much better 17:41
TimToady it's at least erroneous to assume one can
pmichaud you can go ahead and make it an Array for now (that's what master does)
jnthn pmichaud: $!rest is an RPA?
pmichaud $!rest is an RPA, yes.
jnthn Excellent.
pmichaud you can do the same for Array, too
(since Array is List)
create an Array, bind the RPA to $!rest 17:42
jnthn pmichaud: Given what TimToady just mentioned, List is better?
Or did I misunderstand it?
pmichaud given what TimToady just said, Array is better
jnthn oh, OK :)
jnthn is still a bit confused ;)
pmichaud (List has references to the containers used to create it, Array has its own containers)
jnthn ah, got it.
pmichaud I suppose one could say that *@slurpy is rw implies access to the original arguments 17:43
anyway, we'll do it as Array for now :)
17:43 thou joined
jnthn pmichaud: ooc, is .count and/or .arity a hot path? 17:44
pmichaud not really
jnthn OK
pmichaud at least, not for the stuff I'm doing
jnthn I won't premature opt them then :)
pmichaud when you're at a good point for discussion, maybe we can talk about bigint/num handling a bit :) 17:57
I'm thinking maybe we want a perl6_box_bigint__PN() opcode 17:58
which gives back an Int if the argument is in range, a Num otherwise
moritz should I put the Rat operators into operators.pm or Rat.pm?
pmichaud moritz: I tend to prefer that the operators go with their types
but I'm open to other interpretations
moritz pmichaud: then we are d'accord
pmichaud by the same reasoning, I think the string operators ought to go in Str.pm 17:59
or Stringy.pm, maybe
jnthn: unless you have other ideas about how we want to do large ints for the short-medium future 18:00
dalek kudo/nom: 7b6794e | moritz++ | src/core/Rat.pm:
normalize Rats
pmichaud basically, an opcode form of our "upgrade_to_num_if_needed" function in master 18:03
jnthn pmichaud: Yeah, I hate having that function everywhere...
pmichaud then we'd define
jnthn pmichaud: I forget how it works... :)
pmichaud sub infix:<+>(Int \$a, Int \$b) {
18:04 lateau left
pmichaud perl6::perl6_box_bigint__PN( 18:04
pir::add__NII(pir::repr_unbox_int__IP($a), pir::repr_unbox_int__IP($b)))
}
and perl6_box_bigint gives back Num/Int as appropriate 18:05
jnthn gets a REALLY bad feeling about upgraidng to Num...
pmichaud the alternative is to limit all of our programs to int ranges
or to solve the bigint problem overall
18:05 mj41 left
jnthn We can't inline any of the integer operations if we do this 18:05
Well, we can
But we can't depend on the return type
pmichaud as I said, "short-medium future"
jnthn Yeah, but the optimizer is short-medium future too... :) 18:06
Well, medium :)
pmichaud I don't think we can limit the ranges of our ints
jnthn I'm not sure what best thing to do is here.
pmichaud that's always one of the first things that people use/test/discover
jnthn Well, upgrading to Num is only so much better. It bites eventually.
What're our bigint options?
pmichaud I don't know... probably need a way to store bigints in an Int 18:07
jnthn Yeah, I meant more actually doing the operations.
Library wise.
pmichaud oh, I think it should be libgmp
jnthn My preference: we pick one we can bundle a copy of in nqp or Rakudo repo. 18:08
So we don't ahve to play silly dependency games.
ICU is already bad enough.
pmichaud I think the challenge with libgmp has to do with macos or something
at least, according to colomon++
18:08 mj41 joined
pmichaud we should probably get colomon and sorear involved in the discussion for ideas (more) 18:09
jnthn pmichaud: I was pondering integrating it at the NQP level and providing a set of ops and a repr.
pmichaud NQP level I agree with, fully.
here's my proposal: short-term let's do the upgrade-to-num approach, so we can pass tests. when you reach the point of inlining optimizations (medium-term), I won't be strongly opposed to ripping out the Num upgrade if we have to do that and don't have another bigint replacement 18:11
i.e., I don't mind if we regress on bigint capability in the name of performance
jnthn +1 18:12
TimToady has mixed feelings...
pmichaud TimToady: so do we all, I think :)
jnthn :) 18:13
jnthn wants to do bigint properly in the not too distant future
And I'd rather do it in a way that fits well with 6model
masak +1
pmichaud I'm fully in favor of "bigint properly"... I'm just worried about "not to distant future" being a bigint :)
jnthn :P
pmichaud *too 18:14
moritz is more worried about nom landing than getting bigint soon
TimToady wants int to be fast and Int to be correct
masak there are small bigints too :)
jnthn TimToady: +1
pmichaud: I suspect it needn't be too far into the future.
pmichaud we also need Int to be fast, too, though
masak of all the things nom could regress on, bigint support is not one that concerns me.
...much.
ss/concerns me/has me concerned/ 18:15
jnthn pmichaud: I mean, after nom lands, for sure.
pmichaud right
moritz especially since it's only bigishint that it regresses on
TimToady but it's harder to make ref types as fast as value types, and it's hard to do variable-sized value types...
moritz t/00-parrot/03-op-logic.t has regressed (Null PMC access in get_bool() after test 5) 18:16
pmichaud from a perception perspective, having overflow errors on Int types (when we don't have them in master) is probably not going to work out initially
but if we say we're eliminating them in the name of performance, I think that flies.
jnthn moritz: It's because the 1.Bool got removed from say and print :(
So now it returns a null PMC. 18:17
pmichaud oh!
oops
jnthn pmichaud: oh, it was you :P
pmichaud fixes.
jnthn :)
tadzik speaking of gmp, libgmp is currently being worked on in Parrot, a gsoc task
jnthn tadzik: I doubt that'll look how I want it to for 6model.
pmichaud tadzik: yes, I'm eagerly awaiting the results. I'm worried that it might not address the problem(s) colomon++ was citing
jnthn *that's
tadzik I see
18:18 kid51 left
jnthn oh no...dalek?! 18:21
No karma!
18:25 dalek joined, ChanServ sets mode: +v dalek 18:27 mj41 left
moritz nom: die 'OH NOEZ' 18:27
jnthn nom: 'there?' 18:29
Hm
moritz: I'm pretty sure we can't die yet
moritz seems I've killed it 18:30
tadzik but it can't die yet
p6eval nom: OUTPUT«Can only use get_who on a SixModelObject␤current instr.: '_block13' pc 28 ((file unknown):0) (:1)␤»
nom: ( no output )
moritz ah, the good old get_who 18:31
pmichaud jnthn: any objections to me having HLL::Compiler automatically put .include lines at the beginning of every .pir file it generates? 18:34
(for the .pasm constants)
and if that's okay, which .pasm's do we want to have included? 18:35
jnthn pmichaud: Sounds sane enough. 18:36
pmichaud: I'm guessing exception severity
And exception type
pmichaud I guess I could just grep on include and see which ones we currently use :)
jnthn heh :) 18:37
pmichaud gist.github.com/1020824 # list of files in nqp 18:39
seems pretty innocuous to just include those four always
18:39 Shozan left
pmichaud gist.github.com/1020825 # includes from master 18:39
I think I'll do that, then add pir::const::SOMETHING which will put a symbolic constant into the output pir 18:40
jnthn pmichaud: the nqp list, or the master list? 18:42
pmichaud union of both
it's only about six includes
jnthn OK
18:44 TBA2 joined
TBA2 hi everyone, anyone know if theres any problems with %*ENV in rakudo? (2001.05-15, parrot 3.4.0) 18:45
get this when trying to iterate over it: Method 'key' not found for invocant of class 'String'
in <anon> at line 5360:CORE.setting
in main program body at line 1
masak rakudo: .say for keys %*ENV 18:46
18:46 buubot_backup left
flussence p6eval's pretty slow today... 18:46
masak seems so.
TBA2: could you nopaste your code somewhere? 18:47
flussence ...but he's right, it does that for me
TBA2 .say for keys %*ENV does it to, thats the only line in the file :)
pmichaud pmichaud@kiwi:/zip/perl/rakudo-2011.05$ ./perl6
> .say for keys %*ENV
Method 'key' not found for invocant of class 'String'
moritz TBA2: it's a known limitation of parrot's Env PMC that you can't iterate over it
TBA2: sadly rakudo inherits that limitation
TBA2 moritz: any way to dump it out to see its contents? or can we only access elements directly?
18:48 dalek left
pmichaud ...we're not doing the %*ENV shadowing? alpha did that. 18:48
masak TBA2: does this sound familiar? rt.perl.org/rt3/Ticket/Display.html?id=80450
18:48 p6eval left, p6eval joined
TBA2 masak: yep thats it 18:48
18:48 ChanServ sets mode: +v p6eval
masak we've reduced the problem to a known RT ticket. :) 18:49
pmichaud we'll undoubtedly have to do the shadowing again in nom, since we don't support Parrot native hashes anyway
TBA2 :) at least its not me thinking i've got my syntax wrong hehe
jnthn pmichaud: In nom I suggest we do it with a custom container with STORE/FETCH that DTRT 18:50
pmichaud jnthn: it'd have to have custom Scalars too, then
%*ENV<abc> = 'foo'; # not a Hash.STORE
jnthn pmichaud: Yes, ti's the customer scalars I was thinking of :) 18:51
pmichaud: Though now you mention it, we need custom hash too :)
Or some help from the hash.
pmichaud it could have Scalars with a $!whence value set... in which case $!whence means "upon assignment" instead of "upon vivification"
jnthn Hm
Not sure that'll work out too well.
pmichaud I think the shadowing approach is *much* easier, fwiw 18:52
jnthn pmichaud: "shadowing"?
18:52 dalek joined, ChanServ sets mode: +v dalek
pmichaud we have a (nom) hash that holds the environment, it then updates the true environment when something "interesting" happens 18:52
(e.g., fork() or exec()) 18:53
18:54 p6eval left
pmichaud this actually works out nicely in case someone does my %*ENV = ...; run('....') 18:54
18:54 dalek left
pmichaud (assuming that's possible) 18:54
jnthn ah, true 18:55
brb, dinner
18:56 p6eval joined, ChanServ sets mode: +v p6eval
TBA2 so does any of %*ENV work yet? can't seem to access any elements in it either (but perhaps i'm mistakingly assuming things like user etc will be set?) 18:57
masak TBA2: you could check instead of asking, you know :P
(don't want to discourage asking, but checking before is pretty nice, too)
TBA2 masak: i'm trying, but not really sure where else to start, nothing i do with %*ENV seems to work without error and not a clue where to start in the parrot/rakudo source yet :/ 18:58
masak TBA2: %*ENV corresponds to the things you get when typing 'env' on the command line. 18:59
that's one way to check.
sorear good * #perl6
masak o/ sorear
TBA2 tried that, but none of the entries listed by env appear to exist in the hash
ah now i'm getting somewhere 19:00
masak: thanks :) 19:01
masak np
19:01 dalek joined, ChanServ sets mode: +v dalek
masak The hardest thing to realize is often that there is a box outside of which one should think. :P 19:01
TBA2 i've found the box, just struggling with the way out ;p 19:02
masak ;p
19:05 buubot_backup joined 19:06 dalek left
sorear pmichaud: hi 19:06
19:06 TBA2 left 19:07 fish|ipad joined, fish|ipad left, fish|ipad joined
sorear pmichaud: may I have some of your time? I'm trying to understand why 'if 1 { my $x; class A { method b() { $x = 5 }; }; A.b; say $x }' works in nom 19:08
19:08 dalek joined, ChanServ sets mode: +v dalek 19:25 dalek left
pmichaud sorear: sorry, had window minimized... 19:31
jnthn might be the person to ask about it....
sorear pmichaud: jnthn told me he had mostly no clue how it worked and said you would know 19:32
apparently you wrote NQPLexPad or something
pmichaud I definitely didn't write NQPLexPad
sorear *blink* 19:33
masak emergent software! :D
sorear Rakudo is starting to write itself, I guess :D
pmichaud I don't even know where NQPLexPad is to be able to tell you who did :) 19:34
sorear $NQP/src/pmc/nqplexpad.pmc
pmichaud github.com/perl6/nqp/blame/7227290...lexpad.pmc
wasn't me :)
masak pmichaud: no, jnthn said you wrote the code that makes sure classes are lexically captured.
is that the code that contains nasty Parrot-level re-linking of OUTER pointers? 19:35
sorear masak: do you know where that code lives?
jnthn pmichaud: I think sorear is missing an explanation of when we capture_lex or take closures
pmichaud we capture_lex at the beginning of every block
jnthn pmichaud: And how the capture_lex'ing makes the example he mentioned works.
pmichaud: all the nested blocks, yes? 19:36
pmichaud all of the first-level nested blocks
jnthn sorear: I think the think you're asking about works in master also 19:37
sorear jnthn: master cheats, HARD
jnthn sorear: Are you asking about it in nom specifically, or just in Rakudo general?
19:37 dalek joined, ChanServ sets mode: +v dalek
sorear nom/nqp general 19:37
19:37 p6eval left
jnthn sorear: I don't see the code generation we do that much differently though 19:37
pmichaud I suspect that the difference here is that nom/nqp have static lexpads, whereas master doesn't 19:38
anyway, here's my guess
jnthn True, though the block capturing doesn't play into the static lexpads.
pmichaud when we execute the "if 1" block, that creates a $x and capture_lex's the "class A" block 19:39
we then execute the "class A" block (is that right?)
sorear the block capturing is sufficient to explain this
yes
pmichaud invoking the "class A" block does a capture lex on the method b block
sorear class blocks are executed as if they were bare blocks, in addition to compile-time classmaking
pmichaud thus when b is invoked, it's referencing the "my $x" that was established by the "if 1"
19:40 dalek left
sorear stefan@stefans:~/dl/rakudo$ install/bin/perl6 -e 'my $x; if 0 { class A { method b() { $x = 5 }; }; }; ::A.b; say $x' 19:41
5
with the "if 0", the method is never capture_lex'd, is it?
pmichaud no, so I suspect it autocloses
sorear so... shouldn't it be writing to the static lexpad version of $x?
pmichaud master doesn't have "static lexpads" 19:42
jnthn Nor does nom in that sense
sorear I'm not touching master at all
19:42 p6eval joined, ChanServ sets mode: +v p6eval
jnthn It builds lexpads for the blcoks until it finds one that has already been invoked (if at all), then stops 19:43
In this case, it finds the $x
er, the pad with $x
sorear I don't follow. What do you mean, it finds the $x? Doesn't $x creation have to wait until runtime? 19:44
19:45 dalek joined, ChanServ sets mode: +v dalek
pmichaud when you invoke b, it says "oh, wait! I haven't been capture_lex'd. I'll just go ahead and capture my OUTER's current pad" 19:45
it's outer says "oh wait! I haven't been capture_lex'd! I'll just go ahead and capture my OUTER's current pad"
etc.
so eventually it gets to the pad that has been capture_lexed (the if 0 block) and we've established the outer chain 19:46
that's "autoclose" (which is still somewhat controversial)
19:46 lichtkind left 19:47 envi_laptop left, thou left 19:48 dalek left, dalek joined, ChanServ sets mode: +v dalek
pmichaud I didn't say all of that precisely correct, but that's the general idea. When a block that hasn't been capture_lex'd gets invoked, it and its outer-parents look up the outer-chain to find a sub with an active lexpad and they close on that (creating dummy lexpads as needed in the process) 19:48
sorear pmichaud: How does that interact with static lexpads? I would have thought that "class A" already would be bound to a lexpad (the static one) 19:49
pmichaud parrot doesn't really have static lexpads, iiuc 19:50
jnthn The only thing I really say changing with static lexpads is s/creating dummy lexpads/using the static lexpad/
masak what are un-static lexpads called?
pmichaud anyway, I don't know about "class A" being bound at that point. It's not been invoked. 19:51
sorear jnthn: EAMBIGUOUS "say changing"
19:51 dalek left
jnthn s/say/see/ :) 19:51
sorear pmichaud: I thought that, with static lexpads, all subs would be bound to the static lexpad before being cloned/capture_lexed
jnthn If Parrot had a way to notify me it was in autoclose mode rather tha normal lexpad creating mode I'd probably have already done that.
19:52 ggoebel left, ggoebel joined 19:53 p6eval left 19:54 p6eval joined, ChanServ sets mode: +v p6eval
pmichaud sorear: I don't know the answer to that. IIRC the spec is largely silent on the subject of static pads 19:54
and handwavy on other aspects 19:55
tadzik I feel that spec is a bit too general on how implicit code blocks are handled 19:56
for example, it says that a paragraph is a code block if it's indented more that its virtual left margin. Now S26:872 surely doesn't want the first paragraph to be a code block (or does it?), but the definition of the virtual left margin makes me think it should be treated as such 19:57
sorear pmichaud: I spent an hour or two 2 days ago talking with jjore and getting an understanding of how Perl 5 handles this stuff, btw 19:58
pmichaud sorear: yeah, chromatic++ gave me a similar lesson once
jnthn errand, back in 30 mins or so 19:59
sorear pmichaud: did he say anything about it being related to autoclose?
pmichaud well, our discussion was comparing Perl 5's approach to Parrot's approach 20:00
20:04 mj41 joined
tadzik is @p6l a good place to ask about possible unclarity of the spec? 20:05
sorear only if you want its complexity to be doubled
masak :)
sometimes one gets good suggestions from p6l.
tadzik that's why I wanted to ask first :) 20:06
masak tadzik: if the question is the above, I'd consider the probability low that you'll come out wiser from mailing p6l.
tadzik: sounds more like a mis-stated part of S26 that you could fix using some good judgment. 20:07
tadzik without mailing p6l I guess? :)
pmichaud forgiveness > permission
tadzik I'm more afraid that about TheDamian's angry look when he sees me on YAPC::EU :P
20:08 dalek joined, ChanServ sets mode: +v dalek
tadzik plus I have no good idea about how it should be. Spec indents paragraphs all the time, and according to the spec these should all be code blocks 20:09
masak tadzik: oh, it's not easily resolvable?
I assumed it was.
yes, then maybe mailing is a good idea.
tadzik masak: not really. See: (moar)
masak especially if it wakes up TheDamian. :)
pmichaud tadzik: maybe email TheDamian directly? 20:10
masak +1
20:10 dalek left
masak avoids being warnocked. 20:10
pmichaud also, TheDamian sometimes doesn't want to get bogged down in p6l bikeshedding
something about "life" and "too short" :-) 20:11
tadzik or maybe not. Hmmm
masak pmichaud: as opposed to the hoards of us who *want* to get bogged down in p6l bikeshedding? :P
tadzik now that I look at it, spec puts every Pod6 it shows an example into a code block
20:11 dalek joined, ChanServ sets mode: +v dalek, Krunch joined
masak tadzik: that's how you show code in Pod6 :P 20:11
(duh) :P
tadzik I know that :)
masak is teasing tadzik 20:12
tadzik wonders what is the cheese, and what is the trap
moritz tadzik: I'm pretty sure that S26:827 is meant to be parsed as a code block
20:12 p6eval left 20:13 dalek left
masak tadzik: the probability that there are outright *errors* in S26 is low, at least for the older changes. 20:13
the ones that have been checked with an actual parser.
tadzik moritz: 872? 20:14
20:15 MayDaniel joined
pmichaud need lunch... bbiaw 20:15
tadzik moritz: yeah, but when thinking inside a code block... So the document starts from "This ordinary paragraph", not "\tThis ordinary paragraph"?
also, look at S26:821. That one is indented more than it's opening delimiter (which, I assume, is as indented as the first paragraphs of the example) 20:17
flussence I guess what you're asking can be simplified to "do these indent the same way as heredocs?" 20:18
20:18 p6eval joined, ChanServ sets mode: +v p6eval
tadzik how are heredocs indented? 20:18
20:19 MayDaniel left
flussence Like an ordinary string literal followed by .indent(*) 20:19
20:19 mj41 left
tadzik aroo, now I have two problems 20:20
but from all of this I think I now understand something :) 20:21
shame that all my tests as for now assume that the block content can indent to whatever it wants to :) 20:22
masak well, it's OK to change the tests if you misunderstood the specification :) 20:23
20:25 dalek joined 20:26 ChanServ sets mode: +v dalek
tadzik yeah :) 20:26
but that all means that I have to treat =list and =pod specially
20:26 dalek left
tadzik already in the grammar 20:26
though I don't quite see why code should only be allowed in those
moritz there's a reason it's a gsoc project and not a weekend hacking session :-) 20:27
tadzik :)
I'm glad :)
is it safe to assume that implicit code blocks only make sense in a delimited blocks? 20:38
moritz with "implicit code block" you mean one that's marked up by indention? 20:40
20:41 dalek joined, ChanServ sets mode: +v dalek
tadzik yep 20:41
moritz that would be a pretty big departure from the p5 pod ways
tadzik every time S26 uses them, it sorrounds them by blank lines. Now if they were inside a parablock, the leading blank line would end the parablock anyway 20:42
moritz: would it?
moritz I might have misunderstood the question 20:43
tadzik it already is, contrary to P5 way, implicit code blocks are allowed only in explicit pod blocks or =items
moritz I think it's safe to assume that code blocks are either surrounded by blank lines or specific =begin code ... =end code
20:43 dalek left
tadzik yes 20:43
so if they're sorrounded by blank lines, they're by definition not allowed to be in paragraph or abbreviated blocks 20:44
20:45 dalek joined, ChanServ sets mode: +v dalek
moritz phenny: ask diakopter any idea what's up with the appflux server? I can't seem to ssh to it, and dalek often times out 20:45
phenny moritz: I'll pass that on when diakopter is around.
20:45 wamba joined 20:53 lumi_ joined
dalek <sorear> moritz: dalek (host04) seems to be doing quite a bit better than our IRC on host02.. 20:56
20:57 am0c joined 21:06 jaldhar left 21:07 jaldhar joined, _patch joined 21:09 araujo left
dalek ecza: 612a7b7 | sorear++ | / (6 files):
Eliminate Beta as a separate pass, inline subs during the parse
21:19
21:20 scottp joined 21:24 jaldhar left, lumi_ left, jaldhar joined, y3llow_ joined, pothos_ joined 21:25 lumi_ joined 21:26 y3llow left, pothos left, y3llow_ is now known as y3llow, pothos_ is now known as pothos 21:29 kaare_ left 21:30 scottp left 21:31 scottp joined
masak blog post! strangelyconsistent.org/blog/june-11-2011-arrays 21:33
pmichaud mmmm pancakes 21:34
pancakes would be good
Util perl6: my @t; @t[0] = @t[2] = 9; @t.perl.say; 21:35
p6eval niecza v6-150-g612a7b7: OUTPUT«[9, Any, 9].list␤»
..rakudo 4a6d21: OUTPUT«[9, Any, 9]␤»
..pugs: OUTPUT«[9, undef, 9]␤»
Util perl6: my @t; @t[2] = @t[0] = 9; @t.perl.say;
p6eval niecza v6-150-g612a7b7: OUTPUT«[9, Any, 9].list␤»
..rakudo 4a6d21: OUTPUT«[9, Any, 9]␤»
..pugs: OUTPUT«[9, undef, 9]␤»
Util Those both work as expected.
masak niecza++ # correctest
Util perl6: my @t; @t[0][0] = @t[0][2] = 9; @t[0].perl.say;
tadzik has actually said "floursaltsugarmilkeggsbutter" 5 times
p6eval rakudo 4a6d21, niecza v6-150-g612a7b7: OUTPUT«[9]␤»
..pugs: OUTPUT«[9, undef, 9]␤»
Util perl6: my @t; @t[0][2] = @t[0][0] = 9; @t[0].perl.say;
masak tadzik: *lol* 21:36
p6eval rakudo 4a6d21, niecza v6-150-g612a7b7: OUTPUT«[Any, Any, 9]␤»
..pugs: OUTPUT«[9, undef, 9]␤»
masak tadzik: but did you say it quickly?
Util Pugs' output matches my expectation. Bug in both Rakudo and Niecza, or am I missing a clue about auto-viv?
tadzik masak: I tried :)
masak :P
Util: undef is no more.
tadzik if I say it quickly, it becomes flaukeshkeshkeshkeshkeshkesh
masak Util: it's all undefined typoid values.
Util: (like Any)
pmichaud I think bug in rakudo as far as the lack of the initial 9 goes
it's one of the autoviv corner cases 21:37
Util masak: I am not referring to undef vs Any. 21:38
masak: Rakudo and Niecza only populate one element; should be two elements. 21:39
tadzik moritz/masak: want to play "does this make sense" game? 21:40
pmichaud anyway, autoviv bug, yes.
Util pmichaud: Thanks! any pointers on where to start poking at the Rakudo source code?
pmichaud the problem has to do with how Rakudo manages containers inside of methods
but the bug ultimately comes down to the Any.at_pos method 21:41
21:41 Psyche^ joined
pmichaud src/core/Any-list.pm:327 21:41
masak Util: oh! 21:42
21:42 Patterner left, Psyche^ is now known as Patterner
Util pmichaud: Thanks! 21:42
masak Util: I missed that one. yes, pugs is righter in that sense.
pmichaud that method automatically converts an Any value to be an Array when something is assigned to one of its (proxy) elements
tadzik so: there is a global (grammar-wide) array keeping last-seen-virtual-left-margin. When a pod directive appears, it unshifts the current margin to it, and shifts it back when it comes to an end. Now, any text content checks the array[0] element, and if it contains <= amount of leading whitespace, it's a normal text block. If more, it looks like a code block
pmichaud "unshifts the current margin" might be better expressed as a dynamic variable, fwiw 21:43
tadzik it seems hell complicated, but I have no better idea to make it right
pmichaud we used to do a lot of stuff with unshifting arrays until we had dynamic variables
masak tadzik: some stack-like mechanism is clearly needed. pmichaud's dynamicals suggestion seems nice. 21:44
tadzik pmichaud: so having $*A = 5; { $*A = 7; blah() }, blah will see $*A as 7, but after the block it'd still be 5?
pmichaud need some my's there
tadzik two my's?
21:44 Vlavv joined
pmichaud my $*A = 5; { my $*A = 7; blah() } 21:44
tadzik makes sense
pmichaud my $*A = 5; { my $*A = 7; blah() }; blah()
first blah sees 7. second blah sees 5.
tadzik first blah sees 7, second...right
great, just what I need 21:45
21:45 lumi_ left
tadzik now I "only" need to refactor paragraph handling and put that ideas together 21:45
masak good thing you have tests ;)
tadzik yep
like 130 of them :)
21:45 lumi_ joined
tadzik I adopted this "you don't have tests? How can you tell it even works?" approach 21:46
21:47 mj41 joined
tadzik can it get any better than "$<spaces> = [ \h* ] { $VIRTUAL_MARGIN = $<spaces> }"? 21:47
s/'$'/'$*'/ of course 21:48
I don't need $<spaces> fwiw
tadzik peeks at rakudo source 21:50
rakudo uses some :my $*QSIGIL := ''; 21:51
21:57 wamba left
dalek pmichaud: <sorear> I have a solution in mind but it is very partial; it cannot handle @a[0][0][0] = @a[0][0][2] = 5. Do you have one that can? 21:57
21:57 scottp left
masak I thought dalek reported commits. 21:58
jnthn I think dalek is feeling a little unwell today :(
dalek Util: <sorear> AIUI, the root of the problem is that, in @a[0][0] = @a[0][2] = 5, the term '@a[0]' appears twice 22:02
autovivification in niecza and rakudo works by creating a new scalar variable, then setting magic on it so that it is bound back into the container if the variable is written to or reference is taken
masak dalek: are you really sorear? 22:03
dalek unfortunately, because @a[0] is used twice, two variables are created, and they can't BOTH be bound back. One of them has to be lost.
jnthn oh wait what...sorear is talking as dalek?!
masak spooky.
tadzik I'm scared 22:04
masak bots taking the souls of humans -- you should!
should be*
it's like a modern horror story on the 'Net. 22:05
jnthn It's the abotalypse!
22:05 sorear joined, mj41 left
sorear I just remembered I have an IRC client installed locally :p 22:05
don't need to puppet dalek :D 22:06
pmichaud sorear++ has identified the problem, yes.
masak each time I get details explained to me like that, a part of my brain goes "screw that, how do I have the cake and eat it too?" :) 22:07
sorear masak: use pugs 22:08
:)
masak :P
sorear obviously pugs is using a different autoviv spec
anyway, anyone with p6eval access can speak through dalek 22:09
22:09 sorear_ joined, diakopter joined
pmichaud maybe the scalar proxy could re-check its source to see if a vivification occurred since the time the proxy was created 22:09
but that gets kinda tricky 22:10
sorear pmichaud: that was my "partial solution"
it doesn't seem to work for @a[0][0][0] = @a[0][0][2] = 5
perhaps another way would be to have latecomers tie themselves 22:11
or rather, the proxy acts like a tied thing, and doesn't guarantee to always bind 22:12
</slushy_thought>
22:12 sorear left 22:13 sorear_ is now known as sorear
pmichaud yes, that's a possibility too, although we need to make sure that such tied items don't get counted in .elems and the like 22:14
22:14 TimToady joined
pmichaud so it's a sort of "provisional tie" 22:14
22:14 jfried left
lue hello world of zebras o/ 22:16
masak lue! \o/
22:16 lumi_ left 22:17 lumi_ joined
tadzik hello lue! 22:18
lue masak: there's a mistake in your 9 June post: "(Or more generally, the surrounding blog that sets $_.)"
masak lue: thank you. fixing. 22:19
lue
.oO(Getting back into coding Perl6 is going to be an interesting couple of days....)
22:23
masak glad you're following my course :)
pmichaud Util: btw, both nqp and nom now support --gen-parrot=master which forces building Parrot from its current 'master' branch. 22:25
lue I was reading through them and learned at least one new thing I didn't know before (I forgot what it was though, so I'll have to look through them again)
pmichaud if you forgot what it was, how do you know that you didn't know it before? ;-)
tadzik pmichaud: should '$<spaces> = [ \h* ] { my $*VMARGIN = ~$<spaces> }' work? 22:26
doesn't the value get lost on }? 22:27
sorear my sleep deprived brain just came up with an idea wacky enough to work 22:28
I'm tempted to try it, but it involves diverging from the spec... (also, scrapping WHENCE) 22:29
tadzik it got better without the 'my' part, but I sense that's a concidence
pmichaud yes, the value would be lost on }
try :my
(I think we have :my implemented)
(looking)
tadzik pmichaud: I see :my in Perl6 grammar, but when I use it in my code it complains about malformed regex
pmichaud note that rakudo currently requires := 22:30
tadzik yeah, I'm not in Rakudo yet
pmichaud okay, nqp requires :=
tadzik I'm in Perl 6:)
also, it doesn't like := either 22:31
it doesn't mind :my in TOP, but it does in other rules
oh, a semicolon 22:32
sorear pmichaud: do you think there's any point to persuing an approach to semantically better autoviv other than WHENCE?
tadzik now $<spaces>.Str becomes "NPA in can()" 22:33
pmichaud I'm not sure if nqp's regex engine understands $/ in a :my directive yet 22:34
tadzik oh, that's a bug like hell 22:35
if I add "{}\n" before the :my, the NPA is gone
sorear !PREFIXES maybe?
pmichaud right, because {} forces $/ to be bound.
sorear oh 22:36
tadzik oh
22:36 awwaiid left, awwaiid joined
tadzik good, less and less tests fail 22:37
sorear pmichaud: or rather, I want to make Any{ } and Hash.at_key unrelated concepts
pmichaud: the closer I look at the spec the less they seem to have in common 22:38
pmichaud sorear: I presume you mean $x{ } and Hash.at_key (where $x is Any) 22:39
since Any{ } means something else entirely in the spec
tadzik oh my, it almost passed 22:40
pmichaud I just know that
my $x; $x{<a b c>} = <alpha beta gamma> 22:41
is expected to work
which looks an awful lot like Hash.at_key to me
and standard postcircumfix:<{ }>
(and it's really Any.at_key at this point)
22:45 fish|ipad left, fish|ipad joined
sorear pmichaud: heh. 22:47
pmichaud: actually I did mean Any{ }. Your reaction confirms my "I'm thinking these are quite unrelated"... :) 22:48
pmichaud they're quite unrelated, yes.
sorear pmichaud: the spec describes both Any.[2] and Pair{ key => 2, value => 3 } using the word "autovivification"
pmichaud Type{ } is a syntactic construct meaning Type but WHENCE({ } )
22:49 rliu49 joined
sorear but I don't think container autovivification and value autovivification are the same thing 22:49
pmichaud however, both jnthn++ and I (and apparently you) feel this part of the spec needs some work.
sorear I'm going to redo niecza's container autovivification based on the crazy idea
pmichaud see also irclog.perlgeek.de/perl6/2011-06-10#i_3893608 22:50
sorear is that the "um wtf it's a TYPE OBJECT how can it have STORAGE" one?
I'll see if it's fast enough, and has useful semantics
pmichaud that was part of the discussion, yes.
(iiuc, there's not anything in the spec that prohibits type objects from having storage) 22:51
jnthn :/
Don't go there.
I can put something in the spec if you like. :)
I think S12's "empty instance" is sufficient though.
sorear niecza makes a different assumption 22:52
pmichaud I don't see "empty instance" (looking)
sorear niecza doesn't connect "type object" with "has storage"...
but the default REPRs all implement defined as $x !=== $x.WHAT
pmichaud S12: "The type object
differs from an instance object not by having a different
type but rather in the extent to which it is defined."
sorear one type, one type object
pmichaud (yes, I now see "empty" instance above that)
I'm not sure that "empty" instance automatically translates to "no storage", though. I think it simply means "not fully initialized". 22:53
jnthn SMOP and 6model have both called empty as no storage. It turns out to work out pretty well.
pmichaud oh, I thought SMOP actually had a defined flag
jnthn I'm pretty sure lack of storage was the defined flag. 22:54
pmichaud maybe I misremember. I know there were big discussions about that several years ago.
sorear niecza's type objects currently always have no storage
pmichaud anyway, the underlying point is that but WHENCE({ ... }) doesn't seem to quite work for vivification
sorear in the past, niecza defined defined as "has no attribute storage"
but then I optimized some things by allowing types with no attributes to have no storage even in defined instances 22:55
pmichaud either that or none of us implementors have figured out how to make it "quite work" :)
jnthn pmichaud: I suspect that bit of the spec has an issue.
pmichaud jnthn: I agree; I was just passing that along to sorear++, who also seems to agree 22:56
jnthn: out of curiosity, will :U and :D honor .defined ?
jnthn pmichaud: No
They're more low level than that.
pmichaud hmmm
in the spec, also?
jnthn They really mean "is the repr defined"?
Er, "does the repr consider itself defined"?
pmichaud: Not sure. I distinctly remember a discussion here about that which ended up saying they're more low-level. 22:57
pmichaud so it really means "is it abstract"?
jnthn Not just sugar for .defined
pmichaud as opposed to "is it undefined"
maybe it should be :A then
jnthn In reality it really means "is it a type object" :)
pmichaud or :T and :I, then.
jnthn Could be T and I
22:57 lumi_ left 22:58 Mowah joined
jnthn Type and In...spooky :) 22:58
pmichaud Although I know seem to recall that TimToady liked the fact that :D smiles at you
s/know//
jnthn Yeah, me too ;)
pmichaud anyway, I think :D and :U might be a point of confusion there someday.
jnthn Perhaps so
22:58 lumi_ joined
jnthn We really want them to be fast. 22:58
And we do need a way of saying "is this a type or not" 22:59
pmichaud I agree, fully.
jnthn Which is a different thing from the overridable .defined
pmichaud I'm not sure that calling it "definedness" is the right way to do it, since we can have concrete instances that aren't defined
jnthn Yeah
It's not instantiatedness.
gah
s/not/more/
pmichaud indeed, it should probably be :A (abstract) and :C (concrete)
since S12 says
Int:U Allow only undefined (abstract) Int values 23:00
Int:D Allow only defined (concrete) Int values
jnthn hmm :)
Yes
pmichaud then :B can be "both"
jnthn :C looks *really* sad :)
pmichaud and we have :A :B :C
jnthn It's as simple as ABC!
jnthn likes
:)
masak +1
pmichaud TimToady: ^^^^^^
jnthn :A...that's a weird smile :)
masak :A :B :C :D :U ?
jnthn masak: I think we'd remove :D and :U 23:01
masak oh, ok.
pmichaud yeah. :D is then where *.defined
jnthn *nod*
masak backlogs
pmichaud and :U is where !*.defined
(and you write them with the where clause, not with the :D/:U)
masak I approve. :U and :D are out, :A and :C are in. 23:03
but :B sounds like a no-op to me.
jnthn It's the default, in a sense.
sjn sees a bunch of new and novel smilies
:U 23:04
masak sjn: we finished designing Perl 6, so now we're designing smilies! :B
sjn approves of this effort
jnthn If it wasn't misleading, we could have object and prototype... :O and :P
sjn makes the language much more expressive :)
masak jnthn: ETOOCUTE :O 23:05
tadzik I'm thinking optional and required parameter: :] and >:( 23:08
jnthn tadzik: please stop thinking :P
:)
tadzik I did, I left fixing my podparser for the morning 23:09
ETOOTIRED
masak clearly there's a niche for an obfuscated language out there -- "Smiley".
colomon pmichaud: As I recall, there were two libgmp issues. The first was that they returned their own data structures on the stack from the functions, which isn't really Zavolaj-compatiable so far as I know. (But can be worked around.) The second was that they wouldn't build on certain versions of GCC, one of which was the default system GCC on some versions of OS X.
sorear runs an autoviv benchmark to establish a baseline 23:10
colomon pmichaud: BTW, IMO it would be a big win to have Bigints in nqp. Their lack creates really ugly issues with numeric literal parsing, as we see in master. (Still haven't backlogged fully to see what is going on, afk for a bit to read stories.) 23:13
masak ++colomon
'night, #perl6. 23:14
sorear 'night.
pmichaud colomon: I'm in full agreement that nqp is where bigints want to live. 23:15
my concern is mainly about getting libgmp or another bigint library to run on our target platforms
afk, walk 23:20
23:32 donri left 23:46 rliu49 left 23:49 mtk left 23:50 lumi_ left 23:51 lumi_ joined 23:59 mtk joined, slavik1 joined