🦋 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:33
jpn joined
00:37
jpn left
01:26
guifa joined
01:29
hulk joined
01:30
kylese left
01:49
lain`_ joined,
atweedie_ joined,
[dpk] joined
01:50
gabiruh left,
Opus left,
gabiruh joined,
dpk left,
atweedie left,
atweedie_ is now known as atweedie,
Opus joined
01:51
lain` left,
Ekho left,
lain`_ is now known as lain`
01:56
guifa left
02:09
Ekho joined
02:15
hulk left,
kylese joined
02:23
guifa joined
|
|||
wayland76 | lizmat: Thanks! | 02:27 | |
03:44
guifa left
05:09
discord-raku-bot left
06:00
discord-raku-bot joined,
discord-raku-bot left
06:01
discord-raku-bot joined
|
|||
whistlingzephyr | bridge test | 06:01 | |
alright, works | |||
06:04
discord-raku-bot left
06:05
discord-raku-bot joined
06:13
discord-raku-bot left,
discord-raku-bot joined
06:24
tejr left
06:29
tejr joined
06:30
discord-raku-bot left
06:31
discord-raku-bot joined
06:34
discord-raku-bot left
06:35
discord-raku-bot joined
06:40
discord-raku-bot left,
discord-raku-bot joined,
tejr left
07:03
tejr joined
07:50
jpn joined
07:55
jpn left
08:03
jpn joined
08:04
[dpk] is now known as dpk
08:08
jpn left
08:09
soverysour joined,
soverysour left,
soverysour joined
08:20
soverysour left
08:45
jpn joined
08:58
sena_kun joined
09:40
soverysour joined
09:44
jpn left
09:50
soverysour left
09:54
soverysour joined
10:08
soverysour left
10:31
jpn joined
10:32
Sgeo left
10:36
jpn left
10:46
jrjsmrtn joined
11:16
jpn joined
11:24
jpn left
11:45
Xliff joined
|
|||
Xliff | m: say "mediumint" ~~ / 'mediumint' /.gist; | 11:45 | |
camelia | False | ||
tellable6 | 2024-07-04T06:32:35Z #raku <SmokeMachine> Xliff: why is that too strict? Do you mean performance wise? | ||
Xliff | WTF? | ||
2024-07-04T06:32:35Z #raku <SmokeMachine> Xliff: why is that too strict? Do you mean performance wise? | 11:47 | ||
lizmat | m: say ("mediumint" ~~ / 'mediumint' /).gist; | 11:48 | |
camelia | 「mediumint」 | ||
lizmat | Xliff: precedence | ||
Xliff | ? | ||
OOOOH\ | |||
OK, that's one thing. I'm trying to debug a grammar. Kinda sucks when you are debugging something and even your debugging code has bugs. | 11:49 | ||
SmokeMachine: Strict as in your first example. I still haven't quite wrapped my head around functional programming, but I do understand the utility. However if I was reading that bit of code at first glance, I'd get got by the difference. | 11:51 | ||
got = fooled | |||
m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; ('mediumint' ~~ &type-test }.gist.say | 11:57 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> tetime' ] }; ('mediumint' ~~ &type-test ⏏}.gist.say… |
||
Xliff | m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; ('mediumint' ~~ &type-test) }.gist.say | ||
camelia | ===SORRY!=== Error while compiling <tmp> Unexpected closing bracket at <tmp>:1 ------> etime' ] }; ('mediumint' ~~ &type-test) ⏏}.gist.say |
||
Xliff | m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; ('mediumint' ~~ &type-test ).gist.say | ||
camelia | Nil | ||
Xliff | lizmat: That's the actual problem | 11:58 | |
m: ('mediumint' ~~ / ['medium' | 'short' | 'tiny' ]'int' /).gist.say | 11:59 | ||
camelia | 「mediumint」 | ||
Xliff | So it's in the larger regex? | ||
m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; ('varchar' ~~ &type-test ).gist.say | |||
camelia | 「varchar」 | ||
Xliff | m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; ('datetime' ~~ &type-test ).gist.say | ||
camelia | 「datetime」 | 12:00 | |
Xliff | m: my rule type-test { [ ['medium' | 'short' | 'tiny' ]'int' || 'var'?'char' || 'datetime' ] }; ('datetime' ~~ &type-test ).gist.say | 12:12 | |
camelia | 「datetime」 | ||
lizmat | Xliff: perhaps you need token? | 12:13 | |
m: my token type-test { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; say 'mediumint' ~~ &type-test | |||
camelia | 「mediumint」 | ||
Xliff | WTF?\ | ||
That *was* a token. | |||
my token type { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; say 'mediumint' ~~ &type-test | 12:14 | ||
m: my token type { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; say 'mediumint' ~~ &type-test | |||
lizmat | then why did it say "rule" ? | ||
camelia | ===SORRY!=== Error while compiling <tmp> Undeclared routine: type-test used at line 1 |
||
Xliff | m: my token type { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; say 'mediumint' ~~ &type | ||
camelia | 「mediumint」 | ||
Xliff | lizmat: Because it's a small part of a larger grammar | ||
lizmat: Does raku have a grammar for parsing SQL? | 12:15 | ||
m: my rule type { [ ['medium' | 'short' | 'tiny' ]'int' | 'var'?'char' | 'datetime' ] }; say 'mediumint' ~~ &type | 12:16 | ||
lizmat | raku.land/?q=SQL | ||
camelia | Nil | ||
Xliff | Boom goes the dynamite. Why does the rule fail? | ||
lizmat | github.com/tony-o/perl6-slang-sql/...ng/SQL.pm6 has a SQL::Grammar | 12:17 | |
Xliff: perhaps raku.land/github:jnthn/Grammar::Debugger can be of help? | 12:18 | ||
Xliff | lizmat: Not really. That's more for executing SQL rather than actually paring out the bits. | 12:28 | |
lizmat | raku.land/cpan:DMAESTRO/SQL::Lexer | ||
perhaps? | 12:29 | ||
Xliff | SQL::Lexer would be useful, but it's not yet up to the bits, but does have the sub-bits. | ||
I actually had the start of an SQL parser back in 2016, but that's probably in the same shape as SQL::Lexer. | |||
lizmat | perhaps a cooperation with tonyo could be the basis of a nice new module ? | ||
Xliff | And SQL::Lexer might be the better work. | 12:30 | |
lizmat: Perhaps. And that is something I'd definitely be interested in. Raku could use a nice SQL parser. | |||
lizmat | agree | ||
Xliff | However, that helps me not right now. | ||
lizmat | also: leont might be interested in this | ||
Xliff | Hmmm.... I'll make pings. | 12:31 | |
tellable, help | |||
tellable6 | Xliff, Like this: .tell AlexDaniel your bot is broken # See wiki for more examples: github.com/Raku/whateverable/wiki/Tellable | ||
Xliff | .tell tonyo Would you be interested in working on a generic SQL parser for Raku. Please see github.com/Xliff/perl6-Parser-SQL | ||
tellable6 | Xliff, I'll pass your message to tonyo | ||
Xliff | .tell leont Would you be interested in working on a generic SQL parser for Raku. Please see github.com/Xliff/perl6-Parser-SQL | 12:32 | |
tellable6 | Xliff, I'll pass your message to leont | ||
Xliff | lizmat: Please note.... 2016 | ||
lizmat | should still work, no ? | ||
one of the benefits of a 100 year language :-) | |||
Xliff | Yeah. But guess what the last test I was working on was. | ||
It was CREATE statements. And it wasn't complete. Same thing I'm working on now and arguably for the SAME use case. | 12:33 | ||
Life intruded. Work was suspended. | |||
12:37
leah2 left
12:58
soverysour joined,
soverysour left,
soverysour joined
13:07
guifa joined
|
|||
antononcube | "SQL::Lexer" might be useful, but it seems to be abandoned. | 13:21 | |
I think @_grenzo might be also interested in "developing" an SQL grammar in Raku. | 13:23 | ||
I.e. I volunteer @_grenzo to help that effort out. 🙂 | 13:24 | ||
13:29
teatwo joined
13:30
teatime left
13:31
teatime joined
13:34
teatwo left
|
|||
Xliff | lizmat: Here's another one for you. Would appreciate some help if you have the time. | 13:46 | |
replit.com/@Xliff/CommonQueryFlips | |||
This is an open question in case anyone else has some insight. | 13:47 | ||
antononcube | @Sliff Does not load for me. (macOS / Safari) | 13:49 | |
Xliff | antononcube: Thanks for looking anyways. | 13:52 | |
I'll try it on tio.run | |||
tio.run/##nVZbT9swFH7vrzhCSE6BlsCm...OMzbhdEz2y | 13:53 | ||
6TdBynZJ6MbbObxJWSMdBEsokT7b2VVR6ETaWIfEqiv7ctWKcHRvMQ1o@FY1t8UIwvzNFFkQCMzYEmUBcAZSs7BA9qxZy0aGs9O@53jVv8HsvtbG7@YqzH9peMlG@RlccyiXVRrB1Tnq2HZ0dpLgtmGjCUVp0XMGo/nQn1JUJMdNFnJgims9FF2t4i7MP0ENez@ucvrSZBm1KnfB2FON5S9pidlqvUJywQ8rRRlvY5TVd1ZOdWDWDIMrvKMpgM2HpINCZLUK58CpLhbkPRtCMy4uBQ7o91SBHK3IK6z7bpVjbLOD4PqnfjQO@92lyNeHBxzOFOSF1mARZHo3aFPGVicP1iag3@WAxMatM79k0Gnh2f3cbvnk72K3qr4LiVEcT0oAtSRTHhRdHodX14a0IS7XRFvnn3vbqIGdSOAvA9Ae5QN | |||
wZFG/s9DFfAwf0NKw1hS4GSp321XS51H7c@t864PRCdwmOVXHDnzd@AkmMhbbQglj17DC4zZcHIBbGvno1tzt/AF192Vr5HE9GcxL@1svW7oLqfpNBMp4xPbt9dk9LkGeO6AY5WkqpaLaZVsRzb2tEquo1p7oUymU/ZtgAnLMT17sciWU3yrOFeFdu9Lp9dudjiPjw5m7h9@bfXP2n4zF9efoqv3cHjS7SLVzHjg7rjuIGCDUfETgGx8fv4N | |||
13:53
teatwo joined
|
|||
Xliff | Oh dear lord. | 13:53 | |
antononcube | 🙂 🙂 | 13:55 | |
Xliff | copy and paste friendly page: pastebin.com/Kc0R7qz0 | ||
lizmat | heh, we need a gist to show the url of a gist | ||
Xliff | I gno rite! | 13:56 | |
lizmat | Forbidden :-( | ||
Xliff | WHAT? | ||
lizmat: Did you use the pastebin link? | 13:57 | ||
13:57
teatime left
|
|||
lizmat | Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it. | 13:57 | |
Xliff | Fixing... | 13:59 | |
antononcube | Yeah "Forbidden (#403)" | 14:00 | |
lizmat | will look after I get back from some cycling& | 14:01 | |
Xliff | lizmat: gist.github.com/Xliff/e5aafbc10196...7eac98a58b | 14:05 | |
And antononcube, of course. | |||
14:12
wlhn left
|
|||
antononcube | @Xliff I made it work -- do the changes get automatcally saved? I.e. can you see my changes? | 14:26 | |
I changed the rule column to be: rule column { <identity> <type> [ <column-opt>+ % \h+ ]? } | 14:27 | ||
and the token identity to be: token identity { '`' .*? '`' | \w.*? } | 14:28 | ||
As a result I get this output: Rule: identity - 「`abuser_id`」 Rule: type - 「mediumint」 int-spec => 「mediumint」 Rule: type - 「mediumint unsigned」 int-spec => 「mediumint」 Rule: type - 「datetime」 Rule: type - 「varchar(200)」 length-spec => 「(200)」 length => 「200」 Rule: column-opt - 「NOT NULL」 Rule: column-opt - 「auto_increment」 Rule: column-no-opts - 「`abuser_id` | 14:29 | ||
mediumint unsigned」 identity => 「`abuser_id`」 type => 「mediumint unsigned」 int-spec => 「mediumint」 Rule: column - 「`abuser_id` mediumint unsigned」 identity => 「`abuser_id`」 type => 「mediumint unsigned」 int-spec => 「mediumint」 Rule: column - 「`abuser_id` mediumint unsigned NOT NULL AUTO_INCREMENT」 identity => 「`abuser_id`」 type => 「mediumint unsigned 」 int-spec => | |||
「mediumint」 column-opt => 「NOT NULL」 column-opt => 「AUTO_INCREMENT」 Nil | |||
14:35
leah2 joined
14:39
jpn joined
14:45
soverysour left
14:46
abraxxa-home joined
|
|||
Xliff | antononcube++ # You rock! | 14:51 | |
15:07
jpn left
|
|||
leont | Xliff: yeah that does sound interesting | 15:08 | |
tellable6 | 2024-07-07T12:32:04Z #raku <Xliff> leont Would you be interested in working on a generic SQL parser for Raku. Please see github.com/Xliff/perl6-Parser-SQL | ||
15:15
soverysour joined
|
|||
antononcube | I wonder to what degree LLMs can generate reiliable SQL Raku-grammars. SQL has very good representation on the Web and there are multiple grammar- and parser efforts for it. | 15:32 | |
15:38
abraxxa-home left
|
|||
Xliff | leont: There's also SQL::Lexer which might be a better starting point. | 15:58 | |
antononcube: Any more thoughts on my Raku-to-Python LLM? | |||
leont | Xliff: having a lexer parser distinction sounds very un-Rakuish to me | 15:59 | |
16:01
soverysour left
16:03
soverysour joined
|
|||
antononcube | @Xliff I have to find and ingest the API documentation of Python-Blender. | 16:03 | |
Xliff | antononcube: OK, thanks! Take your time! Let me know when you need anything. | 16:24 | |
antononcube | @Xliff I was considering to work-out that idea into an example for a conference next week. But I decided to do something of more general interest. (I think it is more general...) | 16:29 | |
Xliff | OK. Let me know when you start work on that and if I can help. | 16:40 | |
17:24
jpn joined
17:37
Sgeo joined
17:44
jpn left
17:46
MasterDuke left
18:04
soverysour left
18:35
soverysour joined,
soverysour left,
soverysour joined
18:40
soverysour left
18:47
soverysour joined
|
|||
_grenzo | gist.github.com/ssotka/03140441d07...10f4093ce4 | 19:00 | |
(just select, update, delete, insert so far) | |||
19:06
soverysour left
19:24
wayland joined
19:25
wayland76 left
|
|||
antononcube | Thanks! I was thinking earlier today that for an SQL parser it might be a good idea to start with the tests. | 19:27 | |
For example, do the other SQL packages in raku.land pass the tests you have in file/gist ? | 19:29 | ||
19:34
soverysour joined
19:39
soverysour left
|
|||
_grenzo | I haven't checked them yet | 19:41 | |
Perl6-Parser-SQL handles WAY more | 19:50 | ||
20:16
guifa left
|
|||
Xliff has put a huge amount of work into this. | 20:18 | ||
20:21
soverysour joined,
soverysour left,
soverysour joined
20:25
soverysour left
20:50
guifa joined
21:18
jpn joined
21:19
MasterDuke joined
21:23
jpn left
23:02
wayland left
23:03
sena_kun left
23:08
merp left
23:12
merp joined
23:54
thaewrapt left
|