This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:18 raiph joined 00:50 Manifest0 left 01:20 raiph left
Yeuph is there a way to set an interval for a range? 01:28
I think I remember it
like 2..4..16 01:29
so I get 2, 4, 6, 8, 10, etc
shmup 2, 4, ..., 16 maybe. i forget im stlil new 01:33
Yeuph yeah its something like that
I don't need to do it right now but it's just been nagging at me lol 01:34
shmup [5] > 2,4...16
(2 4 6 8 10 12 14 16)
m: 2,4...10 01:35
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 32,4...⏏510
guifa_ make sure if doing the interval with a range that your final value is actually in the series 01:45
m: my @a = 2, 4, ... 11; say @a[10]
camelia Potential difficulties:
Comma found before apparent sequence operator; please remove comma (or put parens around the ... call, or use 'fail' instead of ...)
at <tmp>:1
------> my @a = 2, 4,⏏ ... 11; say @a[10]
11
in bl…
guifa_ m: my @a = 2, 4 ... 11; say @a[10] 01:46
camelia (Any)
guifa_ Errr we used to stop when smartmatching it. I guess lizmat did fix that to DWIM
02:00 frost joined 02:02 frost left 02:16 frost joined 02:19 frost left 02:29 human-blip left 02:45 rf left 02:47 human-blip joined 02:53 deoac left
el gatito (** advocate) 2, * + 4 ... * >= 16 02:59
2 is the initial value, * + 4 is the update callable, * >= 16 is the stop condition 03:00
also i noticed i can create factorial using ... it will just look ugly 03:12
m:perl say ({n => 0, r => 1}, {($_<n> + 1) * $_<r>} ... *)[10]<r> 03:15
Raku eval Exit code: 1 Type Int does not support associative indexing. in block <unit> at main.raku line 1
el gatito (** advocate) m:perl say ({n => 0, r => 1}, {{n => $_<n> + 1, r => ($_<n> + 1) * $_<r>}} ... *)[10]<r> 03:16
Raku eval Exit code: 1 Type List does not support associative indexing. in block at main.raku line 1 in block <unit> at main.raku line 1
el gatito (** advocate) m:perl say ({n => 0, r => 1}, {%(n => $_<n> + 1, r => ($_<n> + 1) * $_<r>)} ... *)[10]<r> 03:17
Raku eval 3628800
el gatito (** advocate) m:perl say ((0, 1), -> ($n, $res) {($n + 1) * $res} ... *)[10]<r> 03:19
Raku eval Exit code: 1 Cannot unpack or Capture `1`. To create a Capture, add parentheses: \(...) If unpacking in a signature, perhaps you needlessly used parentheses? -> ($x) {} vs. -> $x {} or missed `:` in signature unpacking? -> &c:(Int) {} in block <unit> at main.raku line 1
el gatito (** advocate) m:perl say ((0, 1), -> ($n, $res) {($n + 1, ($n + 1) * $res)} ... *)[10]<r> 03:20
Raku eval Exit code: 1 Type List does not support associative indexing. in block <unit> at main.raku line 1 03:21
el gatito (** advocate) m:perl say ((0, 1), -> ($n, $res) {($n + 1, ($n + 1) * $res)} ... *)[10][1]
Raku eval 3628800
03:23 frost joined
el gatito (** advocate) m:perl say ( (0, 1) , -> ($n, $res) {($n + 1, ($n + 1) * $res)} ... *)[10][1] 03:23
Raku eval Exit code: 1 * in block <unit> at main.raku line 1
el gatito (** advocate) what 03:24
m:perl say ( (0, 1) , -> ($n, $res) {($n + 1, ($n + 1) * $res)} ... *)[10][1]
Raku eval 3628800
el gatito (** advocate) this is way more readable
03:34 frost left
but still 03:47
04:32 camelia left 04:40 camelia joined 06:49 frost joined 06:52 frost left 07:02 thowe left, thowe joined 08:52 frost joined 08:53 frost left 08:57 Manifest0 joined 09:37 habere-et-disper joined
habere-et-disper The latest rakudo star 2023.02 fails to build for me with: 09:38
Experimental "my" subs not enabled at /private/var/folders/rb/43pg1z6j64dfr5w50fz8pns80000gp/T/tmp.SG33WUH2/3rdparty/nqp-configure/lib/NQP/Config.pm line 1519.
Compilation failed in require at Configure.pl line 33.
BEGIN failed--compilation aborted at Configure.pl line 33.
my sub on_stdout {
    print join("", @_) if $verbose;
    $last_out_at = time;
}
Any workarounds ?
Nahita hi habere-et-disper, what's the version of Perl you use? 09:42
habere-et-disper v5.18.2 09:43
Too old ?
Nahita it seems so 09:44
perldoc.perl.org/5.28.2/feature#Th...s'-feature
from 5.26+, "my" subs are enabled by default
habere-et-disper Retrying compile with newer perl...
Nahita but for 5.18+ to 5.26, one needs to opt for it explicitly
habere-et-disper Thanks!
Nahita np hope it works 09:45
habere-et-disper It takes ~30min to compile... I'll report back.
Nahita ooh, okay
habere-et-disper Okay -- so that compiled okay. Whew! :) 10:29
We have a few modules that failed to install. Should I try zef install them? They are:
  rakudoc
  Log
  Log-Colored
  Terminal::LineEditor 10:30
  IO-Path-XDG
  Config
  Config-Parser-toml
  Config-Parser-yaml
  Config-Parser-json
  DBIish
  Perl6-PathTools
  OpenSSL
  IO-Socket-SSL
  PSGI
  HTTP-Easy
  Temp-Path
During compile these things appeared missing: 10:31
Config::Parser
Text::MiscUtils::Layout
IO::Socket::SSL
Digest::SHA
HTTP::Easy::PSGI
lizmat habere-et-disper: please file issues for the problems you've found 10:38
habere-et-disper Filed as 5219, and 5220: 12:05
github.com/rakudo/rakudo/issues/5219
github.com/rakudo/rakudo/issues/5220
lizmat Thanks, moved them to the Star repo 12:10
habere-et-disper Merci ! 12:13
12:30 frost joined 12:32 frost left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/02/27/2023-...u-renewed/ 13:12
habere-et-disper Thank you @lizmat ! Always good reading. :) 13:18
13:32 habere-et-disper left 13:52 rf joined 16:16 jgaz joined 16:37 NemokoschKiwi joined 16:58 NemokoschKiwi left 17:02 habere-et-disper joined 17:13 jgaz left 17:18 ab5tract joined 17:26 ab5tract left 17:32 habere-et-disper left 17:41 raiph joined 17:45 jgaz joined
shmup i need to fix this irssi bot renamer script lol. an extra > really messes it up ;) bad regex 17:55
18:06 ab5tract joined 19:32 habere-et-disper joined 19:43 raiph left 20:22 habere-et-disper left 20:30 Jit joined, Jit left 21:20 siberia-man joined 21:25 siberia-man left 22:04 raiph joined 23:48 raiph left 23:54 jgaz left
Yeuph why does this work: class IsEven { has $.num; method CheckEven { if (%($!num, 2)) {say 'Is Even';} else {say 'Is Odd';} } } 23:59