🦋 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:20 Sgeo joined 00:52 Manifest0 left
bscan @ugexe I just added a new version of the Raku Navigator. Now you can disable syntax checking by setting "raku.syntaxCheckEnabled" to false. 01:21
ugexe <bscan> ideally i wouldn't have to use separate workspaces + options so that I can switch between developing various raku modules (where i wantn syntax checking) and core code (which doesn't work with syntax checking) 01:24
im not sure there is a good way to detect when someone is working on core rakudo code though
01:25 MasterDuke left
bscan I think different workspaces is probably the best possible unless we have a reliable way of detecting core rakudo code. The syntax checker is written in Raku, so the tests could be added there if we come up with any. 01:31
SmokeMachine I've been playing with `HTML::Component` and databases... it seems to be very easy to use `HTML::Component` + `Cro` + `Red`. Does anyone want to give a try? github.com/FCO/HTML-Component/tree...s/todo-red 01:46
01:51 kybr left, kybr joined 02:37 hulk joined 02:39 kylese left 02:58 vlad joined
SmokeMachine Voldenet: Here's a todo example using database (Red): github.com/FCO/HTML-Component/tree...s/todo-red 03:07
03:15 hulk left, kylese joined 03:42 guifa left
Voldenet SmokeMachine: that's actually quite nice, the only thing I think this example is missing is autogenerating forms from the endpoint 04:01
m: sub new-todo (Str :$description) { }; sub endpoint-form($s) { $s.signature.params.map({ $_.type ~~ Str ?? "input $_.name" !! "" }).say }; endpoint-form(&new-todo) 04:03
camelia (input Parameter<5797307079808>.name)
Voldenet something like this perhaps
04:07 dead1 joined 04:17 mark22k left 04:20 mark22k joined 04:48 vlad left 05:42 bent_fingers left 06:42 itaipu left 07:28 Util left, Util joined 07:37 CIAvash joined 08:21 Sgeo left 08:28 Xliff left 08:30 abraxxa joined 08:35 jpn joined 09:16 haxxelotto joined 09:19 haxxelotto left, haxxelotto joined 09:21 saint- left
SmokeMachine Voldenet: thanks! I like your idea! I think I’ll make it possible to `.form` receive an Endpoint… read the params from it and generate the form… so, in that case one could just do: ```.form: self.new-todo``` 09:23
librasteve good problem solver on LSP etc … fwiw I have used both the comma plugin and the comma standalone … comma plugin struggles since it cannot be used with latest intellij release and also comma standalone is a much nicer experience (for raku) 09:27
any real workflow would likely need the plugin since raku is likely to be an add on tool (for grammar, cli, unicode) before it is the one and only 09:29
09:30 haxxelotto left
so imo we are talking (LSP) plugin (which intellij / jetbrains can consume) vs comma plugin 09:30
09:30 haxxelotto joined
i would vote to put all the wood behind the LSP arrow … 09:32
09:42 sena_kun joined 10:02 haxxelotto left 10:08 haxxelotto joined 10:25 haxxelotto left 10:52 Manifest0 joined 11:02 haxxelotto joined 11:06 jpn left 11:13 jpn joined 11:16 hudo__ left 11:34 guifa joined 12:03 peder left 12:06 peder joined 12:07 itaipu joined 12:11 haxxelotto left 12:12 haxxelotto joined 12:34 jpn left 12:39 jpn joined 12:43 lizmat_ left, lizmat joined 12:44 jpn left
antononcube At first I used Comma’s plugin, but since it did not work with the latеst IntelliJ releases, I started using the Comma app. I use VS Code only for/with Jupyter notebooks. 12:51
12:54 jpn joined
(I do not like Jupyter that much. I started to use it much more often because of the chat-enabled notebooks. I prefer VS Code’s Jupyter extensions to the Web browser Jupyter, and the Jupyter plugin of IntelliJ.) 12:54
SmokeMachine I think after making form be auto generated with Endpoint, I'll try to find a good way to add components that are not root and then add stuff like sessions to it... any idea/suggestion? 13:47
antononcube @SmokeMachine Sorry for the following ignorant question about "Red" -- you might have answered it already. 13:57
SmokeMachine What question? 13:58
antononcube Patience, please! 🙂 I am typing it in.
SmokeMachine Oh, sorry 13:59
antononcube Manually, by myslelf, whithout LLM support...
Do you have any benchmarks for "Red" ? (E.g. speed vs database sizes vs type of queries.) Do you do certain internal indexing or other optimizations for faster query execution? (Maybe, that is "standard" for ORM systems.) 14:01
@SmokeMachine So, I put two questions in, since you are impatient!! 14:02
SmokeMachine > Do you have any benchmarks for "Red" ? 14:11
No, I don't. I make the queries be the simplest possible ones and hope for the better... :)
> Do you do certain internal indexing or other optimizations for faster query execution?
What I try to do is some query optimization, mostly because of the why I "interpret" code blocks... then I try to merge most branches possible... most of my "optimizations" are [here](github.com/FCO/Red/tree/master/lib...Optimizer) and when calling a query, I have a [optimization step](github.com/FCO/Red/blob/master/lib...kumod#L82) to optimize qhe query AST per driver (but isn't doing anything
currently).
I've been waiting until my "block iterpretation" be done using RakuAST to start really doing some optimizations and benchmarks, but until there that's not something I'm doing...
antononcube: ☝️ 14:12
14:22 El_Che left 14:23 El_Che joined
SmokeMachine currently the code blocks are "read" and the query generated at run time... it will NOT perform very well... but the intention is, with RakuAST, make it run at compile time and, with that, make it perform as fast any sql query... 14:24
antononcube Great, thank you for the detailed explanations!
SmokeMachine *for the best 14:26
this (github.com/FCO/Red/blob/master/lib...d#L56-L96) is how we "convert" a block of code into Red::AST... and we do that ar runtime... it CANNOT be fast... 14:29
(and please, if someone have any idea/suggestion on how to make that faster... please let me know!)
I mean, that and all these operators: github.com/FCO/Red/blob/master/lib...rs.rakumod 14:33
but my intention is when I start using RakuAST (if possible) to convert all blocks I'll use on my queries into Red::AST on compile time and cache the query generated by it when running the query... 14:40
14:42 jpn left 14:50 jpn joined 14:56 jpn left
SmokeMachine so, when I do `Model.^all.grep: *.column > 1` it become something like this at compile-time `do given Model.^all { .grep: *.column > 1, :red-ast($ = Red::AST::Gt.new(:left(.of.column), :right(Red::AST::Value.new(:type(Int), :1value))) }`... but I don't even know if something like that is/will be possible... 14:56
That was the reason I started playing with github.com/FCO/RakuAST-Matcher a few time ago... 14:59
15:18 mark22k left 15:20 mark22k joined
antononcube Hmm... raku-ast reminds me the Raobin Williams impersonation of raccoons that swear with the phrase "green asshole!" 15:41
www.youtube.com/watch?v=nNBxi8_ySbU 15:42
15:49 CIAvash left 16:00 jpn joined 16:02 vlad joined 16:05 jpn left 16:09 vlad left 16:43 jpn joined 16:55 vlad joined 16:59 jpn left 17:00 jpn joined 17:25 vlad left 17:33 vlad joined 18:22 abraxxa left 19:04 vlad left 19:08 vlad joined 19:42 vlad left 20:00 abraxxa joined 20:05 abraxxa left 20:36 haxxelotto left 20:40 pragma- joined 20:50 jpn left 21:13 japhb joined 21:21 japhb left 21:30 sena_kun left 21:31 sena_kun joined, mark22k left 21:32 mark22k joined 21:36 japhb joined 21:55 jpn joined 22:02 bent_fingers joined 22:09 dead1 left 22:16 jpn left 22:17 jpn joined 22:21 sena_kun left 22:22 jpn left 22:30 jpn joined 22:43 jpn left 23:23 Sgeo joined 23:30 jpn joined 23:34 jpn left