| Time |
S |
Nick |
Message |
| 00:06 |
|
ssutch |
how does one apply a slurpy hash to another function? sub f(*%args) { other(*%args); } seems to puke |
| 00:06 |
|
jnthn |
other(|%args) |
| 00:06 |
|
|
BenGoldberg joined #perl6 |
| 00:07 |
|
ssutch |
what does |%args "mean"? |
| 00:07 |
|
jnthn |
"flatten %args into the argument list" |
| 00:08 |
|
ssutch |
cool, is it composable eg f(|%hash, |%hash2) |
| 00:08 |
|
jnthn |
yes |
| 00:08 |
|
ssutch |
sweet |
| 00:08 |
|
ssutch |
thanks! |
| 00:12 |
|
|
btyler joined #perl6 |
| 00:21 |
|
sorear |
jnthn: how do I test the chain op? |
| 00:21 |
|
jnthn |
sorear: 1 < 2 < 3 uses it, I suspect |
| 00:21 |
|
sorear |
in rakudo? |
| 00:21 |
|
jnthn |
Yeah |
| 00:22 |
|
jnthn |
Sleep time here...back tomorrow & |
| 00:22 |
|
sorear |
do I have to make a blind change to qast compiler and the rebuild rakudo? |
| 00:22 |
|
jnthn |
Or just write a QAST test to cover it in qast.t, if there ain't one already |
| 00:23 |
|
jnthn |
sleep & |
| 00:23 |
|
timotimo |
is the sequence operator specced to always give the end-determination-block just one argument? |
| 00:24 |
|
|
shachaf_ joined #perl6 |
| 00:25 |
|
|
shachaf_ joined #perl6 |
| 00:29 |
|
ssutch |
how does one compare the contents of an array to the contents of another array |
| 00:29 |
|
timotimo |
i would like to be able to have a list 1, { generate-stuff } ... { $^a == $^b }, so that it would abort if it has the same element twice |
| 00:29 |
|
ssutch |
r: say [1] eq [1] |
| 00:29 |
|
camelia |
rakudo b2072f: OUTPUT«True» |
| 00:29 |
|
ssutch |
it seems to work |
| 00:29 |
|
timotimo |
r: say [1, 2, 3] ~~ [1, 2, 3] |
| 00:29 |
|
camelia |
rakudo b2072f: OUTPUT«True» |
| 00:29 |
|
timotimo |
r: say [1, 2, 3] Z== [1, 2, 3] |
| 00:29 |
|
ssutch |
use ~~ instead of eq? |
| 00:29 |
|
camelia |
rakudo b2072f: OUTPUT«True True True» |
| 00:29 |
|
timotimo |
r: say [&&] [1, 2, 3] Z== [1, 2, 3] |
| 00:29 |
|
camelia |
rakudo b2072f: OUTPUT«True» |
| 00:29 |
|
timotimo |
gotta run to the tram |
| 00:31 |
|
ssutch |
hm, i have two arrays of PB::Option objects which i need to compare |
| 00:31 |
|
ssutch |
infix:<eq> doesnt seem to be called if i use [] eq [] |
| 00:32 |
|
ssutch |
nor with ~~ |
| 00:34 |
|
timotimo |
indeed |
| 00:34 |
|
timotimo |
try Zeq |
| 00:34 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:34 |
|
camelia |
rakudo b2072f: OUTPUT«not ok 1 - option equality sanity test» |
| 00:35 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:35 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - » |
| 00:37 |
|
timotimo |
i think Zeq is kind of cool |
| 00:38 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:38 |
|
camelia |
rakudo b2072f: OUTPUT«PB::Option<-1738647792> = PB::Option<-1734452444>TruePB::Option<-1738647792> = PB::Option<-1734452444>ok 1 - option equality sanity test» |
| 00:38 |
|
|
benabik joined #perl6 |
| 00:39 |
|
ssutch |
Zeq will yield a bool? or an array of bool? |
| 00:39 |
|
ssutch |
r: say (["a"] Zeq ["b"]) |
| 00:39 |
|
camelia |
rakudo b2072f: OUTPUT«False» |
| 00:39 |
|
ssutch |
r: say (["a", "c"] Zeq ["b", "c"]) |
| 00:39 |
|
camelia |
rakudo b2072f: OUTPUT«False True» |
| 00:39 |
|
ssutch |
r: say [&&](["a", "c"] Zeq ["b", "c"]) |
| 00:39 |
|
camelia |
rakudo b2072f: OUTPUT«False» |
| 00:41 |
|
timotimo |
array of bool, yes |
| 00:41 |
|
timotimo |
it zips using the eq operstor |
| 00:47 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:47 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - option equality sanity testnot ok 2 - field equality with same options» |
| 00:48 |
|
ssutch |
ok this is the problem im having ^ it's the same objects, but when accessed using the accessor, it doesn't work |
| 00:48 |
|
timotimo |
cannot find a ticket for multiple argument closure for sequence endpoints |
| 00:49 |
|
dalek |
nqp: 1855c19 | sorear++ | src/vm/jvm/ (2 files): |
| 00:49 |
|
dalek |
nqp: Move "chain" to subcall_noa and nix unused callsites |
| 00:49 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/1855c1969b |
| 00:50 |
|
masak |
'night, #perl6 |
| 00:50 |
|
ssutch |
any reason why Zeq would work normally, but then not work when looking at class attributes? |
| 00:50 |
|
ssutch |
does it have anything to do with the type Array[PB::Option]? |
| 00:51 |
|
ssutch |
in the latter case, the custom eq operator for PB::Option isn't being called at all |
| 00:51 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:51 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - option equality sanity testnot ok 2 - field equality with same options» |
| 00:52 |
|
ssutch |
getting rid of the type doesn't make a diff |
| 00:55 |
|
* timotimo |
looks |
| 00:57 |
|
timotimo |
interesting |
| 00:59 |
|
ssutch |
Zeq doesn't seem to work when comparing two @variables |
| 00:59 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 00:59 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - option equality sanity testnot ok 2 - option array @variable sanity testnot ok 3 - option array .@attribute sanity testnot ok 4 - field equality with same options» |
| 00:59 |
|
ssutch |
^ updated with test for just that in latest |
| 00:59 |
|
timotimo |
the custom eq thing doesn't seem to be called; perhaps we have an array or arrays on each side or something |
| 01:00 |
|
timotimo |
indeed. |
| 01:00 |
|
timotimo |
when you wrote options=>[$fopt] you created a list with one element being an array with one element being $fopt |
| 01:01 |
|
timotimo |
it should work without the [] |
| 01:01 |
|
timotimo |
(and indeed it does) |
| 01:01 |
|
ssutch |
strange, why? |
| 01:02 |
|
ssutch |
isnt [$var] a literal for [$var] ? |
| 01:02 |
|
timotimo |
r: sub foo(@yarr) { say @yarr.perl }; foo([1, 2, 3]); |
| 01:02 |
|
camelia |
rakudo b2072f: OUTPUT«Array.new(1, 2, 3)» |
| 01:02 |
|
timotimo |
r: sub foo(@yarr) { say @yarr.perl }; foo((1, 2, 3)); |
| 01:02 |
|
camelia |
rakudo b2072f: OUTPUT«(1, 2, 3)» |
| 01:02 |
|
sorear |
hmm. I tried to run a nqp test using the eval-client.pl and got java.lang.OutOfMemoryError: PermGen space |
| 01:03 |
|
timotimo |
r: class Bob { has @.foo; }; Bob.new(:foo(1, 2, 3)).perl.say; |
| 01:03 |
|
camelia |
rakudo b2072f: OUTPUT«Bob.new(foo => Array.new(1, 2, 3))» |
| 01:03 |
|
timotimo |
r: class Bob { has @.foo; }; Bob.new(:foo([1, 2, 3])).perl.say; |
| 01:03 |
|
camelia |
rakudo b2072f: OUTPUT«Bob.new(foo => Array.new(1, 2, 3))» |
| 01:03 |
|
timotimo |
hm, strange |
| 01:03 |
|
timotimo |
here's a tip for your new method, btw |
| 01:03 |
|
timotimo |
add ! to the end of your parameters |
| 01:04 |
|
timotimo |
you don't have to check for definedness manually |
| 01:04 |
|
ssutch |
ah! |
| 01:04 |
|
ssutch |
cool |
| 01:04 |
|
timotimo |
another possibility is to give them default values of die |
| 01:04 |
|
timotimo |
r: class Bob { has $.dog = die "bob doesn't want to live without a dog!" }; Bob.new(); |
| 01:04 |
|
camelia |
rakudo b2072f: OUTPUT«bob doesn't want to live without a dog! in method at /tmp/aKIWbX11BT:1 in block at src/gen/CORE.setting:798 in method BUILDALL at src/gen/CORE.setting:753 in method bless at src/gen/CORE.setting:743 in method new at src/gen/CORE.setting:728 in method … |
| 01:04 |
|
timotimo |
r: class Bob { has $.dog = die "bob doesn't want to live without a dog!" }; Bob.new(:dog<woofy-fluffy>); |
| 01:05 |
|
camelia |
rakudo b2072f: ( no output ) |
| 01:05 |
|
ssutch |
cool, thanks |
| 01:05 |
|
timotimo |
no problem :) |
| 01:05 |
|
timotimo |
that doesn't explain the options array weirdness, though |
| 01:05 |
|
ssutch |
is there a bug? |
| 01:05 |
|
timotimo |
FWIW, i almost always write my lists with () instead of [] |
| 01:06 |
|
timotimo |
no, i just don't understand why it behaves that way |
| 01:06 |
|
timotimo |
i mean, why did it put the array into the list as its only element |
| 01:07 |
|
benabik |
r: say [1,2] Zeq [1,2]; my @a = [1,2]; my @b = [1,2]; say @a Zeq @b |
| 01:07 |
|
camelia |
rakudo b2072f: OUTPUT«True TrueTrue» |
| 01:07 |
|
timotimo |
maybe .clone is weird? i've never used it tbh |
| 01:07 |
|
benabik |
r: say [1,2]; my @a = [1,2]; say @a |
| 01:07 |
|
camelia |
rakudo b2072f: OUTPUT«1 21 2» |
| 01:08 |
|
benabik |
r: say [1,2].perl; my @a = [1,2]; say @a.perl |
| 01:08 |
|
camelia |
rakudo b2072f: OUTPUT«[1, 2]Array.new([1, 2])» |
| 01:08 |
|
ssutch |
so, .clone works if i use the :arg(a,b,c) syntax |
| 01:08 |
|
ssutch |
but not if use arg=>[a,b,c] |
| 01:08 |
|
timotimo |
r: class Bob { has @.foo; }; Bob.new(:foo([1, 2, 3])).clone(:foo([1, 2, 3])).perl.say; |
| 01:08 |
|
camelia |
rakudo b2072f: OUTPUT«Bob.new(foo => Array.new([1, 2, 3]))» |
| 01:08 |
|
timotimo |
oh, look! |
| 01:08 |
|
ssutch |
yep |
| 01:08 |
|
timotimo |
r: class Bob { has @.foo; }; Bob.new(:foo([1, 2, 3])).clone(:foo(1, 2, 3)).perl.say; |
| 01:08 |
|
camelia |
rakudo b2072f: OUTPUT«Bob.new(foo => Array.new(1, 2, 3))» |
| 01:08 |
|
timotimo |
clone doesn't seem to know about the listyness of @.options |
| 01:09 |
|
|
Timbus joined #perl6 |
| 01:09 |
|
timotimo |
there's no test in the test suite that would cover it and there's no mention of how it should behave in the specs |
| 01:10 |
|
timotimo |
so ... specbug? |
| 01:10 |
|
ssutch |
perhaps |
| 01:11 |
|
ssutch |
hard for me to say since i am new here as of a week ago |
| 01:12 |
|
timotimo |
mhm |
| 01:12 |
|
timotimo |
well, at least you know how to fix it |
| 01:12 |
|
|
athomason joined #perl6 |
| 01:15 |
|
ssutch |
at least there's that |
| 01:15 |
|
ssutch |
should i file a bug? maybe someone else who knows whats going on can? |
| 01:16 |
|
timotimo |
https://github.com/perl6/specs/issues - i suggest to file a bug here |
| 01:16 |
|
timotimo |
feel free to copypaste parts of the irclog, that's common practice in bug reports |
| 01:16 |
|
timotimo |
at least for perl6 and friends |
| 01:16 |
|
ssutch |
ok cool, thanks |
| 01:19 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 01:19 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - option equality sanity testok 2 - option array @variable sanity testnot ok 3 - option array .@attribute sanity test (using => arg syntax)ok 4 - option array .@attribute sanity test (using :() arg syntax)not ok 5 - field equality with same options»… |
| 01:21 |
|
timotimo |
can you try options=>($fopt), too? (although i think that would be a no-opt compared to options=>$fopt) |
| 01:22 |
|
ssutch |
r: https://gist.github.com/samuraisam/5819387 |
| 01:23 |
|
camelia |
rakudo b2072f: OUTPUT«ok 1 - option equality sanity testok 2 - option array @variable sanity testnot ok 3 - option array .@attribute sanity test (using =>[] arg syntax)ok 4 - option array .@attribute sanity test (using :() arg syntax)ok 5 - option array .@attribute sanity test (usin… |
| 01:23 |
|
ssutch |
ok: https://github.com/perl6/specs/issues/55 |
| 01:24 |
|
timotimo |
i suggest shortening the descriptions, so that they still fit in the output of the evalbot :D |
| 01:25 |
|
ssutch |
hah |
| 01:26 |
|
timotimo |
i recommend you quickly edit the gist link to also link directly at one of the revisions, or we start using a fork of that gist for future refinements |
| 01:26 |
|
ssutch |
good point |
| 01:27 |
|
dalek |
nqp: 5722e28 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (5 files): |
| 01:27 |
|
dalek |
nqp: Class sharing! For now this disables the caching in wvalResolve_noa and subcallResolve_noa entirely; we can be cleverer later. |
| 01:27 |
|
dalek |
nqp: review: https://github.com/perl6/nqp/commit/5722e2853b |
| 01:30 |
|
timotimo |
sorear: still going to limit yourself to startup time improvements for this compiler release? |
| 01:34 |
|
sorear |
timotimo: ? |
| 01:38 |
|
ssutch |
r: say [&&]([1] Zeq []) |
| 01:38 |
|
camelia |
rakudo b2072f: OUTPUT«True» |
| 01:39 |
|
ssutch |
one issue with this is that if the arrays are different size, it gives you an invalid answer |
| 01:39 |
|
timotimo |
oh, right |
| 01:40 |
|
timotimo |
just compare the two arrays with ==, too (== will coerce them to integers, meaning the size of the arrays) |
| 01:43 |
|
ssutch |
wish there was a more elegant way to compare to arrays |
| 01:43 |
|
ssutch |
^ .oO() |
| 01:48 |
|
sorear |
we seem to be creating *thousands* of __P6opaque__ classes |
| 01:56 |
|
timotimo |
*cue sorear changing two lines, cutting the memory usage and startup time down to 1/20* |
| 01:58 |
|
timotimo |
hm, it's kind of sad that perlito doesn't see very much activity |
| 01:58 |
|
timotimo |
it'd be kind of cool to write javascript in perl6 |
| 01:59 |
|
sorear |
https://gist.github.com/sorear/5819756 |
| 01:59 |
|
timotimo |
what just happened |
| 01:59 |
|
sorear |
it does leak memory, so before it can be used for spectesting I need to add something to restart the VM every 10-20 test files |
| 02:00 |
|
sorear |
or fix the memory leaks, but I don't understand exactly what is leaking |
| 02:01 |
|
sorear |
timotimo: it caches the loaded class files between runs |
| 02:01 |
|
sorear |
so the second and subsequent runs are faster |
| 02:03 |
|
|
bluescreen10 joined #perl6 |
| 02:03 |
|
timotimo |
ah, of course |
| 02:03 |
|
timotimo |
i thought you did something magical in between those two calls |
| 02:04 |
|
benabik |
He did. He cached all the classes. :-D |
| 02:04 |
|
timotimo |
yeah, he did :) |
| 02:05 |
|
sorear |
running hello world in a loop it gets to #26 before running out of memory |
| 02:06 |
|
benabik |
Oh! It's a client/server deal like Scala's fsc. |
| 02:07 |
|
timotimo |
maybe it's related to back when calling say "hello world" twice in the repl would give a huge error message about a comp unit alreay existing? |
| 02:16 |
|
sorear |
don't think so |
| 02:17 |
|
timotimo |
okay, i don't think i'll be of much help, so i'll get some sleep instead :) |
| 02:17 |
|
timotimo |
good luck! |
| 02:41 |
|
|
btyler joined #perl6 |
| 02:41 |
|
|
atroxaper joined #perl6 |
| 02:42 |
|
|
cooper joined #perl6 |
| 02:45 |
|
labster |
So I broke the build on Windows? great. |
| 02:49 |
|
colomon |
just in time for the release! |
| 02:49 |
|
labster |
I've joined an elite club, it seems |
| 02:50 |
|
colomon |
;) |
| 02:50 |
|
labster |
I've been thinking about not using basename/directory/volume as attributes, but instead just having a $!path and base.../d/v methods. Except for a few path manipulation things, most methods seem to want the entire thing as a string. |
| 02:52 |
|
* colomon |
nods |
| 02:52 |
|
twigel |
r: say ["a", "b"] eqv ["a", "b"] |
| 02:52 |
|
camelia |
rakudo b2072f: OUTPUT«True» |
| 02:53 |
|
labster |
If it has a side effect of fixing jnthn's build, all the better. |
| 02:53 |
|
twigel |
r: say ["a", "b"] eqv ["a", "c"] |
| 02:53 |
|
camelia |
rakudo b2072f: OUTPUT«False» |
| 02:53 |
|
twigel |
r: say ["a", "b"] eqv ["a", "b", "c"] |
| 02:53 |
|
camelia |
rakudo b2072f: OUTPUT«False» |
| 02:55 |
|
sorear |
looks like I can blame most of the memory leakage on the fact that java.lang.invoke.MethodType uses an intern table. |
| 03:01 |
|
|
snoopy joined #perl6 |
| 03:01 |
|
|
skids joined #perl6 |
| 03:06 |
|
|
SamuraiJack joined #perl6 |
| 03:06 |
|
labster |
.oO (at least the interns are unpaid) |
| 03:08 |
|
sorear |
or hash consing, if you prefer that term |