This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:06 kueppo left 00:32 Kaipei left, Kaipei joined 02:02 Kaipei left 05:17 Kaipei joined 05:33 frost joined 06:19 kjp left 07:58 Kaipii joined 08:01 Kaipei left 09:35 Kaipii left 09:51 frost left 10:24 Kaipii joined 10:47 Kaipii left 11:46 Kaipii joined
Nemokosch never known the last one 12:07
Anton Antonov How can make a test that (i) passes if a certain package P1 cannot be loaded, and (ii) if P1 can be loaded, then applies a certain "typical" test? 13:48
13:48 jgaz joined 14:06 n1to joined 15:18 jgaz left
stevied how can I pause program execution and require user to "hit any key" to continue? 17:38
got it. getc() 17:41
gist.github.com/sdondley/6ac51bb98...3fc40f0d7e 17:45
made a little tutorial for the basics of lists
Anton Antonov <@563790557831495691> Can access this page: antononcube.shinyapps.io/DSL-evaluations/ ? 17:49
stevied yeah
Anton Antonov Please try this command :
```
DSL MODULE DataQuery;
take elements from 32 to 84
```
stevied spits out `dplyr::slice(32:84)` 17:51
Anton Antonov This R -- please select Raku
stevied ok
Anton Antonov I will review the DSL parse to be able to do all of the examples in your gist.
stevied I get: `$obj = $obj[ (32 - 1) ... (84 - 1 ) ]`
Anton Antonov I will review the DSL parser to be able to do all of the examples in your gist. 17:53
stevied what does this do, allow you to translate a special DSL to code in different languages?
Anton Antonov Correct -- the idea is to generate code for different systems (languages + libraries) from the same specialized natural language DSL. 17:55
stevied you are working on this from scratch?
Anton Antonov With Raku, yes. In Mathematica I use a different approach. 17:56
Last year I made this demo : www.youtube.com/watch?v=wS1lqMDdeIY 17:57
stevied very interesting 18:05
so is the goal to be able to query the website using natural language? 18:06
Anton Antonov Yes, but not just the website. I mostly use the code generation through CLI. For example: 18:10
```
> ToDataQueryWorkflowCode Raku 'use the data table $dfTemp; group by Var1; show counts; ungroup; rename Var1 as VAR01'
# $obj = $dfTemp ;
# $obj = group-by( $obj, "Var1") ;
# say "counts: ", $obj>>.elems ;
# $obj = $obj.values.reduce( -> $x, $y { [|$x, |$y] } ) ;
# $obj = rename-columns( $obj, %("Var1" => "VAR01") )
```
The thing is, that list manipulation is relatively new addition to the data wrangling DSL and it most likely needs more attention. 18:12
stevied so you want to be able to create/manipulate Lists using the DSL? 18:13
Anton Antonov Correct. (Some of that is already implemented...) 18:14
stevied how do you do the natural language processing, just using Grammars? Or is there some kind AI component to it? 18:16
how do you do the natural language processing, just using Grammars? Or is there some kind of AI component to it?
Anton Antonov I personally am more interested in the "inverse problem" -- say from Raku code to generate English descriptions. (Again, gist like yours help...)
I have two solutions: 1) "just" with Raku Grammars, and 2) using neural-network based Question Answering System (QAS) in Mathematica. 18:18
I personally am more interested in the "inverse problem" -- say from Raku code to generate English descriptions. (Again, gists like yours help...)
stevied well, I plan on doing more of these gists. mostly just for myself to help solidify my knowledge of Raku and as notes that I can execute and experiment with 18:20
Anton Antonov The QAS-approach is much easier to program, but it is too slow and imprecise. So, some balance / collaboration has to be done between Grammar and QAS
The QAS-approach is much easier to program, but it is too slow and imprecise. So, some balance / collaboration has to be done between Grammar and QAS.
Great. One of the main goals of these code generations is exactly that -- to get quickly around language/library idiosyncrasies using "just technological thinking." 18:22
I.e. using natural language commands.
Actually, what you trying to do can fit the QAS approach. Imagine you can give commands like "Show a Raku example of replacing an element in a list." 18:26
Or, "How do I specify multi-dimensional arrays in Raku."
Or, "How do I specify multi-dimensional arrays in Raku?"
stevied yeah, I will be putting in examples/recipes for those kinds of frequently used idioms 18:27
i'm going to write a simple little grammar for parsing a file with the code samples and the description of what the code does. most of them will come right from the Raku docs website 18:30
Anton Antonov Hopefully, I am not overestimating you curiosity here... Please see the questions and answers after the text from your gist. 18:34
BTW, `FindTextualAnswer` on the AI-side, it neural-networks based. 18:36
BTW, `FindTextualAnswer` is on the AI-side, it neural-networks based. 18:38
BTW, `FindTextualAnswer` is on the AI-side, it is neural-networks based.
stevied that's very cool and amazing 18:41
the last one is slightly wrong because my notes are wrong. they don't "become" positional. they are already positional. 18:42
Anton Antonov Hopefully, I am not overestimating your curiosity here... Please see the questions and answers after the text from your gist.
Yeah, it is wrong -- that is general case with neural-network QAS. It is "just" a statistical heuristic. 18:44
Hence, breed special and corner cases.
stevied alright, well, I'll keep plugging away at this. i'll turn it into a proper repo 18:47
i'll let you know when I've made more progress with less trivial examples.
19:36 kjp joined 20:42 jgaz joined 21:56 jgaz left 23:45 n1to left