🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 01:02 bloatable6 left, quotable6 left, benchable6 left, committable6 left, statisfiable6 left, shareable6 left, bisectable6 left, tellable6 left, nativecallable6 left, greppable6 left, sourceable6 left, unicodable6 left, coverable6 left, notable6 left, squashable6 left, evalable6 left, releasable6 left, linkable6 left 01:03 bloatable6 joined, shareable6 joined, quotable6 joined, nativecallable6 joined 01:04 unicodable6 joined, reportable6 joined, releasable6 joined, squashable6 joined 01:05 coverable6 joined, greppable6 joined, bisectable6 joined, evalable6 joined, linkable6 joined 01:28 gordonfish- is now known as gordonfish 02:28 greppable6 left, linkable6 left, quotable6 left, bisectable6 left, releasable6 left, evalable6 left, shareable6 left, squashable6 left, coverable6 left, bloatable6 left, nativecallable6 left, reportable6 left, unicodable6 left 02:29 shareable6 joined 02:30 bisectable6 joined, quotable6 joined, coverable6 joined, unicodable6 joined, bloatable6 joined 02:31 reportable6 joined, evalable6 joined, nativecallable6 joined 03:03 benchable6 joined, tellable6 joined 03:04 statisfiable6 joined, frost joined, sourceable6 joined 03:29 linkable6 joined 03:30 releasable6 joined 03:31 greppable6 joined 03:59 bdju left 04:01 bdju joined 04:05 committable6 joined 04:08 squashable6 joined 05:08 benchable6 left, committable6 left, releasable6 left, tellable6 left, linkable6 left, statisfiable6 left, sourceable6 left, greppable6 left, squashable6 left, quotable6 left, coverable6 left, shareable6 left, unicodable6 left, nativecallable6 left, bloatable6 left, evalable6 left, bisectable6 left, reportable6 left, evalable6 joined, statisfiable6 joined, benchable6 joined, bloatable6 joined, squashable6 joined 05:09 shareable6 joined, nativecallable6 joined, greppable6 joined, bisectable6 joined, reportable6 joined, committable6 joined 05:10 linkable6 joined 05:11 coverable6 joined 05:47 codesections left 06:02 reportable6 left 06:08 sourceable6 joined, quotable6 joined 06:09 unicodable6 joined 06:10 releasable6 joined 07:02 reportable6 joined 07:26 frost left 07:31 frost joined 07:32 sena_kun left 07:33 sena_kun joined 08:00 Manifest0 left 08:04 notable6 joined 08:20 sena_kun left 08:23 sena_kun joined 09:23 benchable6 left, committable6 left, quotable6 left, shareable6 left, coverable6 left, greppable6 left, bisectable6 left, evalable6 left, statisfiable6 left, sourceable6 left, unicodable6 left, notable6 left, releasable6 left, bloatable6 left, reportable6 left, squashable6 left, nativecallable6 left, linkable6 left 09:24 bisectable6 joined, evalable6 joined, quotable6 joined 09:25 linkable6 joined, benchable6 joined, notable6 joined, squashable6 joined 09:26 committable6 joined 09:37 Sgeo left 09:41 squashable6 left 09:42 squashable6 joined 10:14 squashable6 left 10:16 squashable6 joined 10:17 squashable6 left
grondilu wasn't there such a thing as a 'parsed' trait to define terms constrained by a Grammar/regex? 10:22
10:25 reportable6 joined, sourceable6 joined 10:26 nativecallable6 joined
lizmat not in current core 10:26
doesn't ring a bell with me, maybe with moritz_ ? 10:27
grondilu found it. It's discussed in S06 10:32
however : "This trait and the following are likely to be deprecated in favor of slang macros that are aware of the grammar and category in which they are installed, and that therefore already know how to parse like normal grammar rules. " 10:33
so macro it is I guess
grondilu is not sure how that would work though 10:34
lizmat neither 10:35
11:18 squashable6 joined 11:24 greppable6 joined, bloatable6 joined 11:26 coverable6 joined, unicodable6 joined, releasable6 joined, statisfiable6 joined
grondilu say I hawe a module Foo that uses an other module Bar. How can I have Foo export all the symbols that Bar exports? 11:39
with heritage maybe? 11:40
lizmat by playing EXPORT tricks
see e.g. P5built-ins that imports / exports all of the other P5xxx modules
github.com/lizmat/P5built-ins/blob...ns.rakumod 11:41
11:50 bdju left, bdju joined 12:02 reportable6 left 12:05 reportable6 joined 12:08 frost left
tbrowder m: my $fh = $*OUT 12:12
camelia ( no output )
tbrowder m: my $s="howdy"; my $fh=$*OUT; $fh.say: $s 12:13
camelia howdy
tbrowder just checking to see if i can use a shorthand for writing to stdout 12:14
m: my $fh = $*OUT; $fh.say("foo"); $fh.close 12:15
camelia foo
tbrowder m: my $fh=$*OUT; my $s="bar";$fh.say($s);$fh.close; say $s 12:17
camelia bar
Cannot do 'print' on a closed handle
in block <unit> at <tmp> line 1
tbrowder so, using the alias in a program, i think the "close open file handles when done with them" rule should generally not be followed for std* handles 12:20
rakuing down the river...bye 12:21
12:25 shareable6 joined
grondilu there is no such thing as a parametric module, is there? 12:40
lizmat grondilu: ? what do you mean by that? 12:42
grondilu 'use Foo(:param(value));' 12:43
I guess I can do 'use Foo; $Foo::param = value;' 12:44
lizmat that'd be passing :param(value) to its EXPORT SUB
grondilu *sub, no? 12:45
you could use that to parameterize, I guess
grondilu wrong syntax then
lizmat but it feels better to just export a parameterizable role
and parameterize that
grondilu I don't want to compose it though so it's not a role I want. 12:46
lizmat you can also have a class with a ^parameterize method ? 12:47
grondilu I don't want to instanciate it either. Nevermind I think I just have to assign a our variable. 12:48
setting it during in the use statement would feel convenient, though. 12:49
syntax would have been rather 'use Foo[param];' or something I guess 12:50
Anton Antonov "but it feels better to just export a parameterizable role" -- we can see modules as classes, hence switching from a module to a role is not that far fetched conceptually.
This SO discussion is related to my statement above: stackoverflow.com/q/67564394 12:52
lizmat m: role Foo { $.a = 42 }; dd Foo.new.a # and there's role punning
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable $.a used where no 'self' is available
at <tmp>:1
------> 3role Foo { $.a7⏏5 = 42 }; dd Foo.new.a # and there's r
expecting any of:
term
lizmat m: role Foo { has $.a = 42 }; dd Foo.new.a # and there's role punning
camelia 42
13:25 linkable6 left, evalable6 left 13:27 evalable6 joined 13:43 djerius left, djerius joined 13:48 djerius left 13:52 djerius joined 14:17 adm joined 14:19 adm left 15:19 evalable6 left 15:20 evalable6 joined 15:25 linkable6 joined 15:34 squashable6 left 15:36 squashable6 joined 15:41 Skarsnik joined
Skarsnik Hello, I am confused by some block syntax/error? 15:42
m: try {say "hello"; die "piko"; True} or say "plop"
camelia hello
plop
Skarsnik try {say "hello"; die "piko"; True} or {say "plop"}
evalable6 hello
Skarsnik I am not sure to understand why the second run does say plop 15:43
ugexe m: my $a = {say 42}; say $a 15:45
camelia -> ;; $_? is raw = OUTER::<$_> { #`(Block|74802872) ... }
ugexe m: my $a = {say 42}; say $a()
camelia 42
True
Skarsnik *does not 15:46
ugexe because you didnt use `do` 15:48
Skarsnik Was there a command to run on old rakudo version? 15:51
I dit a PR with code like this to fix a bug in Test and it does not work x) 15:52
!whateverable
commit: 2020.01 try {say "hello"; die "piko"; True} or {say "plop" 15:54
committable6 Skarsnik, gist.github.com/937d23dfa33d6ad65d...8b13b4db1d
Skarsnik commit: 2020.01 try {say "hello"; die "piko"; True} or {say "plop"}
committable6 Skarsnik, ¦2020.01: «hello␤»
ugexe i suspect your PR did not work the way you think then 16:02
Skarsnik not sure why the test did not caught it 16:05
Oh, I did not write a test for the input x) 16:11
I wonder if there are other case where it could be useful to maybe have a class doing her own test failure output. 16:14
# expected: Buf.new(22,25)
# got: Buf.new(22,255)
having the number in hex is more useful 16:15
especially if like the diff is at the 15 bytes, not easy to see if the expected & got string does not make them match 16:16
16:28 djerius left, djerius joined
Skarsnik Can I call a non exported sub from a Module? Like I writing my own is sub in my code x) 16:29
Or can I directly make part of a my code being part of the Test module? 16:32
timo nice to see you Skarsnik :3 16:39
the Test module would probably want to get some kind of API for this purpose
Skarsnik Whenever I propose a new API it stay 4 years without answers! (just kidding) 16:40
timo, any news on your profiler? :) 16:43
timo i just resumed work on it actually 16:46
i made the mistake of just running "npm update" and hoping it would continue working
it did not :D
Skarsnik I will try do run some benchmark when the new release is out. I am curious of the gain on Gumbo benchmark 16:47
timo well, new-disp isn't merged yet, and nativecall is also not yet integrated with it in even the most basic form 16:48
so it's likely not going to be much better immediately
Skarsnik What is new-disp in summary?
timo well, there's an excellent jnthn presentation about it, and i'll likely not do it justice with just a short summary 16:50
one part of it is about generalising a bunch of systems into just one. for example, the method cache is gone now 16:51
AFK for a moment
ok, so we've now got a mechanism that lets the programmer (probably only core developers mostly, though) write in code how different kinds of "dispatch" work 17:04
where dispatch encompasses pretty much everything where "a bunch of arguments go in, a decision what to call or return is made, and that is then acted upon" 17:05
so this is for stringifying things (do we have a built-in C function? do we call .Str on the thing?), deconting things (is it a simple container so we just have to take an attribute? is it a Proxy where we need to invoke a FETCH method?), of course calling raku methods (is there a wrapper? is the proto sub complex? what decides what multi to invoke? are there "where" clauses?) and also this has a way 17:07
to program "resumption"
resumption is for things like nextsame/callsame/samewith/callwith
17:11 tellable6 joined 17:28 Tirifto left 17:29 Tirifto joined
timo Skarsnik: anyway, with moarvm being "in the know" about all these more complex mechanisms, we can have the optimizer understand things better and do inlining and optimization in many more cases than before :) 17:48
Skarsnik interesting ^^
timo absolutely give jnthn's talk a shot
18:02 reportable6 left 18:03 reportable6 joined
Skarsnik Now you need to profile the choice the optimiser made? x) 18:12
18:24 immedlate joined 18:27 Manifest0 joined 18:29 Sgeo joined 18:52 Manifest0 left
timo well, we'll get to see deoptimization counts, and we'll see the inlining decisions 19:01
19:01 Manifest0 joined
timo apart from that we see the generated guards and such in the spesh log 19:01
19:44 xinming left, xinming joined 20:05 TempIRCLogger left, TempIRCLogger joined 20:06 TempIRCLogger left 20:07 TempIRCLogger joined 21:07 linkable6 left, evalable6 left 21:08 linkable6 joined 21:14 immedlate left 21:42 vrurg joined 22:00 vrurg_ joined, vrurg_ left, vrurg left 22:08 evalable6 joined 22:34 colemanx joined 23:11 squashable6 left, perlbot left 23:12 perlbot joined 23:35 MasterDuke left 23:51 Skarsnik left