Geth nqp: MasterDuke17++ created pull request #365:
Add .gist method to NQPRoutine
00:52
nqp: 363352493b | MasterDuke17++ | src/core/NQPRoutine.nqp
Add .gist method to NQPRoutine

This way `say Match.^methods` doesn't die with `X::Method::NotFound exception produced no message`.
05:27
nqp: 8c3aedcc97 | niner++ (committed using GitHub Web editor) | src/core/NQPRoutine.nqp
Merge pull request #365 from MasterDuke17/add_gist_method_NQPRoutine

Add .gist method to NQPRoutine
lizmat Files=1206, Tests=62534, 219 wallclock secs (13.22 usr 4.85 sys + 1329.43 cusr 134.60 csys = 1482.10 CPU) 07:39
nine Can someone tell me, _why_ this patch actually works? gist.github.com/niner/cb9189a88b41...b306f7ae15 07:45
We're already in a MAIN sub, so MAIN dispatching should be done. But when I "require" a script that contains its own MAIN subs, they seem to get called just fine. 07:47
I mean it's great that this little patch shaves off a full rakudo start (~ 130ms) of invoking installed scripts like zef or mi6. But I did not actually expect it to be this easy?!
Doesn't work that way when I precompile the script btw. Then it will load the script but not invoke MAIN, just as I'd expect it to behave with the above patch. 08:00
lizmat feels like a bug that acts as a feature :-) 08:06
nine Yeah, I will resist the temptation to commit this right away. But it shows that my plan to replace those elaborate wrapper scripts we install by a single call to some CompUnit::RepositoryRegistry.run-script(...) 08:10
That way we can utilize that bug without having to commit to staying compatible with it. And it should save some compilation time. 08:11
Which could easily be another 100ms 08:15
|Tux| ???? ???? ???? ???? 08:46
This is Rakudo version 2017.06-45-g86e7b2bd2 built on MoarVM version 2017.06-14-g888b33d1
csv-ip5xs 2.636
test 12.279 08:47
test-t 3.907 - 3.954
csv-parser 12.204
lizmat whee! :-)
afk& 08:49
pmurias if normalizecodes is r(obj) r(int64) r(obj) how does it return a value on the MoarVM backend? 11:55
jnthn It puts the result into the supplied buffer 11:57
iirc
yeah 11:58
qp::normalizecodes(self, nqp::const::NORMALIZE_NFC, nqp::create(NFC))
The third argument is the target
And then it's just the usual mechanism in the QAST -> MAST compiler of indicating which argument becomes the return value 11:59
pmurias thanks, I missed that mechanism
it seems js is being moved towards being a better target as the ECMAScript 2015 added the normalization methods ;) 12:01
jnthn :) 12:17
pmurias
.oO(maybe they add the NFG soon?)
12:19
ugexe nine: does it do the right thing for --help too? 14:10
or the incorrect command output?
eveo New blog post: "Perl 6: Seqs, Drugs, And Rock'n'Roll": perl6.party/post/Perl-6-Seqs-Drugs...ock-n-Roll 15:19
lizmat eveo: I see your getting into the High End Perl spirit :-) 16:05
eveo lizmat: what is that? 16:07
lizmat act.perlconference.org/tpc-2017-ams...apers.html 16:08
of course, in Amsterdam you could of course do /End/and/ :-) 16:09
eveo Ah :) 16:11
lizmat eveo: isn't "my $supply = supply { emit take 42 }" a. a bit weird and b. using the undocumented behaviour that take returns the value taken? 16:16
I seem to recall wanting to have take return Nil
perlpilot huh ... I didn't realize that was undocumented. 16:17
eveo OK. I changed it not to rely on that 16:19
lizmat perlpilot: not in docs.perl6.org/routine/take
nor in docs.perl6.org/syntax/gather%20take
perlpilot As long as it's spec (which I'm now also unsure about :) 16:20
lizmat hmmm S04:818 16:22
synopsebot6 Link: design.perl6.org/S04.html#line_818
lizmat I seem to recall jnthn wanting to make it return Nil for optimization reasons 16:23
but I could very well be wrong :-)
Geth rakudo/nom: 43c1767b2c | (Elizabeth Mattijsen)++ | src/core/Mu.pm
.BUILD/.TWEAK calls 15x faster if no args to .new

Slipping an empty hash for named parameters, is very expensive. Since we already have low-level access to the named parameters specified with
  .new, we can quickly check if anything was specified. And then don't
bother slipping the empty hash when we call BUILD (or TWEAK for that matter).
16:26
lizmat m: use nqp; class A { has Int $.a is default(42) }; my $a := nqp::create(A); dd $a.a; dd nqp::getattr($a,A,q/$!a/).VAR.default # jnthn thoughts ? 16:41
camelia Int
42
lizmat m: use nqp; class A { has Int $.a is default(42) }; my $a := nqp::create(A); dd $a.a = Nil; dd nqp::getattr($a,A,q/$!a/).VAR.default # not that assigning Nil *does* work 16:55
camelia Cannot modify an immutable Int ((Int))
in block <unit> at <tmp> line 1
lizmat m: use nqp; class A { has Int $.a is default(42) is rw }; my $a := nqp::create(A); dd $a.a = Nil; dd nqp::getattr($a,A,q/$!a/).VAR.default # if you mark it "is rw" :-)
camelia Int $!a = 42
42
lizmat .tell jnthn looks like nqp::create is actually assigning type objects to vivify attributes, is that correct ? 16:56
yoleaux lizmat: I'll pass your message to jnthn.
ggoebel .tell pmurias saw the recent commits regarding building js backend... what is the full set of steps now to build it from a fresh git clone github.com/rakudo/rakudo.git? 17:30
yoleaux ggoebel: I'll pass your message to pmurias.
samcv good * 17:58
samcv yawns
eveo \o
jnthn o/ samcv 17:59
lizmat hmnmm... why didn't tell yoleaux my message to jnthn 18:09
yoleaux 17:59Z <jnthn> lizmat: Vivification happens at first access, not at creation time
lizmat ah, different channel
eveo looks like zef likes to keep stuff around. my toaster runs are crashing due to low disk space and I've been waiting for cpan@toaster:~/.zef$ du -sh to complete for a couple of minutes already :/ 18:11
eveo gets tired of waiting and goes with the nuclear option 18:14
m: say 7.3-3.1 18:19
camelia 4.2
eveo 4.2GB of stuff :S
samcv well you're installing all the repos? 18:20
i think you can remove ~/.zef/tmp easily. but removing ~/.zef/cache can remove compcache
eveo It was ~/.zef/store 18:21
I'm installing all the repos to a custom location in /tmp that gets wiped on reboot
samcv ah 18:22
wonder if you can install them with depth of 1?
eveo hm? I'm not following. I'm just installing modules. I don't care at all about git repos or whether there are any git repos backing these modules in the first place. 18:23
filed: github.com/ugexe/zef/issues/179 18:24
ugexe thats unavoided with caching stuff. however now that I think about it should be deleting stuff on exit if the cache is disabled but instead is just not updating the cache's index file 18:32
eveo yeah, I'm using --/cached would be neat if those files could be automagically wiped. 18:33
nine ugexe: indeed it does
eveo m: say log 10Ā¹ā°ā°ā°ā°ā°ā°, 42 18:34
camelia Inf
eveo Wonder if Int log is possible :/
Oh, I guess not. The result wouldn't always be an Int. :\ 18:35
nine ugexe: now I even understand why. Perl6::Actions checks for precompilation mode. As we're not precompiling, it just adds a call to MAIN_HELPER to the comp unit's main line. And MAIN_HELPER looks in the caller's lexical scope for MAIN subs to execute.
ugexe: does zef run git clone with --depth 1? As you don't need the history, that could save transfer and disk space 18:40
ugexe well it does a git clone/pull into ~/.zef/tmp/foo directory, and then that goes through the extract phase as `git --work-tree ~/.zef/foo.git/ checkout $sha` 18:45
--work-tree ~/.zef/store/foo.git/ ^
i think it used to use --depth 1 but i changed it to this to open up the option for commit-ids in the source-url 18:46
or maybe it was so updating the package lists from a git repo was fast 18:47
eveo m: Seq.new(class :: does Iterator { has $!n = 10; method pull-one {say "pulling!"; $!n-- and 42 or IterationEnd }; method skip-one { $!n-- }; method count-only { 10 } }.new).tail.say 19:31
camelia pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
pulling!
42
eveo Would've thought this Seq could've skip-at-least(.count-only-1) and .pull-one instead of pulling all 19:32
s: Seq.new(class :: does Iterator { has $!n = 10; method pull-one {say "pulling!"; $!n-- and 42 or IterationEnd }; method skip-one { $!n-- }; method count-only { 10 } }.new), 'tail', \()
SourceBaby eveo, Sauce is at github.com/rakudo/rakudo/blob/43c1...s.pm#L1873
eveo s: Rakudo::Iterator, 'LastValue' 19:33
SourceBaby eveo, Sauce is at github.com/rakudo/rakudo/blob/43c1...r.pm#L1898
eveo Ah. just needs a little hackety hack up in there
eveo will do that in ~1.5h
New toaster run ready 19:45
buggable: toast
buggable eveo, Between 2017.06-46-g43c1767 and 2017.06: 6 (0.73%) modules got burnt; 11 (1.33%) got unsucced; 199 (24.09%) out of 826 modules appear unusable. See toast.perl6.party/ for details.
eveo buggable: toaster
buggable eveo, Between 2017.06-46-g43c1767 and 2017.06: 6 (0.73%) modules got burnt; 11 (1.33%) got unsucced; 199 (24.09%) out of 826 modules appear unusable. See toast.perl6.party/ for details.
eveo "# Cannot invoke null object" 19:46
moritz that is certainly true :-9
eveo Unsure about unburnt unsuccs. I had to kill a bunch of stuff. Maybe I didn't wait long enough
moritz but often not a very helpfull message :-)
Geth rakudo/nom: 92f8abe008 | (Stefan Seifert)++ | 2 files
Speed up starting installed scripts

Turns out we don't actually have to run a separate perl6 process just to run the appropriate installed script from the wrapper. Due to insufficient checks in Perl6::Actions, MAIN subs are even run when loading a script with
  "require". Arguably that's a bug, but for now this is useful.
... (6 more lines)
eveo gulps at that last sentence 19:47
nine I guess I should start putting the most interesting lines in the top of the commit message: "Brings down zef's startup from 0.744 to 0.507 seconds."
eveo Cool
nine eveo: the ommitted rest of the message explains how I dealt with that being a bug :)
moritz and iirc it's nothing new, right? 19:48
nine moritz: probably been there forever
moritz I remember that when I hacked on MAIN together with patrickas, it was there :-) 19:49
eveo nine: I don't fully get it. There aren't even notes that the behaviour relies on a bug (is it?). If it's definitely a bug, this commit will make it harder to figure out why the fix to the bug breaks other stuff :/
eveo relocates
nine eveo: I actually would like to precompile those installed modules for further savings. When I do that I will have to find another way to run MAIN anyway and will no longer depend on the bug. 19:50
eveo Cool.
nine eveo: but fixing the bug is not high prio anyway. It's been there forever and since modules are precompiled, you pretty much can only run into it by requireing a source file directly. 19:51
For those wondering: this speedup only affects newly installed scripts. 19:52
I wonder if we can still change the .files method of CompUnit::Repository::FileSystem and CompUnit::Repository::Installation. There are no spec tests, the methods are not part of any Role (the installed checks incorrectly assume that Installable repos support it), the name doesn't make sense and its return value is surprising. 20:08
[Coke] eveo: unsucced ? 20:10
Geth rakudo/curfs-resources-lookup: 71ffb16444 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
Find proper %?RESOURCES for non-lib CURFS

Fixes `perl6 -I. bin/zef --help` - in this case the failure was `%?RESOURCES<config.json>` pointing 1 directory level above what it should have.
20:12
rakudo: ugexe++ created pull request #1106:
Find proper %?RESOURCES for non-lib CURFS
eveo [Coke]: yup. Their status was "Succ" on 2017.06 toast and now it isn't, hence an unsucc. It's a superset that includes burnt modules that went from Succ to Fail that also includes Killed and Unknown toasting failures :)
[Coke] thanks. 20:23
Geth rakudo/curfs-resources-lookup: a70362c813 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
%!meta<files> is a hash, not a list of pairs
20:30
ugexe we should probably separate CURs for -Idirectory/containing/meta/file and -Idirectory/containing/perl/modules/only 20:37
nine: this is how I've imagined files: github.com/ugexe/Perl6-CompUnit--R...b.pm6#L220 20:44
nine ugexe: why would a method called "files" return dists? 20:46
ugexe it returns the meta data for each dist
if you search for `bin/zef` and there are multiple results what else should it return? a list of files with no context isn't much good 20:48
lizmat ugexe: so is the PR ready to merge ?
ah, I guess not :-)
ugexe lizmat: that PR is separate from this
lizmat so 1106 is ok ?
ugexe yes 20:49
nine ugexe: you already tell it very precisely, what you're looking for. It could give you just that instead of a list of candidates. Just like .need.
Geth rakudo/nom: 71ffb16444 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
Find proper %?RESOURCES for non-lib CURFS

Fixes `perl6 -I. bin/zef --help` - in this case the failure was `%?RESOURCES<config.json>` pointing 1 directory level above what it should have.
rakudo/nom: a70362c813 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
%!meta<files> is a hash, not a list of pairs
rakudo/nom: d20534c699 | lizmat++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
Merge pull request #1106 from rakudo/curfs-resources-lookup

Find proper %?RESOURCES for non-lib CURFS
ugexe sometimes you want a list of all options 20:50
but just "/some/path".IO would not suffice 20:51
nine That's why I add another method, that doesn't have to pay that price. Because when looking for a script to run, you're interested only in a single script that fits the criteria. And that as fast as possible. 20:52
ugexe sure, but that doesn't fee like a method called 'files' to me 20:53
nine Nope, it's called "script" ;)
Maybe a better name will come along. But I'd really like this to serve a very narrow use case to be able to optimize it as much as possible. 20:54
lizmat m: dd 4 & 6 != 42 # shouldn't this return a Junction ? 20:57
camelia Bool::True
lizmat m: dd 4 & 6 == 42 # this does 21:00
camelia all(Bool::False, Bool::False)
eveo s: &infix:<!=>, \(4 & 6, 42) 21:01
SourceBaby eveo, Sauce is at github.com/rakudo/rakudo/blob/92f8...ic.pm#L291
eveo s: &infix:<==>, \(4 & 6, 42)
SourceBaby eveo, Something's wrong: ā¤ERR: Could not find candidate that can do \(all(4, 6), 42)ā¤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37ā¤ in block <unit> at -e line 6ā¤ā¤
lizmat m: dd not 4 & 6 == 42 # we have a test that it should autothread like not == 21:03
camelia Bool::True
lizmat fwiw, that feels weird to me
eveo Looks like it was added here: github.com/rakudo/rakudo/commit/4a...d8d88c7774 21:04
possibly by accident
I mean the != candidate that collapses the junction
nine zef startup time down to 0.392s! 21:05
eveo :o
nine__
nine++
.ask moritz do you remember what "not raising with Junctions" means in this commit? We now have a situation that Junction == Numeric results in a Junction, but Junction != Numeric collapses the Junction and returns a Bool. That difference wasn't intended, was it? github.com/rakudo/rakudo/commit/4a...d8d88c7774 21:07
yoleaux eveo: I'll pass your message to moritz.
travis-ci Rakudo build errored. Stefan Seifert 'Speed up starting installed scripts 21:10
travis-ci.org/rakudo/rakudo/builds/245934642 github.com/rakudo/rakudo/compare/4...f8abe00883
buggable [travis build above] āœ“ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0).
Geth rakudo/nom: 4693ec8678 | (Stefan Seifert)++ | 2 files
Speed up finding installed scripts by using a specialized interface

The .files method of CompUnit repositories needs to read the candidate dists and parse the JSON. When looking for a single script, we are actually only interested in the path to the file. So use a specialized method that does only that and can thus avoid parsing any JSON at all. The only drawback is that for the full gain, the dist has to be re-installed as previously the short name lookup file did not contain the resource id of the script.
21:12
nine I dare say cutting zef's startup time almost in half makes for a good hacking evening :)
lizmat nine++ 21:13
nine Oh, for the full benefit of these speedups make sure you uninstall previous versions of affected dists and re-install the current one. Otherwise the compatibility code will have to read JSON files. 21:14
ugexe nine++ - just think how slow searching/loading the huge ecosystem json is heh 21:15
eveo .tell [Tux] would you re-build your test-t bench from scratch? We added some start-up speedups, but they need previous versions of stuff uninstalled: irclog.perlgeek.de/perl6-dev/2017-...i_14774187
yoleaux eveo: I'll pass your message to [Tux].
nine eveo: won't affect [Tux]'s benchmarks, as this is for installed scripts. 21:16
eveo doh
.tell [Tux] never mind, turns out this is only for installed scripts. 21:17
yoleaux eveo: I'll pass your message to [Tux].
ugexe i bet it makes a bigger difference on windows too
lizmat m: dd <a b b c c c d d d d>.Mix (-) <a b c d>.Mix # sorta expected 21:28
camelia? 21:29
m: dd <a b b c c c d d d d>.Mix (-) <a b c d>.Mix # sorta expected
("d"=>3,"b"=>1,"c"=>2).Mix
camelia Resource temporarily unavailable
("d"=>3,"b"=>1,"c"=>2).Mix
lizmat m: dd <a b c d>.Mix (-) <a b b c c c d d d d>.Mix # expected (d=>-3,c=>-2,b=>-1).Mix 21:30
camelia ().Mix
Geth rakudo/nom: bde28209b3 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm
Fix unitialized value stringification warning
21:53
ugexe USAGE drowned those out earlier :x 21:54
Geth rakudo/nom: 9c04dfc4a4 | (Zoffix Znet)++ | src/core/Rakudo/Iterator.pm
Make Any.tail() use iterator's .count-only if available

Makes, for example, %h.keys.tail 2.1x faster for a hash with 500_000 keys.
21:57
roast: c4de8b7ecc | (Elizabeth Mattijsen)++ | S03-operators/difference.t
Add initial set of tests for set difference (-)

Tests that need further attention are commented out for now.
22:00
eveo bah... should've waited until I finished my tests 22:04
lizmat eveo: problem with R:I.LastValue ? 22:05
eveo lizmat: no, with my new addition. It still .pull-ones even when .count-only gives zero, which is kinda pointless 22:06
Well, yeah, with .Lastvalue, but not before my change :)
lizmat if count-only returns 0, it shouldn't do anything, as result is already IterationEnd, right ? 22:07
make line 1906 part of the condition in 1908 and you're done 22:08
eveo Yeah, that's what I did 22:09
Geth rakudo/nom: 3a9d8e79d3 | (Elizabeth Mattijsen)++ | t/spectest.data
Also run the more thorough set difference tests
lizmat and that concludes my hacking for today
good night! 22:10
eveo night
ZOFVM: Files=1256, Tests=139510, 114 wallclock secs (19.60 usr 3.13 sys + 2217.53 cusr 162.77 csys = 2403.03 CPU) 22:19
Geth rakudo/nom: 4079f7b548 | (Zoffix Znet)++ | src/core/Rakudo/Iterator.pm
Make R::I::LastValue not pull when count is zero

Because it's pointless
22:20
roast: 449a45dcd2 | (Zoffix Znet)++ | S32-list/tail.t
Spec Any.tail needs to respect .count-only

Allow one pull when count is zero, since it's technically not a mistake. Rakudo does not pull in that case, since it's pointless.
22:22
eveo calls it a day as well
Gonna do the same .count-only thing with .tail(n) and fix RT#131617 tomorrow or on the weekend 22:23
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131617
ugexe m: use Test:ver<6.c>; say Test.^ver; class Test2:ver<6.d> { }; say Test2.^ver; # where is the ^ver logic happening at? 22:47
camelia (Mu)
v6.d
eveo m: my Channel $x .= new; $x.Supply.tap: &say; $x.send: 42; $x.close; await $x 22:50
camelia 42
Cannot receive a message on a closed channel
in block <unit> at <tmp> line 1
eveo What message is it receiving? :/
ugexe race conditiony 22:51
eveo hm?
The 42 is received and printed already... 22:52
m: my Channel $x .= new; $x.Supply.tap: &say; $x.close; await $x
camelia Cannot receive a message on a closed channel
in block <unit> at <tmp> line 1
ugexe is it possible its not finished "processing" the message though
eveo s: &await, \(Channel.new)
SourceBaby eveo, Sauce is at github.com/rakudo/rakudo/blob/3a9d...ops.pm#L18
eveo ugexe: but you can close a channel with some messages still in it
ugexe oh 22:53
eveo m: my Channel $x .= new; $x.send: 42; $x.close; say $x.receive;
camelia 42
eveo m: my Channel $x .= new; $x.send: 42; $x.close; say await $x
camelia 42
eveo I'm guessing it's something with Channel.Supply 22:54
ugexe m: my Channel $x .= new; $x.Supply.tap: &say; $x.close; say $x.closed; await $x 22:56
dunno what that means, but it probably means something
camelia (timeout)Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable), status => PromiseStatus::Kept)
timotimo m: my Channel $x .= new; $x.closed.then({ .perl.say }); $x.send("hi"); $x.close 23:01
camelia ( no output )
timotimo m: my Channel $x .= new; $x.closed.then({ .perl.say }); $x.send("hi"); $x.close; await $x.closed
camelia (timeout) 23:02
timotimo oh, wrong thing
m: my Channel $x .= new; $x.Promise.then({ .perl.say }); $x.send("hi"); $x.close; await $x.closed
camelia No such method 'Promise' for invocant of type 'Channel'
in block <unit> at <tmp> line 1
timotimo mhm
*shrug*, not something i've experimented with yet