🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
mykhal c: releases say (1..10).&{ .?expand // .?agile // .?eager } 00:23
committable6 mykhal, ¦releases (56 commits): «(1 2 3 4 5 6 7 8 9 10)␤»
mykhal c: releases say (1..3).Set.keys.sort.join ; say (1..3).Set.sort.keys.join 00:38
committable6 mykhal, ¦releases (56 commits): «123␤012␤»
CIAvash vasko: For that specific example, you can also do `(0..4).map($++ => *²).hash` or `(0..4).kv.map(* => *²).hash` or `(0..4).map(*²).kv.hash`. 06:00
Geth doc: dcbec63a1f | (JJ Merelo)++ | doc/Language/js-nutshell.pod6
Adds requested section, closes #3928
07:32
linkable6 Link: docs.raku.org/language/js-nutshell
Geth doc: f0447e85a6 | (JJ Merelo)++ | doc/Language/js-nutshell.pod6
Addressing @moon-chilled comments #3928
07:38
linkable6 Link: docs.raku.org/language/js-nutshell
Geth doc: 68191b2b57 | (JJ Merelo)++ | doc/Language/modules.pod6
Fixes #3911 link
07:46
linkable6 Link: docs.raku.org/language/modules
AlexDaniel committable6: releases say $*PERL.compiler.version 07:58
committable6 AlexDaniel, gist.github.com/dcf3243800499f0664...181cde700d 07:59
AlexDaniel Altai-man: I think I figured it out. It's probably the case of tag not being pushed (or being pulled) before the commit is fetched
Altai-man: so for whateverable, at the moment of building, 2021.06 didn't exist. I deleted the build and now it shows up correctly 08:00
(deleting a build means it regenerates it in a few minutes)
vasko CIAvash: Nice! The «kv» method looks awesome :) I'm starting to see how the `*` slot works, thanks! 11:52
daxim do we have a moral equivalent of webperl? I want to try out raku in the front-end 13:51
patrickb daxim: I think not. The best there is, is rakudo-js: www.npmjs.com/package/rakudo 14:03
rakudo-js works. Biggest caveats are that it's currently not being actively worked on, and long load times. 14:04
daxim perlpunks.de/paste/show/61055be2.60...66?plain=1 14:19
patrickb Is there a call-if-object-exists-op? something like `$obj.some-meth() if $obj`? 16:07
lizmat .foo with $obj
codesections ($obj//Nil).foo also works, but ^^^ is what I'd go with 16:10
patrickb ($obj//Nil).foo looks strange. Is Nil.foo a noop? 16:15
MasterDuke mostly
codesections Nil.anything returns Nil (but also may have some warnings) 16:16
MasterDuke m: Nil.foo; Nil.push
camelia Use of Nil.push not allowed
in block <unit> at <tmp> line 1
patrickb Ah, understood.
lizmat Nil.push is not allowed, because .push should mutate the invocant, and Nil is immutable
m: Nil.append 16:17
camelia Use of Nil.append not allowed
in block <unit> at <tmp> line 1
lizmat m: Nil.shift
camelia ( no output )
codesections ^^^ despite saying "not allowed", that's still a warning, right?
lizmat m: Nil.pop
camelia ( no output )
lizmat hmmm... looks like we forgot a few
ah, Nil.shift could be considered a .shift on an empty Array, and that returns a Failure 16:18
m: dd [].shift
camelia Failure.new(exception => X::Cannot::Empty.new(action => "shift", what => "Array"), backtrace => Backtrace.new)
lizmat and since Nil is a sort of soft Failure, I guess Nil.shift and Nil.pop are ok
codesections Oh, no, I was wrong: Nil.push is an error (not a warning). It's just runtime rather than compile time 16:19
m: try Nil.push; say $!.raku 16:20
camelia X::AdHoc.new(payload => "Use of Nil.push not allowed")
MasterDuke m: sub a($b) { dd $b }; my $c; .&a with $c; ($c//Nil).&a 16:24
camelia Nil
tbrowder can anyone using emacs tell me how to avoid the editor rerunning all the unicode font prep? i haven't noticed when it happens, but, out of the blue i will open a text file and it takes quite a few seconds to map unicode chars and such. i would capture the messages but i'm never prepared for it when it happens! 18:54
i suspect i need something that's absent in my emacs config files 18:55
but know not what :-( 18:56
CIAvash tbrowder: I'm not sure, but try `(setq inhibit-compacting-font-caches t)` 19:30
tbrowder thnx, will do 19:31
codesections I use emacs but don't do any unicode stuff with it (I use a compose key with xmodmap) so I haven't run into that
I'm surprised that can take so long, though. What's it _doing_ with that time? 19:33
tbrowder well as far as i know i'm not doing anything explicitly unicodey, but i'm mostly a copy/paste guy (except for the regex indexing thing) 19:34
i do have some user files with embedded unicode i read with emacs, so i guess i need to test with those. 19:36
CIAvash: thnx, bye 19:37
ionsolo Hi, someone knowns how can set a variable n times of change? , for example $x only can change 5 times 22:10
lizmat iosolo#0792: use a Proxy and you can add all the logic that you want: docs.raku.org/type/Proxy 23:00
ionsolo Lol, I forget the Proxy class, thanks Lizmat :) 23:20