🦋 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.
Geth advent/master: 4 commits pushed by Altai-man++, (Juan Julián Merelo Guervós)++ 06:54
kawaii good morning o/ 08:03
[ptc] \o 08:08
zacts morning 08:35
I want to get involved with raku; don't know exactly where to begin. 08:36
sena_kun zacts, it depends on what you want and can (learn to) work on. For starters, see raku.org/community/ <- Getting Involved section where number of activities is described. 08:38
zacts cool. I'm guessing I should start by learning the language a bit first. 08:41
sena_kun Yes. In fact, even trying to setup things can be helpful, as you can report issues, inconveniences and such.
zacts I'm hoping to find a way to define my own syntax and stuff. 08:42
like, at least from what I gather, it seems that raku has a lot of promise for my goals of a daily language that I work with.
sena_kun Extending the syntax is surely possible, yes. 08:43
zacts I'm looking for something that I can customize, kind of like what I might do with the fish shell but for a programming language.
ah, is there a good list of books? 08:51
perl6book.com/ 08:52
cool
holyghost I started on the X11 client for my music editor, with an example from scx, scheme bindings for X11 09:59
now I have to write a scheme widget kit, several widgets and other sound processing software 10:00
abraxxa X11 is dead, Wayland is the future 10:01
tellable6 hey abraxxa, you have a message: gist.github.com/d2587255010615a448...4152833ed6
holyghost I have to wait for a posted book thoughm to commence 10:02
Geth advent: taboege++ created pull request #53:
20th: claim RFC 145
10:29
Geth advent: a5f7454b05 | (Tobias Boege)++ | 20th/README.md
20th: claim RFC 145
10:40
advent: 5b936c8e3b | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | 20th/README.md
Merge pull request #53 from taboege/master

20th: claim RFC 145
Geth doc: taboege++ created pull request #3541:
Remove false "shorthand"
11:53
[ptc] JJMerelo: is it possible to install older versions of Documentable? I've only been able to find 1.3.1 via zef 12:14
tellable6 2020-07-29T10:08:58Z #raku-dev <JJMerelo> [ptc] it's a reasonable option to remove that, yes. It's not running anyway, and hasn't for some time.
[ptc] JJMerelo: ok, I'll get rid of the whateverable stuff. Thanks for the feedback! 12:14
tbrowder .tell vrurg see fixed conflicts on roast #657 13:33
tellable6 tbrowder, I'll pass your message to vrurg
vrurg tbrowder: thanks! 13:40
tbrowder you're welcome. thnx for doing the cleanup! 13:42
vrurg tbrowder: have you hardcoded all WS into the pod block of the test itself? 14:27
Geth doc: 3c3352640d | (Tobias Boege)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Remove false "shorthand" (#3541)

The code referred to as a "shorthand" is in fact longer in bytes and in the number of regex atoms involved. This is corrected and another quality of the `~` operator is mentioned as a substitute, then the paragraph is reflowed.
14:33
linkable6 Link: docs.raku.org/language/regexes
DOC#3541 [closed]: github.com/Raku/doc/pull/3541 Remove false "shorthand"
tbrowder vrurg: yes, but it probably ought to be in \x[nnnn] form for clarity. but there are some subtleties in there i don't recall now so i'm reluctant to revisit mods. 15:04
tbrowder all i did was use the code generator and captured the output, cleaned it up a bit, and voila! 15:05
oh,
and extracted the subs to a test module 15:06
vrurg tbrowder: I'll be afk for some time. But I left comments on the PR with a suggestion.
tbrowder ok
vrurg The idea is that it is possible to use EVAL without affecting test code clarity. 15:07
kawaii Is there a reliable way of a Raku script/application knowing it's own memory usage? 15:08
codesections I'm not aware of one directly. There's probably a way to use `Kernel.free-memory` and some math to get a pretty good estimate (or, at least, of how it's changing over time). Or you could shell out 15:14
or use NativeCall 15:15
[Coke] didn't lizmat do some work that gives us this info? 15:16
kawaii If that's the case I'd be _really_ interested in knowing how :) 15:18
codesections (if you are willing to shell out, something like `say (run <ps -o rss=>, $*PID, :out).out.slurp` should work) 16:01
m: say (run <ps -o rss=>, $*PID, :out).out.slurp 16:02
camelia 100836
codesections I'm kind of surprised Camelia lets me print her system info
[Coke] codesections: Hard to put things in "safe" mode. 16:13
[Coke] easier to run inside a container that doesn't have real system access. 16:14
El_Che i heard something of a dot release? 16:26
is there one? (holidays so somewhat out of the loop)
sena_kun El_Che, the fix suggested was incomplete, so the bug is still here, so we can't point. 16:27
El_Che ok, "good". I'll try to check daily to release updated pkgs when out
thx
sena_kun El_Che, I'll ping you if we have one out. 16:30
El_Che thx! 16:31
kawaii codesections: hey that looks like a decent little hack for now, thanks! 16:52
codesections :) 16:59
zacts cool, so I'm going to start with the book Think Raku. 17:08
pmurias hi, 17:29
is the growth/size of the Raku community/ecosystem somehow measured?
[Coke] There are metrics that could be gathered, but I don't think anyone is 17:32
# of modules in the ecosystem list, # of people with commit bits, # of questions/participants on SO 17:33
people in the FB group, on IRC chat, perl6-users mailing list...
but I don't know of any tracking. (also: #rakulang on twitter) 17:36
codesections finanalyst.github.io/ModuleCitation/ reports the growth in the number of published modules since 2016
(the 3rd graph)
pmurias seems a least interesting at least to me, always found it hard to estimate how things where doing even when I was an active part of the community
codesections well, that graph shows growth from 452 modules to 12,52 17:37
*1,252
zacts I wonder if I can script vim with raku? 17:39
codesections so, we've *almost* caught up to JavaScript. Just need to increase our package count by … *checks* … 3 orders of magnitude! 17:40
:zacts Vim or NeoVim?
zacts either actually
codesections I'd *think* neovim would be pretty doable. Wasn't multi-language extensibility part of their pitch? But I haven't kept up 17:41
tadzik afaik as long as you can send JSON over sockets you can script neovim. Haven't done any of that though, so I could be wrong 17:47
codesections And the same will be true for Emacs in a few months 17:48
(when v27 is released)
pmurias tadzik: hi, do you still live in Warsaw? 17:49
tadzik pmurias: yeah
pmurias I have relocated to Warsaw like a ~month ago 17:50
tadzik oh nice :)
this could be a good opportunity to revive Warsaw.pm somewhat, if it wasn't for the pandemic and all that :/
pmurias: which part of Warsaw did you settle in? 17:51
timotimo facemask.pm
like bicycle.pm 17:52
lizmat kawaii: perhaps docs.raku.org/type/Telemetry is of interest
pmurias goo.gl/maps/B9iz9tjRJnbPoxxj8
tadzik close to the park, nice 17:54
you started at Google, right?
pmurias yes, writing frontend stuff in typescript and angular 17:55
it's wfh unfortunately but I relocated anyway to Warsaw 17:57
pmurias tadzik: if you want to meet sometime let me know 18:17
codesections I'm pretty confused. Either I don't understand Raku's introspection or Raku is lying to me 18:52
codesections I read this as saying "there is an `add` method that BagHash can call; specifically the one it gets from BagHash" 18:53
m: say BagHash.^lookup('add'); say BagHash.^lookup('add').package;
camelia add
(BagHash)
codesections And I read *this* as saying "there is no `add` method in Str's inheritance graph"
m: say Str.^lookup('add');
camelia (Mu)
codesections I am thus not surprised to get this error: 18:53
m: Str.add;
camelia No such method 'add' for invocant of type 'Str'
in block <unit> at <tmp> line 1
codesections Here's where I *am* surprised:
m: say Buf.^lookup('list');
camelia (Mu)
codesections m: say Buf.list;
camelia ((Buf))
SmokeMachine m: say Buf.^find_method: “list” 18:54
camelia The 'ForeignCode' class is a Rakudo-specific
implementation detail and has no serviceable parts inside
codesections Why does `Buf.list` act like a valid method call when `Buf.^lookup('list')` just told me there *isn't* a list method in `Buf`'s object graph
oh
hmm 18:55
From the `lookup` docs: 19:00
> Returns the first matching method object of the provided $name or (Mu) if no method object was found. The search for a matching method object is done by following the mro of $obj. Note that lookup is supposed to be used for introspection, if you're after something which can be invoked you probably want to use find_method instead.
> The difference between find_method and lookup are that find_method will use a default candidate for parametric roles, whereas lookup throws an exception in this case, and that find_method honors FALLBACK methods, which lookup does not.
does that mean that `Buf.^lookup('list').defined` *should* return False, and the current behavior is a bug? 19:01
guifa2 codesections: was it you that was asking about wanting floating values in BagHash? I know someone was asking about it 19:02
codesections It wasn't me
lizmat guifa2: I guess you know the answer? MixHash ? 19:55
guifa2 lizmat: yeah 19:58
codesections I think Raku is just messing with me at this point:
m: Metamodel::MROBasedMethodDispatch.find_method
camelia No such method 'find_method' for invocant of type
'Perl6::Metamodel::MROBasedMethodDispatch'. Did you mean 'find_method'?
in block <unit> at <tmp> line 1
lizmat codesections: ^find_method 19:59
it's a method on the meta-object
codesections oh, right!
I knew that at some point…
lizmat also: some of these methods only look at the methods in the class themselves, and not whether the method is inherited or not 20:00
codesections Yeah. I'm actually trying to get deep into walking the inheritance graph
lizmat codesections++
codesections So, how would I refer to the `^find_method` code object? 20:03
[Coke] ^foo is shorthand - you can write it out the long way. 20:13
lizmat codesections: ^find_method returns a code object?
m: dd Int.^find_method("Str")(42)
camelia "42"
[Coke] or that. ;) 20:14
codesections lizmat: right, `^find_method` returns the code object for it's argument. So, your example gave me the `Int.Str` code object 20:16
I'm asking about the `^find_method` code object. E.g., I want to write something like:
m: say &Metamodel::MROBasedMethodDispatch.^find_method('find_method') 20:17
camelia (Mu)
codesections except that doesn't work, because it's looking for `find_method` as an method on `Metamodel::MROBasedMethodDispatch`, when I guess it should be on a meta-object corresponding to that Metamodel? or something like that? 20:18
lizmat codesections: so you're introspecting the introspection ? 20:19
codesections Trying to :D
lizmat ah... ok, that feels... bold :-) 20:20
codesections haha yeah, it's more an attempt to wrap my head around how these things work/take things apart in the REPL
not something I'm deploying :D
lizmat it's just that as deeper you go into that, the supporting tortoises start to show up :-) 20:22
guifa2 wait.... Raku(do)'s core is actually Logo? 20:24
codesections That's entirely fair. What I was actually looking at this for (er, right now; it's been a bit of a yak shave) was to decide if I should open an issue about what I discussed above: 20:25
&Metamodel::MROBasedMethodDispatch.^find_method('find_method')
er no, wrong paste
m: say Buf.^find_method('list').defined; say Buf.^lookup('list').defined
camelia True
False
guifa2 .tell supernovus Looking over your old Timezone code. Found some old TODOs you left in and wanted to see if we could work together to get those solved 20:26
tellable6 guifa2, I'll pass your message to supernovus
codesections should those both be True? Or am I misunderstanding the difference between those two meta-methods?
moritz m: say Buf.^HOW 20:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use .^ on a non-identifier method call
at <tmp>:1
------> 3say Buf.^HOW7⏏5<EOL>
expecting any of:
method arguments
moritz m: say Buf.HOW.^name
camelia Perl6::Metamodel::ParametricRoleGroupHOW
moritz parametric roles is exactly where these two method methods differ, iirc 20:39
codesections and (dare I ask?) what is a parametric role? :D 20:42
The docs tell me that "A Metamodel::ParametricRoleHOW represents a non-instantiated, possibly parameterized, role"
but I'm not enlightened
Geth doc: 88bc7e51de | Antonio++ (committed using GitHub Web editor) | template/main.mustache
Add main.mustache, refs #2508
20:46
linkable6 DOC#2508 [open]: github.com/Raku/doc/issues/2508 [build][site] Create site-specific Mustache templates
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/07/29/au...-exitcode/ 21:02
codesections: see: docs.raku.org/language/typesystem#Parameterized 21:03
codesections Thanks. I'd somehow missed that the MOP was documented on that page in addition to it's own 21:05
gfldex codesections: The MOP is _one_ way to construct types. Type declarators may or may not boild down to MOP calls. 21:07
codesections Oh, I thought it was _the_ way. Thanks 21:08
kawaii www.irccloud.com/pastebin/dCcj67ML...e%20reason 22:48
oh it typed my message in the paste title field... useful 22:49
www.irccloud.com/pastebin/4j3jPMxe/
I don't know why I'm getting what looks to be a typecasting error when doing a simple select statement with Red 22:50
Ah, I figured it out, I need to use `,` instead of `&&` here 22:53
tbrowder hi, all 23:11
kawaii o/ 23:12
tbrowder i filed an issue with rakudo and have not heard from anyone about it
kawaii: howdy!
i asked why can't a normal user query %?RESOURCES for an installed module 23:13
tbrowder currently the %?RESOURCES hash is almost useless without some effort by a module author making a sub so a user can access the module's resources. 23:15
if you look at some of the Documentable's problems they could be solved with easier access to the RESOURCES hook. 23:16
tony-o tbrowder: i have an interesting thought on an relational mapping i want to build on DB:: stuff since some precomp change hosed Xoos 23:28
tellable6 2020-07-28T22:07:36Z #raku <patrickb> tony-o I commented on gist.github.com/tony-o/07fdf8b3a0f...4131ac224b
tony-o .tell patrickb i'll flesh that out in the gist tomorrow ante meridiem 23:32
tellable6 tony-o, I'll pass your message to patrickb
tony-o .tell patrickb that being the zef ecosystem tpf doc 23:33
tellable6 tony-o, I'll pass your message to patrickb
tbrowder tony-o: always interested in DB stuff 23:49