🦋 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 getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 25 August 2021. |
|||
00:02
reportable6 left
00:13
lichtkind left
00:35
Xliff joined
00:55
frost joined
01:04
reportable6 joined,
neshpion left
01:12
rakuUser left
02:12
bloatable6 left,
squashable6 left,
sourceable6 left,
coverable6 left,
reportable6 left,
quotable6 left,
nativecallable6 left,
greppable6 left,
benchable6 left,
linkable6 left,
notable6 left,
statisfiable6 left,
committable6 left,
tellable6 left,
bisectable6 left,
shareable6 left,
releasable6 left,
unicodable6 left,
evalable6 left,
committable6 joined
02:13
nativecallable6 joined,
greppable6 joined,
quotable6 joined,
tellable6 joined,
benchable6 joined
02:14
linkable6 joined,
kybr left,
squashable6 joined,
notable6 joined,
evalable6 joined
02:17
kybr joined
|
|||
Geth | doc/special-chars-in-char-ranges: 3a0d01c988 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 Fix whitespace Remove trailing whitespace. |
03:09 | |
03:14
bisectable6 joined,
shareable6 joined,
coverable6 joined
03:15
reportable6 joined,
sourceable6 joined
03:59
keutoi joined
|
|||
Geth | doc: 9741c66cc2 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 Explain behavior of non-alphanumerics in <[ ]> The docs previously mentioned that you can use \ to escape characters inside <[ ]> ; this commit adds the fact that you don't need to escape most non-alphanumeric characters the way you do in the portion of a regex outside <[ ]> and that you must escape (rather than quote) characters inside <[ ]> for them to have their literal meaning. |
04:03 | |
linkable6 | Link: docs.raku.org/language/regexes | ||
Geth | doc: 3a0d01c988 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 Fix whitespace Remove trailing whitespace. |
||
04:03
discord-raku-bot left
|
|||
doc: c6b9012fee | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 Merge pull request #3948 from Raku/special-chars-in-char-ranges Explain behavior of non-alphanumerics in <[ ]> |
|||
04:04
discord-raku-bot joined
04:15
unicodable6 joined,
bloatable6 joined
04:30
synthmeat left
04:31
synthmeat joined
04:50
clarjon_1 joined
04:52
clarjon1 left
05:05
Sgeo left
05:13
Xliff_ joined,
statisfiable6 joined
05:17
Xliff left
|
|||
tib | Hello :) | 05:26 | |
dev.to/thibaultduponchelle/the-eph...oudot-2a1a and dev.to/thibaultduponchelle/the-eph...atria-2m5h jjatria maybe plans to talk about Raku (?) | 05:27 | ||
05:28
aleksb joined
|
|||
aleksb | hi, something counter-intuitive is happening, if this isn't a compiler bug can someone please explain this behaviour? | 05:35 | |
sub test { | |||
gather { | |||
loop (my $d = 1; $d < 5; $d++) { | |||
take (0, $d); | |||
} | 05:36 | ||
} | |||
} | |||
say test(); # output: ((0 1) (0 2) (0 3) (0 4)) | |||
say eager test(); # output: ((0 5) (0 5) (0 5) (0 5)) | |||
05:59
ufobat_ joined
06:02
reportable6 left
06:03
reportable6 joined
06:09
markus_ left
06:13
releasable6 joined
07:05
keutoi left,
keutoi joined
|
|||
MasterDuke | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; say test(); say eager test() # aleksb fyi you can run code here | 07:11 | |
camelia | ((0 1) (0 2) (0 3) (0 4)) ((0 5) (0 5) (0 5) (0 5)) |
||
gfldex | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; say eager test(); | 07:12 | |
camelia | ((0 5) (0 5) (0 5) (0 5)) | ||
moon-child | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $x = eager test; say $x[0] === $x[1] | 07:13 | |
camelia | False | ||
moon-child | huh. Thought that might be it | ||
gfldex | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); say $l.WHAT; | 07:18 | |
camelia | (List) | ||
gfldex | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); dd $l.WHAT; | ||
camelia | List | ||
gfldex | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d); } } }; my $l := eager test(); dd $l; | ||
camelia | ((0, 5), (0, 5), (0, 5), (0, 5)) | ||
gfldex | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take 0, $d; } } }; my $l := eager test(); dd $l; | 07:19 | |
camelia | ((0, 5), (0, 5), (0, 5), (0, 5)) | ||
MasterDuke | m: sub test { gather { my $d = 1; while $d < 5 { take (0, $d++); } } }; say test(); say eager test() | ||
camelia | ((0 1) (0 2) (0 3) (0 4)) ((0 1) (0 2) (0 3) (0 4)) |
||
08:05
linkable6 left,
evalable6 left
08:09
lichtkind joined
08:19
neither joined
08:28
patrickb joined
|
|||
gfldex | aleksb: "the variable is declared as a lexical variable in the loop's outer or containing scope so that it can be used in code following the loop statement." | 08:45 | |
08:46
neither12 joined,
neither12 left
|
|||
gfldex | and gather/take must preserve the scope | 08:46 | |
08:46
neither81 joined,
neither81 left
08:48
neither left
09:20
lizmat_ joined,
lizmat_ left,
lizmat_ joined
09:21
C0l0mb0 joined,
C0l0mb0 left
09:23
lizmat left,
col0mbo joined
|
|||
aleksb | gfldex: does (0, $d) capture a reference to $d rather than its value? Using [0, $d] instead does what I expect | 09:23 | |
09:23
TempIRCLogger left
|
|||
aleksb | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take [0, $d] } } }; say eager test() | 09:23 | |
camelia | ([0 1] [0 2] [0 3] [0 4]) | ||
09:24
lizmat_ left
|
|||
aleksb | m: sub test { gather { loop (my $d = 1; $d < 5; $d++) { take (0, $d) } } }; say eager test() | 09:24 | |
camelia | ((0 5) (0 5) (0 5) (0 5)) | ||
09:27
lizmat joined
09:28
lizmat joined
09:29
TempIRCLogger joined
|
|||
MasterDuke | aleksb: yeah, i seem to recall someone wrote a blog post recently talking about the difference between Arrays and List and how they interact with containers/values | 09:29 | |
aleksb | m: my $x = 1; my $y = (0, $x); $x++; say $y | 09:32 | |
camelia | (0 2) | ||
09:38
neither joined
|
|||
aleksb | well, I guess that's just how it works... seems strange for "immutable" lists to be so easy to change | 09:39 | |
MasterDuke | well, it's a matter of perspective. the lists themselves can't change, but the things in the lists can | 09:41 | |
aleksb | Is there a "correct" way to store the value, not the variable, in the list? I can do +$d or $d.clone | 09:50 | |
09:50
col0mbo left
|
|||
MasterDuke | m: my $x = 1; my $y = (0, $x<>); $x++; say $y # another way | 09:53 | |
camelia | (0 1) | ||
aleksb | ah I think I needed that operator for something recently thanks | 09:54 | |
MasterDuke | it's the decont (de-containerizer) operator | 09:55 | |
mentioned in docs.raku.org/language/containers (and probably other places, but that's the first place i looked) | 09:56 | ||
aleksb | yeah thanks I need to review that | 09:57 | |
10:07
linkable6 joined
10:08
evalable6 joined
|
|||
frost | hello, does raku have the similar things as [x;y;z] in python, where i can use index from x to y counting by z steps? | 10:48 | |
lizmat | m: my @a = ^20; say @a[1,3..*] | 10:49 | |
camelia | (1 (3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)) | ||
lizmat | m: my @a = ^20; say @a[1,3...*] | ||
camelia | (1 3 5 7 9 11 13 15 17 19) | ||
10:50
kylese joined
|
|||
frost | oh, thanks lizmat | 10:52 | |
lizmat | or any other algorithm you can think of with ... | ||
frost | Yes, it is really impressive. | 10:56 | |
10:56
squashable6 left
|
|||
MasterDuke | m: my @a = ^20; say @a.skip.rotor(1 => 1).flat # TIMTOWTDI | 10:57 | |
camelia | (1 3 5 7 9 11 13 15 17 19) | ||
frost | Yes, it is really impressive. | 10:58 | |
10:58
squashable6 left
|
|||
camelia | (1 3 5 7 9 11 13 15 17 19) | 10:58 | |
neither | hi, I have a class `A` and its implementation in a file. I also have some infix operator declarations for type `A` outside the class e.g., to have `$a1 + $a2`. Can I move these operator subroutines to another file and `use` them along with the class? | 11:01 | |
frost | MasterDuke thanks, it's also a good way,TMTOWTDI! | 11:02 | |
MasterDuke | benchable6: compare my @a = ^20; my @b; @b = @a[1,3...*] for ^10_000; ||| my @a = ^20; my @c; @d = @c.skip.rotor(1 => 1).flat for ^10_000; | ||
benchable6 | MasterDuke, ¦my: «Cannot find this revision (did you mean “nom”?)» | ||
MasterDuke | benchable6: HEAD compare my @a = ^20; my @b; @b = @a[1,3...*] for ^10_000; ||| my @a = ^20; my @c; @d = @c.skip.rotor(1 => 1).flat for ^10_000; | 11:03 | |
benchable6 | MasterDuke, starting to benchmark the 1 given commit | ||
MasterDuke, No new data found | |||
MasterDuke | benchable6: compare HEAD my @a = ^20; my @b; @b = @a[1,3...*] for ^1_000; ||| my @c = ^20; my @d; @d = @c.skip.rotor(1 => 1).flat for ^1_000; # i didn't the sequence version would be that much slower | 11:05 | |
benchable6 | MasterDuke, starting to benchmark the 1 given commit | ||
MasterDuke, ¦HEAD: «04===SORRY!04=== Error while compiling /tmp/Q5mKSSUk5IMissing blockat /tmp/Q5mKSSUk5I:1------> 03y $b = Bench.new; $b.cmpthese(10, %subs)08⏏04<EOL>» | |||
gfldex | m: sub f { gather for ^19 { state $i = 1; take $i++ } }; say (my @a = ^20)[&f]; | ||
camelia | (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) | ||
gfldex | frost: subscripts also take callables ^^^ | ||
MasterDuke | benchable6: compare HEAD my @a = ^20; my @b; @b = @a[1,3...*] for ^1_000; ||| my @c = ^20; my @d; @d = @c.skip.rotor(1 => 1).flat for ^1_000; | 11:06 | |
benchable6 | MasterDuke, starting to benchmark the 1 given commit | ||
11:06
sena_kun joined
|
|||
benchable6 | MasterDuke, gist.github.com/cea6e1eb84580f6f21...953295b805 | 11:06 | |
gfldex | neither: The operators will refere to the type object produced by the class. As long as those are available at compile time, you can put the operators where you like. | 11:07 | |
MasterDuke | ugh, don't know why that took so long to get right | ||
neither | gfldex: Yes that's the issue: I get `Invalid typename 'A' in parameter declaration.` as you say. I don't know how to make it available at compile time. | 11:14 | |
gfldex | neither: did you try a forward declaration? | 11:15 | |
neither: You will have to `use` the module with the class definitions in the file with the operators. | 11:19 | ||
11:24
neither left
11:37
neither joined
11:49
lizmat left
11:50
lizmat joined,
lizmat left
11:51
lizmat joined
11:53
TempIRCLogger left
11:54
lizmat left,
lizmat joined
11:55
TempIRCLogger joined
12:03
reportable6 left,
reportable6 joined
12:29
patrickb left
12:39
patrickb joined
12:42
happy-dude left,
juanfra left,
AlexDaniel left,
cnx left,
demostanis[m] left,
CIAvash left
12:45
juanfra joined
12:53
unixcat64 left
12:54
Sgeo joined
12:56
unixcat64 joined,
unixcat64 left,
unixcat64 joined
13:02
cnx joined,
happy-dude joined,
demostanis[m] joined,
AlexDaniel joined,
CIAvash joined
|
|||
neither | gfldex: I have 3 files: `main.rakumod`, `ops.rakumod` and `script.raku`. If I `use` the `main` module in `ops`, rakumod files are compiling fine. Aim is to `use main` from `script.raku` and to be able to use the class in `main` module along with its operations available, e.g., `$a1 + $a2` to be possible. But from `script.raku`, it doesn't see the | 13:03 | |
operators. | |||
13:06
rakuUser joined
13:08
unixcat64 left
13:09
unixcat64 joined
13:11
kylese left
13:19
Xliff_ left
13:28
neither left
13:29
Xliff joined
13:30
Manifest0 left
13:37
frost left
|
|||
lizmat clickbaits rakudoweekly.blog/2021/08/30/2021-...perseding/ | 13:46 | ||
14:02
neither joined
14:15
b2gills left,
b2gills joined
14:27
neither55 joined
14:28
neither left
14:29
keutoi left
14:33
unixcat64 left
14:34
unixcat64 joined
14:46
tejr left,
tejr joined
14:48
unixcat64 left
14:49
unixcat64 joined
14:54
unixcat64 left
14:55
unixcat64 joined
15:24
unixcat64 left,
unixcat64 joined
15:30
Manifest0 joined
15:36
patrickb left
15:37
neither55 left
16:02
ufobat_ left
16:08
ufobat_ joined
16:37
MoC joined
16:57
squashable6 joined
16:59
ufobat__ joined
17:02
ufobat_ left
17:22
rakuUser left
17:32
rakuUser joined
17:44
jaguart joined
18:02
reportable6 left
18:36
sena_kun left
18:38
SmokeMachine__ left,
SmokeMachine__ joined
19:25
ufobat__ left
19:36
jess joined
19:58
ufobat__ joined
20:04
reportable6 joined
20:37
ufobat__ left
20:42
MoC left
21:29
rakuUser left
21:43
MasterDuke left
|
|||
phogg | Whoever figured out the BUILD/TWEAK constructor split was a genius. The more I try to use more rigid non-Raku languages the more I'm convinced nothing else is sane. | 21:46 | |
21:47
neshpion joined
|
|||
Xliff | phogg: Examples, pls? I'm interested in seeing how other people have been using that. | 22:02 | |
phogg | I have nothing particularly worth sharing, just a general delight in the way that composition with them works | 22:05 | |
for a work project I and one of my co-workers liberally stole the Raku object model and implemented it in PHP, and it is there where we have repeatedly found the objects and APIs to be superior | 22:06 | ||
things I have in real Raku are too trivial by comparison | |||
22:15
rakuUser joined
22:19
rakuUser left,
rakuUser joined
22:30
Oshawott joined
|
|||
[Coke] | phogg: are you able to consider switching to Raku wholesale? | 22:32 | |
phogg | [Coke]: would if we could | ||
[Coke] | I hear that. | ||
phogg | a couple million lines of code don't get rewritten overnight | ||
[Coke] | What if there was an Inline::PHP? | 22:33 | |
phogg | we had been saying for years "sure would be nice if the APIs and libraries in PHP didn't suck" and then in 2017 my co-maintainer said "I am just going to write a version of Str." | ||
22:33
archenoth left
|
|||
phogg | One thing lead to another, and things are much better now. If you box hard enough you can get pretty far even without a language that really supports modifying itself | 22:34 | |
lack of multiple inheritance is a pretty hard limit | |||
I should eventually port our extensions to Str and other things out and put them up as raku modules. There are some useful things maybe others would want. | 22:35 | ||
[Coke] | cool. | 22:36 | |
phogg | if there was a working Inline::PHP that would help a lot. | 22:39 | |
that would give us an easier incremental transition path without having to stop and rewrite the world. | 22:40 | ||
22:49
MasterDuke joined
23:09
SystemFFan joined
23:20
lichtkind left
|