🦋 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 inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
jorge hi 02:51
can I hack people with raku? 02:52
Voldenet computers maybe, but not people 02:58
nine yet 06:30
moritz working on it? :D 07:42
lizmat is reminded of the final episode of Dollhouse 07:47
"Despite its best efforts, the L.A. Dollhouse has been unsuccessful in stopping the mind-wiping technology from spreading out of control."
"depicts a post-apocalyptic future where the mind-wiping technology of the Dollhouse has developed to the extent that vast numbers of people can be remotely wiped and have new personalities implanted"
en.wikipedia.org/wiki/Dollhouse_(TV_series) 07:48
CIAvash I'm reminded of Ghost in the Shell 07:53
MasterDuke en.wikipedia.org/wiki/The_Left_Hand_(Dollhouse) was a fantastic episode, Victor as Topher was a phenomenal acting job 07:55
also reminiscent of Altered Carbon 07:57
kawaii_ Why does smartmatch against true always match? 09:41
I've got this sub here, which checks a cache first and then a database if nothing returned from the cache, and I wanted a DRYer way of doing the log output than just if/else based on the state of $cached. www.irccloud.com/pastebin/JGXlYhj8/ 09:46
But apparently I can't use `when True` or `when False` here as they always smartmatch? 09:47
MasterDuke `when * === True` should work 09:49
kawaii_ oh, they do, thanks! 09:52
nine kawaii_: it's simply by definition. It's simply useful to have an "always matching" and "never matching" value, .e.g in $my-version ~~ ($desired-version // True) 10:10
moritz kawaii_: if I remember correctly, it was introduced because people wrote things like { $_ > 0 } or * > 0 as smart-matchers, and those return True when evaluated. If smart-match then went on smart-match the original value against that return value, it would confuse the heck out of everyone 14:12
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/05/23/2022-21-math-like/ 14:21
[Coke] lizmat++ 14:29
[Coke] ? Someone just gave me ops? 15:28
tonyo fish sucks 15:44
[Coke] squash: what 16:01
there used to be a bug called "squashable" - gone, yes?
s/bug/bot/
lizmat: in the live log viewer, topic setting shows as just a send from a user, not that the user has set the topic. 16:04
(e.g. raku-doc from a few moments ago)
Geth doc/old-docs: 8e4d915c9b | Coke++ | 3 files
Remove references to Squashatons

  * explainer doc
  * reference in community page, including defunct bot
closes #4066
16:10
doc/old-docs: 55fe1e9973 | Coke++ | 3 files
Revert "Remove references to Squashatons"

This reverts commit 8e4d915c9b1e3654a0cd09f07869f0ffdc4c1fee.
  (Wrong branch, apologies)
16:12
doc: 165ea10539 | Coke++ | 3 files
Remove references to Squashatons

  * explainer doc
  * reference in community page, including defunct bot
closes #4066
lizmat [Coke]: not just on the live view, also on the daily: irclogs.raku.org/raku-doc/2022-05-23.html 17:05
hmmmm
tonyo does finanalyst hang out in here? 17:24
lizmat looks like he last left the channel on 28 Mar 2022 17:26
irclogs.raku.org/search.html?nicks...annel=raku 17:27
guifa Would be there a way to do a pragma for different compilers? Obv we only have Rakudo, so it's pointless, but just thinking if you had code that could be like if $*COMPILER ~~ Rakudo { optimized-NQP-code } else { vanilla-Raku-code } 17:34
I guess maybe Macros could handle that pretty easily
[Coke] finanalyst is mainly an email person, I think. 17:53
He did join the raku-doc call this past weekend, briefly. 17:54
[Coke] guifa: assuming macros were evenly distributed across compilers. 17:54
m: say $*COMPILER
camelia Dynamic variable $*COMPILER not found
in block <unit> at <tmp> line 1
guifa or whatever that dynamic variable was to get at the compiler / VM 17:55
[Coke] but (assuming we find the right var), checking that var is probably easiest.
lizmat m: say Compiler.new.version 17:56
camelia v2022.04.75.g.19.c.3.bd.180
lizmat m: say Compiler.new.backend 17:57
camelia moar
lizmat m: say Compiler.backend
camelia moar
[Coke] m: say Compiler.new.keys; # awww
camelia (0)
lizmat m: say Compiler.^methods 17:58
camelia (TWEAK backend id verbose-config supports-op release codename Str gist name auth version signature desc BUILDALL)
[Coke] m: say Compiler.new.^methods; #ahh
camelia (TWEAK backend id verbose-config supports-op release codename Str gist name auth version signature desc BUILDALL)
[Coke] heh. I did it in another channel by accident, but you beat me to it. :) 17:59
lizmat m: dd Compiler.new.name
camelia "rakudo"
tonyo m: dd $*VM 18:12
camelia VM moar = VM.new(config => {:ar("ar"), :arflags("rcs"), :arout(""), :as("as"), :asm(".s"), :asmout("-o "), :asmswitch("-S"), :auxclean("\@:"), :be("0"), :bindir("/home/camelia/rakudo-m-inst-1/bin"), :booltype("_Bool"), :can_specific_werror("1"), :can_…
tbrowder hi, i have a question about using raku and zef for the debian root user: 19:03
does root have to have its own /root/.raku directory? 19:04
another question: can the zef executable work properly if linked to /usr/local/bin? 19:06
question 3: if root installs a module, where is it stored? 19:08
the questions are somewhat rhetorical since i think the zef standards have changed a bit over the years, and also may be implemented differently between os types and whether they are this 19:10
*third party packages, local installs, or official packages from the OS provider. 19:11
then genesis of my query is the need for spinning up new hosts from a variety of sources such as digital ocean, my favorite bare-iron provider, etc. i would like them all to have the same default behavior: raku (with zef) is installed by root in a location available to all users. when root installs a module with zef, it is installed in the default location for all users to search first. 19:19
i am having problems with inconsistent behavior between my primary host having started with raku/zef many years ago versus a new debian 11 host using the rakudo-pkg installation. 19:23
Xliff m: my % = (a => 1, b => 2, c => 3, d => 4); %a.pairs.map( { .key .= uc if .value %%2 == 0 }); %a.gist.say 19:48
camelia ===SORRY!=== Error while compiling <tmp>
Variable '%a' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> % = (a => 1, b => 2, c => 3, d => 4); ⏏%a.pairs.map( { .key…
Xliff m: my %a = (a => 1, b => 2, c => 3, d => 4); %a.pairs.map( { .key .= uc if .value %%2 == 0 }); %a.gist.say
camelia Cannot modify an immutable Str (a)
in block <unit> at <tmp> line 1
Xliff You can't modify the key of a pair?
Xliff m: my %a = (a => 1, b => 2, c => 3, d => 4); %a.pairs.map( { .value .= succ if .value %%2 == 0 }); %a.gist.say 19:51
camelia {a => 2, b => 2, c => 4, d => 4}
[Coke] m: say 6 %% 2 19:56
camelia True
[Coke] m: say 6 % 2
camelia 0
[Coke] fyi
[Coke] should we remove REA from default zef searches? 23:03
shouldn't dead modules be the sort of thing you have to go looking for?
ah, not just dead but also "slightly out of date but still a prereq for something". nevermind 23:04
grondilu I get an annowing warning "unhandled Failure in DESTROY". 23:15
since it's during destruction, it's kind of hard to debug.
also it's not consistent: sometimes it appears, sometimes not. 23:16
it shows about once at of ten on some minimal code I wrote.
but everytime on the original code. 23:17
here is the "minimal code" : gist.github.com/grondilu/39bcb969f...33a1289049
it's not really small, but hopefully it's clear enough.
I could possibly try to minimalize it more, but since the warning does not show at each execution, it's kind of hard to find the truly minimal version. 23:18
it's for my chess module FYI 23:19
it might be related to github.com/rakudo/rakudo/issues/4852
Xliff_ grondilu: Have you tried adding a "submethod DESTROY { CATCH { default { .message.say; .backtrace.concise.say } }; nextsame }" to class Square? 23:20
grondilu no, I haven't
Xliff_ Let me know if that works for you. 23:21
grondilu I've just tried on my original code, which complains all the time, and I see no differencee 23:22
(actually almost all the time) 23:23
Xliff_ Ah well, it was worth a shot. 23:28
grondilu: You might want to range check your .pred calls 23:31
m: 0.pred.say
camelia -1
Xliff_ m: Nil.pred.say
camelia Nil
Xliff_ m: 'a'.pred.say 23:32
camelia Decrement out of range
in block <unit> at <tmp> line 1
Xliff_ grondilu: ^^
grondilu oh yes but in my original code I had a subset so -1 was supposd to generate an error too 23:32
grondilu edited the gist 23:34
what I don't get is why would DESTROY call .left? 23:36
Xliff_ grondilu: Donno. But sticking a guard on that would effectively kill the Failure. 23:55
tellable6 Xliff_, I'll pass your message to grondilu