🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
guifa_ habere-et-disper you can do some cool chaining with it 00:02
m: sub triple($x) { $x * 3 }; sub half($x) { $x / 2 }; say half triple 10 00:03
camelia 15
guifa_ is the same as say(half(triple(10)))
lucs What's a nice way to see whether $some-number.log($some-base) evaluates to an round integer? 03:03
avuserow m: say 5.log(2) == 5.log(2).floor; say 4.log(2) == 4.log(2).floor; # lucs: maybe use .floor like this? 05:02
camelia False
True
avuserow not sure that we have a method to easily get the fractional part 05:06
do we have a task queue in raku, along the lines of celery (python) or minion (perl5)? I want something on the simpler end of things, which can run a few workers in parallel and do some retries if a task fails 05:11
Nemokosch I mean, it's a feature if anything that I "hijacked" HTML::Tag that wouldn't even install anymore. If you always have to specify the auth and the version - let alone in your code, not even your dependencies - we are essentially back to unique names that are even ugly 06:35
lucs: you can narrow down the type of a variable and check if you get to integers 06:42
Nemokosch m: dd 10.log(2).narrow ~~ Int; dd 32.log(2).narrow ~~ Int; 06:43
camelia Bool::False
Bool::True
Nemokosch > not sure that we have a method to easily get the fractional part 06:46
I also don't know but % 1 works
> do we have a task queue in raku, along the lines of celery (python) or minion (perl5)? I want something on the simpler end of things, which can run a few workers in parallel and do some retries if a task fails 06:48
avuserow: not sure because I don't know these modules BUT
it sounds like something that might be built-in in Raku, since Raku supports parallelizing your code natively
jjatria Nemokosch: I guess that's the big question: is the fact that even in a "trusted" ecosystem anyone can "hijack" a distribution a feature or a bug? 08:35
tellable6 jjatria, I'll pass your message to Nemokosch
lizmat one can hijack indeed, but only code that doesn't specify "auth" in their use statement, would be vulnerable 08:37
Nemokosch "vulnerable" or "reliable", you name it 08:39
because a module that can take my version of HTML::Tag instead of the original HTML::Tag will continue to work while the one that specified the old auth will not
and anyway, what else would be the reason to let you "hijack" a module, if not this? 08:40
jjatria I think this _is_ the reason the feature was added 08:41
Nemokosch if the only reason is that you can give the same name to a module "for the lolz", AND THEN you'll have to specify auth anyway, that's actually worse than just downright banning name conflicts
because that is just an ugly way _to ban name conflicts_ 08:42
jjatria But I still think that Raku should maybe warn if it sees a bare `use HTML::Tag` in an environment where multiple HTML::Tag distributions with different `auth` are installed
Nemokosch Yes, that makes sense 08:43
I'm just "worried" (maybe this is a strong word) that the end goal is to make auth and maybe even ver mandatory in code 08:44
jjatria I would imagine we'd lean more towards "you can choose not to use them, as long as you understand the risks", and recommend it for stuff that should run in production 08:45
Nemokosch which IS essentially banning name conflicts, with extra steps
jjatria That seems to mesh with the rest of the "enough rope to shoot yourself in the foot" attitude 08:46
I just don't think enough people understand the risks, because I don't think any other language's ecosystem works quite like this 08:47
Nemokosch I'd think that the same people also don't understand the supposed benefits. I'm also at the point where I'm not sure how much this "allow name conflicts" was meant as a feature 08:50
How much it is intentional that one has the chance to replace a module - which _can_ be a good thing, mind you
jjatria What's the state of those `supersedes` and `superseded_by` fields in S22? design.raku.org/S22.html#supersedes 08:51
lizmat NYI 08:52
jjatria First (relatively) auto-release of PublicSuffix it out! :D 10:15
Still have to come up with a better setup than a local cronjob, but anyway
ugexe Nemokosch: its all very intentional and somewhat related to the dbic ownership problem from years ago, not "for the lolz" 12:06
tellable6 ugexe, I'll pass your message to Nemokosch 12:07
ugexe jjatria: i had a pr open that implemented `emulates` that likely was much of the work of implementing `supersedes` 12:10
there are so many conflicts now though that it probably isn't very useful
github.com/rakudo/rakudo/pull/2732 12:17
i guess its still useful as a blueprint for a new pr 12:18
lucs avuserow: Thanks (for the log/integer answer). 13:02
Nemokosch: Thanks too.
tellable6 lucs, I'll pass your message to Nemokosch
jjatria What do CUR, CURI, and CURFS stand for? 13:48
lucs jjatria: The answer here mentions them: stackoverflow.com/questions/666159...ku-modules 13:52
docs.raku.org/type/CompUnit 13:54
Geth doc: 9c7470bff1 | Coke++ | doc/Language/list.pod6
Use less flowery text

Closes #4083, pmrobotics++
16:43
linkable6 Link: docs.raku.org/language/list
Geth doc: 74508673dd | Coke++ | lib/Pod/Convenience.rakumod
Track code deprecation notice.

Since we theoretically track the version of rakudo each release, don't have to worry about older rakudo versions.
16:49
Nemokosch japhb: how does the history in Terminal::LineEditor work? It's longer than the current repl session but it's not exactly the last commands of the last session, either 17:02
avuserow @Nemokosch: sure, raku's built in concurrency features makes this a lot easier. but a lot of this is about running this separately from e.g. your main web server process so you can do long running tasks and not lose them when you restart your web server. then there's also the boring business logic of having a database record of the task, if it succeeded, any results, etc. 17:04
japhb Nemokosch: Better to ping me directly from IRC. irssi (my IRC client) doesn't highlight anything the bridge bot says, so I can easily miss stuff. (And this channel is too chatty to read everything all the time.) 18:56
tellable6 japhb, I'll pass your message to Nemokosch
japhb Refreshing my memory about how history was linked into the REPL
OK, the code that handles Terminal::LineEditor in the REPL is here: github.com/rakudo/rakudo/blob/mast...L.pm6#L103 19:01
Looking at line 406 in that file, it looks to me like the line editor (of whatever type) does not get a chance to do any cleanup if you exit via ^C ^C. 19:05
(And for Linenoise and Terminal::LineEditor, that "cleanup" includes writing out the most recent history updates.)
Nemokosch sometimes, even ctrl+c is enough to exit 20:57
Geth ecosystem: 3721f80d4a | (Richard Hainsworth)++ (committed using GitHub Web editor) | META.list
Update Meta.list migrating Collection-R...

Migrating Collection-Raku-Documentation to fez
22:21
habere-et-disper How many operators does raku have? Can I ask the REPL? 23:49
guifa_ I don't think you can ask REPL, but it has a lot lol 23:57
docs.raku.org/language/operators should list most all of them in that initial table 23:59