Zoffix | Woot... watch out for snow tomorrow... There's a positive comment on Reddit: "Perl6 is such a wonderful language. It nicely hits a sweet point. No weird syntax like Haskell or too many parenthesis like in $LIPS. Allows a wide range of different programming paradigma. Has cherry picked a lot of nice stuff from other languages. Is a true Perl language without it ugly parts, which forced me to give up Perl5" | 00:09 | |
ugexe | m: use Test:ver<6.c> | 01:03 | |
camelia | ( no output ) | ||
ugexe | m: use Test:ver<6> | ||
camelia | rakudo-moar e5d7a1: OUTPUT«===SORRY!===Cannot resolve caller Numeric(Version: ); none of these signatures match: (Mu:U \v: *%_)» | ||
ugexe | m: use Test:ver<*> | ||
camelia | rakudo-moar e5d7a1: OUTPUT«===SORRY!===Could not find Test:ver<*> at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::R…» | ||
ugexe | m: use Test; use-ok("Test:alsjfalskjdflasdf") | 01:04 | |
camelia | rakudo-moar e5d7a1: OUTPUT«ok 1 - The module can be use-d ok» | ||
ugexe | EVAL is not properly handling the pairs attached to the module name | 01:06 | |
[Tux] | This is Rakudo version 2016.08.1-115-ge5d7a16 built on MoarVM version 2016.08-35-g5108035 | 06:33 | |
csv-ip5xs 9.470 | |||
test 15.802 | |||
test-t 7.343 | |||
csv-parser 17.042 | |||
lizmat | Files=1135, Tests=52707, 244 wallclock secs (13.41 usr 4.10 sys + 1493.71 cusr 138.76 csys = 1649.98 CPU) # on a cold machine | 06:34 | |
nine | lizmat: 13 seconds less than yesterday :) | 06:37 | |
lizmat | well, yes, but yesterday the machine I ran this on, wasn't cold | ||
nine | Btw. time perl6 -e 'use Inline::Perl5' went down from 415ms to 310ms through the optimizations of the past two days. | 06:49 | |
lizmat | $ time perl6 -e 'use Inline::Perl5' real0m0.275s # for reference | 06:52 | |
nine | Btw. there is no measurable gain from removing RAKUDO_MODULE_DEBUG | 06:59 | |
dalek | kudo/nom: f648d3b | niner++ | src/core/CompUnit/PrecompilationStore/File.pm: Save a couple more microseconds by getting rid of a Hash lizmat++ for noticing |
07:14 | |
nine | Fun fact: a precompiled GTK::Simple could load in 0.6s if they changed the require to use statements in github.com/perl6/gtk-simple/blob/m...Simple.pm6 | 07:44 | |
timotimo | is that semantically equivalent in this case, nine? | 08:09 | |
nine | timotimo: AFAICT yes. | 08:16 | |
timotimo | *neat* | 08:18 | |
nine | It's much faster because with require, the transitive dependencies were not included in GTK::Simple's own (which were none) so we process very similar dependency trees over and over again instead of a consolidated list. | 08:20 | |
timotimo | ah | 08:21 | |
i'm opening an issue linking to this discussion | |||
nine | The most equivalent alternative is probably need, not use. Both improve load time just the same. | 08:33 | |
We spend 18 % of the time to load (the improved) GTK::Simple just checking if PrecompilationIds match /^<[A..Za..z0..9._-]>+$/ | 08:51 | ||
I.e. subset type checking. And only the regex part of that, not even the length checks. | |||
jnthn | Wowzer :) | 08:52 | |
Guess I should get on with trying to optimize how we compile simple regexes/grammars :) | |||
timotimo | that's true, yes. quite. | 08:53 | |
they are terribly slow at the moment | |||
nine | I guess I'm just glad that I could finally join the performance game. It's usually my favourite part of software development :) | ||
timotimo | \o/ | 08:54 | |
do we have a way (with nqp ops) to check if a given string starts with a composite grapheme? | |||
jnthn | Still walking up, but nqp::chr(nqp::ord(str)) eq nqp::substr(str, 0, 1) is the obvious way | 09:04 | |
timotimo | ah | 09:06 | |
that might be expensive | |||
timotimo AFK | |||
jnthn | Oh, you can use nqp::eqat to make it a bit cheaper :) | 09:07 | |
timotimo | a bit, yeah | ||
Zoffix | m: sub foo { @_.join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); my $what = 'zoffix'; say $what eq foo $c xx $what.chars | 10:39 | |
camelia | rakudo-moar f648d3: OUTPUT«False» | ||
Zoffix expected a True :/ | |||
Ah, you can use @_ if you want it to Junct | 10:44 | ||
m: sub foo { ($^a, $^b, $^c, $^d, $^e, $^f).join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); say so 'zoffix' eq foo $c xx 6 | |||
camelia | rakudo-moar f648d3: OUTPUT«Too few positionals passed; expected 6 arguments but got 1 in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
Zoffix | m: sub foo { ($^a, $^b, $^c, $^d, $^e, $^f).join }; my $c = any (flat 'a'..'z', 'A'..'Z', 0..9, <- _ .>); say so 'zoffix' eq foo |($c xx 6) | ||
:} | 10:45 | ||
camelia | rakudo-moar f648d3: OUTPUT«(timeout)» | ||
Zoffix | *can't use | ||
m: sub foo { ($^a, $^b, $^c).join }; my $c = any flat 'a'..'z'; say so 'zof' eq foo |($c xx 3) | 10:46 | ||
camelia | rakudo-moar f648d3: OUTPUT«True» | ||
Zoffix | \o/ | ||
jnthn | Yeah, it's like a *@_ signature, and an @foo can hold Mu | ||
Zoffix | Now, on to scaring people on reddit who think $a = 1|2|3 is too magical :P | 10:47 | |
jnthn would probably have written it with X~ :P | |||
stmuk | people on reddit are delicate snowflakes | 10:48 | |
DrForr | m: my $x = 3; 1|2|4 < $x < 9; | ||
camelia | ( no output ) | ||
DrForr | m: my $x = 5; 1|2|4 < $x < 9; | ||
camelia | ( no output ) | ||
Zoffix | m: my $x = 5; say 1|2|4 < $x < 9; | ||
camelia | rakudo-moar f648d3: OUTPUT«True» | ||
DrForr | Not sure what that'd mean though :) | ||
Ah, still too used to the p5 bot. | 10:49 | ||
Zoffix | stmuk, I think I'm actually starting to enjoy that crowd :) Set in their ways. Terrified of innovation. It's a fun game to try to write an article that will terrify them the most :} | 10:59 | |
"Why not just use arrays/lists or another collection and use a "Contains" type of function?" ah yes, why not. The language you use doesn't have Junctions, does it? ;) Scary | |||
[Coke] | TimToady: regarding irclog.perlgeek.de/perl6/2016-09-05#i_13155397 - we have a 6.d document in specs/ somewhere where you can write down those sorts of things. | 12:51 | |
masak | TIL there's a word "yclept" in English, apparently still in tongue-in-cheek use. | 13:37 | |
TheLemonMan | hmm, let's say an object O inherits two roles A and B that both define a method M, is there a way to forcefully invoke a specific one ? | 13:50 | |
nine | m: role A { method m() { say "A"; } }; role B { method m() { say "B"; } }; class C does A does B {}; C.m # role clash | 13:51 | |
camelia | rakudo-moar f648d3: OUTPUT«===SORRY!=== Error while compiling <tmp>Method 'm' must be resolved by class C because it exists in multiple roles (B, A)at <tmp>:1» | ||
nine | TheLemonMan: ^^^ | ||
m: role A { method m() { say "A"; } }; role B { method m() { say "B"; } }; class C does A does B { method m() { self.B::m } }; C.m # resolved | 13:52 | ||
camelia | rakudo-moar f648d3: OUTPUT«B» | ||
masak | the `self.B::m` syntax is a wonderful "lie-to-children" | 13:57 | |
it really has nothing to do with packages. methods install in the `has` scope, not in the `our` scope | |||
but it's irresistably appropriate nonetheless | |||
[Coke] | github.com/supernovus/perl6-http-e...sy.pm6#L52 - there should be a start block somewhere in there, no? | 14:05 | |
BTW, I'm still confounded by trying to add async processing to a Bailador app, let me gist some chunks. | 14:07 | ||
ugexe | there might have been, but you have to read the socket in the same thread you create it in | ||
so maybe he just fell back to that in the mean time | |||
[Coke] | gist.github.com/coke/84389edf917a1...30f1c86848 - when I run this (and there's a lot elided on line 3), if the request is coming in, or if the promise is being worked on, I get output from the react block - otherwise, it goes silent; it should be emitting something every 5s or so. | 14:09 | |
TheLemonMan | m: class :: {has $.x is rw;method a{$.x.item=[1,2,3];dd $.x;dd $!x}}.new.a | 14:11 | |
camelia | rakudo-moar f648d3: OUTPUT«$[1, 2, 3]Array $!x = $[1, 2, 3]» | ||
[Coke] | (If I just have that react loop, it does reliably run every 5s or so.) | 14:12 | |
TheLemonMan | I suspect it boils down to the fact '$.x' is desugared as 'self.x.item' | 14:13 | |
[Coke] | so, something in the baile (http::easy.run) is, I'm guessing, getting "stuck" and preventing the async code from running. | 14:14 | |
tempting to split up the "accept http requests" logic and the "do something about the request" logic into 2 separate programs and using redis/temp files/something to handle offloading the work instead of start{}. :| | 14:15 | ||
TheLemonMan | I also suspect it ends up calling the item method on the iterable object, but I have not managed yet to discover why | 14:17 | |
[Coke] | (ah, it's not just the react that's hung up; it processes part of the start block and then hangs. then, when the second request comes in, it finishes processing the first request, gets started on the second one (which now gets even less far in processing), and then hangs again before completing the block. Yup, very borked. | 14:19 | |
lizmat waves from Vaduz | |||
[Coke] | I will try to come up with a test case for this for Bailador, but it's probably really a core issue. | ||
Ulti waves from Cambridge | 14:20 | ||
jnthn | Been a while since I was there :) | 14:21 | |
And I had to look up Vaduz on the map :P | |||
[Coke] | (test) of course, simplifying it down to the minimum means it doesn't fail. :| | 14:24 | |
TheLemonMan | m: class :: {has $.x is rw;method a{$.x=class :: {};dd $.x;dd $!x}}.new.a # doesn't happen with generic objects | 14:25 | |
camelia | rakudo-moar f648d3: OUTPUT«<anon|83268576> $!x = <anon|83268576><anon|83268576> $!x = <anon|83268576>» | ||
lizmat | it's the 5th country this trip that Wendy and I visit for the first time | ||
TheLemonMan | m: class :: {has $.x is rw;method a{$.x={};dd $.x;dd $!x}}.new.a # happens with hashes (implements Iterable) | 14:26 | |
camelia | rakudo-moar f648d3: OUTPUT«${}Hash $!x = ${}» | ||
TheLemonMan | m: class :: {has $.x is rw;method a{$.x=[];dd $.x;dd $!x}}.new.a # happens with arrays (implements Iterable) | ||
camelia | rakudo-moar f648d3: OUTPUT«$[]Array $!x = $[]» | ||
timotimo | [Coke]: sometimes exceptions will end your start block in the middle and not actually show up | 14:28 | |
[Coke] | timotimo: that's why I keep the list of promises and examine their status | 14:29 | |
none of them are dying. they're just... paused. | |||
... and then the loop to check their status gets paused as well. | 14:31 | ||
timotimo | interesting | ||
you are on very latest moar i assume? as jnthn recently fixed a bunch of problems where locks could move away from under a promise etc? | 14:32 | ||
[Coke] | 2016.08.1 | 14:33 | |
timotimo | inot sure if that has the fixes | 14:34 | |
i would update at least moar to be sure im not run ing against fixed bugs :) | 14:35 | ||
the trouble came when mutexes were gc moved. or maybe semaphores | |||
[Coke] | can I get the abs. latest with 'rakudobrew triple master master master' ? | 14:36 | |
timotimo | we did not habe them at an indirecton so calling lock or unlock suddenly arrived at semantically a distinctt lock while another lock got unlockable | ||
[Coke] | hah! misspelled as "rakudobrew tripe" | ||
timotimo | nom master maatee | ||
... | 14:37 | ||
phone keyboard + shaking train + unreliable net connection | |||
[Coke] | got it. | ||
timotimo | commute continues by car, so no motre irc for now | 14:38 | |
[Coke] | timotimo: `` | ||
timotimo: ~~ | |||
huh. 'rakudobrew triple nom master master' dies with Couldn't determine correct make program. Aborting. | 14:40 | ||
[Coke] does it the old fashioned way | 14:42 | ||
I just built a one off rakudo. added it to my path. which perl6 shows the right perl6. run "perl6 bootstrap.pl" in panda. it ends with a note that I should add the rakudobrew dir to my path. :( | 15:05 | ||
ok. I suspect it was because I did a "perl6 bootstrap.pl" without adjusting away from rakudobrew first; hit ^C, fixed path, ran again. maybe something got stuck? | 15:09 | ||
timotimo: AHAHAHAHA | 15:18 | ||
timotimo: now the start block hangs EVEN FASTER | |||
maybe this means I can at least come up with a test case that isn't my entire script. | 15:22 | ||
geekosaur | `which` can lie. use `type` | 15:36 | |
(and `type` will pribably tell you it's still using the rakudobrew one, because it found that one and remembered it; try `hash -r`) | 15:37 | ||
[Coke] updates gist.github.com/coke/84389edf917a1...30f1c86848 to highlight his bailador(socket) vs. async issue. | 15:41 | ||
jnthn | [Coke]: I'm guessing that doesn't simply return "OK" and then spit out "A" straight away and "B" soon after? | 15:42 | |
[Coke] | jnthn: it returns OK immediately, emits "A" immediately. "B" doesn't show up until you invoke the curl line about 8 times. | 15:43 | |
remove the start? "B" is emitted almost immediately. | |||
jnthn | ...oh. | ||
[Coke] | change the slurp to a sleep 4? "B" shows up reliably in 4 seconds. | ||
(with only one curl) | 15:44 | ||
jnthn | Do curls within that 4 seconds get blocked? | ||
[Coke] | real world use case: github web hooks that kick off a build. trying to return to the hook immediately, but do some long running process in the background that generates and runs a docker container. | ||
jnthn: nope | 15:45 | ||
they are all accepted, then in 4 seconds, you get that many B's back | |||
jnthn | [Coke]: OK. I've got Perl 6 tuits tomorrow, if I forget then poke me about it then...guess I can install Bailador and reproduce it easy enough. | 15:46 | |
[Coke] | so it seems to need the http listener, the start, AND the IO.slurp (or a qqx/docker.../ or qqx/git/ ) | ||
jnthn: want an RT? | |||
jnthn | [Coke]: Can do; stick [CONC] in the subject also :) | 15:47 | |
[Coke] | aye | 15:48 | |
jnthn++ | |||
nine | Is there a faster way to check if a directory contains anything than $dir.dir.so? | ||
jnthn | I'd guess .so is smart enough to short-circuit... | 15:49 | |
nine | Oh, indeed. It will end up calling reify-at-least(1) | 15:53 | |
literal | ?$dir.dir :) | 15:54 | |
[Coke] | jnthn: #129213 | 15:59 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129213 | ||
[Coke] | "I'm an IO object, dir.dir.dir" | ||
nine | Why does IO::Spec::UNIX::catdir canonicalize the path? Seems like a lot of work that's unrelated to the actual job. | 16:13 | |
mst | also a bug | 16:15 | |
I should be able to build up a dirpath without reference to the filesystem | |||
nine | My suspicion is that it's just for not adding another / when the parent path already ends in one. | 16:18 | |
brrt | then check for the suffix of the parent path.. | 16:19 | |
what if i want to catdir for something im going to access over a network | 16:20 | ||
lizmat | m: use nqp; say nqp::if("foo",0,1) # is there a better way to revert any value to its not() ? | 16:23 | |
camelia | rakudo-moar f648d3: OUTPUT«0» | ||
lizmat | in nqp, that is ? | 16:24 | |
brrt | i think we have something like nqp::not | ||
lizmat | we have nqp::not_i, but that only works on ints | 16:26 | |
there's no nqp::not_o | |||
or nqp::not | |||
lizmat is working on making Junction.Bool and Junction.ACCEPTS about 2x faster | 16:27 | ||
nine | Making IO::Path::child use catpath instead of catfile shaves off 17 % of GTK::Simples loading time. catpath is essentially the same without the canonicalizing. | 16:43 | |
dalek | kudo/nom: b3e442c | lizmat++ | src/core/Junction.pm: Make Junction.Bool|ACCEPTS about 2x faster - rewrite with nqp ops - be smarter with the loops: no need to "return" on success - store native list instead of List for states |
16:45 | |
lizmat | autothreading next | 16:47 | |
nine | The only failing test is this: is IO::Path::Unix.new(".").child('foo'), "foo", "append to cwd"; | 16:49 | |
Because this now gives './foo' instead of 'foo'. | |||
Hard to say which one is the correcter one | 16:51 | ||
lizmat | dinner& | 16:55 | |
dalek | ast: 413ec98 | titsuki++ | S06-multi/syntax.t: Make sure where-blocked multi is prior to non-where-blocked multi (#155) |
17:12 | |
[TuxCM] | Hi, I get «Internal error: Unwound entire stack and missed handler» on a try-out with NativeCall | 17:14 | |
what to do now? :) | 17:15 | ||
hoelzro | [TuxCM]: could you paste the code that causes it? | 17:20 | |
(sounds like github.com/MoarVM/MoarVM/issues/159) | |||
[TuxCM] | www.xs4all.nl/~hmbrand/nc-c.pl | 17:21 | |
re-fetch. first post was the alternative | 17:22 | ||
hoelzro | ah, I imagine that one of your callbacks is raising an exception | 17:23 | |
what happens for NC is MoarVM actually creates a new MoarVM interpreter for callbacks | 17:24 | ||
[TuxCM] | which is likely hard to debug? | ||
hoelzro | unless your callbacks catch all of their exceptions, yes | ||
the exception throwing logic is looking for its handler, but the call stack it's looking on is the new MoarVM interpreter, so it unwinds to the top and throws up its hands | 17:25 | ||
[TuxCM] | the callbach (at the moment) is just field-count, which doesn't (yet) use any of the arguments | 17:26 | |
hoelzro | maybe it's from the use of Nil? | ||
[TuxCM] | The use of Nil actually got rid of many other errors | ||
hoelzro | interesting | 17:27 | |
[TuxCM] | what should I use for NULL instead? | ||
nine | Any? | ||
[TuxCM] | Any coused havoc | 17:28 | |
caused | |||
replacing Nill with an actual cb, got my the unwind error too | 17:29 | ||
nine | I use Pointer for NULL pointers | 17:30 | |
[TuxCM] | nine, Nil -> Pointer still error, but reads more logical :) | 17:31 | |
nine | Oh nice! IO::Spec::join is IO::Spec::catpath + special handling of / or . as parent. With that spectest is clean :) | 17:41 | |
Does anyone have any objections to me committing that change? | |||
I wonder if we actually have to look through all precomp stores when looking for dependencies of the precomp file we're currently loading. | 17:54 | ||
I don't think it's possible to find it in a repo further up the chain or our original target would be located there. | 17:55 | ||
timotimo | i like the sound of faster loading times in any case :) | 18:10 | |
nine | I guess turning CompUnit::PrecompilationId from a subset into its own class would get rid of a lot of checking and rechecking on every method call. | 18:11 | |
timotimo | oh, probably | 18:12 | |
dalek | kudo/nom: 73c9dd5 | niner++ | src/core/IO/Path.pm: Speed up IO::Path::child by replacing catfile with join This change saves ~ 20 % of GTK::Simple's loading time by saving a lot of calls to IO::Spec::Unix::canonpath which is called by catfile. The semantic change is that .child no longer canonicalizes the path. But that seemed to be unrelated to the actual purpose of the method anyway. |
18:13 | |
nine | So...how can I make my CompUnit::PrecompilationId $id = 'abcdefg'; work, i.e. assigning a Str to it? | 18:17 | |
timotimo | that's ... a bit trickier :) | 18:18 | |
i know how you can make it boxable, but that'll require going through nqp::box_s | 18:19 | ||
nine | Add STORE multis? | ||
timotimo | not sure that helps; wouldn't you have an undefined PID object that that'd be called on? | ||
maybe a STORE with an is rw invocant could work | |||
m: class Test { method STORE($self is rw: $value) { self = self.new } }; my Test $foo = "hi"; say $foo.perl | 18:22 | ||
camelia | rakudo-moar b3e442: OUTPUT«Type check failed in assignment to $foo; expected Test but got Str ("hi") in block <unit> at <tmp> line 1» | ||
timotimo | hm, it doesn't get to the underlying object's STORE method it seems | ||
dalek | kudo/nom: bd3d430 | (Zoffix Znet)++ | tools/contributors.pl6: Make repo locations configurable from command line This will let release managers be more flexible when generating the contributors list. For automated releases, this will make the contributor generation step less dependent on the current state of the rakudo repo. |
19:02 | |
nine | Turning CompUnit::PrecompilationId from a subset into a class saves another 13 % of GTK::Simple's loading time. Is now at 0.34s. Quite nice considering that it was 20s last week :) | 19:05 | |
japhb | nine++ # Very nice improvements indeed! | 19:10 | |
nine: Are you seeing more LHF in improving the loading time, or are you out of ideas (for "easy" stuff at least) at this point? | 19:12 | ||
nine | Starting to run out of ideas | 19:16 | |
japhb | Well, given you're closing in on 2 orders of magnitude (when you subtract minimum rakudo startup time), that's still pretty darned impressive | 19:21 | |
dalek | kudo/nom: 72d3be6 | niner++ | / (5 files): Speed up passing CompUnit::PrecompilationIds around Turning CompUnit::PrecompilationId from a subset into a proper class saves the re-checking of its contents when passing them to methods. The downside is that we have to be more explicit in creating them. Saves 13 % of GTK::Simple's loading time. |
19:22 | |
jnthn | With that nine++ has got it down to, could even be interesting to do a callgrind run to see what if there's MoarVM hotspots | 20:11 | |
nine | Note that I test with github.com/perl6/gtk-simple/pull/64 merged | 20:24 | |
But even without that we're already down to ~ 1s. Less than I thought we would be. | |||
japhb | jnthn: Oh, good point. It would be interesting to find something that is broadly applicable to general Perl 6 code that happens to be hotspotted by this benchmark. | 20:25 | |
And the IO::* improvements are welcome too, because dang are we slow at filesystem stuff. | 20:26 | ||
nine | japhb: well we already know that regex matching can use all the speedups it can get :) | ||
I wonder if we could actually get rid of the precomp file modification time check as we are already comparing the checksum anyway. | 20:34 | ||
But even if, that's probably something for the next release. Because if it uncovers subtle issues, it'd be hard to pinpoint with all these changes. | 20:37 | ||
Doing away with those checks brings unmodified GTK::Simple down to 0.78s and the improved on to 0.30s! | 20:41 | ||
jnthn | Wow | 20:45 | |
That's fairly decent | 20:46 | ||
And amazing considering where we've come from :) | |||
nine++ nine++ nine++ :) | |||
moritz | nine++ indeed | 20:47 | |
dalek | kudo/nom: f55e113 | niner++ | src/core/CompUnit/PrecompilationRepository.pm: Speed up loading dependencies by removing .modified checks Since we already compare the checksums, we know that if the loaded file is the same that we used for compilation. So we don't need the unreliable file modification timestamp as a proxy. Remove the check as it's redundant and costs quite some time. |
21:00 | |
nine | Ah screw the caution. Everything works just fine here and I have no idea why a sha1 would not be enough to clearly identify the precomp file's contents. | 21:01 | |
jnthn | If it works for Git... | 21:02 | |
lizmat | nine: agree, and even *if* it is modified according to the file system, if the sha1 is the same, what would it matter ? | ||
mst | nine: claim that you're doing it to add NFS support. | 21:03 | |
[Coke] takes a deep, calming breath and tries not to think about $DAYJOB. | |||
TheLemonMan | jnthn, (WRT github.com/rakudo/rakudo/commit/fa...d04c259a2) shouldn't something like this be done for the Iterator item() ? | 21:23 | |
jnthn | TheLemonMan: Where exactly? | 21:24 | |
(I don't see an item method in github.com/rakudo/rakudo/blob/nom/...erator.pm) | |||
(So not sure where you're talking about :)) | 21:25 | ||
TheLemonMan | jnthn, github.com/rakudo/rakudo/blob/nom/...ble.pm#L14 | 21:26 | |
gah, I should head to bed heh | |||
jnthn | Oh, hmmm | 21:27 | |
TheLemonMan | for more context, I think that we have a problem with $. accessors and objects implementing Iterator on the RHS of the assignment | ||
m: class :: {has $.x is rw;method a{$.x=[1,2,3];dd $.x;dd $!x}}.new.a | |||
camelia | rakudo-moar f55e11: OUTPUT«$[1, 2, 3]Array $!x = $[1, 2, 3]» | ||
TheLemonMan | m: class :: {has $.x is rw;method a{$.x={};dd $.x;dd $!x}}.new.a | ||
camelia | rakudo-moar f55e11: OUTPUT«${}Hash $!x = ${}» | ||
TheLemonMan | m: class :: {has $.x is rw;method a{$.x=42;dd $.x;dd $!x}}.new.a | ||
camelia | rakudo-moar f55e11: OUTPUT«Int $!x = 42Int $!x = 42» | ||
jnthn | I think the github.com/rakudo/rakudo/commit/fa...8d04c259a2 is dubious :( | ||
TheLemonMan | $.x is desugared as self.x.item and then 'assign''d | 21:28 | |
jnthn | oh wait... | ||
Well, .item on an Iterable needs to put a Scalar container around the thing really | |||
Otherwise it won't behave like an item | |||
Oh, which is why we get away with it in Mu | 21:29 | ||
Because it doesn't actually matter there | |||
I suspect Iterable.item maybe wants to look like method item(Iterable \SELF:) { nqp::iscont(self) ?? self !! nqp::p6bindattrinvres(nqp::create(Scalar), Scalar, '$!value', self) } | |||
That is, it preserves an existing container | 21:30 | ||
But creates one if needed | |||
oh, and with "is raw" in the signature | |||
gah wat | |||
I should sleep too | |||
with with is raw on the method | |||
(so the return type survives) | |||
TheLemonMan | it seems to fix that particular case (I just made it return self instead) | ||
jnthn | yeah, but if we just return self then we break other things | 21:31 | |
m: my @a = [1,2,3].item; say @a.elems | |||
camelia | rakudo-moar f55e11: OUTPUT«1» | ||
jnthn | If we just return self there, I bet that will end up returning 3 | 21:32 | |
TheLemonMan | 'twas just a quick test heh | ||
jnthn | :) | 21:33 | |
I'm almost surprised you can compile CORE.setting and survive startup with that broken ;) | 21:34 | ||
TheLemonMan | let's see if it survives a spectest too heh | 21:35 | |
mst | you'd be amazed how much of rakudo boots even when it's still mnostly buggered | ||
I discovered this a lot while doing the Alien:: stuff | |||
jnthn | I guess it's fairly robust to that in so far as we've found most ways to break it over the years :) | 21:36 | |
(And the failure modes were often horrible :)) | |||
sleep & | 21:45 | ||
dalek | kudo/nom: e29495e | moritz++ | src/core/CompUnit/PrecompilationRepository.pm: Try to make precompile backwards compatible again This should help for issues like travis-ci.org/perl6/doc/builds/157995993 |
21:59 | |
kudo/nom: ef98f8f | (Zoffix Znet)++ | tools/create-release-announcement.pl: Make release announcement script more robust - Accept custom repo locations and rakudo dirs as args - We no longer care what directory the script runs from - Propagate custom repo locations to contributor generating script - Actually bail out if contributor script exits unsuccessfully |
22:07 | ||
TheLemonMan | jnthn, sent a PR anyway so we don't forget about this | ||
'nite |