🦋 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.
lucs Are there any slots still available for the Advent calendar? (how can I find out?) 00:44
gfldex lucs: github.com/Raku/advent/blob/master...authors.md 00:54
lucs Thanks :)
Nemokosch test 01:29
🥳 01:30
ugexe avuserow++
Nemokosch What does née exactly mean? "also draws on an earlier attempt at a Perl 6 (nee Raku) port (XML::LibXML)." - isn't it rather Raku née Perl 6? 11:31
guifa yeah that's backwards 11:32
it should be Raku née Perl 6 11:33
née is used to indicate someone had a previous name. Most common for women who change their surname upon marriage. So if Jane Smith marries John Doe, you might say Mrs. Jane Doe (née Smith)
comes from French, meaning "born" (if a guy changed his name, it'd be "né", but I've always seen Raku/Perl 6 as femenine, thanks to Camelia) 11:35
lizmat yeah, and in that context in french, it means "born as"
Nemokosch okay, thanks, just a little sanity check. Not sure such a minor README correction is issue worthy 😄 11:44
(Saw it in the LibXML module)
Anton Antonov @guifa Good explanations nee clarifications. Or vice versa ... 12:12
El_Che nothing wrong with a little revisionism and cut the perl 6 references 12:20
guifa I still have a few modules that keep the née Perl 6 on them. The reality is many people are behind the curve when it comes to news, etc., so I'm goign to wait a good while before I start taking it off personally 12:21
guifa would prefer the perl 5 isms to be opt in, instead of opt out though 12:22
The warnings, I mean
lizmat hmmm.. perhaps if you put "isms" in RAKULIB?
Nemokosch good point
I've been thinking that there is one situation where the Perl 6 references could still do good service. And that's education, Hungarian education at the very least, which has always been off the trends. 12:23
If I were to tell a teacher or an institute "hey, why don't you embrace this language you have never heard of", I'd get nowhere 12:24
However, if I said "you know Perl, right? this is the next iteration, it should be quite easy for you to catch up with it", that might even work 12:25
El_Che I love Perl, but sadly it's not a good reference today 12:34
most people haven't seen it, but heard terrible things about it :) 12:35
I have set quite a few young colleagues in their place :)
guifa I sometimes make references where I point out flexibility, or clean syntax, etc, and I mention this is a legacy of Perl
guifa Perl does a lot of things right — it just has a lot of reeeeeeeallly bad code floating out online that gives the wrong impression 12:35
and I'm happy to try to help break those misconceptions where I can, even if I don't use Perl that much these days 12:36
Nemokosch and that's okay - however, there are still places where Perl is "living legacy" without anybody meaning it in a negative way 12:37
as you can expect, these are the places where Raku is unheard of, and will be unheard of for the next 10 years
El_Che where I work they have been migrating of a Perl app for longer than a decade and the end is not in sight 12:38
:)
Nemokosch but... those people might remember that there was a Perl 6 planned, and you might be able to tell them "oh it's long done, just not called that way anymore" 12:39
tbrowder hi, what's the syntax for writing a module test to run its bin/prog file? i've tried "lives-ok { bin/prog }" with and without the bin and other path combos. thnx 13:00
ugexe probably something like `run($*EXECUTABLE, "-I", $*PROGRAM.parent, $*REPO.repo-chain.map({ ("-I", $_).Slip }), $*PROGRAM.parent.child("bin/program.raku"))` 13:08
its not so simple because you dont know how the dependencies to your program are being supplied. i.e. if you are using Test::FooBar in your test it might be fulfilled because its already installed (in which case the `$*REPO.repo-chain.map({ ("-I", $_).Slip })` isnt needed) or via -Isome/path or via $RAKULIB=some/path 13:09
lizmat if it's in a test-script, I think you can assume a -I. has been done already ?
ugexe that doesnt do any good for an external process
i guess if $RAKULIB is set it might be fine depending on when it gets set, but definitely not -I 13:10
ugexe what i personally do is put bin/script code in a module and then test *that*. and direct testing of running the bin/script itself is done via CI while the unit tests test the CLI module 13:13
leont ugexe: that .Slip is a good example of why we should never have deprecated flatmap 13:58
[Coke] wonders if he can close a raku-adjacent GH issue each day 14:37
Nemokosch I read "choose" and I was like..."only one? hard pick!" 14:47
leont: I thought it was only "deprecated" in the sense of "disapproval"
which could be undone without any effect
[Coke] I don't know if .flatmap was only deprecated, or eventually removed. 15:08
avuserow In 2022.07 it still exists and runs without any warnings :shrug: 15:09
m: dd [1, 2, 3].flatmap(*+1)
camelia (2, 3, 4).Seq
leont I remember it warning, but I might be mistaken
It is documented as «This method is deprecated in 6.d and will be removed in 6.e. Use .map followed by .flat instead.» 15:10
tbrowder ugexe: thnx, i like the idea of putting the script code in a module 15:17
which it mostly already is, duh! just test that interface (he says as he slaps his forehead) 15:19
leont And it annoys me greatly because a rather significant percentage of my maps are really flatmaps 15:20
Nemokosch yes well, you have me on this one 15:41
I see no reason whatsoever to remove it
ceterum censeo, fix the smartmatch of Matches instead
melezhik . 16:03
o/
.tell avuserow I created a SparrowCI pipeline to test raku-audio-taglib against different versions of Linux (Alpine/Arch/Debian/Ubuntu) - ci.sparrowhub.io/report/1686 16:04
tellable6 melezhik, I'll pass your message to avuserow
melezhik .tell avuserow let me know if you're interested and I can create a PR 16:05
tellable6 melezhik, I'll pass your message to avuserow
melezhik github.com/melezhik/raku-audio-tag...arrow.yaml
.tell avuserow sorry,  this is correct link - ci.sparrowhub.io/report/1685 16:16
tellable6 melezhik, I'll pass your message to avuserow
Nemokosch leont: moreover, docs.raku.org/type/List#method_flatmap shows no hints of being removed, that's why I remembered it as "only disapproved" 16:39
leont Ah, maybe only Any.flatmap will be removed 16:40
I find the «please use .map( ).flat as it is clear when the .flat is called and is not confusing like .flatmap.» really confusing, as I have no idea what would be confusing about it. 16:44
nd3i Is there a current command line debugger, or should I dive in and try to install comma? 16:47
Back up a step: I'm having trouble getting either raku-debug or rakudo-debug to load my code. While raku -c myfile.raku shows no errors, raku-debug dies with:Unexpected structure of 'when' statement QAST node: 16:51
- QAST::Op(if)  :when_block<?> :statement_id<35> when \"raw\" { }\n\t
  - QAST::Stmts
Nemokosch I hope there is somebody who can help you but that's not me unfortunately 16:53
for leont: I think the idea is that there is .flat.map and .map.flat but anyway, I also don't buy this argument. The question is: will you back me up if I open a revision issue? 16:54
leont Absolutely
Nemokosch also: what do you think of this RT issue that led to the current situation github.com/Raku/old-issue-tracker/issues/5989 ? 16:56
leont I've never wanted the former, and flatmap exists in a number of other languages (including Javascript) where it isn't considered confusing 16:57
Nemokosch because for any change, this needs to be countered
so basically you prefer flatmap over deepmap if this comes up as a dichotomy, do I understand right? 16:58
leont I'm not sure I understand your question 16:59
Nemokosch what is "the former"? 17:00
leont I've never been in a situations where I wanted .flat.map, but I've been in a lot of situations where I've wanted .map.flat
Also, there's an end-weight issue with the latter: a method call after a coderef is very poorly readable IMNSHO (even more so if the coderef is multi-line) 17:01
Nemokosch in my not-so-humble opinion? 😂 17:04
you know, the argument was that "flatmap" reads kinda like "deepmap" and therefore it's confusing. This is the argument to take on
leont I don't see why that would be confusing TBH 17:07
(nor I see why anyone would ever want to do a deepmap, but that's an entirely different discussion) 17:08
Or maybe it isn't different, IDK
nd3i Looks like my question would fit better in the beginner channel. I'll try there.
Nemokosch leont: that's why I asked about it 17:09
here comes a (possibly) funny one: 17:09
> One of the goals in the design of Perl 6 is that it is worse to confuse an expert than a neophyte.
^ and for some reason, this should be read as a con of deepmap? lol 17:10
flatmap*, sorry
tonyo nd3i: do you have a gist? 17:18
nd3i I can make one, but I get the same problem with a one-liner: 17:22
$ raku-debug -e "given 42 { when Int { say 'NUMBER' }}"
>>> LOADING -e
Unexpected structure of 'when' statement QAST node:
tonyo send it
nd3i - QAST::Op(if) <sunk> :when_block<?> :statement_id<2> when Int { say 'NUMBER' } ...
tonyo ah
what's your raku -v? 17:23
m: given 42 { when Int { say "NUMBER" }}
camelia NUMBER
nd3i $ raku -v
Welcome to Rakudo™ v2022.07.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.07.
tonyo moar --version ? 17:24
nd3i $ moar  --version 17:25
This is MoarVM version 2022.07 built with JIT support
Nemokosch1 leont: I think that eventually this is all up to 2 factors:
1. is the deprecation already acted upon, or somebody added it to the documentation while others didn't care?
2. if the deprecation is in (actual) progress, what is somebody willing to do in order to undo it?
tonyo nd3i: can you try `given 42 { when * ~~ Int { say 'number' } }` ?
nd3i $ raku -e "given 42 { when * ~~ Int { say 'number' } }" 17:28
number
$ raku-debug -e "given 42 { when * ~~ Int { say 'number' } }"
>>> LOADING -e
Unexpected structure of 'when' statement QAST node:
- QAST::Op(if) <sunk> :when_block<?> :statement_id<2> when * ~~ Int { say 'number' }
avuserow .tell melezhik sure, a PR would be welcome :)
tellable6 avuserow, I'll pass your message to melezhik
tonyo what is the raku-debug -v? same as raku? strangely raku-debug won't run at all for me. i build from source but am in the same 2022.07 17:29
nd3i  raku-debug -v 17:30
Welcome to Rakudo™ v2022.07.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.07.
tonyo does it work if you do raku-debug and then just run `e given ...` ? 17:31
nd3i BTW, I'm using the "rakudo" package from Arch (AUR), which builds from source on my machine (gcc or maybe clang. Gcc is the default for raku, no?). 17:34
Goal! 17:36
tonyo ?
nd3i $ rakudo-debug
>>> LOADING <REPL 1>
+ <REPL 1> (1 - 1)
| REPL
> e given 42 { when * ~~ Int { say 'number' } }
number
Nemokosch what changed? 17:41
nd3i It works if you first start the debugger, then e (eval) the given/when. 17:44
tonyo that seems like a bug 17:54
nd3i Should I report something? Best practice? (I'm not seeing an up-to-date bug link) 18:11
tonyo i'm not sure if that's a bug in the debugger module or the `rakudo-debug` app 18:12
nd3i Seems like something that more people would have noticed, no?
tonyo i think most people use an IDE
i wonder if you do rakudo-debug <script> with that code in the <script> if it behaves the same
nd3i Well, that was my fall back route. 18:13
I'm not excited by having another complex thing to learn & fiddle with. Maybe I can get by with REPL and "say". 18:14
Thanks for your help! ttfn 18:15
Voldenet for me rakudo-debug doesn't even work 18:25
>Could not find Debugger::UI::CommandLine
not that I'm complaining, it was a foreign feature to me a sec ago 18:26
tonyo that's what i got too, had to zef i 18:29
melezhik . 19:16
tellable6 2022-11-10T17:28:43Z #raku <avuserow> melezhik sure, a PR would be welcome :)
melezhik I started interrogation of Sparrow and Go - allows to write Sparrow tasks in go, compile them in binaries and run from Sparrow - github.com/melezhik/sparrowgo 19:17
interrogation -> integration HA-HA ))) 19:18
melezhik .tell avuserow -  github.com/avuserow/raku-audio-taglib/pull/1 sorry for lot of commits, I guess we can squash them ? 19:42
tellable6 melezhik, I'll pass your message to avuserow
avuserow yeah let's squash them. should be easy to do at merge time I think 19:52
tellable6 2022-11-10T16:04:45Z #raku <melezhik> avuserow I created a SparrowCI pipeline to test raku-audio-taglib against different versions of Linux (Alpine/Arch/Debian/Ubuntu) - ci.sparrowhub.io/report/1686
2022-11-10T16:05:10Z #raku <melezhik> avuserow let me know if you're interested and I can create a PR
2022-11-10T16:16:07Z #raku <melezhik> avuserow sorry,  this is correct link - ci.sparrowhub.io/report/1685
melezhik sure! 19:53
Guest38 Hello! Anyone from Brazil making money in Raku? 20:01
[Coke] The only person I know in Brazil is not. :) 20:07
melezhik LOL )))
[Coke] IME, the best way to make money using Raku is to already be making money, and then use Raku to do it. 20:22
I have introduced several various projects (back through Parrot days) at $dayjobs I already had.
Guest38 Thank you. 20:24
Anton Antonov @Coke Yeah, that is my approach. When I "earn money with Raku" is am basically using Raku to speed-up the invocation or application of my usual workflows. 20:35
[Coke] (y) 20:36
Nemokosch Yes, I'm also trying to use Raku in a similar fashion 21:39
Honestly, mostly as a good shell toolset
El_Che The Red author is a Brazilian 21:42
I had a raku program in prod for 2 years. No longer because its task was done. We moved from Certificate CA and we have hundreds of domains. The raku program identified who was using the old CA and how long they still could use it and send mails how to get a new cert with the new CA and how long their cert would be valid. 21:45
zero problems, hurray for raku
melezhik . 22:05
El_Che ..
melezhik ... 22:06
😁 22:07
Nemokosch 😄 22:19
El_Che ... --- ... 22:21
Nemokosch -.- 22:25
El_Che .-. .- -.- ..- 22:30
melezhik El_Che ---...--- )) 22:39
sortiz m: my %h = a => 1, b =>2; say %h ~~ :2b 22:41
camelia True
El_Che 🐻 in Spanish, it could be useful in Florida :) 22:42
Nemokosch is pod6 extensible? 22:48
guifa it was designed to be 22:55
I think there's one or two modules that take advantage of it but I can't remember them off hand
guifa is afk
melezhik El_Che ++ 23:23
Nemokosch1 > I start to dislike "the ship has sailed" metaphore. it sounds to me as "I don't really need arguments for this" 23:56
El_Che, 2018 23:57