Working on the LSP VSCode extension for #suetum posed interesting questions, like "what is a variable definition in a logic programming language"?

Formally there's nothing like a declaration in that case, but the best way to put it is that the first time a variable is used, this is where it gets declared, and since Suetum integrates logic and imperative programming, it's been cool to notice that every reference in the imperative part must have a counterpart in the logic one to be correct!

The expansions generating that code look something like this. #suetum #versu #praxis

Well, even though I was working on SelanΓ­a too these days, I've been able to get to the end of the expansion mechanism too! Now I can write stuff like

```
Have you heard of what [Gossippee.subj] said yesterday?
No! What did [Gossippee.subj] do?
Well, you know, someone gave [Gossippee.obj] the excuse to...
```

And have it expand to

```
Have you heard of what Mary said yesterday?
No! What did she do?
Well, you know, someone gave her the excuse to...
```

#suetum #versu #praxis

In order to expand strings like
"Hello, [greeting.towards.Person]."
I must know context about Person (like: do I hate them? I love them? I'm neutral?), which means that intelligent expansions must be used (context free grammars with conditions from the current state of the game, in practice), which means that they are not just syntactic replacement but need the whole machinery of the runtime engine, which means moving lots of code... AAAAA xD

#Suetum #versu #praxis

Parsing code + test suite done, so now I can go on with the compilation and then execution of the expansion! #suetum #versu #praxis
ok, after some bugfix I reached the astronomical amount of...
(drumrolls)
48 lines of antlr4 parser.
i love so much when i can code less O_O
#suetum #praxis #versu
Lots of thinking, and then the grammar for the expansion construct is so embarrassingly simple πŸ₯Ή #Suetum #versu #praxis

Since I have a little lull in the development of Selanìa, I'm advancing with #Suetum.

The system is more and more getting structured in a way that allows for parts of the project to be used independently. One can just use the fact list as a knowledge base, or just the expansion mechanism, just the instructions, or multiple parts combined into something different from Suetum (e.g.: with this architecture, one could implement a Lume-like system based on exclusion logic: https://www.researchgate.net/publication/335590895_Lume_a_system_for_procedural_story_generation )

Ian Horswill is writing a book that is a very good introduction to formalisms around procedural generation.

I love how it is quite focused on text generation, but it shows how very similar techniques can be applied to e.g. generating environments.

Very well written, clear, to the point, without sacrificing precision.

I will definitely use lots of the elements laid out here to work on the expansion/interpolation mechanism in #Suetum .

https://ianhorswill.github.io/DPGD/index.html

Declarative Programming for Game Designers

An introduction to declarative programming with applications to vidoegames

Declarative Programming for Game Designers

Fixed also the last bug regarding axiom/rules exploration. Which allows you to drill-down in axiom expansions, and sub-axiom expansions and so on.

Now, in the space between the work on Selanìa, I can get to attack (my version of) Prolog's definite clause grammars.

It will probably be a more pragmatic approach, strongly oriented towards the narrative usages, with dedicated syntax, although it will be 100% based on exclusion logic like the rest.

#Suetum #versu #praxis