🦋 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:05
thaewrapt left
00:17
thaewrapt joined
00:22
thaewrapt left
00:24
thaewrapt joined
00:31
thaewrapt left
00:42
thaewrapt joined
00:49
sftp left
00:51
thaewrapt left
00:52
sftp joined
01:01
ACfromTX left
01:02
ACfromTX joined,
thaewrapt joined
01:10
jmcgnh left
01:14
thaewrapt left
01:15
MasterDuke joined
01:19
eseyman left
01:21
eseyman joined
01:24
thaewrapt joined
01:25
hulk joined,
kylese left
01:26
jmcgnh joined
01:31
thaewrapt left
01:42
thaewrapt joined
02:15
hulk left,
kylese joined
07:29
Sgeo left
07:58
dakkar joined
08:21
teatwo left
08:35
sena_kun joined
08:51
soverysour joined,
soverysour left,
soverysour joined
08:52
jpn joined
09:47
soverysour left
10:02
teatime joined
11:31
japhb left
11:47
japhb joined
12:02
jpn left
12:11
jpn joined
12:16
jpn left
12:23
jpn joined
12:29
jpn left
12:37
jpn joined
13:01
sena_kun left
13:15
sena_kun joined
13:44
vrurg joined
13:47
vrurg_ joined,
vrurg__ left
13:50
vrurg left
13:57
hexology left,
hexology joined
14:01
hexology left
14:02
hexology joined
14:03
hexology left
14:06
thaewrapt left
14:09
vrurg joined
14:10
vrurg__ joined
14:13
vrurg left,
vrurg_ left,
vrurg joined
14:16
Sgeo joined
14:17
vrurg__ left,
thaewrapt joined
14:22
jpn left
14:24
thaewrapt left
14:31
thaewrapt joined
14:32
jpn joined
14:38
vrurg_ joined
14:42
vrurg left
14:48
vrurg_ left
14:49
vrurg_ joined
14:53
DarthGandalf left
14:54
DarthGandalf joined
14:58
jpn left
15:10
vrurg joined
15:11
jpn joined
15:12
MasterDuke left
15:13
vrurg_ left
|
|||
_grenzo | Which is better? rule list { '(' [ <item> ',' ]* <item> ')' } or rule list { '(' <item> [ ',' <item> ]* ')' } | 15:22 | |
vendethiel | %% or % :-) | 15:23 | |
_grenzo | That went right over my head 🙂 | 15:24 | |
vendethiel | '(' ~ ')' <item>+ %% ',' | ||
_grenzo | Oh! | 15:25 | |
Thanks | 15:26 | ||
15:33
vrurg_ joined
15:36
jpn left,
vrurg left
15:58
derpydoo joined
16:14
swaggboi left
16:15
swaggboi joined
|
|||
antononcube | The second. | 16:31 | |
roguerakudev | The placeholder is nice | ||
16:32
Maylay left
16:33
kst left,
kst joined
|
|||
antononcube | In this particular case the parenthesiized expression is short, so using ’(‘ ~ ‘)’ … does not make the rule definition more readable. (To me at least.) | 16:34 | |
16:44
Maylay joined
16:57
vrurg joined,
vrurg_ left
17:07
soverysour joined,
soverysour left,
soverysour joined
17:09
jrjsmrtn_ joined
17:10
jrjsmrtn left
17:12
dakkar left
|
|||
coleman | docs.raku.org sent me an alert. I'm checking on it. | 18:05 | |
scullucs | Interesting. To me the '(' ~ ')' … one is much more readable. | 18:11 | |
One reads as "An opening parenthesis, followed by an <item>, followed by a block that holds a comma followed by an item, block that can appear zero or more times, followed by a closing parenthesis." | |||
And the other one as "A parenthesized expression holding one or more items joined with commas." | |||
Of course it only takes a short moment to see that the first one means the same as the second one, but hey, we've got a nice mechanism to express it more simply 🙂 | 18:13 | ||
_grenzo | I had never seen that notation before. If @vendethiel hadn't said it was the same thing it would have taken me a while to figure out | 18:32 | |
scullucs | Oh, the meaning is not obvious, but once learned, it kind of is. | 18:34 | |
vendethiel | Outside of readibility, it helps with error messages | 18:41 | |
Certainly there are some things I’ve forgotten but I’ve been a Raku user for more than a decade :-) | 18:42 | ||
scullucs | I've been using Raku for a while too, and that feature, I knew it existed, but would probably have had to look up the exact syntax (if I had thought of using it instead of the original formulation). | 18:43 | |
Raku is a pretty big language 🙂 | |||
18:45
derpydoo left
18:57
abraxxa-home joined
|
|||
antononcube | @vendethiel Hmm… how so? The syntax implies some sort of an universal error message? | 18:58 | |
18:58
abraxxa-home left
19:00
abraxxa-home joined
19:02
vrurg left,
vrurg joined
19:05
Xliff joined
|
|||
Xliff | \o | 19:05 | |
19:07
thaewrapt left
|
|||
Xliff | I think I know the answer already, but is there any way to use the '$' as a prefix operator? | 19:09 | |
m: multi sub prefix:<﹩> (Numeric $v) { say "BOO!"; $v + 3 }; say ﹩4 | 19:12 | ||
camelia | BOO! 7 |
||
Xliff | \o/ | ||
God bless unicode. | |||
19:12
vrurg left
|
|||
lizmat | .oO( may all your dollar prefixes be small ) |
19:17 | |
Xliff | lizmat: '$' is never allowed. Most of the unicode alternatives just aren't as appealing. | 19:20 | |
lizmat | yeah, that would slow down parsing significantly if we made $ overrideable | ||
Xliff | Figured as much. | ||
I can do this though.... | 19:21 | ||
m: multi sub prefix:<$$> (Numeric $b) { say "BOO!"; $b }; my $a = $$14 + 2; $a.say | |||
camelia | BOO! 16 |
||
Xliff | Can't have any alphas in that one, though. | ||
m: multi sub prefix:<Z$> (Numeric $b) { say "ZIMBABWE!"; $b }; my $a = Z$14 + 2; $a.say | 19:22 | ||
camelia | ZIMBABWE! 16 |
||
Xliff | I'm thinking about writing a module for currency symbols. | ||
The pieces are all assembled. I just have a few other questions I want to answer. | 19:23 | ||
19:26
abraxxa-home left
19:30
Xliff left
19:54
discord-raku-bot left
19:55
discord-raku-bot joined
19:56
tib_ is now known as tib
|
|||
antononcube | @Xliff A certain Raku new-comer proclaimed ideas and the making of a similar package recently. | 20:04 | |
That was a few months ago. As I recall from reviewing the code, his package covered lots of bases. | 20:06 | ||
20:08
guifa joined,
swaggboi left
20:09
guifa left,
guifa joined
20:15
peder left,
peder joined
20:18
swaggboi joined
20:35
vrurg joined
20:37
jpn joined
20:47
vrurg left
20:52
vrurg joined
21:05
soverysour left
21:39
jpn left
22:30
thaewrapt joined
22:41
wayland76 joined
22:46
sena_kun left
22:58
wayland76 left
|