01:55 MasterDuke left 03:06 upupbb-user3 left 03:17 upupbb-user3 joined 04:25 cognominal left 04:35 upupbb-user3 left 04:51 hungrydonkey joined 05:00 hungrydonkey46 joined 05:02 hungrydonkey left 05:17 cognominal joined 05:47 [TuxCM] left 06:29 hungrydonkey46 left 06:48 hungrydonkey joined
[Tux] Rakudo version 2020.02.1-261-g478239e61 - MoarVM version 2020.02.1-69-g16ff1585e
csv-ip5xs0.694 - 0.735
csv-ip5xs-206.236 - 6.323
csv-parser24.861 - 25.947
csv-test-xs-200.382 - 0.394
test7.598 - 8.158
test-t2.001 - 2.004
test-t --race0.976 - 1.016
test-t-2032.631 - 33.432
test-t-20 --race9.808 - 10.308
07:18 MasterDuke joined
AlexDaniel lizmat++ great weekly 07:28
08:15 hungrydonkey left 09:03 squashable6 left 09:05 squashable6 joined 09:18 upupbb-user3 joined 09:34 cognomin_ joined 09:37 cognominal left 10:01 [TuxCM] joined 10:12 cognominal joined 10:15 cognomin_ left 10:31 MasterDuke left 11:06 finsternis left
lizmat Files=1306, Tests=111225, 210 wallclock secs (28.89 usr 8.15 sys + 2963.90 cusr 267.52 csys = 3268.46 CPU) 11:56
Kaiepi .tell jnthn, did you get a chance to review the pr yet? 12:05
tellable6 Kaiepi, I'll pass your message to jnthn
12:29 squashable6 left 12:31 squashable6 joined 12:41 MasterDuke joined 12:43 lichtkind joined
tbrowder hi, lizmat. 12:48
lizmat tbrowder o/
tbrowder i'm looking at yr P5 version of scalar util and you don't emulate openhandle 12:49
PostScript::File uses it in a weird way and i've taken a shot at a raku version:... 12:50
sub oh($f) { return True if $f.^name ~~ /Handle/} 12:51
it should be undef unless the arg is an open file handle 12:52
jnthn Matching on .^name is awfully fragile; should probably just be so $f ~~ IO::Handle 12:53
tellable6 2020-03-31T12:05:22Z #raku-dev <Kaiepi> jnthn, did you get a chance to review the pr yet?
lizmat tbrowder: what jnthn says :-)
jnthn Kaiepi: Didn't get to any Raku stuff yesterday (well, aside from that needed on a $dayjob project...) Today looks better for that. :)
lizmat tbrowder: I'm not aware of what opehandle is 12:54
tbrowder ah, i didn't realize that, thanks you two! made my day
yes, my usual ff (fumble finger,none finger typing :-D
lizmat hmmm... it appears an update is needed :-) 12:55
tbrowder: could you make an issue for it? so it won't fall through the cracks ? 12:56
tbrowder you said in Scalar::Util you didn't port it due to internalisms
yes i will, thnx
lizmat aah... ok hmmm
sub oh($f) { $f.?opened } 12:58
sub oh($f) { ?$f.?opened } # if you insist on a Bool being returned 12:59
jnthn lizmat: I'd make sure it's a handled also; .opened isn't such a weird method name to have 13:00
13:00 lichtkind left
lizmat sub oh($f) { $f ~~ IO::Handle && $f.opened } # in that case 13:01
jnthn *nod* 13:02
13:03 Altai-man_ joined
lizmat sub oh($f) { $f ~~ IO::Handle && $f.opened ?? $f !! Nil } # to mimic the interface of openhandle tbrowder 13:09
tbrowder 'IO::Handle'
i see quotes required due to '::' 13:10
lizmat ?
tbrowder when i tried bare ~~ /IO::Handle/ i got an error 13:11
test for openess is required, good point 13:12
lizmat do you have a gist ?
it should not require quotes
tbrowder let me check, may be an ff
jnthn tbrowder: Remove the /../; the smartmatch is against the type, not a regex :) 13:14
tbrowder duh, i see that now, sorry 13:15
13:16 lichtkind joined
lizmat tbrowder: anyways, Scalar::Util 0.07 on its way to CPAN now 13:17
with openhandle() support :-)
tbrowder thnx much!
lizmat glad to see someone using those modules :) 13:18
jnthn Kaiepi: Taken a look at it and left feedback, also looked at the NQP and MoarVM deps of it 13:20
Kaiepi aight, thanks
tbrowder lizmat: they really are helpful, as well as many other modules by other #raku people. i'm so far giving 10 a workout, 5 of yours and 5 others. my README has the credits listed. 13:34
lizmat tbrowder++
14:07 sena_kun joined 14:08 Altai-man_ left 14:11 upupbb-user3 left 14:32 lucasb joined 16:05 Altai-man_ joined 16:08 sena_kun left
tbrowder from reading docs it's pretty clear how to use a separate file to import subs and vars into a unit module file. is there any way to do the same for a class? i.e., can i put some or all of a classes methods in another file and import them some magic way? 16:28
afk for a while... 16:31
nine no 16:37
[Coke] Could you stub the class and then augment it? 16:38
(I think you'd have to do the other imports yourself, not from inside the stub, though)
Altai-man_ I am feeling this is the question where "why" part is more important than "how" part. 16:39
[Coke] :)
nine Well actually, there is a way: put those methods into a role
and consume the role
[Coke] I get not wanting to have a huge monolithic source file.
Altai-man_ [Coke], if you have a huge class there are plenty of other ways to structure it in another way, I think. Moving lots and lots methods doesn't solve the issue, just moves it in another file and you're in square one, no? 16:41
[Coke] It solves the issue of "having a file that's very large". 16:43
That's all. I'm not saying it's the best way to maintain your source. But if you can group things into Roles, that hopefully makes more sense with a thematic group of methods as well.
Altai-man_ Roles decomposition - sure. I mean, instead of "a very large file" you have "a small file with class definition and an a bit less large but still large file with its methods", no? 16:44
Though, well, never mind me. 16:45
nine Of course, an excellent question in such a case would be: why do you have so many methods in a class in the first place? 16:46
Altai-man_ Yes, and this takes us back to "why not just decompose". \o/ 16:47
Kaiepi i think i figured out how to get rid of that pesky branch in Metamodel::Mixins.mixin once and for all 17:01
the only time it gets called on uncomposed types during the setting is when traits that use mixins are applied to routines before their types get composed 17:02
so by applying Callable to Code and composing Sub/Method/Submethod in the prologue no mixins of uncomposed metaobjects get made during the setting 17:03
just waiting for tests to finish before making the pr
Geth rakudo: Kaiepi++ created pull request #3583:
Ensure Routine subtypes are composed before performing mixins with their instances
17:48 AlexDaniel left 17:55 lichtkind left 17:56 lichtkind joined 17:59 upupbb-user3 joined
[Coke] let's make sure our distros never don't ship core modules. (having trouble with perl5.26 on git bash on windows that's missing some ExtUtils module) 18:03
18:06 sena_kun joined 18:08 Altai-man_ left
[Coke] (on the plus side, I'm now using a raku one liner instead) 18:11
tbrowder thnx for ideas. yes, it's a LARGE file and i work remotely a lot and don't vi very well 18:14
i'm trying to port a large Perl module and haven't yet figured out a way to cut back the number of methods or put some of them in a separate class, but that can be done for sure. 18:19
sena_kun tbrowder, can it be separated into roles? Maybe it does too much? 18:20
nine tbrowder: can't you open it in your local editor via some remote protocol like sftp? 18:21
18:34 lichtkind left
nine jnthn: if we take the :noinline band aid for takenextdispatcher now, the speedups we are gonna gain as side effect of your one dispatcher interface to rule them all (tm) will look even more impressive ;) 18:37
sena_kun nine, one dispatcher interface? Do we have a proposal? 18:38
nine sena_kun: not yet: github.com/Raku/problem-solving/is...-606783081 18:41
sena_kun nine, thanks. 18:52
19:35 maggotbrain joined
Geth rakudo: 5baa645bb0 | (Ben Davies)++ | src/core.c/Capture.pm6
Make Capture.raku 45% faster

Most of the work the method does reduces to nqp ops quite nicely.
20:06 Altai-man_ joined 20:09 sena_kun left
Kaiepi there are more optimizations to Capture i can make but those will require a pr 20:23
not quite to that degree though
dogbert17 .seen lizmat 20:53
tellable6 dogbert17, I saw lizmat 2020-03-31T19:15:21Z in #raku: <lizmat> yup
lizmat you rang?
dogbert17 I have a stupid question (as usual)
lizmat I hope I will raise the standard of the response :-)
dogbert17 I believe you'll have a laugh :) 20:54
m: my @a; push @a, $_ for ^500000; say now - INIT now # is this the same as
camelia 4.800496
dogbert17 m: my @a; @a.push: $_ for ^500000; say now - INIT now # this
camelia 0.2146712
lizmat push @a calls @a.push 20:55
dogbert17 there's a tiny speed difference
lizmat so you're cutting out the "middle man" as it were
dogbert17 and the middle man takes his time 20:56
lizmat hmmm... looking at profiles, it looks like @a.push is not getting jitted from inside sub push 20:57
20:57 Kaeipi joined
Kaiepi you can use $*INIT-INSTANT instead of INIT now 20:57
20:57 Kaiepi left
dogbert17 Kaiepi: thx, didn't know that 20:58
tellable6 dogbert17, I'll pass your message to Kaiepi
dogbert17 I wonder how many uses the 'older' syntax 20:59
lizmat ah, the source code of sub push is definitely, eh, icky 21:00
dogbert17 oops 21:02
icky like in 'not very fast'?
I was looking at an old sieve benchmark which was discussed a few years ago 21:05
lizmat looks at a better solution 21:06
for github.com/rakudo/rakudo/issues/2943
dogbert17 changing one line, i.e. '@composite[$t] || push @primes, $t;' to use the method syntax saved more than 10% of the total runtime
lizmat: than you're in the relevant piece of code :) 21:08
dunno if this warrants an issue, what do you think? 21:09
lizmat yeah, please make one :-)
dogbert17 coming up ...
R#3584 21:15
linkable6 R#3584 [open]: github.com/rakudo/rakudo/issues/3584 sub push much slower than method push
Kaeipi oh, there's one optimization to Capture i can make without a pr 21:16
this one's more important than the raku one
MasterDuke greppable6: /^\s*push[ (]/ 21:19
greppable6 MasterDuke, Found nothing!
MasterDuke greppable6: help
greppable6 MasterDuke, Like this: greppable6: password # See wiki for more examples: github.com/Raku/whateverable/wiki/Greppable
MasterDuke greppable6: ^\s*push[ (] 21:20
greppable6 MasterDuke, 749 lines, 142 modules: gist.github.com/2f9eed0d8624e8b915...bffd34bb90
Kaeipi geth didn't log it, but i made Capture.WHICH 60% faster 21:23
lizmat pings tyil re Geth 21:24
Kaeipi hm, maybe the way i was thinking of optimizing Capture further that would require a pr isn't the best idea 21:31
i was thinking of making it so @!list and %!hash always exist, but do they not at the moment because there's a significant impact on memory usage?
lizmat yes
Kaeipi ah 21:32
lizmat but check with jnthn: things may have changed since then
Kaeipi aigh 21:33
in the meantime, some methods don't check if they exist or not 21:34
lizmat Kaeipi: well, try to create a case where they would fail ? 21:39
Kaeipi it's just EXISTS-KEY that doesn't. the other Positional/Associative methods return Nil when that happens 21:45
so i'm thinking it should return False when that happens
lizmat I think EXISTS-KEY is fine, because it will also return 0 if there is no hash? 21:46
Kaeipi m: say [].Capture.<foo>:exists
camelia existskey requires a concrete object (got a VMNull type object instead)
in block <unit> at <tmp> line 1
lizmat ok, that would be a bug :-)
Kaeipi fixed 21:52
couldn't the \key and Str:D \key candidates for EXISTS-KEY and a couple other methods be made into one Str() candidate? 21:53
lizmat Kaeipi: that's a performance issue... but maybe not anymore: the code precedes coercion capabilities in signatures 21:54
so you would have to benchmark
Kaeipi aight 21:56
MasterDuke coercion looks to be slightly slower 22:01
lizmat yeah, but how much ?
MasterDuke m: class F { method bar(Str:D() \a) { "a " ~ a }; }; my $a; $a = F.bar((^2).pick ?? "b" !! 2) for ^100_000; say now - INIT now; say $a
camelia 0.4300029
a b
MasterDuke m: 22:02
m: class F { multi method bar(Str:D \a) { "a " ~ a }; multi method bar(\a) { "a " ~ a.Str } }; my $a; $a = F.bar((^2).pick ?? "b" !! 2) for ^100_000; say now - INIT now; say $a
camelia 0.3168794
a 2
22:03 MasterDuke left 22:05 dogbert17 left, dogbert17 joined 22:07 sena_kun joined 22:08 patrickb joined 22:09 Altai-man_ left
lizmat m: multi a(\b) { "\\" }; multi a(@b) { q/@/ }; dd a $(1,2) # sorta expected to see \ there 22:14
camelia "\@"
Kaeipi huh
i would've expected Str() to be a bit faster since there are fewer candidates to analyze 22:15
lizmat the additional nqp::istype() either blows it, or the Any makes it too wide ?
.tell tyil looks like Geth is AWOL again 22:18
tellable6 lizmat, I'll pass your message to tyil
22:23 patrickb left
tbrowder .tell nine when i say remote i mean via a terminal on my ipad accessing my laptop in another room while i'm lying in my easy chair :-/ 22:27
tellable6 tbrowder, I'll pass your message to nine
tbrowder i could use emacs but i don't like it so much without a real gui...all lame excuses i know... 22:29
22:37 MasterDuke joined 22:51 lucasb left
Kaeipi oh lizmat is github.com/rakudo/rakudo/pull/3575 worth reviewing before the next release? 22:53
23:00 sena_kun left 23:17 upupbb-user3 left