🦋 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:01 ptc left 00:25 TieUpYourCamel left 00:37 TieUpYourCamel joined 00:41 Manifest0 left 01:00 Xliff left
guifa ugh so close to having my prolog interpreter going first step to getting logic into raku 01:03
SmokeMachine \o/ 01:04
I'm very curious about that! 01:05
guifa no fancy syntax yet 01:14
it's just a plain old simple prolog interpreter
so I can figure out some strategies of attack
I think in the end I'm going to use macro-esque reinterpreting of method calls 01:15
mother_child(X,Y) :- child_parent(Y,X), woman(X).
would be
logic mother_child(X,Y) { child_parent Y, X; woman X } 01:16
obviously, parentheses could still be used, just standard routine calls
each of the components of the predicate (separated by commas in prolog) would be separated by semicolons just like normal raku statements 01:17
Just like each prolog one gets interpreted more or less one by one (ish, depending on whether one does a depth or breadth first search, etc), I'll treat each statement similarly 01:18
the cool bit here will be that there's nothing preventing you from using Raku code there
plus(A, B, C) :- C is A + B. would be logic plus(A,B,C) { C == A + B }; # math done raku style 01:22
coleman Will this be a library or a deeper language extension? 01:28
SmokeMachine guifa: would it make sense to make `logic mother_child(:$X, :$Y) …` to make it possible to use any order? 01:32
guifa no, order is extremely important
SmokeMachine Even if parameters are named?
guifa yeah, because sometimes you can define the same thing in multiple ways and you'd want to potentially change the variable names accordingly, but the position is what's key 01:37
if I do
mother_child(X,Y) :- child_parent(Y,X), woman(X).
It will look up all the definitions of mother child, and see which don't conflict with mother_child(X,Y) (that's...all of them lol)
then it will check all versions of child_parent, check if any of them match the reverse pattern. then it will check that one is a woman. But the definition of child_parent might be 01:38
child_parent(K,P) :- birthed(P,K). child_parent(K,P) :- birthed(Px,K), married(Px,P) 01:40
SmokeMachine Ex: logic mother-child(:$X, :$Y) { child-parent :$X, :$Y; woman :$X }
guifa is X the mother or is Y the mother? 01:41
(remembering that there's no obligation to use X or Y, you could use M and C if X and Y make more sense elsewhere in the body) 01:42
SmokeMachine Depends on your definition… it could be: mother-child(:$mother, :$child) for example
And when defining: mother-child :mother<Maria>, :child<Jesus> 01:43
But feel free to ignore that… my knowledge on that is nullable… that’s just what I was thinking while reading about that… 01:44
guifa yeah. logic languages are.....different :)
SmokeMachine (But I still don’t see why it couldn’t be that way…) 01:45
The way I see, when storing it, you could just put on the right order… mother-child(X, Y) storing X, Y, and for mother-child(:$X, :$Y) storing $X, $Y… but I’ll stop insisting… I clearly don’t know what I’m talking about… :) 01:48
02:10 hulk joined, kylese left 02:31 guifa left 03:15 hulk left, kylese joined 06:00 CIAvash joined 07:46 Sgeo left 07:56 ptc joined 08:14 jpn joined 08:15 samebchase left 08:16 samebchase joined 08:19 jpn left 08:32 jpn joined 08:41 CIAvash left 08:49 Manifest0 joined 08:51 dakkar joined 09:27 jpn left 09:28 jpn joined 09:40 sena_kun joined 10:05 sena_kun left 10:22 jpn left 10:25 jpn joined 10:43 SrainUser joined 11:08 SrainUser left 11:16 hudo__ left 12:18 MasterDuke left 12:26 jpn left 12:41 hudo__ joined
tbrowder .seen skaji 13:31
tellable6 tbrowder, I saw skaji 2021-10-22T01:56:00Z in #raku: <skaji> if you remove this line github.com/tbrowder/DateTime-US/bl...eral.t#L8, then the test will pass.
13:33 jpn joined
tbrowder @skaji's App::Mi6 is a wonderful and very useful tool, but he hasn't responded to issues or PRs in a while (although I see internal changes a few months ago). 13:40
lizmat, could you ping him to see if he is still interested in maintaining it? 13:42
else we could add it to community module collection 13:43
14:49 vlad joined
antononcube .seen leont 15:07
tellable6 antononcube, I saw leont 2024-03-03T22:58:39Z in #raku: <leont> I'd probably have to start with extracting a bunch of existing mi6 logic into its own modules so it's reusable (e.g. version handling)
leont ?
antononcube Hi, @leont ! 15:08
I want to parse YAML headers of placed in the beginnings of Markdown files. 15:09
This is in order to "parameterize" executable Markdown files. 15:10
leont «"parameterize" executable Markdown files»?
antononcube @leont Hm... sorry. That is from the so called Literate Progrmming (LP) perspective. 15:11
LP in Raku is facilitted with (1) Jupyter kernels, and (2) "Text::CodeProcessing".
The latter is used to "execute" Markdown, Pod6, and Org-mode files. 15:12
So, I want give parameters to those to files. RStudio's / Posit's Markdown files, with extension ".Rmd", use that approach. 15:13
Here is an example: monashdatafluency.github.io/r-rep-...eader.html 15:14
Here is another example: zsmith27.github.io/rmarkdown_crash...aders.html
@leont Sorry, if those messages above are too much... 15:15
I need an YAML parser and interpreters to get: (1) Raku hash of parameter name-value pairs, and (2) generate Markdown text/code. 15:16
leont So you preparse it to separate the two sections, and then use YAMLish for the first and a Markdown parser for the second? 15:19
antononcube Yes -- that is more or less I want to do. 15:21
15:21 jpn left
From application of the YAML parser I get two results: a Raku hash, and Markdown text to be spliced with the rest of the Markdown file. The rest of the Markdown file is processed using the Raku hash -- the corresponding parameters are replaced with their values. 15:23
... Then the Markdown text is executed.
16:11 vlad left 16:19 ptc left 16:30 vlad joined
tonyo . 16:35
17:34 SrainUser joined 17:38 patrickb_ joined 17:39 clarkema_ joined, perryprog_ joined 17:45 gugod_ joined 17:46 gugod left, perryprog left, clarkema left, patrickb left, patrickb_ is now known as patrickb, clarkema_ is now known as clarkema 17:48 jpn joined 18:01 dakkar left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/03/25/2024-...ing-again/ 18:23
antononcube @lizmat I shamelessly copied your meh-not-installed design from "App::Rak". (With reference.) 18:27
lizmat you're very much welcome :-) 18:28
antononcube 👍 18:32
18:39 SrainUser left 19:00 ACfromTX left 19:10 vlad left, SrainUser joined 19:24 sena_kun joined 19:33 SrainUser left
tonyo .seen rf 19:41
tellable6 tonyo, I saw rf 2023-08-07T20:59:12Z in #raku: <rf> Where does this person get gremlins from? Besides that I think they liked Raku?
19:43 SrainUser joined 19:45 jpn left 19:47 jpn joined 19:52 jpn left 20:20 SrainUser left 20:26 ptc joined 20:39 jpn joined 20:48 jpn left 21:10 guifa joined 21:20 kst left 21:29 kst joined 21:41 jpn joined 21:47 jpn left 22:09 Sgeo joined
antononcube @tonyo Hmm... no @rf -- I was looking for them few days ago too. 22:09
22:49 ptc left 22:55 sena_kun left
tonyo getting weird body results on humming-bird, iirc they're still around though 23:13
23:37 jpn joined 23:42 jpn left 23:43 jpn joined 23:49 jpn left