🦋 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:12
swaggboi left
00:14
sena_kun left
00:15
swaggboi joined
00:30
yewscion joined
00:39
yewscion left
01:35
swaggboi left
01:38
stanrifkin_ joined
01:41
stanrifkin left
01:42
swaggboi joined
01:49
shrewd joined
02:20
yewscion joined
02:28
yewscion left
02:31
jpn left
02:35
yewscion joined
02:41
yewscion left
03:11
yewscion joined
03:17
yewscion left
04:05
Sgeo_ joined
04:09
Sgeo left
04:14
shrewd left
04:53
MyNetAz left,
stanrifkin joined
04:56
stanrifkin_ left
05:08
MyNetAz joined
06:14
Aedil joined
06:45
yewscion joined
06:50
yewscion left,
Sgeo_ left
07:18
yewscion joined
07:23
yewscion left
07:41
apac joined
07:51
yewscion joined
07:55
yewscion left
07:59
apac left
09:16
yewscion joined
09:17
dakkar joined
09:20
yewscion left
|
|||
librasteve | lizmat: great post on assuming - fwiw I have been wrestling with assuming and have had to avoid using too much since it can be unreliable in an unpredictable way in my medium sized code base (well guess I am including all of Cro, all of Red etc in my builds) - the insight into the old implementation goes a long way to explaining this unreliability ! roll on RakuAST | 09:29 | |
lizmat | thanks! good to hear! | 09:30 | |
I haven't looked at the Cro code yet, but jnthn mentioned Cro as one of the places RakuAST could be used | |||
librasteve | yes - my bet is that he was thinking of speeding up github.com/croservices/cro-webapp/...p/Template | 09:31 | |
dakkar | and replacing the route compiler | 09:32 | |
currently it builds a grammar via strings | |||
librasteve | (which some folks have mentioned is quite slow in the dev cycle since cro templates are all (p)recompiled on server start) | ||
dakkar | github.com/croservices/cro-http/bl...er.rakumod is where most of the non-template code generation happens | 09:36 | |
09:36
derpydoo joined
09:39
lichtkind joined
|
|||
librasteve | dakkar: interesting (but rather over my head what is going on) | 09:42 | |
SmokeMachine | is anyone able to install Red on 2025.02? It's breaking to me... :( | 09:45 | |
did we have any change on reduce? I'm seeing errors in 2 different places that in common they have a `reduce` call... | 09:49 | ||
lizmat | yes, we did have a change there: the magic for 1-argument handling is gone | ||
if you have a custom op, you will need to make sure it handles 0 and 1 argument calls yourself | 09:50 | ||
SmokeMachine | that will probably explain the error: Too few positionals passed; expected 2 arguments but got 1 | ||
lizmat | right | ||
SmokeMachine | how did it was not gotten on release? | 09:51 | |
lizmat | I don't know, maybe Red is an always fail on Blin ? | ||
SmokeMachine | I don't think it does... | 09:52 | |
if it did, it would be good to know... | |||
10:15
sena_kun joined
|
|||
SmokeMachine | fixed... (I use too much) | 10:22 | |
fixed... (I use too reduce much) | |||
dakkar | are you planning to… reduce your use of it? 😁 | 10:23 | |
SmokeMachine | :) | ||
lizmat: I'm not sure if it would help anything, but it seems there is a RakuAST class missing... www.irccloud.com/pastebin/rFeOMip4/ | 10:24 | ||
I mean, a type object being used while expecting an object... if I run that without the RAKUDO_RAKUAST, that works... | 10:26 | ||
lizmat | and after you've run it without, can you run it again with RAKUDO_RAKUAST=1 ? | ||
SmokeMachine | lizmat: it gives me the same error: www.irccloud.com/pastebin/90zXTGhR/ | 10:29 | |
El_Che | hallo | ||
SmokeMachine | (I have ctrl + c the tests... it had already passed the error point...) | 10:30 | |
lizmat | SmokeMachine: then I suggest not running "mi6 test" with RAKUDO_RAKUAST=1 at this time | ||
SmokeMachine | Yes, I’m not… I run that from time to time to see when I can start using RakuAST on red… :) | 10:31 | |
10:31
derpydoo left
|
|||
SmokeMachine | (I should find some time to try to help RakuAST some how…) | 10:32 | |
lizmat | you can use RakuAST on Red now | ||
you don'e need RAKUDO_RAKUAST=1 for that | 10:33 | ||
*don't | |||
SmokeMachine | no??? I want to change code using RakuAST... don't I need RAKUDO_RAKUAST=1 for that? | 10:34 | |
lizmat | you don't | ||
you need either "use v6.e.PREVIEW" or "use experimental :rakuast" for that | |||
RAKUDO_RAKUAST=1 makes your code be parsed by the new Raku grammar, which uses RakuAST to build the QAST | 10:35 | ||
SmokeMachine | yes, and I need it to modify the code at CHECK time, no? | 10:36 | |
lizmat | aaah.. ok, you want to do it like that... | ||
I guess yes, you do need RAKUDO_RAKUAST=1 :-) | 10:37 | ||
SmokeMachine | I want to use RakuAST to replace map/grep/first blocks with RedAST... | ||
lizmat | so someone gives you a Callable, and you want to mess with that | 10:38 | |
10:38
jpn joined
|
|||
SmokeMachine | I mean `.map({ BLOCK })` -> `.map({ BLOCK }, :red-ast(Red::AST::Translator.translate(BLOCK)))` | 10:38 | |
then Red's map will handle that named par while usual map will ignore it... | 10:40 | ||
lizmat | well, maybe you could start with allowing a *string* to be specified in the map, and then use .AST on that string to get a RakuAST tree, and the start modifying that ? | ||
SmokeMachine | I want to Red looks from plain raku... but yes... I think that may be a good first step... | 10:42 | |
lizmat | it'll allow you to develop the logic you could re-use later | ||
SmokeMachine | at least the translation method would be the same... | 10:43 | |
even the map handling :red-ast named par can already be written... I can do `multi method map(Str $code) { my $ast = $code.AST; self.map: $code.EVAL, :red-ast(Red::AST::Translator.translate: $ast) )` | 10:46 | ||
lizmat | that feels like a plan :-) | ||
I'm pretty sure you will find bugs... but that would be good, as then we can fix them :) | 10:47 | ||
SmokeMachine | lizmat: thanks for that idea!! I'll start it as soon as possible! | ||
10:55
JimmyZhuo joined
|
|||
SmokeMachine | lizmat: I just added www.irccloud.com/pastebin/LU3wesU5/ | 11:05 | |
lizmat | that doesn't tell me much :-( | 11:07 | |
SmokeMachine | sorry, I pressed enter before finishing... I was trying to say I added `use v6.e.PREVIEW;` on the first line of Red::ResultSeq (that is where I implement .map) and tried running the tests... | ||
I'll try it again after work... | |||
lizmat | ah, hmmm and with "use experimental :rakuast" ? | ||
ok | |||
SmokeMachine | with `use experimental :rakuast` it at least started running the tests... I'll let you know if it finishes... | 11:10 | |
lizmat: it did pass | 11:14 | ||
lizmat | nice :-) | 11:15 | |
11:16
peder left
|
|||
SmokeMachine | I'll start playing with that after I finish my 2nd post about Sourcing... thank you lizmat | 11:17 | |
lizmat | you're welcome :-) | ||
11:25
peder joined
11:51
jpn left
12:01
melezhik joined
|
|||
melezhik | . | 12:01 | |
how can I make :gloabl modifier part of regexp? | |||
m: say "hello world" ~~ /:g (\S+)/ | |||
camelia | ===SORRY!=== Error while compiling <tmp> Unrecognized regex modifier :g at <tmp>:1 ------> say "hello world" ~~ /:<HERE>g (\S+)/ expecting any of: term |
||
12:12
jpn joined
12:17
melezhik left
|
|||
librasteve | m: say "hello world" ~~ m:g/(\S+)/ | 12:25 | |
evalable6 | (「hello」 0 => 「hello」 「world」 0 => 「world」) |
||
Raku eval | (「hello」 0 => 「hello」 「world」 0 => 「world」) | ||
librasteve | just need that m first (for match) to avoid leading colon | 12:26 | |
12:28
Aedil left
12:34
jpn left
12:44
Aedil joined
12:56
Aedil left
13:01
Aedil joined
13:10
jgaz joined,
derpydoo joined
13:18
vrurg joined,
vrurg_ left
13:25
peder left
13:27
jpn joined
13:32
jpn left
13:33
yewscion joined
13:35
peder joined
13:36
jpn joined
13:37
MyNetAz left
13:38
derpydoo left
13:41
derpydoo joined
|
|||
[Coke] | off topic: any drone enthusiasts on channel? | 13:52 | |
13:52
MyNetAz joined
13:54
JimmyZhuo left
14:13
yewscion left
|
|||
tbrowder | m: say "hello world" ~~ /(\S+)/ | 14:18 | |
camelia | 「hello」 0 => 「hello」 |
||
14:22
yewscion joined
14:25
jpn left
14:38
hvxgr joined
14:47
jpn joined
14:50
wayland joined,
wayland76 left
14:53
jpn left
14:54
jpn joined
14:56
derpydoo left
14:59
MyNetAz left
15:14
MyNetAz joined
15:41
orangebot joined
15:42
jpn left
15:43
jpn joined
16:47
apac joined
16:57
jpn left
17:22
yewscion left
17:26
yewscion joined
17:39
dakkar left
17:55
apac left
17:59
Guest47 joined
18:04
yewscion left
18:07
abraxxa-home joined
18:08
abraxxa-home left
18:10
abraxxa-home joined
18:13
yewscion joined
18:15
Guest47 left
18:18
yewscion left
18:23
yewscion joined
18:58
yewscion left
18:59
yewscion joined
|
|||
antononcube | @Coke I recently discussed analogies between drones and Chuck Norris. (Via Raku-made plots.) | 19:05 | |
I was more of a "drone enthusiast" in 2023. | 19:06 | ||
[Coke] | Just picked up one and have a few local flights as unlisted videos on youtube. wondering if anyone had any pointers | 19:08 | |
19:10
yewscion left
19:38
yewscion joined
|
|||
lizmat clickbaits rakudoweekly.blog/2025/03/10/2025-...-cfp-week/ | 20:04 | ||
20:27
jgaz left
|
|||
tbrowder | ref drones: check FAA reqs | 20:38 | |
[Coke] | If I trust the drone manufacturer, I'm fine at my location. | ||
tbrowder | they are very cool for watching railroads | 20:39 | |
and their operations | |||
one of my fav utube channels is "distant signal" and Danny Harmon is a masterful drone user | 20:40 | ||
20:40
Xliff joined
|
|||
Xliff | \o | 20:41 | |
my $b = Buf[uint16].new(1, 2, 3); Buf[uint8].new($b).gist.say | |||
evalable6 | Buf[uint8]:0x<01 02 03> | ||
tbrowder | o/ | ||
Xliff | Hmmm.... | ||
Is there any way to properly convert a Buf[uint16] to a Buf[uint8] so that the above output is: «Buf[uint8]:0x<00 01 00 02 00 03>» | 20:42 | ||
20:53
yewscion left
21:02
Aedil left
|
|||
Xliff | Well, this is close: | 21:28 | |
m: y $b = Buf[uint16].new(1, 2, 1 +< 10 + 0xa0).Array; $b.say; my $c = $b.map({ my $a = Buf[uint8].new; $a.write-uint16(0, $_); |$a.Array }); $c.say | |||
camelia | ===SORRY!=== Error while compiling <tmp> Unsupported use of y///. In Raku please use: tr///. at <tmp>:1 ------> y<HERE> $b = Buf[uint16].new(1, 2, 1 +< 10 + 0x |
||
Xliff | m: my $b = Buf[uint16].new(1, 2, 1 +< 10 + 0xa0).Array; $b.say; my $c = $b.map({ my $a = Buf[uint8].new; $a.write-uint16(0, $_); |$a.Array }); $c.say | ||
camelia | [1 2 1184] (1 0 2 0 160 4) |
||
21:30
yewscion joined
21:32
yewscion left
21:41
lichtkind left
22:08
wayland left,
abraxxa-home left
22:23
abraxxa-home joined
22:25
abraxxa-home left
22:43
Sgeo joined
22:46
maylay left
22:48
maylay joined
22:52
Xliff left
22:59
sena_kun left
23:27
maylay left
23:30
maylay joined
23:53
maylay left
23:56
maylay joined
|