🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
rypervenche Hmm, that seems to do the same as what I had when I remove the %(). That produces an array of lists. If do: @dir-pairs = @dir-pairs».Hash; that gets the desired outcome, albeit in an extra line. 00:11
rypervenche Ahh, I'm an idiot. I can just add that to the end of the line: my @dir-pairs = (( "before" X=> @before ) Z ( "after" X=> @after ))».Hash; 00:56
That works. :) Thanks for all the help.
Geth doc: 0980a9cf7d | (JJ Merelo)++ | doc/Type/Failure.pod6
Marks as unhandled a handled failure if fail is called on it refs #2632
08:10
linkable6 Link: docs.raku.org/type/Failure
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
samebchase- What's the idiom for: "if a key is not found in the map, return this default value instead". I am messing around with the ternary operator, but it seems I am repeating myself 10:19
my $val = %m<key>:exists ?? %m<key> !! 'default'; 10:20
what's an elegant way to type %m<key> only once 10:21
lizmat m: my %h is default(42) = a => 42; dd %h<a b> 10:22
camelia (42, 42)
lizmat m: my %h is default(42) = a => 66; dd %h<a b>
camelia (66, 42)
lizmat samebchase ^^ 10:24
samebchase- lizmat: nice! I want the behaviour "check if this value is in the map, or return this other value instead". The 'default' value has no connection to the map.
%m<key> or 'value' <-- this behaviour works in some languages
lizmat you mean only for that particular key?
assuming you do not have undefined values in the hash, you could use // 10:25
m: my %h; dd %h<a> // 42
camelia 42
samebchase- lizmat: yes!!! that is what I need
MasterDuke m: my %h; dd %h<a> // 42; dd %h # just showing it doesn't auto-vivify the given key 10:26
camelia 42
Hash %h = {}
lizmat MasterDuke: auto-vivification is much smarter in Raku
m: my %h; my $b = %h<a>; dd %h; $b = 42; dd %h 10:27
camelia Hash %h = {}
Hash %h = {}
lizmat m: my %h; my $b := %h<a>; dd %h; $b = 42; dd %h
camelia Hash %h = {}
Hash %h = {:a(42)}
samebchase- The defined-or operator is probably my favourite operator 10:30
samebchase- What's the closest we have to `python3 -m http.server` where it serves the current directory? 11:09
jmerelo samebchase-: probably something with Cro::HTTP, but there's nothing in the standard library 11:11
samebchase- thanks jmerelo 11:16
oddp Although quite a bit to digest for a noob like me, I really liked the latest grant report. Thanks for powering through with all that work! 17:56
lizmat oddp: it's quite a bit to digest for most :-) 18:03
cpan-raku New module released to CPAN! LibXML (0.5.0) by 03WARRINGD 18:34
New module released to CPAN! LibXSLT (0.1.0) by 03WARRINGD 18:42
Altai-man_ releasable6, status 21:11
releasable6 Altai-man_, Next release in ≈2 days and ≈21 hours. There are no known blockers. 143 out of 292 commits logged (⚠ 4 warnings)
Altai-man_, Details: gist.github.com/724bba04e9c46eba3d...dc5db25faa
cpan-raku New module released to CPAN! Sparrow6 (0.0.23) by 03MELEZHIK 21:17
New module released to CPAN! Sparrow6 (0.0.24) by 03MELEZHIK 21:24
melezhik .tell El_Che - fyi - www.reddit.com/r/azuredevops/comme...perations/ 21:29
tellable6 melezhik, I'll pass your message to El_Che
melezhik upss, I meant to post it to r/rakulang .... :-)) 21:32
melezhik reposted - www.reddit.com/r/rakulang/comments...perations/ 21:35
raku-bridge <DataKinds> just saw the work on zeco, real cool stuff 21:51
<DataKinds> i'd be happy to lend a hand if y'all need it (cc: tony-o)
<DataKinds> has there been any more work on macros since masak's 007? 21:58
Altai-man_ Have you seen jnthn's presentation on RakuAST? 22:07
See jnthn.net/papers/2020-gpw-realizing...macros.mp4
melezhik .tell El_Che - I've create home project and call it Spazure - Sparrow automation for Azure DevOps ))) - github.com/melezhik/Spazure 22:09
tellable6 melezhik, I'll pass your message to El_Che
raku-bridge <DataKinds> Altai-man_: got a Youtube link? streaming video doesn't work super well on mobile 22:14
Altai-man_ No youtube. 22:44