🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:36 orinthe8 joined, orinthe left, orinthe8 is now known as orinthe 00:42 cpan-raku left 00:44 cpan-raku joined, cpan-raku left, cpan-raku joined 00:46 Xliff joined
Xliff \o 00:46
How can I use npq to make a method call?
01:03 frost-lab joined
Xliff Adjacently... where can I find the source code for postfix:<.> 01:05
^^ jnthn timotimo AlexDaniel lizmat
timotimo what is postfix:<.>? 01:06
you should normally be able to just do a normal boring method call in nqp, how exactly do you mean? 01:07
Xliff timotimo: Well. I have a problem. 01:09
I have had a "submethod BUILD" in many of the ::Role:: objects I've created over the two years. 01:10
Have now discovered that it conflicts with "submethod BUILD" composed in the object (might be better if it could override?\)
timotimo ah, yes
that is a common issue
Xliff So I've tried to do it at .bless time with a custom bless method. 01:11
Now discovered that doing it this way, there is NO SELF when punning a role to a blank object (ie using a role def as a class def)
01:11 aborazmeh joined, aborazmeh left, aborazmeh joined
Xliff So I have a method used in the initialization logic that expects "self" to exist. 01:12
It doesn't. I get "Cannot invoke this object (REPR: Null; VMNull)"
Bug? 01:13
This is odd because I am calling that method via an object created by self.CREATE.BUILDALL(Empty, %attrinit); 01:14
timotimo bless is responsible for creating the self 01:18
Xliff I know. so why the VMNull exception? 01:19
Further explanation here: github.com/Xliff/p6-GIO/blob/septe...le.pm6#L40
See comments in .bless and .setGFile
If role code is encountered via object, things are fine. 01:20
However if we use the role AS an object, there are initialization failures.
These resulted in the need for the custom .bless as shown.
timotimo i think you'll want to use method dispatch:<::> 01:21
Xliff How?
Example, pls?
timotimo $foo.Int::BUILD is compiled as $foo.dispatch:<::>($foo, "BUILD", Int) 01:22
feel free to play around with that i guess :)
Xliff :)
\i/
Er. \o/
Er... I think. 01:23
timotimo i didn't actually look very closely at your code, but i'm thinking this mechanism could get you much further
Xliff That would work if the object overrode the BUILD.
It doesn't, it conflicts.
And here I am attempting to find a solution to the problem that doesn't require me re-writing a lot of code. 01:24
timotimo it conflicts, meaning you get a compilation error or an error at the time the role is composed into the object?
Xliff Yes
timotimo hmm. to get around that error you'd put a submethod BUILD of your own in the target class i guess 01:27
but that has the "benefit" of eliminating the things you generally lose when you implement BUILD yourself 01:28
Xliff Impossible. Too many target classes.
This is something that the role logic can do in a self-contained manner.
timotimo hmm. at compile time rename BUILD to something else :D 01:29
Xliff LOL!
Code?
timotimo build a metaclass of your own that just doesn't return BUILD when asked for it
Xliff Of course, that would have the unfortunate side effect of "Losing the Point"
Because how will the role code initialize via self.bless( :$param )? 01:30
To implement this within self.BUILD of target classes would mean rewriting thousands of lines of code.
That, I'd like to avoid for obvious reasons. 01:31
timotimo right
may i ask, what state is the project in right now and what were you trying to add when you hit this roadblock?
Xliff Runnable state. Then I ran into this.
You can clone github.com/Xliff/p6-GIO.git 01:32
then switch to september-refactor-review branch
Then ./p6gtkexed t/08-file.t
Er,
Then ./p6gtkexec t/08-file.t
01:33 Kaeipi left
Xliff Hmm... GIO could use an installation README.md 01:33
One sec!
01:33 Kaeipi joined
timotimo i may actually go to sleep soon 01:34
Xliff OK. 01:35
Done, tho... check it if you have some time, tomorrow... 01:36
timotimo: Good night. 01:42
Now bouncing into windows for play.
01:42 Xliff left 01:47 leont left 01:50 Kaeipi left, Kaiepi joined 01:59 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 02:06 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 02:07 mowcat left 02:08 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 02:33 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 03:21 aborazmeh left 03:41 Xliff joined, Xliff left, Xliff joined 03:43 sno left 03:45 sno joined 03:58 cpan-raku left 03:59 cpan-raku joined, cpan-raku left, cpan-raku joined 04:03 Xliff left 05:02 holli__ joined 05:03 maggotbrain left 05:09 aluaces joined 05:16 maggotbrain joined 05:27 nige_ joined, nige left 05:35 sena_kun joined 05:37 holli__ left 05:38 Doc_Holliwood joined 05:41 Altai-man joined 05:44 sena_kun left 05:55 jmerelo joined 06:22 Doc_Holliwood left 06:39 maettu joined 06:44 skids left, BenGoldberg left 07:08 natrys joined 07:48 kylese joined 07:52 maettu left 08:52 sono__ joined 08:56 Black_Ribbon left 08:59 frost-lab left 09:01 sono__ left 09:06 Doc_Holliwood joined 09:12 synopsebot joined, synopsebot left 09:18 wamba joined 09:19 bocaneri left 09:25 bocaneri joined 09:34 rindolf joined 09:36 bocaneri left, BenGoldberg joined, sauvin_ joined 09:40 pecastro joined 09:41 Sgeo left 09:42 sena_kun joined 09:43 Altai-man left 09:46 skids joined 09:47 Doc_Holliwood left 09:48 maettu joined
lizmat weekly: www.reddit.com/r/rakulang/comments...esections/ 09:48
notable6 lizmat, Noted! (weekly)
lizmat Files=1336, Tests=113604, 217 wallclock secs (29.25 usr 8.46 sys + 3040.82 cusr 285.45 csys = 3363.98 CPU)
09:58 kylese left 10:07 maettu left
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/10/10/sn...arguments/ 10:08
10:09 BenGoldberg left 10:28 gabiruh left 10:29 gabiruh joined 10:30 wamba left 10:33 wamba joined
moritz gfldex: the docs for Method say "Methods will ignore extra named arguments where other types of C<Routine> will 10:39
tellable6 2020-10-09T16:39:39Z #raku <tbrowder> moritz just heard from apress (springer nature): the print book price does NOT include the ebook with the purchase.
moritz throw at runtime."
what's missing from that?
10:39 m6locks left
moritz ah, probably that they land in %_ 10:40
10:40 m6locks joined
gfldex aye 10:40
moritz m: class A { method x() }; A.^find_method('x').signature.print 10:41
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3class A { method x() 7⏏5}; A.^find_method('x').signature.print
moritz m: class A { method x() {} }; A.^find_method('x').signature.print 10:42
camelia Signature<60209904>
moritz m: class A { method x() {} }; A.^find_method('x').signature.perl.print
camelia :(A: *%_)
Geth doc: 1b7057739b | (Moritz Lenz)++ | doc/Type/Method.pod6
Methods have an implicit *%_
linkable6 Link: docs.raku.org/type/Method
moritz m: class A { method x() {*%a} }; A.^find_method('x').signature.perl.print 10:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
Geth doc: 4ef062d94e | (Moritz Lenz)++ | doc/Type/Signature.pod6
Mention default *%_ in methods in Signature docs as well
10:46
linkable6 Link: docs.raku.org/type/Signature
10:53 __jrjsmrtn__ joined, _jrjsmrtn left 11:12 patrickb joined
patrickb o/ 11:13
lizmat, I'd value your opinion on github.com/rakudo/rakudo/pull/3948 . It's basically the follow up to the recently merged MAIN bundling changes that you suggested. 11:15
lizmat approved :-) 11:16
patrickb lizmat: Wow, that was fast. Thanks :-) 11:17
lizmat i value leont's assessment in this :-)
patrickb lizmat: That's why I also asked him to review. 11:18
lizmat :-)
11:39 leont joined 11:58 skids left, Doc_Holliwood joined 12:07 patrickb left 12:08 wamba left 12:09 patrickb joined 12:13 patrickb left 12:16 jmerelo left 12:27 molaf joined 12:30 wamba joined 12:39 spycrab0 joined 12:41 jmcgnh left 12:47 jmcgnh joined 12:49 grondilu joined
grondilu Hi. Possibly a dumb question but : why isn't parameter evaluation used as a paradigm for parallelism ? 12:50
By this I mean that a programming language could decide that all function parameters should be evaluated concurrently.
12:53 camelCaser left
grondilu Like instead of Promise.allof(&a, &b).then(&c) we could write (sub { c() })(foo(), bar()) 12:54
sorry I meant (sub { c() })(a(), b()) 12:55
m: { say "c" }({ say "a" }(), { say "b" }()) 12:56
camelia a
Too many positionals passed; expected 0 or 1 arguments but got 2
in block <unit> at <tmp> line 1

b
grondilu m: (sub ($a, $b) { say "c" })({ say "a" }(), { say "b" }())
camelia a
b
c
grondilu m: (sub ($a, $b) { say "c" })({ sleep 1; say "a" }(), { sleep 1; say "b" }()); say now - BEGIN { now } 12:59
camelia a
b
c
2.0180792
12:59 DriedGrape joined
grondilu I mean it would be conceptually simpler and we wouldn't have to learn keywords and syntax 13:00
13:02 BenGoldberg joined
timotimo in a programming language without an effect system, it'll be very hard to prevent bad things from happening there 13:04
grondilu well ideally concurrency would be applied only if the parameters are pure functions or something 13:05
which should not be too hard for the compiler to detect
timotimo in a language with late-bound method calls, good luck :) :)
also, figuring out when it's worth it to parallelize could be a difficult task as well 13:06
otherwise parallelization overhead is going to eat all your wins 13:07
grondilu that's a good point
parallelizing all function calls would probably be overkill indeed
timotimo imagine, every function you're calling will also likely call functions 13:09
grondilu well the compiler could keep track of the number of threads and limit them to the number of avalaible processors or something 13:10
timotimo the compiler? at compile time? :D
13:11 aborazmeh joined, aborazmeh left, aborazmeh joined
grondilu not the compiler indeed. My bad. 13:11
the vm then ? I don't know.
timotimo i'd say "the runtime", that covers everything i think 13:13
whether it be a VM or something a little simpler 13:14
grondilu doesn't the runtime already limit the number of threads, anyway ? 13:16
timotimo our runtime? 13:17
grondilu yeah, raku's
or rather rakudo's 13:18
I thought so, anyway.
timotimo we have the ThreadPoolScheduler, which has a "maximum threads" attribute, but by virtue of the $*SCHEDULER variable being dynamic, you can have many instances of the scheduler for different parts of your program
and of course you can create new Thread objects at any time
until you run out of file descriptors, that is :)
13:35 BenGoldberg left, dummy joined 13:36 dummy is now known as Guest75794, Doc_Holliwood left 13:41 Altai-man joined 13:42 Guest75794 left 13:43 sena_kun left 13:59 oneeggeach joined, oneeggeach left 14:32 aborazmeh left 15:01 Doc_Holliwood joined 15:12 MilkmanDan left, MilkmanDan joined 15:18 maettu joined 15:31 grep0r joined, grep0r left 15:37 oneeggeach joined 15:55 grondilu left 16:26 BenGoldberg joined 16:43 Xliff joined
Xliff \o 16:43
kawaii o/
16:53 maettu left 16:56 Benett left 17:00 BenGoldberg left 17:01 Benett joined 17:14 MilkmanDan left 17:15 jmerelo joined 17:20 oneeggeach left 17:21 MilkmanDan joined 17:34 Success joined
[Coke] m: dd "a".uniprop("Numeric_Value_Denominator") 17:35
camelia "NaN"
[Coke] ^^ Having that be a string is problematic.
m: dd "a".uniprop("Canonical_Combining_Class") 17:38
camelia "0"
[Coke] I also don't think we have a way to interrogate if the property is considered boolean/numeric, etc. 17:39
17:42 sena_kun joined 17:44 Altai-man left 17:49 Success left 17:57 skids joined
moritz m: say 'a'.uniprop('Numeric') 17:59
camelia Lower
moritz what?
m: say 'a'.uniprop('Punctuation') 18:00
camelia 0
[Coke] not the numeric property - if the property itself is a numeric property 18:16
e.g. punctuation is a boolean; but *Denominator is numeric 18:17
18:28 jmerelo left 18:37 gnufr33dom joined
JJAtria[m] I want to check at runtime whether a given version of a module is available. My current working code is `$*REPO.repo-chain.map( *.?candidates: "Foo::Bar", :ver<1.2.3+> ).flat.grep( *.defined ).so`, but that's a mouthful. Is there an easier way to do it? 18:37
skids You could use .first instead of grep. 18:42
jdv79 how is .WHAT determined? think i foung a bug. 18:43
found even
JJAtria[m] skids: one char more, though :P 18:44
skids But more efficient.
18:44 gnufr33dom left
jdv79 well, perhaps not a "bug" per se 18:45
m: class Foo::Bar {}; Foo::Bar.new.WHAT.say
camelia (Bar)
jdv79 why is that showing only the last portion of the name?
lizmat jdv79: I think that's actually a bug that nine reported 18:46
moritz I think it's by design, even if the design never quite convinced me
jdv79 I spent a few minutes trying to figure out why my Foo::DateTime obj was a DateTime obj...
lizmat: ok, i'll check.
moritz class Foo::Bar {}; say Foo::Bar.^name
evalable6 Foo::Bar
moritz one of the many reasons I prefer this for debugging :D
jdv79 how is it by design then? 18:47
good luck trying to search for an issue on that:( 18:48
lizmat yeah... I wonder where I saw that again :-( 18:49
18:49 gnufr33dom joined
JJAtria[m] skid: Yeah, I mean it is an improvement, alright. I guess I'm less worried about the performance of that query than the fact it looks like I'm doing it wrong 18:50
skids: ^ 18:51
skids [//] maybe?
JJAtria[m] If I wanted to do it at compile time I could do `use Foo::Bar:ver<1.2.3+>`, which looks pleasingly straightforward 18:53
18:53 Sgeo joined
skids Are you trying to dtermine if it available and then maybe use it, or doing something more meta with packages? 18:55
moritz S14-roles/namespaced.t:is(A::B.WHAT.gist, '(B)', 'A::B.WHAT stringifies to short name B'); 18:56
JJAtria[m] Use it if available, or tell the user that it's needed 18:57
skids See the bottom of docs.raku.org/syntax/require for runtime symbol lookup
JJAtria[m] I know I can do `require ::("Foo::Bar")`, but I'm not sure how to add the version information in there 18:58
moritz the test I referenced above was introduced in 2009 by jnthn++
18:59 defaultxr left 19:04 mowcat joined 19:27 MilkmanDan left, MilkmanDan joined 19:34 gnufr33dom left 19:51 BenGoldberg joined
skids star: say $*REPO.repo-chain.map( *.?candidates: "Digest::SHA")[0][0].meta 20:04
camelia {api => v0, auth => Lucien Grondin, checksum => 4800B0DD54DDAAA7F2C0E757B76106F3CABE56FF, source => C61E6C50139D029A15E947C2DB2ECA511574F2EB, ver => v0.3.4}
skids star: use Digest::SHA:ver<0.3.5>; 20:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find Digest::SHA:ver<0.3.5> in:
inst#/home/camelia/.raku
inst#/home/camelia/star-2020.05-rc2/share/perl6/site
inst#/home/camelia/star-2020.05-rc2/share/perl6/vendor
inst#/…
skids star: require Digest::SHA:ver<0.3.5>;
camelia ( no output )
skids JJAtria[m]: loks like non-symbolic require does not check version either. 20:06
20:08 Ernesto joined, Ernesto is now known as Guest89238
skids maybe it just never got iplemented? 20:09
Guest89238 Hi !! i stuck on one problem but i don't know where post it since the community have many dynamics 20:11
my problem is related with the library Graphics::PLplot that installs without error but doesn's work with latest stable ubuntu by default because the library of plotting it does not (anymore i guess?) on libplplot-dev 20:14
in the specific: Cannot locate native library '(null)': libplplotd.so: cannot open shared object file: No such file or directory 20:16
appears when you tried to running the any file that calls the library but checking the list of files with 20:17
dpkg-query -L libplplot-dev
say that the file actually don't exists, in new to report any kind of error and i really new understanding problems with libraries because before i resolve everything with bash-programs but i see raku as a manner of expanding my capabilities about processing text 20:21
MasterDuke does your dpkg-query listing show something similar? maybe it upgraded its version number and is now libplplotd.2.so or something like that 20:23
if so, you could always try creating a symlink from what Graphics::PLplot is looking for to what you actually have 20:24
20:24 JJMerelo joined
JJMerelo Hey 20:24
releasable6: status 20:25
releasable6 JJMerelo, Next release in ≈13 days and ≈22 hours. There are no known blockers. 0 out of 34 commits logged
JJMerelo, Details: gist.github.com/ebdc5c2d74273adaae...8fa5752794
20:26 DriedGrape left, angelaig joined
JJMerelo Hey, angelaig 20:26
angelaig (y)
JJMerelo Just a few things you can do around here
20:26 BenGoldberg left
JJMerelo Just ask any question 20:26
You can use the nick directly to "talk" to anyone,like angelaig 20:27
There's also little camelia that you can use to evaluate Raku expressions fast. Like this
camelia: <a b c>.pick.say
... she's taking a walk ...
m: <a b c>.pick.say
camelia b
JJMerelo so just m: and then some raku expressions 20:28
You can use /me and then some sentence to express thoughts or feelings
JJMerelo things it's a bit quiet around here tonight 20:29
s/things/thinks/
And that's it. You'll find lots of friendly and helpful people around here to help you get in the wonderful world of raku :-)
angelaig thank you!
JJMerelo goes AFK now, 20:30
20:30 JJMerelo left
Guest89238 Hi JJmerelo !!! i know you from your book :O 20:34
20:34 Xliff left
Guest89238 yes the output of the query was something that i guess is the library 20:36
this: /usr/lib/x86_64-linux-gnu/libplplot.so 20:37
but there is no 'd' in it that's the problem
20:40 rindolf left
Guest89238 i tried to chance the link in the library to this but i don't understand what is happning under the hood because the problem still happening 20:40
20:54 Success joined
MasterDuke Guest89238: you tried changing the filename in Graphics::PLplot? 21:03
21:04 wamba left 21:10 BenGoldberg joined 21:11 Doc_Holliwood left
moon-child m: 5 21:13
camelia WARNINGS for <tmp>:
Useless use of constant integer 5 in sink context (line 1)
21:15 sena_kun left 21:20 sena_kun joined 21:22 cpan-raku left 21:24 cpan-raku joined, cpan-raku left, cpan-raku joined 21:28 Guest89238 left 21:30 Tirifto joined, angelaig left 21:31 natrys left 21:32 natrys joined, natrys left 21:40 sena_kun left 21:50 patrickb joined 21:56 patrickb left 22:06 Ernesto joined 22:07 Ernesto is now known as Guest94360
Guest94360 @MasterDuke sorry there was a shutdown where i live because a thunder join in the electric network so i have to wait to be reconected 22:09
about changing the name if the library i already do it, but doesn't seem to work, i don't know if i should open a issue in github 22:12
MasterDuke how did you change the name? had you used zef to install the module? 22:16
Guest94360 yes i used zef to install module and it was installed without problems 22:18
i already clean the .perl6 in the home directory and reinstalled
let me replicate the commands of use to locate the file where i changed the name 22:20
MasterDuke did you change the name that the module is looking for to point to the file you have? or change the name of the file on the disk to match what the module is looking for?
Guest94360 grep libplplot ~/.perl6/sources/* 22:22
and returns a file with the name of the file that references to libplplotd.so, just i open the file and delete the extra "d" but don't work 22:23
MasterDuke yeah, any changes you make to files under that path won't be picked up. you'll need to clone the module source, make the change there, and then use a `-I` flag to rakudo that points to your clone 22:24
Guest94360 Duhh my bad, let me try 22:25
MasterDuke not the first person to make that mistake, won't be the last
Guest94360 how install a local module ? 22:29
MasterDuke you can `zef install .`, or -I will use it without "installing" it 22:30
22:31 aluaces left
timotimo will want to --force there unless you're bumping the version in the meta file every time 22:32
Guest94360 what the hell !!?!?!?!?! 22:33
it works 22:34
JJAtria[m] skids: Hm, yeah... Thanks for looking! I'll see if I can find an issue about this somewhere and otherwise open a new one
Guest94360 Thanks for the help !!! 22:38
MasterDuke np 22:39
23:03 mowcat left 23:05 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 23:08 pecastro left 23:24 mryan joined 23:31 mryan left 23:35 Tirifto left 23:47 BenGoldberg left, Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 23:58 aborazmeh joined, aborazmeh left, aborazmeh joined