🦋 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 still being worked out. If you're a beginner, check out the #raku-beginner channel!
Set by lizmat on 16 August 2021.
moon-child mjgardner: it's only 3 lines long, there's not really anything there to critique! 00:01
mjgardner I suppose, I just didn’t know if there was any more magic Raku operators or whatever I needed to be aware of. I’m just trying to avoid making a fool of myself before I write a post saying, “Look, this is the better version.” 00:03
00:03 reportable6 joined
moon-child a couple of things that you might not know about--I don't think they would improve the script, but as a point of style you might happen to prefer them-- 00:05
@feeds[0] can be written as @feeds.first or @feeds.head
in 'put $_.title, "\t", $_.link', you can leave off the $_ 00:06
or smoosh the whole thing into one string literal: put "$_.title()\t$_.link()" for...
mjgardner Oh right, you can interpolate method calls. 00:07
I think I’ll do without the smooshing, it’s got more punctuation noise. 00:11
moon-child yeah; I would probably prefer that if there were a lot of literal text alongside the interpolated bits, but not just for one character 00:12
00:49 notable6 joined, benchable6 joined 00:50 squashable6 joined 01:12 lichtkind left 01:32 Kaiepi left 01:33 Kaiepi joined 01:46 monkey_ joined 01:48 Kaiepi left, Kaipi joined, tellable6 joined 01:50 shareable6 joined 01:51 Kaipi left, Merfont joined 01:56 Merfont left 01:58 Kaiepi joined 02:12 Kaipi joined, Kaiepi left 02:28 holyghost left 02:48 Kaipi left 02:49 evalable6 joined, sourceable6 joined 03:10 neshpion left 03:49 releasable6 joined 04:24 holyghost joined 04:45 Gruber joined, gugod left, raydiak left, Grrrr left, Ulti left, Ulti_ joined, raydiak_ joined 04:46 gugod joined 04:48 camelia left, vodkra left, JRaspass left, Tirifto_ left, KotH left, El_Che left, SmokeMachine_ left, Scotteh left, bartolin left, markmarkmark left, KotH_ joined, El_Che_ joined, bartolin_ joined, vodkra_ joined, JRaspass_ joined 04:49 SmokeMachine__ joined, Tirifto joined, JRaspass_ is now known as JRaspass, Scotteh joined 04:50 markmarkmark joined 04:54 monkey_ left 05:12 keutoi joined 06:02 reportable6 left 06:04 reportable6 joined 06:36 abraxxa joined 06:42 abraxxa left 06:43 abraxxa joined 06:55 Sgeo left 07:22 Manifest0 joined 07:36 dakkar joined 07:48 eseyman left 07:58 eseyman joined
Geth doc: e13f656fba | (JJ Merelo)++ | doc/Language/5to6-perlfunc.pod6
Clarify differences between ucfirst vs tc and tclc

This closes #3933.
08:33
linkable6 Link: docs.raku.org/language/5to6-perlfunc
doc: 2e3006c502 | (JJ Merelo)++ | doc/Type/Cool.pod6
Revision of the definition of log2 and log10

Triggered by #3929, I didn't really find the error; however, there were some minor issues with the definition and the grammar. Anyway, this closes #3929.
08:34 linkable6 left, linkable6 joined 08:36 frost joined 08:50 dakkar left, dakkar joined
Geth doc: 916875f833 | (JJ Merelo)++ | doc/Language/haskell-to-p6.pod6
Adds description of takeWhile

With a specific example suggested by @mykhal in issue #3932. Also, closes #3932
09:01
linkable6 Link: docs.raku.org/language/haskell-to-p6
09:01 linkable6 left 09:03 linkable6 joined 09:56 lichtkind joined 10:03 raydiak_ is now known as raydiak 10:05 Xliff joined 10:06 keutoi_ joined 10:07 keutoi left 10:29 xinming left 10:37 sena_kun joined 11:14 jjido joined 11:19 keutoi_ is now known as keutoi 11:44 jjido left 12:02 reportable6 left 12:09 frost left 12:26 frost joined
lizmat and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2021/08/23/2021-34-stabler/ 12:29
12:30 guffiardon joined 12:44 keutoi left 12:55 keutoi joined
sjn yay! lizmat++ # RWN 12:57
12:57 Pipirok joined, Pipirok left
tib lizmat++ 13:04
13:05 reportable6 joined 13:10 frost left
Altreus it's a great consolation for the fact it's Monday 13:19
13:35 keutoi_ joined 13:36 keutoi left, keutoi_ is now known as keutoi 14:06 Xliff left 14:14 guffiardon left 14:18 Sgeo joined 14:28 MoC joined 14:56 xinming joined 15:02 camelia joined
codesections m: say "this.uc() works"; 15:36
camelia this.uc() works
codesections er, 15:37
6c: say "word.uc() is"; 15:39
committable6 codesections, ¦6c (57 commits): «word.uc() is␤» 15:40
Altreus I don't think that's how it works :D
codesections Odd. Memory must be playing tricks on me. nevermind. 15:41
Altreus you can run methods in interpolation, but only on external objects, which chars within the string are not 15:43
6c: say "{ 'word'.uc() } is" ## maybe this? 15:44
...
committable6 Altreus, ¦6c (57 commits): «WORD is␤»
Altreus !
codesections oh, I remember now. I was thinking of this: 15:45
Altreus m: my $word = 'word'; say "$word.uc() is" ## also this?
camelia WORD is
codesections that
Altreus yeah, the thing has to be being interpolated already :)
codesections indeed, that's what was temporarily slipping my mind 15:46
Altreus I quite like the new rules for interpolation. They make it very simple to separate the parts
m: my $word = 'word'; say "{ $word }.uc() is" ## just text
camelia word.uc() is
Altreus none of this ${ symbol name }, or maybe it was @{ symbol } or oh I've gone crosseyed
codesections indeed. And they make is easy to decide when to create new scopes 15:47
Altreus m: say "{[ <what does this do> ]}"
camelia what does this do
Altreus ehehe
codesections m: for 0..5 { say "$($++) | {$++}" } 15:48
camelia 0 | 0
1 | 0
2 | 0
3 | 0
4 | 0
5 | 0
Altreus that'll presumably be the values of $0, $1 etc? 15:49
or just the value of a variable literally called $++?
m: my $'$++' = ':('
camelia 5===SORRY!5=== Error while compiling <tmp>
Name must begin with alphabetic character
at <tmp>:1
------> 3my $7⏏5'$++' = ':('
expecting any of:
constraint
infix
infix stopper
postfix
Altreus phew
codesections it's the $ variable in scalar context 15:50
Altreus why is the second half always 0 though 15:51
codesections because {...} creates a new scope, and resets $
gfldex Quote constructs dont share scope.
codesections m: for 0..5 { say "$($++) | {++$}" } 15:52
camelia 0 | 1
1 | 1
2 | 1
3 | 1
4 | 1
5 | 1
Altreus oh, it's not the $ from the for
gfldex m: for 0..5 { say ($($++) | {++$}) }
camelia any(0, -> ;; $_? is raw = OUTER::<$_> { #`(Block|74173264) ... })
any(1, -> ;; $_? is raw = OUTER::<$_> { #`(Block|64390616) ... })
any(2, -> ;; $_? is raw = OUTER::<$_> { #`(Block|64390688) ... })
any(3, -> ;; $_? is raw = OUTER::<$_> { #`(Bloc…
Altreus it's a "block" within the string with its own $
gfldex m: for 0..5 { say ($($++) | {++$}() }
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3for 0..5 { say ($($++) | {++$}() 7⏏5}
expecting …
gfldex m: for 0..5 { say ($($++) | {++$}.() }
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3for 0..5 { say ($($++) | {++$}.() 7⏏5}
expecting…
gfldex m: for 0..5 { say ($($++) | {++$}.()) } 15:53
camelia any(0, 1)
any(1, 1)
any(2, 1)
any(3, 1)
any(4, 1)
any(5, 1)
codesections Altreus yep, exactly
Altreus okay, so how come the first one maintains state and the second one doesn't :x
apologies if this is raku 101
I feel like it's more likely to be 301 though 15:54
gfldex i agree
andinus second one is its own block {}
gfldex But then, I'm a Raku beginner since 2008.
Altreus :D
codesections because $(…) *doesn't create a new scope — which makes $(...) handy for things that want to access the outer scope
it's a context, not a block
(like @ or %) 15:55
Altreus ooohh $() *is* the $ from the for block, but {} is a new block each iteration
and that's where the state of $ is held
gfldex m: for 0..5 { say ($($++) , {++$}.()) }
camelia (0 1)
(1 1)
(2 1)
(3 1)
(4 1)
(5 1)
Altreus so $ is basically just "A container for this block to make use of"
codesections yeah, exactly 15:56
docs.raku.org/language/variables#The_$_variable
Altreus nodnod
gfldex m: for 0..5 { say ($($++); say {++$} }
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3for 0..5 { say ($($++); say {++$} 7⏏5}
expecting…
gfldex m: for 0..5 { say $($++); say {++$} }
camelia 0
-> ;; $_? is raw = OUTER::<$_> { #`(Block|80142560) ... }
1
-> ;; $_? is raw = OUTER::<$_> { #`(Block|80142848) ... }
2
-> ;; $_? is raw = OUTER::<$_> { #`(Block|80142920) ... }
3
-> ;; $_? is raw = OUTER::<$_> { #`(Block|80142992) ...…
gfldex It's a little more complex in this case because the block is stored as a code object. And {} is the thing that created code objects, unless they are in sink context. 15:57
Altreus oh no, I misunderstood slightly - "Each reference to $ within a lexical scope is in effect a separate variable"
So you have as many of them as times you use them because Raku is somehow magic and can identify a variable by where it's used as well as what it's called 15:58
gfldex Anonymous variables are special cased.
Altreus special octarine case 15:59
octiron?
yes, octiron
16:02 evalable6 left
gfldex m: for 0..5 { say $($++); put {++$} } 16:07
camelia 0
Block object coerced to string (please use .gist or .raku to do that)

1

2

3

4

5

in block at <tmp> line 1
Block object coerced to string (please use .gist or .raku to do that)
in block at <tmp> line 1
Block…
gfldex Altreus: please note that say is kinda special, thanks to it's `is raw` argument. 16:08
Altreus ah, put is say without gist behaviour? 16:14
gfldex yes
Altreus oh, say is documented as such
have to remember that in future 16:15
gfldex And gist on lists wont return more then 100 elements. If I where to design assignments for Raku hires (one can dream!), I would make sure to have the fine candidate to output a list with 101 elements. :-> 16:16
Geth doc/master: 5 commits pushed by (JJ Merelo)++ 16:18
Altreus I followed a twitter link from the daily and it segfaulted my browser tab 16:21
lizmat Altreus interesting... which one ? 16:22
Altreus this one, but I think it's generically Twitter sucking rather than the link in particular twitter.com/markjgardner/status/14...4619587584
lizmat yeah, looks like
Altreus It might be due to the number of criminally bad takes on climate change that Twitter thinks I want to see 16:23
Apparently a tweet involving the word "uninformed" means I want to see lots of other uninformed people with a platform
gfldex If you must change the climate, please change it back!
I had to get myself a cosy blanket, jut because we had the windows open. 16:24
Altreus lizmat: you have far more patience on Twitter than I do 16:25
lizmat perhaps.. :-)
16:31 dakkar left
Geth doc: f5c9535d2e | (JJ Merelo)++ | doc/Type/Cool.pod6
Actually fixing #3929

Thanks @mabiggar for clarification.
16:33
linkable6 Link: docs.raku.org/type/Cool
16:34 linkable6 left 16:36 linkable6 joined 16:45 jess joined 17:04 evalable6 joined 17:05 guillardo joined 17:14 b2gills left 17:15 b2gills joined 17:22 abraxxa-home joined 17:30 Kaiepi joined 18:03 reportable6 left 18:06 sena_kun left 18:14 keutoi left 18:25 abraxxa-home left 18:35 neshpion joined, neshpion left 18:36 neshpion joined 18:45 guillardo left
nine Rakudo 2021.08 is now also available in openSUSE Tumbleweed. Just: zypper in rakudo 18:55
Rakudo 2021.08 is now also available in openSUSE Tumbleweed. Just: zypper in rakudo 18:58
lizmat whee! 19:03
19:07 japhb left
lizmat PSA: I have just transferred the IRC::Client module from raku-community-modules to my account 19:18
I intend to work on it the coming days and release a new version updated to the latest and greatest Raku features
gfldex :o 19:19
codesections lizmat++
19:23 MahBot joined
lizmat MahBot: hello 19:24
MahBot lizmat, HELLO
19:24 MahBot left
El_Che_ lizmat++ nine++ 19:29
19:34 japhb joined 19:52 MoC left 20:05 reportable6 joined 20:48 gordonfish- joined 20:50 gordonfish left 21:12 ecocode left 21:13 ecocode joined 21:20 japhb left 21:37 jjido joined 21:52 tejr left 21:56 japhb joined 21:59 tejr joined 22:02 gordonfish- is now known as gordonfish 23:02 linkable6 left, coverable6 left, unicodable6 left, nativecallable6 left, reportable6 left, evalable6 left, releasable6 left, benchable6 left, squashable6 left, quotable6 left, greppable6 left, notable6 left, shareable6 left, bloatable6 left, sourceable6 left, statisfiable6 left, tellable6 left, bisectable6 left, committable6 left 23:03 committable6 left, reportable6 joined, nativecallable6 joined, coverable6 joined, quotable6 joined, shareable6 joined, greppable6 joined, notable6 joined, linkable6 joined 23:04 committable6 joined, unicodable6 joined, benchable6 joined