🦋 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:02 pmurias left
tbrowder guifa: i will be glad to attend your presentation, sorry lizmat won't be there 00:05
00:16 pecastro left 01:14 ZZZzz left 01:22 wildtrees left 01:30 Kaiepi left 01:31 Kaiepi joined, TeamBlast left, TeamBlast joined 01:34 lichtkind left, sena_kun left 01:36 TeamBlast left 01:37 TeamBlast joined 01:39 hungrydonkey joined 01:43 Sgeo left 01:47 sena_kun joined, Sgeo joined 01:58 ZZZzz joined 02:01 Circlepuller joined, TeamBlast left, Circlepuller is now known as TeamBlast 02:03 sono__ joined 02:05 Black_Ribbon left 02:23 lucasb left, ZZZzz left, aborazmeh left 02:29 molaf left 02:32 hungryd59 joined 02:35 hungrydonkey left 02:41 molaf joined 02:44 hungryd59 left, hungrydonkey joined 02:52 hungryd89 joined, hungrydonkey left 02:58 ZZZzz joined 03:06 hungryd89 left 03:20 hungrydonkey joined 03:28 nosqrt left 03:34 sena_kun left 03:48 sena_kun joined 03:52 elcaro left 03:56 elcaro joined 04:19 abraxxa left, abraxxa joined 04:39 molaf left 05:29 hungrydonkey left 05:33 hungrydonkey joined 05:34 sena_kun left 05:50 sena_kun joined 06:10 jmerelo joined 06:17 |Sno| left 06:25 a3r0 left 06:26 a3r0 joined 06:33 sauvin joined
cpan-raku New module released to CPAN! Date::Calendar::Julian (0.0.1) by 03JFORGET 06:51
07:22 wamba joined 07:30 |Sno| joined 07:33 sena_kun left
guifa tbrowder: I’m still trying to figure out how I’m going to do it. I’ve never presented at a tech conference before 07:40
07:42 jmerelo left 07:49 sena_kun joined 07:54 atroxaper joined
atroxaper hi, #raku ! 07:54
07:55 zakharyas joined, domidumont joined 07:56 wamba left 07:58 darkstardev13 left 08:00 darkstardev13 joined
atroxaper I'm trying to understand a Container system deeply. I'm reading docs and the code of MoarVM, nqp and Rakudo. And I have a few questions. 1) As I see in the code, there is the only one 'container' - Scalar. Only Scalar has specific 'container specification' (and Proxy also). But (my @a).VAR.^name says Array. Why? 2) I cannot find VAR method code. Probably its implementation will help me to answer the first question. Where is it? 3) I cannot 08:11
find decont operator (<>) code. Docs says it is postcircumfix:<>. As I understand, <> is implemented only on Grammar/Action layer but I cannot find it. And why is it postcircumfix instead of postfix? :)
08:14 rindolf joined 08:32 wamba joined
El_Che Hi atroxaper, I can not answer your question, but stick around, I am sure jnthn or lizmat will pop up soon and help you 08:33
atroxaper El_Che: ;) 08:41
08:46 wamba left, wamba joined 08:47 sono__ left 08:49 aluaces left 08:51 rindolf left, mahtob joined 08:52 mahtob left 08:53 mahmudov left 08:58 dakkar joined 09:00 AlexDaniel` left, uzl[m] left, wamba left 09:06 wamba joined 09:15 lichtkind joined 09:18 mahmudov joined 09:19 rindolf joined 09:23 aluaces joined 09:31 AlexDaniel` joined 09:34 sena_kun left 09:48 sena_kun joined 09:53 pmurias joined 09:54 pecastro joined 09:59 BlackChaosNL[m] joined, CIAvash joined, unclechu joined, awwaiid joined, rba[m] joined, EuAndreh[m] joined, matiaslina joined, pmf[m] joined, uzl[m] joined, tadzik[m]1 joined
Voldenet atroxaper: if you see the output of –target=ast, usage of <> uses { } if i'm interpreting this correctly: `QAST::Op(call &postcircumfix:<{ }>) <wanted> <>` 10:02
erm, --target=ast
atroxaper Voldenet: I did so. That is why I decided that <> implements on Grammar/Action layer. 10:09
Voldenet: But now I try to decont by {} and it is works as <> promises :) Probably it is 'specific Rakudo implementation'. 10:12
jnthn Isn't it just a default case of the zen slice on a non-aggregate? 10:14
This is the impl that leads to the decont: github.com/rakudo/rakudo/blob/mast...e.pm6#L171 10:15
atroxaper jnthn: Actually, I'm right now found it myself ^^ 10:16
Yes, it is zen slice. 10:19
jnthn About .VAR, all it does is wrap it in another level of Scalar container, such that a method call on it will decont the throwaway container.
However, if you pass it through two things that both want to discard a container, then it will unravel. Really, the only thing you can safely do with the result of .VAR is call a method directly on it. Or bind it such that you can call multiple ones. 10:20
atroxaper jnthn: pretty deftly
I think, question #1 is hardest 10:22
jnthn: Well... If .VAR just wrap to one more container, then (my @a).VAR === Array means that Array may be not a container. 10:24
10:25 a3r0 left, a3r0 joined
jnthn atroxaper: .VAR is a no-op in that case 10:26
atroxaper: It only does it if nqp::iscont returns true 10:27
(where "it" is the wrapping)
atroxaper jnthn: I'm I right that only Scalar is a 'container', but not an Array or Hash or Callable? Is it Rakudo specific implementation?
10:30 pmurias left 10:31 lichtkind left
tbrowder guifa: if bill and i can help in houston (or ahead of time) we're happy to assist you 10:36
jnthn atroxaper: Only Scalar and Proxy 10:37
atroxaper: That .VAR is a no-op on anything exept these is spec
atroxaper: As is the existence of Scalar and Proxy
atroxaper jnthn: Now I check nqp::iscont(Array) == 0; I just want to know, is it part or specification (roast) or Rakudo implementation only. Because documentation describes "callable containers" for example. 10:38
jnthn atroxaper: How exactly an implementation chooses to achieve that (e.g. Rakudo's container_spec mechanism) is implementation defined. There's also no official way to add additional kinds of containers either.
nqp::iscont is - like all nqp::foo - Rakudo specific, but its semantics are such that it gives 0 whenever .VAR is identity 10:39
And .VAR doing that on Array is spec
(that is, returning identity) 10:40
atroxaper jnthn: Many thanks! Now I understand much more then previously :) Some advents and documentations about 'containers' a little confused me and I decided to find out everything directly from their code. 10:42
jnthn Yes, I think "container" gets used to mean quite a broad range of things, but only Proxy and Scalar are kinds of "item container" 10:45
10:49 mowcat joined 10:51 mowcat left, pmurias joined 10:54 hungryd7 joined, hungrydonkey left, veesh left, wamba left
El_Che atroxaper: Voldenet and jnthn saved the day :) 10:56
11:02 zakharyas left 11:03 zakharyas joined 11:05 mowcat joined 11:06 Kaiepi left, domidumont left 11:07 Kaiepi joined 11:13 veesh joined 11:34 sena_kun left 11:48 sena_kun joined 11:50 darkstardev13 left 11:56 wamba joined 11:58 molaf joined 12:02 wbn left, zakharyas left 12:03 wbn joined 12:05 patrickb joined 12:10 atroxaper left 12:12 darkstardev13 joined, wamba left
lizmat sometimes I wonder why o why people want to re-invent the wheel: blogs.perl.org/users/lichtkind/2020...-kbos.html 12:24
12:25 atroxaper joined
tadzik maybe one day we'll end up with a round one... ;) 12:25
El_Che round is overrated
it's clear that Perl needs an extra OO framework 12:27
pmurias lizmat: fun?
lizmat I guess 12:29
El_Che " class types (not even Raku has them) "
isn't class type just a class? 12:30
I am missing something probably
lizmat I guess they mean that you could have a group of class sharing a type
El_Che a class like a struct? 12:31
lizmat m: role GroupType { }; class A does GroupType { }; class B does GroupType { }; dd A ~~ GroupType; dd B ~~ GroupType
camelia Bool::True
Bool::True
lizmat voila, in my interpretation, those are "class types"
it feels the same as Positional or Associative classes, reallt 12:32
*really
alas, I've given up trying to comment on blogs.perl.org
pmurias lizmat: is there an explanation of what he means by "class types"? 12:34
lizmat not that I could further gather from the blog post
pmurias OTOHhe has a next blog post planned on that topic 12:35
El_Che my definition of overengineering your app: creating an adhoc OO/ORM/Auth/etc system only for your app :) 12:37
but on the other hand, maybe that's how generic libs are born :)
tyil using `dd %?RESOURCES<foo>.DEFINITE` in a module gives me a warning "Use of uninitialized value %result{'resources/foo'} of type Any in string context.", but still shows `Bool::True` as the result of the `dd`. There's no 'foo' resource in the module 12:38
is it intended that a missing resource is still considered definite, while also showing a warning about it?
(I'm looking for a way to check in my module if the resource actually exists) 12:39
lizmat what does dd %?RESOURCES<foo>:exists give ?
12:39 hungrydonkey joined
tyil Bool::False, but it seems to do that for existing resources as well 12:40
(that was one of the first things I tried, since it seemed the most obvious) 12:41
lizmat maybe the AT-KEY implementation on %?RESOURCES is borked
12:42 hungryd7 left
tyil github.com/rakudo/rakudo/blob/add2...n.pm6#L223 12:43
seems to always return a Distribution::Resource, not sure if those have (correct) boolean representations
lizmat hmm... interesting, implementation appears "incomplete" I'dsay 12:45
tyil no method Bool() at least, and IO() always returns something as well
lizmat would have to dive into that (having meant to do so for a while) 12:46
but my head is full of other stuff at the moment, so that would be a hard context switch :-( 12:47
12:47 mowcat left
lizmat I wonder though why Distribution::Resource doesn't just have an .IO instance of itself, and then use "handles" for all the methods it appears to support 12:48
tyil I would have no clue on that either :p
using .IO on a non-existing resource also shows the warning, but does return an IO::Path pointing towards the /usr/share/perl6/site/resources directory 12:50
12:59 domidumont joined, abraxxa left 13:06 vike joined 13:13 domidumont left, aborazmeh joined, aborazmeh left, aborazmeh joined
atroxaper One more question about containers and binding... Why binding into $ and sigilless is different? Example: 13:18
my @a; @a = (1, 2) #uses Array.STORE
my \a = []; a = (1,2) # uses Array.STORE
my $a := []; $a = (1,2) # fail 13:19
my $a :=[]; $a<> = (1,2) # uses Array.STORE
jnthn 'cus the compiler case-analyzes based on sigil 13:20
And in the case there's no sigil, has to do a late-bound thing (e.g. nqp::iscont(x) ?? nqp::assign(x, y) !! x.STORE(y)) 13:21
In principle it could always do the latter, but then every assignment would code-gen into something ~5 times the bytecode size. 13:22
atroxaper jnthn: Thanks! 13:25
patrickb rba: Whenever you have time: I have made another change to the rakubrew.org website (fixing installation on Powershell). You can deploy whenever you have time. 13:29
tadzik nice website :) 13:32
13:32 molaf left 13:33 Kaiepi left, Kaiepi joined 13:34 sena_kun left
rba[m] . 13:35
patrickb tadzik: Thanks! 13:36
rba patrickb: lets go 13:37
patrickb: The fix is in the image or in the data? 13:40
patrickb only in the website repo at the moment. 13:42
There is no now rakubrew version. Only the website changed
tadzik: Once rakubrew is out of the testing phase, we'll have to decide whether rakudobrew will live on or will be deprecated. I'll leave that decision to you. 13:43
rba patrickb: Do have to create a new docker image or do you have new download file for the filesystem? 13:45
13:47 lucasb joined, Skarsnik joined
Skarsnik Hello there 13:47
13:49 sena_kun joined 13:52 mahmudov left
patrickb rba: I'll create a docker image. 13:53
What do I have to do with it? 13:54
13:54 aborazmeh left
rba patrickb: I pulled your changes, building the image and update the registery... Will be online in a few minutes... 13:55
patrickb Ah! OK.
Skarsnik hm, I am trying Comma, is that normal it tell me that all Test routine are not found? (like ok, done-testing..) even with use Test;
patrickb rba: Thank you!
13:56 mensvaga joined
jnthn Skarsnik: Make sure that you have an SDK set up properly (under File > Project Structure) 13:57
rba patrickb: updated, may you double-check, please?
patrickb rba: Looks good! 13:58
Skarsnik ohh thanks, I moved file round because it did not put the file in the folder I wanted, that probably why it lost the sdk setting x)
still does not work. also it could be nice to be able to run zef from Comma (too lazy to try to run it under windows xD) 14:00
sena_kun Skarsnik: no exceptions? Windows? 14:08
Skarsnik I am streaming this if you want (I am writing test for an async server) www.twitch.tv/skarsnikus 14:09
14:11 ZZZzz left
sena_kun Skarsnik: I just opened comma under windows VM, sdk was broken, set a working one, closed comma, opened comma, ??? the subs fom Test are available. 14:15
Skarsnik hm, let's see
thanks, it works :) 14:16
sena_kun Skarsnik: hmmm, what rakudo version do you use? 14:17
Skarsnik or not
sena_kun not star one, by accident?
Skarsnik Raku 2020.01
sena_kun Hmmm. :S
Skarsnik: it is a legitimate windows bug then, unfortunately. 14:18
14:19 aborazmeh joined, aborazmeh left, aborazmeh joined
Skarsnik Is there a way to know what it try to run? 14:28
sena_kun Skarsnik: you need to unpack some jars... 14:30
Skarsnik: if you want to debug it real time, I can give some instructions 14:31
Skarsnik I mean, I try to run something and it should probably shows what it try to do? like 'raku myfiletorun.raku' error blablalba 14:33
sena_kun Skarsnik: the script is placed in jar resources, so you firstly have to obtain it. 14:34
14:36 titsuki joined
sena_kun Skarsnik: 2019.12 works, so a regression after migration to intellij platform 193 version. 14:44
Skarsnik 2019.12 is not tagged are raku?
I am confused x)
sena_kun Skarsnik: sorry, I mean Comma release 2019.12. 14:45
Skarsnik Hooo
Do you have a link to this version so I can try? I don't find a link to older releases x) 14:47
libertas hi, would like to try raku-debug with this line: $ raku-debug -e "'foobar' ~~ /f.+b/;" 14:48
===SORRY!=== Error while compiling -e
Could not find Debugger::UI::CommandLine in:
do I have to install some CommandLine package? 14:49
rypervenche libertas: You need to zef install Debugger::UI::CommandLine
If you don't have zef installed already, you can get it here: github.com/ugexe/zef 14:50
sena_kun Skarsnik: do you have a subscription?
libertas # zef install Debugger::UI::CommandLine 14:51
===SORRY!=== Error while compiling /usr/local/bin/zef
rypervenche libertas: Can you pastebin the errors for us?
Skarsnik I am just trying comma, I don't have a sub then ^^ 14:52
libertas rypervenche: I'll delete zef, reinstall it, and do as you suggest 14:53
rypervenche libertas: You have zef already, you shouldn't need to reinstall it. Can you show the errors you're seeing?
libertas is zef meant to be run under root, right? 14:56
rypervenche I believe it can be run as either a user or as root. I do it as a user so all of my modules get installed into ~/.raku . 14:57
libertas ok 14:58
I did the reinstall again and it failed as can be seen at pastebin.com/E3JaFWuw
sena_kun Skarsnik: only latest community releases are served, so nope. you can either wait for a hotfix release at the end of the month if there will be one or move to a linux box.
14:59 atroxaper left
Skarsnik it's weird, because it works fine for syntax check x) 15:00
Geth doc: 41dfc333fb | Coke++ | doc/Language/contexts.pod6
fix typo
doc: bf04414e98 | Coke++ | doc/Language/faq.pod6
whitespace
linkable6 Link: docs.raku.org/language/contexts
Link: docs.raku.org/language/faq
sena_kun Skarsnik: what do you mean with "syntax check"? 15:01
or, well, I know what you mean, but Comma doesn't use `raku -c` or something like that to check syntax.
Skarsnik it's just an issue with symbols from other modules or something? 15:02
sena_kun Skarsnik: seems like it. I'll patch it next release, possibly we'll do a community hotfix.
rypervenche libertas: Yes, you already have zef, so no need to try to reinstall it. Try simply running: zef install Debugger::UI::CommandLine 15:03
[Coke] . 15:04
Skarsnik hm, it does find await too, is that supposed to be a language keyword? x)
*does not
15:04 aborazmeh left
sena_kun Skarsnik: symbols from CORE are resolved differently, so it is not entirely useless. :) 15:05
libertas rypervenche: I just did as mentioned in the github installation section
rypervenche: $ ./zef install Debugger::UI::CommandLine
===SORRY!=== Error while compiling /usr/local/zef/bin/./zef
Could not find Zef::CLI in:
$ ./zef --help 15:06
===SORRY!=== Error while compiling /usr/local/zef/bin/./zef
rypervenche libertas: How did you install rakudo and zef the first time? 15:07
libertas rakudo was via the package manager, zef as git clone github.com/ugexe/zef 15:08
rypervenche What does "raku -v" output?
tadzik git clone will not be enough to install it 15:09
libertas rypervenche: This is Rakudo version 2020.01 built on MoarVM version 2020.01.1
implementing Perl 6.d.
tadzik unless you followed it up with the install step as the readme says :)
but then you shouldn't need to run it with ./zef
libertas tadzik: but it generates an error 15:10
runnit with ./zef because it's not im my PATH yet
tadzik libertas: did you run the `perl6 -I. bin/zef install .`? 15:14
libertas tadzik: $ perl6 -I. bin/zef install .
===SORRY!=== Error while compiling /usr/local/zef/bin/zef
===SORRY!=== Error while compiling /usr/local/zef/lib/Zef/CLI.pm6 (Zef::CLI)
===SORRY!=== Error while compiling /usr/local/zef/lib/Zef/Client.pm6 (Zef::Client)
Could not find NativeCall in:
... 15:15
tadzik hrm 15:18
libertas at /usr/local/zef/lib/Zef/Client.pm6 (Zef::Client):715
at /usr/local/zef/lib/Zef/CLI.pm6 (Zef::CLI):2
at /usr/local/zef/bin/zef:3
tadzik it seems like it's trying to run the already installed version without it actually being properly installed, for some reason
libertas I removed the directory and cloned it some minutes ago
tadzik ...or are you actually running this in /usr/local/zef?
libertas yes I am 15:19
tadzik ah, okay then 15:20
NativeCall should be included with your installation 15:21
does `raku -e 'use NativeCall'` work, or does it error out too?
15:24 wamba joined, wamba left 15:26 domidumont joined 15:27 rafaschi joined
[Coke] who was asking about the Pakku error with Hash::Merge::Augment ? 15:27
15:33 sena_kun left
libertas tadzik: ===SORRY!=== Error while compiling -e 15:35
Could not find NativeCall in:
regarding my distro packages, I've installed the following: MoarVM-2020.01.1_1, nqp-2020.01_1 and rakudo-2020.01_1
15:38 hungrydonkey left 15:42 hungrydonkey joined 15:49 sena_kun joined
Skarsnik I am confused, how I wait for a Supply to a give me data (ideally with a timeout)?. I am trying to use Cro::Websocket in a 'sync' manner 15:55
rypervenche libertas: What distro?
jnthn Skarsnik: Use a `react` block 15:57
Skarsnik: One whenever over the data and collect it somewhere, another whenever Promise.in($timeout) { die "timed out" }
libertas rypervenche: it's Void 15:58
15:59 titsuki left
Skarsnik Hoo thanks, yeah make sense ^^ 16:01
I did not think a react block was blocking the code 16:02
jnthn Yes, `react` is sort of like `await supply ...`
16:07 wamba joined 16:08 hythm joined
hythm [Coke] it was me asking about the Pakku error with Hash::Merge::Augment 16:09
16:12 pmurias left
[Coke] hythm: not sure if it helps, but golfed down to: gist.github.com/coke/4c60943a9d754...4ee02291cb 16:12
Skarsnik funny, I set the --prefix on configure.pl to ~/raku and it created me a ~ directory (and a raku in it) 16:15
hythm thanks [Coke] thats definitely helpful, I also opened this issue github.com/scriptkitties/p6-Hash-Merge/issues/5 16:18
cpan-raku New module released to CPAN! Gnome::GObject (0.15.12) by 03MARTIMM
[Coke] feel free to steal that gist 16:19
Perhaps someone can reduce the Pakku::Log include to something smaller. I was happy to get it down to a single use. 16:20
16:22 atroxaper joined
hythm i will work on it in a few days,,, but for the moment I made a quick work around by not using Hash::Merge::Augment and stole the "hashmerge" sub from the module :D, till i get the time to work on it 16:23
Skarsnik Hoo insteresting module x)
[Coke] hythm: thanks for updating the "depends" 16:35
16:35 wamba left 16:36 wamba joined 16:40 pecastro left
Skarsnik hu 16:45
skarsnik@DESKTOP-UIA12T1:~/raku/zef$ ../share/perl6/site/bin/zef --help
===SORRY!===
No candidate found for 'zef' that match your criteria.
Did you perhaps mean one of these?
Distribution | Author(ity) | Version
rafaschi Skarsnik: please use a pasting service, don't paste multiple lines in IRC. 16:46
Altreus I wish IRC had a pre-commit hook 16:56
17:00 domidumont left
masak hypothesis: lichtkind wrote "class types" but meant "typeclasses" (like in Haskell) 17:01
it's true that Raku (*shudder*) does not have them
I suspect a language needs to be more "statically typed" to have them
rypervenche libertas: I'll set up a Void VM and see if a fresh install has any problems. 17:02
libertas rypervenche: thank you so much! 17:04
17:08 molaf joined 17:11 abraxxa joined 17:13 abraxxa left, |Sno| left, kensanata joined, abraxxa joined 17:14 dogbert17 left
discord6 <Highlander> does anyone happen to remember the old, hacky way of making class members required, prior to the required trait being introduced? 17:15
17:15 mowcat joined
Skarsnik Private multi-methods are not supported. Hm, is there a real cause or it's just not implemented yet? x) 17:16
rafaschi Highlander: check if it exists in the TWEAK submethod? 17:21
17:33 dakkar left, sena_kun left
Altreus Time for me to ask basic questions again! Can I populate an object from a hash, essentially the opposite of self.Capture.Hash ? 17:36
er, small h there
I can probably do it with a loop but I'm sure there's a way along the lines of "yes, easy" or "don't do that, do it properly" 17:37
17:37 wamba left
Skarsnik MyClass.New(|%hash)maybe 17:37
Altreus nar I need to populate a constructed object
I was doing what you said but I have discovered a requirement to fill in objects with only some of their properties 17:38
... only some properties populated
17:41 kensanata left
lizmat Altreus: maybe modules.raku.org/dist/Object::Delayed is something for you? 17:41
Altreus wwwwwwwwwwwwhhhhhhhhhhh
rypervenche libertas: Almost done. Just having issues getting git installed :P 17:42
Altreus is there anything you fine people have not done?
I will see about this forthwith
libertas rypervenche: I'm curious to see if you have the same problem 17:44
17:45 domidumont joined
Skarsnik I wonder if there is a await-timeout in a module x) 17:45
Altreus lizmat: my use case is that the Discord API sometimes sends me only part of an object - often it's ID, which is common for APIs, but sometimes other parts too. Can I make an object whose $.id is immediate and the rest of which is delayed? 17:46
... using this?
lizmat class A { has $.immediate; has $.delayed handles <list of methods> } ? 17:47
Altreus ah, food for though
t
lizmat I haven't tried that, but I don't see a reason why that wouldn't work
Altreus Do attributes create methods, as far as handles is concerned? 17:48
I guess as far as the user is concerned it does
17:48 sena_kun joined
Skarsnik Are you working on the discord module? 17:48
Altreus Only if you're referring to the one I'm working on
lizmat yeah, that's my interpretation of that
Altreus has $.delayed handles <list> = slack { something I've yet to invent }; ? 17:49
lizmat Altreus: yeah, that sounds about right ? 17:50
Altreus I'll play around :) thank you lizmat ! 17:51
lizmat Altreus: yw, hope it works out and the result is a nice blog post for the RWN
:-)
17:51 aborazmeh joined, aborazmeh left, aborazmeh joined
Altreus I think I'll call them all ::ButLazy 17:52
17:52 domidumont left
Altreus or maybe ::ButReal 17:52
yes
17:52 pecastro joined, wamba joined 17:54 aluaces left 17:55 domidumont joined
rypervenche libertas: It looks as though the Void package may be broken. A fresh install can't find NativeCall. 17:57
Altreus can the slack property access the other properties? Does the block know about the owner object? 17:59
libertas ah, glad you found the issue
Skarsnik I am always confused, why calling .mymethod in a method does not work when self.mymethod work? 18:00
Altreus cos it runs on $_
18:00 hacktor joined
libertas rypervenche: xbps-query -S rakudo shows info about the package including the maintainer 18:01
will you contact him?
rypervenche libertas: I'm filing an issue on Github. I'll send you the link when I'm done. 18:02
18:03 hungrydonkey left
Altreus nice, it can see $!id 18:03
I'm not going to pretend to know how this works
lizmat Altreus: sorry, was afk 18:05
Altreus it's fine, it turned out to be easy to TIAS 18:06
I'm so used to working in an environment where TIAS is 20 minutes of setup
18:07 wamba left
Altreus I assume handles just proxies all candidates of a multi method? 18:10
Skarsnik TIAS? 18:11
hm, how I can force the type of an array/list passed as argument? 18:13
rypervenche libertas: github.com/void-linux/void-package...sues/19151
Skarsnik basicly I am try to fix this. 18:14
Cannot resolve caller AUTOGEN(Usb2Snes:D: Usb2Snes-Opcode:D, List:D); none of these signatures match:
(Usb2Snes: Usb2Snes-Opcode $cmd, Str @args, *%_)
rypervenche libertas: In the meantime you might want to install from source. 18:15
18:17 jmerelo joined
libertas rypervenche: is it only the rakudo package that I should install from source? 18:18
18:21 aluaces joined 18:22 domidumont left
lizmat Altreus: my understanding is that it does a ^find_method, which gives you the proto in case of a multi 18:23
m: class A { multi method a { } }; dd A.^find_method("a") 18:24
camelia Method a = proto method a (::T : |) {*}
Altreus it's all magic 18:27
18:28 wildtrees joined
Skarsnik hu self.send-command($cmd, Array[Str].new($arg)); this is not very pretty xD 18:30
rypervenche The pre-compiled version has it all included: rakudo.org/downloads 18:33
libertas: ^
18:34 aborazmeh left
libertas rypervenche: ok, thank you so much for your help! Raku is such an excellent language! 18:34
rypervenche libertas: Let us know if you have any questions with it :)
How does the Linux binary tarball get created? There's an incorrect path in the README.md for it. 18:36
18:40 hythm left, abraxxa left, kst joined 18:41 aborazmeh joined, aborazmeh left, aborazmeh joined
Altreus I'm going home now, but once there I've got a compiler error to ask about that probably involves me doing some very silly things, so ... take care :) 18:42
lizmat Altreus: travel safely 18:43
tbrowder hi, all 18:49
rafaschi heya
tbrowder i just noticed raku doesn't have trig functions with degree versions 18:50
lucs In my Foo.pm6, I print $?FILE and obtain something like "/path/to/Foo.pm6 (Foo)". 18:51
What's that trailing " (Foo)" doing there?
tbrowder any objections to adding them?
atroxaper Skarsnik: self.send-command($cmd, (my Str @ = $arg)); # looks better? 18:52
sena_kun lucs: module name
lucs Sure, but why?
tbrowder e.g.: sind cosd tand atand atan2d etc
sena_kun lurcs: hmm, is "why" to my answer or? 18:53
lucs I want the file name, not its description or whatever.
sena_kun lucs: you can just trim it
lizmat m: dd $?FILE 18:54
camelia "<tmp>"
tbrowder my answer is 1. because we can and 2. i want to use the repl as a pocket caculator
lucs sena_kun: That is seriously LTA.
lizmat m: say $?FILE
camelia <tmp>
lucs lizmat: Yeah, I tried that with camelia here, saw the same results. 18:55
lizmat $ raku 1
"/Users/liz/Github/rakudo.moar/1"
$ cat 1
dd $?FILE;
ah, precomped? 18:56
sena_kun lizmat: you need file to be in a module-like compunit
not a temp or a script
lucs Oh, yes, it is precomped I guess.
atroxaper tbrowder: probably, it is good to stay a core of compiler not too large if possible. Any additional math functions maybe implemented in modules.
lizmat lucs: confirmed... wonder where that comes from 18:57
sena_kun dunno, I think it is handy, sometimes you want to know the module a thing is from. we are using it in Comma, for example. maybe $?FILE is not the most obvious name compared to e.g. $?FILEINFO (which can hold more things?), but hmm
lizmat I'd say that *is* LTA
lucs sena_kun: The handiness is nice, but it should be implemented somehow else :) 18:58
lizmat "Which file am I in?"
18:58 sauvin left
lizmat so, you could argue it is wrong in more than one way 18:58
a. it's a Str, not an IO::Path
b. it's not an .IOable string
lucs: could you make an issue for that ? 18:59
lucs OK
Thanks for confirming
18:59 jmerelo left
sena_kun NOOOOOOOOOOOO 18:59
github is at it again... 19:00
tbrowder atroxaper: but we already have many core math routines and the degree versions are probably used more by non-mathematicians
19:03 Black_Ribbon joined
rafaschi I don't think new functions would be the best approach, but a new numeric type that can do clock arithmetic would be nice. If it knew how to convert itself to radians, the trig functions could accept it. 19:03
sena_kun wouldn't one want to write a module for it? 19:04
rafaschi At least at first, I think it should be a module.
atroxaper tbrowder: we already have the to-json sub but want to remove it from the core. All thing in the core have to be documented and covered by tests (spec). There are a lot of unobvious tasks for each new thing. For example, a good subs' naming. 19:05
sena_kun IIRC, the current policy is "make it a module at first" and then "if there are serious reasons to do so, pull into core".
tbrowder maybe there is one already...
there is Math::Trig but no decimal trig functions 19:09
lucs Heh. github.com/rakudo/rakudo/issues/2539
19:18 patrickb left
lizmat lucs++ 19:18
tbrowder .seen perlpilot 19:20
lucs tbrowder: He is no longer with us :(
19:20 thundergnat_ joined
thundergnat_ m: sub postfix:<°> (Numeric $d) { $d * τ / 360 } say sin 45°; say sin 90°; say cos 0°; # who needs a module? 19:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ostfix:<°> (Numeric $d) { $d * τ / 360 }7⏏5 say sin 45°; say sin 90°; say cos 0°; #
expecting any of:
thundergnat_ argh 19:21
tbrowder hm, did he leave in anger?
thundergnat_ m: sub postfix:<°> (Numeric $d) { $d * τ / 360 }; say sin 45°; say sin 90°; say cos 0°;
camelia 0.7071067811865475
1
1
lizmat tbrowder: no, he really left this plane
lucs tbrowder: Deceased :(
19:21 [Sno] joined
tbrowder oh, i see 19:21
lizmat he still committed every now and then when he was already really sick
he died just over a year ago, if I remember correctly 19:22
19:22 thundergnat_ left
moritz I very much enjoyed collaborating with him 19:22
lizmat so did I, and not nearly enough 19:23
tbrowder ah, that's coming back to me. does anyone know any family of his or anyone who might be able to day anything about ownership of his Math::Trig module? 19:24
s/day/say 19:25
sena_kun tbrowder: I think you can just fork, update maintainence notices if any and update ecosystem versions with yours 19:26
tbrowder it's the perfect one for adding decimal trig functions
moritz yes, just take over his module for maintenance / enhancements 19:27
tbrowder ok, i'll think about doing that, but don't let that stop anyone else who wants to jump in first! 19:29
thundergnat: that is slick! the awesome power of raku! 19:32
19:34 sena_kun left 19:36 domidumont joined 19:37 domidumont left 19:38 hankache joined
hankache hello #raku 19:38
m: use Test; plan1; can-ok 'Raku', 'is-prime'; 19:39
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
plan1 used at line 1. Did you mean 'plan'?
hankache m: use Test; plan 1; can-ok 'Raku', 'is-prime';
camelia 1..1
ok 1 - An object of type 'Str' can do the method 'is-prime'
hankache How is this possible? 19:40
lizmat m: say "41".is-prime
camelia True
lizmat Cool
a Str is Cool, so using it in a numeric context will cause automatic conversion 19:41
hankache oh ok. Thanks lizmat.
I guess the doc mislead me, it didn't list a candidate for Cool docs.raku.org/routine/is-prime
lizmat++ 19:42
19:47 sena_kun joined 19:58 aborazmeh left 20:00 stoned75 joined
rypervenche m: say Int.^mro 20:17
camelia ((Int) (Cool) (Any) (Mu))
rypervenche Does anyone know who is in charge of the built Linux tarballs on the rakudo.org download page? 20:19
lizmat El_Che ? 20:20
20:32 hankache left
stoned75 :q 20:33
rypervenche Hmm, the tarball looks to be different from the one on rakudo-pkg.
20:34 cpan-raku left 20:35 cpan-raku joined, cpan-raku left, cpan-raku joined
sena_kun rypervenche: what do you mean? access to the site? or who makes the release tarballs? 20:35
rypervenche sena_kun: There's a mistake in the README.md. I'm not sure where to submit an issue, if possible. 20:36
sena_kun rypervenche: what readme, rakudo one?
rypervenche Yes, the one from the Linux binary on rakudo.org/downloads 20:37
sena_kun rypervenche: I can patch, what's the typo?
s/typo/mistake/
rypervenche $(scripts/set-env.sh) should be set to $(bin/set-env.sh)
sena_kun rypervenche: github.com/rakudo/rakudo/blob/ee1b...nning-raku <- this? 20:38
or, rather, github.com/rakudo/rakudo/blob/mast...nning-raku 20:39
rypervenche: can you please open a ticket in rakudo repo?
rypervenche Sure. Would a PR be better?
sena_kun not sure, there are guides other than linux one, I'd ask about it a person who edited them before doing any fixes... though we might just ask for a review. 20:40
20:41 hankache joined
rypervenche All right. I'll submit an issue. Thanks. 20:41
sena_kun rypervenche++
Altreus right 20:46
here's a branch github.com/shuppet/p6-api-discord/...provements 20:47
uh
not that one
github.com/shuppet/p6-api-discord/...ct-delayed
I get an error: No such method 'raku' for invocant of type '::?CLASS'
I have no idea what is trying to do what 20:48
it is sufficient to do «raku -Ilib -MAPI::Discord»
(with 2020.01) 20:49
What mistake have I made? :D
sena_kun Altreus: interesting... is there a more complete trace? 20:50
Altreus this is the entirety of it gist.github.com/Altreus/001c7da089...f91c559a84 20:51
I wondered if I've simply done something wrong in the way I declare classes in Channel.pm
6
being the only one I've changed and the one with the error
sena_kun Altreus: can you run it with --ll-exception? 20:52
Altreus uh, well not the only one - the main one
ya
sena_kun: I've updated the gist 20:53
20:53 rafaschi left
sena_kun that's better, now I feel like you can file a rakudo issue out of this. :) 20:54
lizmat Altreus: you may have found a bug in Object::Delayed, caused by recent renaming 20:55
Altreus ah nuts 20:58
:)
well it works in general so it's probably my crazy role shenanigans 20:59
I'll pare it down for now - should I raise a raku issue or an Object::Delayed one? :)
lizmat start with an Object::Delayed one 21:00
Altreus okay :)
lizmat Altreus++
guifa tyil: I think ugexe knows more about the inner workings on the Distribution. There was definitely some changes made in there I think between b and c (or at least documentation took a while to catch up) 21:01
Altreus I'm afraid the issue is not very specific github.com/lizmat/Object-Delayed/issues/4 21:04
But I did a very specific thing to make up for it! github.com/lizmat/Object-Delayed/pull/3 21:05
21:05 hankache left
lizmat Altreus++ # PR merged 21:06
Altreus That was weird. I saw you merge it through my translucent terminal
guifa tyil: if you’re looking for a way to check if it exists, I *think* I remember the one that I finally got to work was %?RESOURCES{$filename}.IO.e 21:08
21:13 pmurias joined 21:16 kensanata joined 21:17 domidumont joined 21:20 mensvaga left 21:26 domidumont left
Altreus This error is odd 21:29
It doesn't seem to be related to O:D 21:30
But also it does
ah, no it's just too much information and I got confused :)
lizmat: O:D isn't involved :) it's a raku thing... that I have yet to isolate 21:31
lizmat *phew* :-)
Altreus phew but also not phew :D
I can't be sure it's not me doing something wrong
lizmat well, the code you presented, was pretty big... perhaps it's possible to make a mre ? 21:32
Altreus Here's a smaller thing gist.github.com/Altreus/1428eb3e20...283a5e78a9
From here github.com/shuppet/p6-api-discord/...Object.pm6 21:33
Skarsnik I wonder if my GPTrixie branch still make rakudo crash
21:33 sena_kun left
Altreus I haven't tried to pare down that role to which bit is wrong 21:33
oh wait I might be able to peel off a layer 21:34
It doesn't like my JSONy: github.com/shuppet/p6-api-discord/...ce.pm6#L33 21:35
Perhaps a multi method can't switch on the definedness of its invocant? 21:45
lizmat m: class A { multi method a(A:D:) { "instantiated" }; multi method a(A:U:) { "type object" } }; dd A.a; dd A.new.a 21:47
camelia "type object"
"instantiated"
lizmat Altreus: ^^
Altreus Then it doesn't like that combined with ::?CLASS
Cos it worked when I renamed one of the options
hmm 21:48
It works when I *remove* one of the options
i.e. leave one in, but still multi
21:49 sena_kun joined
Altreus right 21:49
21:52 dustinm` left
Altreus I have isolated it to: A multi method, differentiated by definedness of invocant, in a Role, using ::?CLASS instead of a known class name, where *one of the multis is unimplemented* 21:54
So, nice and simple
21:54 rindolf left
Altreus The idea being that whatever consumes it gets one method with a default implementation on a type object, but has to implement the instance version 21:55
Should I expect it to work? :)
lizmat gist ?
Altreus except ... I can't get it to break 21:56
ohhh it's the return type!
Now I can gisy 21:57
t
here :) gist.github.com/Altreus/528c6172a6...a3ace22b19
without « returns ::?CLASS » it seems fine
lizmat nine: grrrr "repeat while $?FILE.ends-with($caller.file) { 21:58
Altreus I can't put « returns ::?CLASS » on an unimplemented multi method which also uses ::?CLASS to define the invocant 22:00
so those four things together cause this error, and it seems like any combination of fewer than those four things is fine 22:01
I guess I'll open a raku issue :D
tyil guifa: even for nonexistend files, %?RESOURCES returns the base dir of the repo's resources dir, which is true when called .IO.e on it 22:03
though it *also* shows a warning for me
guifa aaah maybe that’s what I was doing and catching the warning
(it’s been a while since I worked with the Fluent module that had the same issue) 22:04
tyil for my current module, I'm only working with files, so I can .IO.f for now
but it does seem like very awkward behaviour
xinming m: my $cmd = "curl -s example.com"; my $res1 = qx{$cmd}; $res1.perl.say; my $res2 = qx{curl -s example.com}; $res2.perl.say 22:06
camelia ""
"<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initia…
xinming In this example, Why will the second qx work, But not the first?
jnthn 'cus q doesn't interpolate
xinming Oops, Ignore me 22:07
jnthn You probably want qqx
xinming I forgot qqx :-)
Yea
Altreus github.com/rakudo/rakudo/issues/3483 22:10
:)
jnthn is here to tell me why I shouldn't do that :D
22:11 dustinm` joined 22:16 MasterDuke left
jnthn Altreus: 'cus it's a bad idea! 22:17
jnthn actually reads the issue :)
Altreus :x
jnthn Altreus: Hm, that should probably work
Some missing generic instantiation somewhere I guess 22:18
Altreus It didn't strike me as foolish
But foolish things often don't
jnthn No, at first glance that seems reasonable to me
Altreus :) 22:19
jnthn m: role R[::T] { method m(--> T) { T.new } }; R.m
camelia No appropriate parametric role variant available for 'R'
in block <unit> at <tmp> line 1
Altreus I'll use the workaround for now - removing the returns
jnthn m: role R[::T] { method m(--> T) { T.new } }; R[Int].m
camelia Died with X::TypeCheck::Return
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
jnthn Hah, yes, it's a more general buglet
xinming m: my %h = <a b>; %h[]:k.perl.say; %h<>:k.perl.say; 22:20
camelia (0,)
("a",)
xinming jnthn: In this example, I notice the diff use of [] vs <> on Hash, I thought [] and <> are both decont operators. But now, I'm confused, 22:21
what does the [] and <> exactly do underneath please?
22:24 nosqrt joined 22:49 titsuki joined 22:59 kensanata left
tbrowder can anyone tell me the secret to getting a new module recognized by travis? 23:00
as far as i know i'm using all the same support files (.travis, meta6, etc.) but travis isn't seeing it nor can i see it when i go to travis. 23:01
afk 23:16
23:33 sena_kun left
cpan-raku New module released to CPAN! Math::Trig (0.3.1) by 03TBROWDER 23:36
23:43 lucasb left
libertas after untarring a rakudo archive, compiling and `make install`, the files are at the `rakudo source`/install directory. 23:44
what do you usually do? set PATH to include that directory or do you copy the items to /usr/local or other place? 23:45
23:49 sena_kun joined 23:59 wamba joined