00:24
yewscion__ left
00:36
yewscion_ joined
00:41
yewscion_ left,
yewscion_ joined
00:51
wayland76 joined,
wayland left
01:47
maylay left
01:49
maylay joined
02:05
hulk joined,
kylese left
03:07
yewscion_ left
03:15
hulk left,
kylese joined
03:21
maylay left
03:24
maylay joined
04:30
kylese left
04:34
kylese joined,
tejr left
04:40
tejr joined
05:30
kylese left
05:32
kylese joined
06:09
maylay left
06:12
maylay joined,
maylay left
06:19
maylay joined,
maylay left
06:26
maylay joined,
maylay left
06:36
Sgeo left,
maylay joined
06:43
Aedil joined,
Aedil left
06:53
maylay left
06:55
maylay joined
07:50
maylay left
07:53
maylay joined
|
|||
melezhik. | . | 08:07 | |
tellable6 | 2025-03-25T20:26:35Z #raku <librasteve> melezhik: please do - but i am worried about the ease of installing the Air deps since I’m struggling on macOS with DBIish on pq with 2025.02 | ||
08:21
yewscion_ joined
08:27
yewscion_ left
09:16
dakkar joined
09:22
sena_kun joined
09:37
sena_kun left
09:48
dakkar left
09:53
lichtkind joined
10:08
maylay left
10:11
maylay joined
|
|||
wayland76 | Voldenet: Regarding RED, thanks! I'll have a look at it. | 10:12 | |
.tellable6: Voldenet Regarding RED, thanks! I'll have a look at it. | 10:16 | ||
10:16
maylay left
10:19
maylay joined
|
|||
wayland76 | .tellable6 Voldenet Regarding your simplified xpath, it'd be even simpler with: sub xpath(*@n) {}; xpath <html head h1>, { .id eq "red" }, <h2>, { .className eq "x1" } | 10:19 | |
SmokeMachine | wayland76: did you see this? glot.io/snippets/h5t1sg55xd | 10:21 | |
10:36
dustinm` left
|
|||
wayland76 | SmokeMachine: Wow, very nice! Had not considered that AT-KEY might work for this! | 10:37 | |
10:37
dakkar joined
10:49
JimmyZhuo joined
10:55
maylay left
10:58
maylay joined
11:19
JimmyZhuo left
11:23
Aedil joined
11:31
dustinm` joined
|
|||
Voldenet | I've pondered about syntax similar to `(html <- "body" <- "h1"){ *.id eq "red" }`, but then I've realized that "h1" should be logically glued to that block | 11:53 | |
SmokeMachine | Im thinking that now too… but before, I thought it should be related to the “relationship “ because of the 2nd example, the join one… | 11:57 | |
Voldenet | yeah, they're both not the same example | ||
in fact, I like sql, after seeing how weird is left joins syntax in efcore | 11:58 | ||
> SELECT bar_id, foo_id FROM foo LEFT JOIN bar ON bar_id = bar.id | 12:00 | ||
vs | |||
SmokeMachine | But now I think, maybe, the best solution would be an Slang that would translate that to something like this: glot.io/snippets/h5u6pwid3l | ||
Voldenet | > c.Foo.GroupJoin(c.Bar, foo => foo.BarId, bar => bar.Id, (foo, barGroup) => new { foo.FooId, BarGroup = barGroup }).SelectMany(x => x.BarGroup.DefaultIfEmpty(), (x, bar) => new { x.FooId, BarId = bar?.BarId }); | 12:01 | |
Slang is fun, but you can write similar thing using `sub xpath(*@n)`, it gets really simple | 12:04 | ||
it's all a list of strings and blocks after all | 12:05 | ||
SmokeMachine | I don’t know if that’s the case, but I would assume it would not only have < but also, maybe, << to deep search? | 12:06 | |
Voldenet | simple apis require simple solutions: xpath(<// h1 span // h2>) | 12:08 | |
SmokeMachine | About the join, I like: `Foo.^all.join-model: :left, Bar, *.bar-id == *.id` :) | 12:09 | |
Voldenet | yeah, it's sane | ||
in fact, efcore has it, except it's marked as internal, with all the warnings included | 12:10 | ||
SmokeMachine | (That’s Red syntax if it’s not clear… :) ) | 12:11 | |
But that has a problem, if you do not call a map to specify the fields you want there, it will return only the Bar objects… it should return Foo and Bar… I’m still trying to find a good way to return both… | 12:14 | ||
Voldenet | there are multiple pain points possible with the entity-based syntax overall | 12:17 | |
expressing things like `select bar_id from bar cross apply openjson(bar.json) with (x int) as j join foo on foo.x_id = j.id` gets difficult | 12:18 | ||
erm, there should be j.x on the end | 12:19 | ||
It can be possible, but syntax would very likely close to sql at some point | 12:21 | ||
SmokeMachine | I’m not sure if I get that openjson stuff… but I think it would look something like: `Bar.^all.join-model(:cross, Foo, *.json.x == *.x-id).map: { Bar.id }` but I probably missed something… | 12:29 | |
Sorry: `*.json<x>` | 12:30 | ||
Voldenet | that json stuff for every varchar() `{"x":42}` extracts that x | 12:37 | |
and then appends that to resultset, so it can be joined to another table somehow | 12:39 | ||
my point is that sql has a lot of things that can't be easily expressed in simplified syntax | 12:43 | ||
or rather, it would turn your simplified syntax to sql | 12:44 | ||
so imo there should be strong focus on composing over sql | 12:47 | ||
12:58
dakkar left
13:08
human_blip left
13:11
human_blip joined
13:14
yewscion_ joined
13:33
human_blip left
13:35
human_blip joined
13:45
maylay left
13:48
maylay joined,
yewscion_ left
13:51
Tzimisces joined
|
|||
SmokeMachine | usercontent.irccloud-cdn.com/file/...997453.JPG | 13:57 | |
14:01
yewscion_ joined
14:26
Fritz14 joined
14:29
codesections joined
|
|||
Fritz14 | Hi Raku experts, I am getting a Segmentation fault with my Raku programm and have no clue how to debug this. | 14:35 | |
``` | |||
PERL5LIB=thirdparty/lib/perl5 raku -Ilib bin/agrammon.raku --cfg-file=etc/agrammon.single.yaml web version6/End.nhd | |||
Segmentation fault (core dumped) | |||
``` | |||
is all I get. My suspicion is that it could be related to using `Inline::Perl5` with `Excel::Writer::XLSX:from<Perl5>`, but I am not sure. | |||
Unfortunately, so far I could not reproduce the seg fault with a minimal program using these two modules. | |||
I tried running it under `raku-remote-debug`, but only got this output: | |||
``` | |||
> received: | |||
85 a2 69 64 12 a4 74 79 70 65 9 a6 74 68 72 65 61 64 d a9 6e 61 74 69 76 65 5f 69 64 cf 0 0 76 93 eb e0 6 c0 ac 61 | |||
70 70 5f 6c 69 66 65 74 69 6d 65 1 | |||
``` | |||
Any help on how to proceed would be much appreciated. | |||
Oh well, I guess my formatting attempts only partially succeeded ... | |||
ugexe | i think you're gonna have to post some source code | 14:37 | |
Xliff | Fritz14, try running raku with the --ll-exception | 14:38 | |
Fritz14, You can also use this to disable SPESH: MVM_SPESH_DISABLE=1 | 14:41 | ||
Fritz14, and the following to disable JIT: MVM_JIT_DISABLE=1 | |||
Try with all 3 and see if that helps. | 14:42 | ||
Also, you might want to try updating your Raku and Inline::Perl5 | |||
14:42
dakkar joined
|
|||
Fritz14 | Xliff neither of the three helped. | 14:46 | |
I am running | |||
Welcome to Rakudo™ v2025.03. | |||
Implementing the Raku® Programming Language v6.d. | |||
Built on MoarVM version 2025.03. | |||
and a freshly installed Inline::Perl5. | |||
I am using this in production with Rakudo/MoarVM 2024.10 without problem. | |||
I had tried to upgrade to 2025.02 and 2025.03 and both fail. | |||
ugexe I'd be happy to provide source could, but couldn't get a small failing example so far. The whole thing is a bit bigish: github.com/oposs/agrammon | 14:48 | ||
melezhik. | .tell librasteve: this is an example of validating arbitrary html table structure , it checks for “outside of table / rows ” table rows and cells , maybe something worth try out for Air unit tests - gist.github.com/melezhik/115dde6e3...b6c2d86df5 | 14:50 | |
tellable6 | melezhik., I'll pass your message to librasteve | ||
lizmat | Fritz14 o/ | ||
Fritz14 | I'll try 2024.10, 2024.12, 2025.01 on the development machine now to see if I can narrow it down. | ||
lizmat | that would be helpful! | ||
melezhik. | The advantage of the approach it works with ANY table structure , not just of fixed size | 14:53 | |
15:15
Guest52 joined
15:20
Guest52 left
15:37
jgaz joined
15:54
codesections left
|
|||
Fritz14 | The segfault is not happening on Rakudo version up to 2025.01. Both 2025.02 and 2025.03 ARE sefaulting. | 16:02 | |
16:05
dakkar left
|
|||
Fritz14 | Found this now via `journalctl`: | 16:17 | |
Mar 26 17:16:39 thinlinc-aarweg-01 kernel: 4: GeneralWorke[157826]: segfault at c ip 00007a52b5b31151 sp 00007a52b2bff530 error 4 in libperl.so.5.38.2[7a52b5a43000+1ab000] likely on CPU 27 (core 27, socket 0) | |||
Mar 26 17:16:39 thinlinc-aarweg-01 kernel: Code: ff 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 55 48 89 e5 41 57 49 89 f7 41 56 41 89 ce 41 55 49 89 d5 41 54 4d 89 cc 53 48 83 ec 18 <80> 7e 0c 06 48 89 7d c0 4c 89 45 c8 0f 86 65 01 00 00 be 30 00 00 | |||
16:26
Fritz14 left,
Fritz81 joined
16:39
yewscion_ left
|
|||
Fritz81 | A minimal program for reproducing the segfault is: | 16:42 | |
use lib:from<Perl5> 'perl5'; | |||
use Excel::Writer::XLSX:from<Perl5>; | |||
my $workbook = Excel::Writer::XLSX.new('testseg.xlsx'); | |||
# next line leads to segfault | |||
my $bold-format = $workbook.add_format(); | |||
# below only needed to show that things are working | |||
# without the call to add_format(); | |||
my $sheet = $workbook.add_worksheet('Test'); | 16:43 | ||
$sheet.write(0, 2, 'Testing'); | |||
$workbook.close(); | |||
with `perl5/` containing an installation of the Perl5 module `Excel::Writer::XLSX` | |||
Calling this script with | |||
`raku test.raku` | |||
segfaults. Commenting out the line calling `add_format()` avoids the segfault | |||
and testseg.xlsx is created. | |||
jdv | wut | 16:45 | |
nopaste or gist or wutever | 16:46 | ||
16:55
Tzimisces left
|
|||
Fritz81 | gist.github.com/zaucker/5800adb925...00f5a717bc | 16:56 | |
17:13
Fritz81 left
|
|||
lizmat | Fritz is used to MatterMost :-) | 17:20 | |
18:09
discord-raku-bot left,
Tzimisces joined,
discord-raku-bot joined
18:17
Xliff_ joined
18:19
codesections joined
18:22
yewscion_ joined
|
|||
Xliff_ | lizmat: Can the methods Inline::Perl5.unwrap-perl5-object and .p6-to-p5 safely return Nil? | 18:28 | |
lizmat | I have no idea: nine probably knows :-) | 18:29 | |
Xliff_ | That's the source of the segfault. | ||
$o === Pointer and is passed to $!p5.add_magic which attempts to deref and BOOM! | |||
This is what Fritz is running into. | 18:30 | ||
antononcube | I expected lizmat to say: "use a wrapper." | ||
lizmat | so why doesn't that happen before 2025.02 ? | ||
Xliff_ | lizmat: *shrug* | ||
lizmat | Inline::Perl5 didn't change | 18:31 | |
Xliff_ | Doesn't really matter if Inline::Perl5 isn't performing a null check on $o? | ||
s/\?// | |||
nine: Any thoughts? | 18:32 | ||
lizmat | NativeCall hasn't seen any changes this year | ||
so that can't be it either, I'd say | |||
Xliff_ | A changed in MoarVM that was masking the issue was probably removed, maybe? | 18:33 | |
lizmat | Inline::Perl5 hasn't seen a release since august 2022 | ||
that's why I suspect 6f19ada9cb30a2477a9 in MoarVM | |||
but we probably should take this to #moarvm | |||
Xliff_ | OK | ||
18:35
human_blip left
|
|||
antononcube | @lizmat I have an "Acme::Text::UpsideDown" question: is this a known limitation, not being able to write "π" upside down? | 18:35 | |
18:35
codesections1 joined
|
|||
lizmat | if you can tell me the codepoint to use for π upside down, we'd be in business | 18:36 | |
antononcube | Hmm.... I can use a Chinese or Korean character for that. | ||
E.g. 'ㅛ'. | |||
18:36
human_blip joined
18:37
codesections left,
codesections1 is now known as codesections
|
|||
If I figure out a good replacement I will file an issue / PR. | 18:37 | ||
lizmat | ㅛ looks good to me | 18:38 | |
Xliff_ | Oh my god! There really is an upside down smiley! | ||
lizmat | antononcube a PR would be appreciated | ||
Xliff_ | “🙃” U+1F643 Upside-Down Face Unicode Character | ||
antononcube | @Xliff Extremely important package! I use it at least twice every three months. | ||
Xliff_ | 🙃.unichar.say | 18:39 | |
m: "🙃".unichar.say | |||
camelia | No such method 'unichar' for string '🙃' in block <unit> at <tmp> line 1 |
||
Xliff_ | m: "🙃".uniname.say | ||
camelia | UPSIDE-DOWN FACE | ||
18:39
Aedil left
|
|||
Xliff_ | OK, now for what I REALLY wanted to ask. Do RakuAST knows support a .parent method? | 18:40 | |
Or does such tree navigation require special processing? | |||
lizmat | Xliff_: it does not at the moment, afaik | ||
that said, I think you could create something like that by a specially crafted code block for .visit-children | 18:42 | ||
18:44
codesections left
|
|||
lizmat | Xliff_: try @*LINEAGE.tail inside .map / .grep ? | 18:44 | |
melezhik. | . | 18:47 | |
18:47
yewscion_ left
18:52
sena_kun joined
|
|||
Xliff_ | lizmat: Dynamic variable @*LINEAGE not found | 18:55 | |
lizmat: This is the invocation I used: RAKUDO_RAKUAST=1 raku -e 'use experimental :rakuast; class Post { method a { }; method b { }; }; CHECK { $*CU.grep( RakuAST::Method ).map({ @*LINEAGE.gist.say; $_ }) }' | 18:57 | ||
lizmat | I did: RAKUDO_RAKUAST=1 raku -e 'CHECK .say for $*CU.grep({ when RakuAST::StrLiteral { say @*LINEAGE.tail.^name } }); say "hello world"' | 18:59 | |
librasteve | there’s a 2025.02 moar issue over here on the Discord raku channel (not the same as the raku-irc channel) btw | 19:03 | |
tellable6 | hey librasteve, you have a message: gist.github.com/7e25825012e715a193...128dbab468 | ||
Xliff_ | lizmat: Only available in .grep then. Not in .map | 19:09 | |
lizmat | Xliff_: CHECK Nil for $*CU.map({ when RakuAST::StrLiteral { say @*LINEAGE.tail.^name; $_ } }); say "hello world" | 19:18 | |
tells me otherwise ? | |||
argh | 19:19 | ||
s/tail/head | |||
I had it backwards | 19:20 | ||
CHECK $*CU.map({ when RakuAST::StrLiteral { say @*LINEAGE.head; $_ } }); say "hello world" | 19:21 | ||
Xliff_: .parent method coming up, but only inside .grep / .map | 19:26 | ||
Xliff_ | lizmat: Thanks! | 19:31 | |
lizmat | github.com/rakudo/rakudo/commit/6fd413c05f | ||
Xliff_ | Wow! Elegant! | 19:32 | |
lizmat: Actually, maybe (int $generation = 0) ?? | 19:33 | ||
lizmat | we might want to change the Nil to a Failure... | ||
why? native ints default to 0 | |||
Xliff_ | Oh! Nevermind then. | 19:34 | |
I'm a little worried now that something like .parent.parent might not work. | |||
19:35
Tzimisces left
|
|||
Xliff_ | I think the fix is an act of documentation. | 19:36 | |
lizmat | .parent.parent would not work | ||
Xliff_ | Yeah. That would have to be rewritten to .parent(1) | ||
lizmat | indeed | ||
Xliff_ | Like it, though. lizmat++ | 19:37 | |
19:58
farointerleaver joined,
yewscion_ joined
20:04
yewscion_ left
20:14
yewscion_ joined
|
|||
Xliff_ | So this is what I was hoping to get at runtime: RAKUDO_RAKUAST=1 raku -e 'use experimental :rakuast; our ($CU-CLASSES, $CU-METHODS); class Post { method a { }; method b { }; }; CHECK { $*CU.grep({ when RakuAST::Class { $CU-CLASSES.push: $_; for .find-nodes( RakuAST::Method ){} { $CU-METHODS{ $CU-CLASSES.tail.name.simple-identifier }{ .name.simple-identifier } = $_ }; }; }); $CU-METHODS.gist.say }'... unfortunately I don't think | 20:15 | |
it will survive serialization for various reasons. | |||
lizmat | we still have serialization issues in RakuAST, that's why I had to revert the new .assuming implementation | 20:18 | |
Xliff_ | OK. So I can put that on hold for awhile then. | 20:19 | |
20:19
yewscion_ left
|
|||
lizmat | well, I'm hoping we can fix that before the 2025.04 release | 20:19 | |
Xliff_ | Sounds good! | ||
20:25
swaggboi left
|
|||
melezhik. | . | 20:26 | |
20:29
swaggboi joined
20:35
Fritz30 joined
20:41
abraxxa-home joined
20:44
abraxxa-home left
20:47
abraxxa-home joined
20:51
wayland76 left,
wayland76 joined
20:54
maylay left
20:57
maylay joined
21:15
farointerleaver left
21:27
codesections joined
21:46
yewscion_ joined
21:47
Xliff_ left
21:50
yewscion_ left,
codesections1 joined
21:51
codesections left,
codesections1 is now known as codesections
22:00
codesections left
22:17
Fritz30 left
22:25
wayland76 left
23:03
yewscion_ joined
23:05
sena_kun left,
Sgeo joined
23:12
abraxxa-home left
23:13
codesections joined
23:19
sena_kun joined
23:20
codesections1 joined
23:22
codesections left,
codesections1 is now known as codesections
23:23
sena_kun left
23:39
lichtkind left
23:58
codesections left
|