🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 reportable6 left 00:02 reportable6 joined 00:16 jgaz left
rf Is there a phaser or something for a class to run when GC collects an instance? 00:16
lizmat nope
that's VM land, and VM's are free to GC whenever they feel like it 00:17
[Coke] GC should be mostly invisible.
tellable6 2023-02-18T21:30:20Z #raku <tbrowder> [Coke] see my ramblings on #raku-doc ref "Opener graphemes" and added proposal at doc issue #3917
[Coke] ... lizmat's phrasing is better. :)
lizmat however, having said that, you *can* specify a DESTROY method that *will* get called when an object is GCd
however, there is no guarantee that an object will ever get GCd, for whatever reason, so YMMV 00:18
docs.raku.org/language/classtut#in...ry-DESTROY
rf ^
lizmat notices that the documentation doesn't mention that there is no guarantee that a DESTROY will run at all ever 00:19
rf Cool. This will let me take my simdjson port to the moon.
Thanks liz & will 00:20
lizmat rf: FWIW, you're probably better off with a LEAVE or END phaser
the END phaser *is* guaranteed to run
rf Ok. I'm gonna try both and see which one results in less of a memory leak lol 00:21
00:28 deoac left
Geth doc/main: 75815167fa | (Will Coleda)++ | META6.json
no more build, no more depends
00:39
00:42 Geth left, Geth joined
Geth doc/main: b1b5d523fe | (Will Coleda)++ | Build.pm6
Avoid installing this repo.

Other repositories that use it expect a clone to exist, they do not expect it to be installed, and our old install process was broken for years.
00:48
[Coke] How to make sure github.com/raku/doc isn't listed in the ecosystem? 00:55
Geth ecosystem/doc: 1d02e07044 | (Will Coleda)++ | META.list
Doc isn't meant to be installed
00:57
ecosystem: coke++ created pull request #615:
Doc isn't meant to be installed
00:58
[Coke] there's one way.
[Coke] clones REA.... so slow. 00:59
01:04 xinming left
[Coke] opens github.com/Raku/REA/issues/10 and tags lizmat. 01:04
Where is the official copy of Artistic-2.0?
if I wanted to verify that someone hadn't changed a local copy?
01:06 xinming joined
[Coke] en.wikipedia.org/wiki/Artistic_License is missing some Perl 6 -> Raku changes. 01:06
(Also refs to parrot can probably be dropped)
Ugh. looks like the official version is here: www.perlfoundation.org/artistic-license-20.html - would love a raw version in an official TPF github project. 01:07
especially since the html version has at least one embedded weird codepoint. 01:08
ah, it's a ZWS 01:10
.ask codesections - if you compare the LICENSE In raku/docs vs. rakudo/rakudo, you'll see they are not identical. (differing only by whitespace, presumably because it was failing raku/doc's overly strict "no trailing whitespace" test) - how to proceed? 01:11
tellable6 [Coke], I'll pass your message to codesections
Geth doc/main: 063ae29db1 | (Will Coleda)++ | .gitignore
These ignores should be per-user, not in the repo itself
01:14
[Coke] .ask ugexe - I made the Build.pm6 in raku/doc die if someone tries to install to prevent it. Is that "OK"? Is there a better way to declare in META6? 01:17
tellable6 [Coke], I'll pass your message to ugexe
ugexe my first thought is lets use .rakumod for new files :P 01:18
[Coke] it's not a new file, it's years old. :) 01:19
ugexe ah
[Coke] it used to try to copy things from doc into resources and did so badly, so the install hasn't worked in ages. 01:20
ugexe the other question i have is: do you still need the META6.json file then to (I presume) install dependencies?
[Coke] Yes, still have test deps.
ugexe Yeah thats probably the best you can do. I dunno if the message is strong enough or not... zef is going to suggest using --force-build when the build step fails and I'm guessing users will then just try that 01:21
[Coke] "you can force build it but it will still not install anything." 01:22
I could do that I suppose
~gist.github.com/coke/3c9cda4e6bf87...0910a1ee07 01:23
"This repository is not intended to be installed." is the current exception
ugexe hmm i didn't expect it to show up as a SORRY 01:24
i dunno i guess that seems pretty clear to me
gist.github.com/ugexe/b04f71e97fad...ca73b42860 -- this + deleting the META6.json would be more ideal 01:26
I need to revisit my grant proposal ideas one of these days :/ 01:27
02:06 linkable6 left, evalable6 left, linkable6 joined 02:07 evalable6 joined 02:20 Manifest0 left 02:48 ispyhumanfly left 02:59 p6steve left 03:02 p6steve joined 03:06 cfa left 03:25 razetime joined 03:54 jpn joined 03:58 jpn left 03:59 razetime left 04:04 kjp left 04:05 saint- left 04:07 kjp joined 04:43 razetime joined 04:50 rf left 05:50 shareable6 left, bisectable6 left, bloatable6 left, reportable6 left, committable6 left, notable6 left, unicodable6 left, releasable6 left, coverable6 left, statisfiable6 left, squashable6 left, tellable6 left, nativecallable6 left, sourceable6 left, greppable6 left, evalable6 left, linkable6 left, quotable6 left, benchable6 left 05:51 statisfiable6 joined, reportable6 joined, linkable6 joined, shareable6 joined, evalable6 joined 05:52 tellable6 joined, bisectable6 joined, sourceable6 joined, coverable6 joined, committable6 joined, greppable6 joined 05:53 releasable6 joined, bloatable6 joined, quotable6 joined, nativecallable6 joined, squashable6 joined, notable6 joined, unicodable6 joined, benchable6 joined 06:00 reportable6 left 06:01 reportable6 joined 06:42 nort joined 06:45 derpydoo left 07:00 samcv left, jpn joined 07:05 jpn left 08:05 tellable6 left, evalable6 left, unicodable6 left, sourceable6 left, coverable6 left, committable6 left, releasable6 left, notable6 left, squashable6 left, benchable6 left, shareable6 left, nativecallable6 left, statisfiable6 left, bloatable6 left, reportable6 left, quotable6 left, bisectable6 left, linkable6 left, greppable6 left 08:06 quotable6 joined, statisfiable6 joined, committable6 joined, releasable6 joined, coverable6 joined, evalable6 joined, benchable6 joined, squashable6 joined, unicodable6 joined 08:07 notable6 joined, tellable6 joined, greppable6 joined 08:08 bisectable6 joined, bloatable6 joined, shareable6 joined, sourceable6 joined, nativecallable6 joined, linkable6 joined, reportable6 joined, jpn joined 08:15 jpn left 08:17 razetime left 08:30 razetime joined 08:39 QhpAptyj9hj0RQwM joined 08:42 jpn joined 08:51 jpn left 09:05 bdju left 09:07 bdju joined 09:21 jpn joined 09:47 freeside left 10:01 sena_kun joined 10:03 razetime1 joined, razetime left 10:07 razetime1 left 10:08 razetime joined 10:28 Manifest0 joined 10:32 abraxxa-home joined, CaptainQ joined 10:33 CaptainQ left, abraxxa-home left 10:35 abraxxa-home joined 11:04 razetime left 11:12 hythm joined 11:14 frost joined 11:20 abraxxa-home left
hythm may be a new field need to be added in dist's META file, "uninstallable": "reason" or whatever the name would be to declare that the dist should not be installed. and that field should be honored by package mangers and not attempt to install the dist. also a recommendation manager should not recommend that version of the dist or may be add to the 11:20
bottom of the recommended list
11:22 Sgeo left
hythm this works for new dists, but not sure how this would be done for existing dists since it will require updating version anyway to pick up the changes in the ecosystem 11:24
lizmat If something is in the REA, the exposed META files aren't an exact duplicate of the one in the distro anyway, so things can be done there 11:26
hythm Ok, then I think a name should be chosen and agreed on for the key in META to indicate uninstallable dist 11:37
ugexe I’m not convinced this is a good idea
A field hard coupled to a specific CURI for the sole purpose of marking distributions that shouldn’t be in an ecosystem / discoverable at all as not installable sounds weird 11:41
Just don’t put it in the ecosystem indexes to begin with
lizmat well, there's a lot of dists in the REA that are probably uninstallable / have known issues 11:45
I'd rather not remove them for the historical record
but somehow an indication that it may not be what you want, could be a nice thing to have 11:46
ugexe If they aren’t installable they have no historical value being indexed 11:47
and none of this stuff would work for other CURs
lizmat not being installable ≠ no potentially valuable code inside 11:48
ugexe It doesn’t belong in an index of an ecosystem
it’s on GitHub. The code and value still exists
But it’s totally a code smell that a field is hard coupled to a specific type of CUR 11:53
because that field a) only has meaning to CURI and b) uninstallable based on what (rakudo version? OS? Etc) 11:54
lizmat fair enough... that's why I removed the meta of p6doc just now from the REA 11:56
ugexe 👍 12:00
12:00 reportable6 left 12:02 reportable6 joined 12:10 jpn left
tbrowder lizmat: hi, i just filed issue #800 for nqp. discovered it when working on a doc table to replace "Opener graphemes" 12:19
12:32 samcv joined
tbrowder samcv: hi 12:34
.ask samcv do we know you by another name? 12:36
tellable6 tbrowder, I'll pass your message to samcv
lizmat tbrowder: that'd be Samantha McVey :-) 12:37
tbrowder every time i see yr name i think of "green eggs and ham, sam i am"
12:39 QhpAptyj9hj0RQwM left
tbrowder lizmat: that's what i thought, but yr comment on issue and seeing samcv join seemed too non-random 12:39
i guess it was a git notification
12:59 QhpAptyj9hj0RQwM joined 13:59 evalable6 left, linkable6 left 14:00 linkable6 joined 14:01 evalable6 joined 14:28 derpydoo joined 14:29 derpydoo joined 14:51 ab5tract left
mst oh orange site, how foolish are ye 14:56
14:57 freeside joined
mst I mention raku with a caveat I've probably got my example slightly wrong, somebody who knows raku better replies with a very polite "yep, you did, I reckon this is what you meant:" followed by much better examples than mine were 14:57
I reply saying "your corrections and elaborations are much appreciated"
somebody immediately downvotes the thank you comment
trout.me.uk/facepaw.jpg
15:00 jpn joined 15:05 jpn left 15:20 frost left 15:28 jpn joined
tbrowder mst: where did that happen? 15:28
there is a class of ppl who seem to downvote anything they see just to be ornery 15:29
mst tbrowder: news.ycombinator.com/item?id=34846306 15:30
I'm guessing it was one of (a) random ornery (b) somebody convinced that saying thank you is a low quality post (c) one of my fan club somehow interpreting my gratitude to be the opposite 15:31
never mind, the post now has a comment from not-me that covers what I was attempting to except properly
15:36 jpn left
tbrowder i couldn't see the downvote (or any vote), but i have visited there before and think it's something like the talks in the public squares in london: not my cup of tea 15:39
anyhow, this place is much friendlier
15:40 jpn joined
tbrowder ref master branch for any checked out raku/rakudo repo: for those like raku/doc, how does one change from master to main painlessly? raku/doc is my immediate concern 15:48
perryprog tbrowder you need I think 100 (somewhere around there) to be able to downvote. Downvoted comments appear in a less opaque font. 15:51
15:52 razetime joined
perryprog That is a very orange site thing to downvote for though 15:52
lucs How to rename an exported sub when using a module? 15:53
Raw
(Oops, "Raw" is mispaste.)
Details: gist.github.com/lucs/9beec4122981b...50aa170754 15:54
mst: As someone put it after seeing someone be a similar kind of victim on Reddit: 15:56
"Unfortunately there are a few noisy people there who confuse the vote down button with an “I am very stupid” button, which they eagerly click"
mst tbrowder: you can generally only see the vote counts for your own comments 16:00
tbrowder thnx
mst upvotes are designed to encourage the author rather than form a popularity contest 16:11
it's breaking down somewhat at the current scale of the site but it actually worked rather well for some years 16:12
lucs I usually upvote when I feel the post or comment deserves to be read.
I very rarely downvote.
perryprog Eh, I think it still works pretty well. It's only like 1/10 posts that I see a post that was downvoted for no good reason. 16:18
I see a comment*
16:20 yjh left
Geth doc/main: 6a7bfe63d8 | cfa++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Fix output for the `wantarray` example

Also update to use the OUTPUT: «...» convention for consistency.
16:27
mst perryprog: 'still works pretty well' and 'breaking down somewhat' are pretty much the same observation, tbh 16:28
perryprog ummm
you got me there 16:29
16:32 jpn left
Geth doc/main: bbf9c01f77 | cfa++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Amend output for `wantarray` sink example
16:35
16:38 cfa joined
cfa o/ 16:40
16:42 QhpAptyj9hj0RQwM left 17:00 jpn joined 17:22 razetime left 17:26 jpn left 17:28 jpn joined 17:49 jpn left 17:51 cfa left 18:00 reportable6 left 18:01 reportable6 joined 18:09 hythm left
[Coke] do we have any kind of metrics on module usage? I'm curious if anyone is using raku/rakudoc 18:56
18:56 jpn joined
[Coke] cfa++ 19:00
ugexe Telemetry in zef would be nice, but I also wouldn’t opt in (and am skeptical a significant enough number of people would) 19:04
19:05 jpn left, QhpAptyj9hj0RQwM joined
ugexe You can also go to the repo on GitHub, click the insights tab, then (if you have proper permissions) view traffic 19:17
to show how often the repo gets cloned anyway
19:19 Sgeo joined
[Coke] Danke 19:22
19:26 SenFache left 19:27 Sauvin joined 19:43 QhpAptyj9hj0RQwM left, QhpAptyj9hj0RQwM joined
Anton Antonov @Coke Any Gherkin / Cucumber updates? 19:46
[Coke] No. As I said, I don't have time to lead the project, haven't done anything on it.
Anton Antonov Did you try the “Cucumis::Sextus” module? 19:47
Ok
I plan to take a more minimalistic perspective. I just want to generate Raku test files from Gherkin specs. 19:48
[Coke] sounds good 20:19
Geth doc/main: 0923eb74fd | (Will Coleda)++ | 2 files
Rename Build file

use preferred file extension
20:20
[Coke] ugexe: fixed the extension 20:21
Geth doc/main: 305537cc6f | (Will Coleda)++ | README.md
Remove references to items in generated HTML

Leave SO listing for now, but this should be reviewed for accuracy.
20:24
Anton Antonov A good introduction to the Cucumber / Gherkin approach and workflows is the README of "Cucumis::Sextus" : github.com/robertlemmen/raku-cucum...tus#readme . 20:37
20:43 linkable6 left 20:44 evalable6 left 20:45 QhpAptyj9hj0RQwM left, evalable6 joined 20:46 linkable6 joined 21:04 grondilu joined 21:14 grondilu left 22:02 rf joined
rf Afternoon folks 22:02
22:09 cfa joined
rf If anyone has some spare time, I need some more eyes on another Humming-Bird feature github.com/rawleyfowler/Humming-Bi...l/34/files 22:10
22:16 QhpAptyj9hj0RQwM joined
Geth doc/main: 78e0a5ccce | cfa++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Prefer OUTPUT: «…»
22:18
lucs Um, "How to rename an exported sub when using a module?" 22:32
New revised gist: gist.github.com/lucs/8ba389a6480c7...b7622b5b44
(the one I showed earlier was wrong) 22:33
Nemokosch github.com/lizmat/from 22:39
I don't know why it's suddenly impossible to find 22:40
raku.land/zef:lizmat/from
Geth ecosystem/main: 1d02e07044 | (Will Coleda)++ | META.list
Doc isn't meant to be installed
22:44
ecosystem/main: 2c96b832e3 | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #615 from Raku/doc

Doc isn't meant to be installed
lucs Not sure if that was for me, but it doesn't do quite what I need. 22:50
22:56 QhpAptyj9hj0RQwM left
Nemokosch I don't understand what you need, then 22:59
lucs Hmm... I'm not sure how to phrase it bettet than in the gist. 23:00
rf You need to import a sub from another dist under a different name? 23:04
lucs Yeah, pretty much that. Under an arbitrary different name.
23:05 sena_kun left
The example in the gist is very explicit. 23:06
Nemokosch I think from can do that, though 23:15
rf m: my &new-name = do { use Test; &ok };
camelia ( no output )
Nemokosch maybe I'm misremembering but that was clearly what I had in mind
23:17 merp left
maybe there is also an "as"... I clearly seem to recall something that did just that, I thought it would be in "from" 23:18
23:18 merp joined
lucs Yeah, an "as" sounds like what I'm after, but that module does not appear to supply that. 23:21
tl;dr-the_gist: My::Mod exports sub foo(). I want: If user does "use My::Mod 'bar'", then they can use bar() instead of foo() in their code. 'bar' is arbitrary, it could be anything.
Hmm... 23:23
lucs rf: I did not express that the idea is also to render the original name inoperative, and ideally, the user would just need to pass an extra argument to the "use" statement. 23:32
Why inoperative? Because the idea is also that if the original name happens to be exported into the code by some other module, they can use that meaning without collision. 23:33
rf I'm not sure if that makes sense though, if you have a collision, you want one ot inoperative. 23:37
to be**
In my example you rebind ok from Test to new-name, using a scoped block. 23:38
Now you just have access to ok through new-name you wont be able to call 'ok'.
I don't think it makes sense to do that at the module level. 23:40
lucs You're right, I mistested that.
So this is very close. 23:41
How can I make that mechanism work with use MyMod 'bar'; ? 23:42
(getting pretty hungry, will go start making food, but I'll be around) 23:43
cfa speaking of this, i find the following surprising: 23:49
m: module A { sub foo is export { ... } }; module B { sub foo is export { ... } }
camelia ===SORRY!=== Error while compiling <tmp>
A symbol '&foo' has already been exported
at <tmp>:1
cfa given that i hadn't imported A at the time of B's definition; why should my ability to import from A affect compilation of B?
lucs rf: Oh, I meant, you're right about it being inoperative after the example code you showed, but I'm not sure why it would not make sense at the module level. 23:50
cfa by contrast if A and B are in their respective .rakumod files, i can import both (and B's foo shadows A's)
lucs cfa: Interesting. 23:52
ugexe it sounds like maybe you want to write your own EXPORT function 23:55
although i'm not sure i totally grok what you're trying to do, it sounds like you want to do something at import time based on the arguments passed to `use Main ...` 23:56
cfa i figured the intent behind the request was for something like python's `from foo import bar as baz` 23:57
ugexe yeah not sure that would work quite the same since we usually do our imports via some group name like :DEFAULT (i.e more than one sub) 23:59
cfa for this use MyMod 'bar', is 'bar' supposed to be dynamic?