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:26
habere-et-disper left
01:07
Manifest0 left
04:38
ACfromTX left
05:09
ACfromTX joined
|
|||
rcmlz | habere-et-disper: did you try to create a nix file (package) that sets up rakudo, zef and packages - like rakudo-star does outside of nix? Or did you try to use rakudo-star from nix? | 08:02 | |
do you have the file you are working on (default.nix, shell.nix, …) on some public space? | 08:03 | ||
Nix and the underlying concepts are not easy to grasp - but addictive. I also fiddle around with NixOS/Nix-Packages on beginners level, perhaps I can have a look. | 08:07 | ||
09:07
Manifest0 joined
11:06
human-blip left
11:08
human-blip joined
|
|||
nahita3882 | today i learned that Raku has a (kind of) built-in identity function: [o] or [∘] | 13:56 | |
can we catch the "potential difficulties" things? is that an error or a warning or something else? | 14:04 | ||
for example: say 02; | |||
antononcube | That is interesting -- I would occasionally "miss" having an identity function in Raku. | 14:13 | |
.landyacht. | I think that’s compile time so probably not | 16:50 | |
nahita3882 | hmm, so I can CATCH some (all?) compile-time errors under, say, .EVAL, but this is like a compile-time warning and there is no mechanism for that? | 17:28 | |
m: CATCH { default { say $_.is-compile-time } }; "&unknown()".EVAL | 17:29 | ||
Raku eval | Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Undeclared routine: unknown used at line 1 | ||
nahita3882 | m: CATCH { default { say $_.is-compile-time } }; Q|&unknown()|.EVAL | ||
Raku eval | 1 | ||
nahita3882 | m: CATCH { default { say $_.is-compile-time } }; Q|02|.EVAL | 17:30 | |
Raku eval | Potential difficulties: Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o2'. If you meant to create a string, please add quotation marks. at /home/glot/EVAL_0:1 ------> 02⏏<EOL> | ||
ab5tract | nahita3882: I think this works? | 19:27 | |
m: BEGIN CATCH { say "caught $_" }; my Int $x = "ok" | |||
camelia | caught Type check failed in assignment to $x; expected Int but got Str ("ok") Type check failed in assignment to $x; expected Int but got Str ("ok") in block <unit> at <tmp> line 1 |
||
ab5tract | but make sure you keep it as a thunk, or else the CATCH is installed underneath the scope you actually intended | ||
Sorry, disregard that as these are not addressing compile time | 19:30 | ||
23:04
swaggboi left
23:10
swaggboi joined
|