🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left
00:01
reportable6 joined,
djerius left
00:02
djerius joined
00:28
jpn joined
00:38
ab5tract left
00:51
jpn left
00:54
discord-raku-bot left,
discord-raku-bot joined
01:03
xinming left
01:04
xinming_ left
01:05
xinming joined,
xinming_ joined
01:13
Manifest0 left
01:15
jjido left
01:17
jpn joined
01:19
swaggboi left
01:23
NemokoschKiwi joined,
jpn left,
NemokoschKiwi left
01:36
jpn joined
01:43
NemokoschKiwi joined
01:45
swaggboi joined
01:51
jpn left
01:53
Guest5498 is now known as Sauvin
01:54
NemokoschKiwi left,
discord-raku-bot left,
discord-raku-bot joined
02:03
discord-raku-bot left,
discord-raku-bot joined
02:05
jpn joined
02:08
discord-raku-bot left,
discord-raku-bot joined
02:10
japhb left
02:11
jpn left
02:17
jaguart left
02:18
jaguart joined,
japhb joined
02:24
jpn joined
|
|||
jaguart | rf: lol - I know that feeling :) | 02:25 | |
02:30
jpn left
|
|||
rf | jaguart: Yeah I wasn't even running the right code lol, I was targeting another block without even knowing | 02:32 | |
02:45
razetime joined
02:48
jpn joined
|
|||
PipStuart | Nemokosch: Sorry I missed the "c" in your nick twice. My oversight. | 02:52 | |
tellable6 | PipStuart, I'll pass your message to Nemokosch | ||
02:54
jpn left
03:01
rf left
03:18
jpn joined,
discord-raku-bot left
03:19
discord-raku-bot joined
03:26
jpn left
03:38
jpn joined
03:53
jpn left
04:06
jpn joined
04:12
jpn left
|
|||
ispyhumanfly | Hey all, are their any good/recommended CLI frameworks for Raku? | 04:22 | |
tellable6 | 2023-01-18T19:33:38Z #raku <tonyo> ispyhumanfly no problem. i have a fix for that bug in progress | ||
hey ispyhumanfly, you have a message: gist.github.com/33b390c3a9593b641a...63abab2213 | |||
ispyhumanfly | tonyo: Great, I'll grab the fix when ready. | ||
04:25
jpn joined
|
|||
jaguart | not sure about CLI frameworks, but when I'm big I'm going to be like github.com/ugexe/zef/blob/main/lib...LI.rakumod | 04:29 | |
I also quite like App::Mi6 - ala `my $app = App::Mi6::App.new; multi sub MAIN ... { $app.cmd('build') }` approach | 04:31 | ||
ispyhumanfly | jaguart: haha | 04:32 | |
jaguart: jaguart: Thank you. I'll dig into your comments.. | 04:35 | ||
04:43
jpn left
04:57
jpn joined
05:03
jpn left
05:04
epony joined
05:26
jpn joined
|
|||
CIAvash | tonyo: Thanks, it's been updated, should I close the issue or you'll do it? | 05:43 | |
06:00
reportable6 left
06:02
reportable6 joined
06:04
jpn left
06:54
discord-raku-bot left
06:55
discord-raku-bot joined
06:59
discord-raku-bot left,
discord-raku-bot joined
07:00
samcv left
07:04
razetime1 joined,
razetime left,
razetime1 is now known as razetime
07:18
jpn joined
07:23
jpn left
07:31
abraxxa joined
07:36
abraxxa left,
abraxxa joined
07:54
discord-raku-bot left
07:55
discord-raku-bot joined
08:08
jpn joined
08:13
jpn left
08:21
Homer_Simpson joined
08:28
Sgeo left
08:32
sena_kun joined
08:37
jjido joined
08:48
swaggboi left
08:51
jjido left
08:55
discord-raku-bot left,
discord-raku-bot joined
09:02
swaggboi joined
09:11
dakkar joined
09:22
ab5tract joined
09:29
razetime left
09:33
ab5tract left
09:37
archenoth joined,
Oshawott left
10:04
lichtkind joined
10:17
woosaaahh[m] joined
10:18
jpn joined
10:19
ab5tract joined
|
|||
jjatria | Nemokosch: what's up? | 10:19 | |
tellable6 | jjatria, I'll pass your message to Nemokosch | ||
10:24
Manifest0 joined
10:32
ab5tract left
10:38
discord-raku-bot left,
discord-raku-bot joined
11:32
discord-raku-bot left,
discord-raku-bot joined
11:41
ab5tract joined
11:50
dogbert11 joined
11:53
dogbert17 left
11:57
dogbert17 joined
12:00
dogbert11 left,
reportable6 left
12:02
dogbert11 joined
12:03
reportable6 joined,
dogbert17 left
12:06
ab5tract left
12:08
ab5tract joined
12:21
Homer_Simpson left
12:34
ab5tract left
12:42
jpn left
12:43
jpn joined
13:07
jpn left
13:28
jpn joined
13:34
jpn left
13:38
discord-raku-bot left,
discord-raku-bot joined
13:42
jpn joined
13:48
simcop2387 left
13:53
simcop2387 joined
14:06
Sgeo joined
14:34
Homer_Simpson joined
14:38
discord-raku-bot left,
discord-raku-bot joined
14:45
codesections left
14:46
sftp left,
sftp joined
|
|||
Homer_Simpson | how can I treat each line of a file as a separate array element | 14:51 | |
[Coke] | ... call .lines | ||
Homer_Simpson | pastebin.com/Gc6XnMGL | ||
[Coke] | again, .slurp gives you a single string including newlines; .lines gives you an array of lines; | 14:52 | |
you aren't calling .lines there, it's commented out | |||
(this is the same thing we talked about yesterday) | 14:53 | ||
14:54
Altai-man joined
|
|||
Homer_Simpson | ah ok thx | 14:54 | |
yes I commented that bit out cause I thought slurp was needed, but replacing slurp with lines worked | 14:55 | ||
what does slurp do again, I know what chomp does | |||
[Coke] | "slurps" the file into a variable: it takes all the contents and puts them in a single string. | 14:56 | |
Homer_Simpson | ohh | ||
[Coke] | docs.raku.org/routine/slurp | ||
Nahita | .lines doesn't give you an array. that you're assigning it to a @-sigiled thing reifies it, it being a lazy sequence that didn't fetch any lines until you asked, one way of which is @-sigiled assignment | ||
[Coke] | yes, it's really a Seq. but it is a Positional. Was only contrasting vs. string. | 14:57 | |
14:58
sena_kun left
|
|||
[Coke] | Once we get String vs. Positional, we can drill down into types of array-like things. | 14:58 | |
m: dd $*ARGFILES.lines; | 14:59 | ||
camelia | ("»Wann treffen wir drei wieder zusamm?«", " »Um die siebente Stund‘, am Brückendamm.«", " »Am Mittelpfeiler.«", " »Ich lösche die Flamm.«", " »Ich mit«", "", " »Ich komme vom Norden her.«", " »Und ich vom… | ||
[Coke] | m: dd $*ARGFILES.lines.^name; | ||
camelia | "Seq" | ||
[Coke] | m: dd $*ARGFILES.lines.^mro | ||
camelia | (Seq, Cool, Any, Mu) | 15:00 | |
[Coke] | m: dd $*ARGFILES.lines.^roles | ||
camelia | (Sequence, PositionalBindFailover, Iterable) | ||
Homer_Simpson | how come it is reading the file from bottom to top | 15:02 | |
pastebin.com/r7cbrZWk | 15:04 | ||
and I also gotta do lines(contents) + 1 for some reason | |||
ugexe | for "data.ldr".IO.lines -> $line { say "This is line {$++} and its contents are: {$line}" } | 15:06 | |
that is more idiomatic | 15:07 | ||
Homer_Simpson | ok loop (my $i = 0 ; $i < elems(@contents) ; $i++) | ||
Nemokosch | or: for "data.ldr".IO.lines.kv -> $index, $line { say "This is line $index and its contents are: $line" } | 15:13 | |
you can write C-ish code in Raku as well but there isn't much point. You are throwing away the benefits while keeping the downsides | 15:14 | ||
15:14
jpn left
15:16
jpn joined
|
|||
Homer_Simpson | ok that works too thx but it is still printing in reverse order | 15:23 | |
its putting line 3's contents as line 0 | |||
err as line 1 | 15:24 | ||
I could make the loop decrement but then its basically C again and its not how computers read files anyhow | |||
ugexe | i think you're confused because nothing anyone has told you would read a file in reverse order | 15:25 | |
15:25
TieUpYourCamel left
|
|||
ugexe | you might want to reevaluate what you're doing, the contents of the file, or how much coffee you've had today | 15:25 | |
Homer_Simpson | ah oops ok thats how the file is | 15:26 | |
[Coke] | :) | 15:34 | |
15:37
TieUpYourCamel joined
16:03
ab5tract joined
16:13
ab5tract left
16:29
jpn left
16:31
jpn joined
16:38
discord-raku-bot left,
discord-raku-bot joined
16:45
razetime joined
16:46
razetime left,
ab5tract joined
16:59
jpn left,
melezhik joined
|
|||
melezhik | ispyhumanfly - check sparrow, it's cli framework, just very opinionated )))) , if you after creating cli apps with small efforts - sparrow could be a good fit - raku-advent.blog/2020/12/07/mixing...g-sparrow/ | 17:01 | |
17:04
melezhik left
17:05
ab5tract left
17:06
ab5tract joined
17:20
ab5tract left
|
|||
tonyo | CIAvash: i can close the ticket | 17:31 | |
17:38
dakkar left
17:51
Homer_Simpson left
17:53
jjido joined
18:00
reportable6 left
18:02
reportable6 joined
18:48
dogbert17 joined
18:50
dogbert11 left
18:52
epony left
18:57
ab5tract joined
19:03
squashable6 left
19:05
squashable6 joined
19:09
notna joined
19:27
abraxxa left
20:27
linkable6 left,
evalable6 left,
evalable6 joined
20:28
linkable6 joined
20:30
Altai-man left,
Altai-man joined
20:31
jpn joined
|
|||
notna | Hi Rakoons. Who knows how the "Rakudo Star Bundle MacOS .dmg disk image file" on rakudo.org/star/macos was build in the past? | 20:44 | |
Any script or "how-to" somewhere, which I could start from? | |||
20:57
jpn left
|
|||
[Coke] | as one of the mac users, nope. | 21:06 | |
I typically build from scratch if doing dev or use rakubrew otherwise | |||
sorry! | |||
notna | @coke: "building from scratch"... with the Srtar BASH script? | 21:12 | |
21:20
jpn joined
21:25
jpn left
21:26
notna left
|
|||
[Coke] | no, with xcode, git, etc. | 21:30 | |
rakudo.org/downloads/rakudo/source | 21:32 | ||
ugexe: rakudo.org/downloads/rakudo/source - should thaty last zef line say -I. , not -Ilib? | |||
21:38
discord-raku-bot left
21:39
discord-raku-bot joined
|
|||
[Coke] | (under linux/mac) | 21:40 | |
tonyo | iirc there was a bundling script in the repo for it notna | 21:45 | |
github.com/rakudo/star/wiki/01_Rak...quickstart | 21:46 | ||
21:52
ispyhumanfly left
21:54
Altai-man left
22:16
lichtkind left
22:35
samcv joined
22:53
jpn joined
|
|||
ugexe | [Coke]: yeah it should say -I. instead of -Ilib | 22:57 | |
it shouldnt technically matter, but its best practice | |||
22:58
jpn left
|
|||
ugexe | similar for others, like the WSL instructions | 23:06 | |
23:48
Homer_Simpson joined
|
|||
Homer_Simpson | anyone know how I can tweak the given condition so that it checks for a number followed by a space because it is thinking 11 is line type 1: pastebin.com/GKPNRvs3 | 23:48 | |
23:51
codesections joined
|
|||
Homer_Simpson | I sort of fixed it in a not very good way | 23:56 | |
I made substr 0 to 2 and changed '0' '1' '2' '3' '4' '5' to '0 ' '1 ' '2 ' '3 ' '4 ' '5 ' | |||
[Coke] | do you care about the spacing, or would: | 23:59 | |
m: dd '01 02 03 04'.words | |||
camelia | ("01", "02", "03", "04").Seq |