December Adventure 2024
The following in my journal for the December adventure. The most recent post will always be a the top. You can jump to the start here.
December 3rd (Day 3)
Today's task was getting something working in LÃVE. This is the first step toward my goal for December Adventure. After a bit of fiddling and ironing out mistakes on the Lua side of things, I finally have a hello world screen:
Before you ask, I did *not* any kind of string handling in LVERA. That will have to happen in some form. The application I want to make requires it. I've got a few, application specific, ideas for it. It definitely won't be a general approach to string for Vera nor The Nova Family. Finally, I updated the my Collatz conjecture example to show off ports a bit more.
Oh, I also did a bunch of work on the Nova wiki.
December 2nd (Day 2)
I realized dating and numbering these is redudant but oop.
Some small work done on LVERA to add support for basic importing. I haven't yet pushed those changes, and it's already past bed time so, oop. However, I spent most of the day messing with the Vera playground. Sierra, recently added support for some basic UI elements.
This opened up the door for a small group collab session where we built a etch-a-sketch like program. Then, we later hot-patched a generated Vera program to add support for external controls. Being able to add a button that restarted, what for other langauges would be, a while loop is a new relm of possibilities.
I'm hoping to get started on my actual project tomorrow. I think I have all the pieces set to build something interesting.
December 1st (Day 1)
Okay, technically I'm writing this at 12:51 AM on December 2nd, but nearly everything was done on December 1st.
Everyone knows tomorrow only starts when you go to bed and wake up :V
I've ripped appart LVERA's ports, annotations. and compiler. Ports have been replaced by stubs. Annotations have been replaced by compiler passes. And the compiler backend is now a module you give to lvera:compile(backend)
. The end result is the following experience on the Nova and Lua sides:
|_| Convert our parity encoding back into unary, looping as needed. |show x| , copy x to @number , print number |copy x to @number| x -> @number:9007199254740991 |x -> @number, x| @number, temporary x |x -> @number| |temporary x| x |print number| @print number |move, 2| move, x |move, 1| x |move | hailstone |_| Compute 3x + 1 |odd, 2| odd, x:6 |odd | hailstone, x |_| compute the parity of x |eval, x, 1| eval, 2 |eval, x | eval, 1 |_| resolve our base cases 3x + 1 and x / 2 |eval, 2, 1| odd, 2, x:3 |eval | move |hailstone| show x, eval |#port, on print number , needs, @print number, clears, @print number , takes, @number| || hailstone || x:27
package.path = package.path .. ";./src/?.lua" local Lvera = require "lvera" local lua_generator = require "generators.lua" local lvera = Lvera.new() lvera:load("samples/hailstone.nv") lvera:add_pass(require "passes.ports" (lua_generator.ports)) lvera:add_pass(require "passes.constants") lvera:add_pass(require "passes.eliminate-dead-code") local compiled_lua = lvera:compile(lua_generator) local out_file = io.open("generated.lua", "w+") out_file:write(compiled_lua) local machine = load(compiled_lua)() function machine.on_print_number(_, number) print(number) end machine:run()
This should give me much more flexible control over extending Nova. Additionally, ports have been freed from twiddling counters by hand. My next task is probably going to be merging in other Nova files and starting some graphics. Next goal is gonna be something like:
|#include| notecards/graphics.nv |set color to white| , @color r:255 , @color g:255 , @color b:255 |draw a circle| @draw a circle |display the frame| @display || @circle x:400, @circle y:300, , set color to white , draw a circle , display the frame
November 27th (Day -4)
I've created this section in my wiki section for December Adventure. What I want to focus on is a bit of a double-hitter. My primariy focus will be a small visual-narrative tool written in Lua. My secondary focus is refining my implementation of Nova: LVERA.
For a few years now, I've yearned for a tool that focused around turning drawings directly into interactive elements. I've tried various tools such as Bitsy, Flicksy 2, Decker. None have quite scratched the itch I have. They all have a bit too much "editor" to them. One too many menus to navigate. A weird bit of disjointedness.
I want some that feels more like a painting program than a game editor.
Each of them comes with a bit of scripting. Bitsy and Flicksy both use a bespoke and limited scritping language. These languages can do some basic logic, but I've found them cumbersome for logic-intensive projects. Decker utilizes the programming langauge called lil.
It's a compact yet powerful language. It doesn't hold you back from diving head on into complex logic. However, I've found lil pushed me into "thing like a programmer" more than I liked. I want something that doesn't force me to ponder design patterns and encapsulation.
I also had the misfortune of hitting a bug that ended my attempt at participating in Dec(k) Month. This bug has since been fixed, but I've found returning to Decker difficult after that.
However, there are a few "small tools" that have stuck with me: Flick Game and Kooltool. Flick Game presents itself as a canvas, some brushes, a fixed 16-color palette, and fixed 16-scene list. Each colore can be assigned a sign to transition to when you click on it. This enables you to make tiny branching narratives.
Kooltool is a interactive tile-based world that you can navigate, explore, and edit. It's highly experimental, however, it provides fuel for the imagination. The editor provides you a sense of space and navigation. Every tile is a canvas you can draw on, automatically updating other copies. You can write text, draw, create tiles, and create entites seemlessly. It's rough around the edges, but I've been enamoured with it.
Then, Devine completely blew me away with Tote. Tote is a visual rewriting system. It's fully capable of general computing while only using user created glyphs. It blended art and logic into a magical cocktail. I was completely swept off my feet.
Seeing Devine craft Tote has inspired me to try again. Additionally, I am now armed with knowledge on rewriting system. Interactive fiction relies heavily on managing and manipulating a chunk of global state to drive a story. This is a task that rewriting excells at.
Additionally, by leveraging Nova, I should have something that you could theoretically port and glue into other systems with (relative) ease.
November was supposed to be my time to build something. But, the distress from the US (that's where I live) elections washed out my motivation. However, life continues, I feel inspired. I'm going to create. Hopefully, I end up with something neat at the end.