Vushu

@vushu
0 Followers
2 Following
7 Posts
PL explorer, interested in emulators, compilers.

#prolog

I made a simple prolog formatter for fun, maybe it can be useful for you 😊

https://github.com/vushu/prologfmt

GitHub - vushu/prologfmt: Simple formater for prolog

Simple formater for prolog. Contribute to vushu/prologfmt development by creating an account on GitHub.

GitHub

@vushu I just read your advent article https://raku-advent.blog/2023/12/19/day-19-autogenerating-raku-bindings/ and I wanted to bounce an idea off you.

We have code written in lang l1, and we need to output code written in lang l2.

Now, we use Raku's built in facilities to define a grammar for l1, and we define action methods to generate the output code in lang l2 which seems to be a lot of string manipulation.

Ideally, for such source to source translations (i.e. compilation), could we have higher level mechanisms, like the output grammar and it's unparsing actions.

l1 --parse-> ast --unparse-> l2

This way we can ensure that whatever final code artifact is generated it is valid (at least according to the defined grammar for l2).

So something like:

```
compile(codeL1, GrammarL1, GrammarL2)
```

should return the valid code artifact according to GrammarL2.

What do you think the ideal API for such a thing could be like?

#rakulang

Day 19 – Autogenerating Raku bindings!

by Dan Vu Preface For this advent post I will tell you about how I got into the Raku Programming Language and my struggles of making raylib-raku bindings. I already have some knowledge about C, whi…

Raku Advent Calendar
Day 21 – Using DALL-E models in Raku

In this blog post we proclaim recent creation and updates of several Raku packages that facilitate the utilization of the OpenAI’s DALL-E 3 model.

Raku Advent Calendar

Day 19 – Autogenerating Raku bindings! - Dan Vu

https://programming.dev/post/7456990

Day 19 – Autogenerating Raku bindings! - Dan Vu - programming.dev