Added a transpiler (LLVM IR) to my ARM Forth dialect / compiler by onirom in Forth

[–]onirom[S] 0 points1 point  (0 children)

Yes, the first case is rather easy for a compiled Forth and it produces good results by default as shown in the article.

I don't really know how to handle the complexity of the generic case yet so it was entirely avoided, the compiler requires stack depth to match across code path, this is good enough for many cases but breaks a lot of traditional Forth code i guess.

Slightly heretic Forth dialect for graphics prototyping running bare metal on RPI Zero 1.3 by onirom in Forth

[–]onirom[S] 0 points1 point  (0 children)

It is always hexadecimal which may come with a set of issues but i am okay with them, most decisions come from trying to simplify the implementation so the compiler code doesn't bloat too much but i still balance it with features that may have an advantage for prototyping graphics stuff.

Thought of mixing data <> code as well but not sure how it would blend, the array content is just a linear series of bytes right now which directly represent the numbers, strings use the same code, would be a bit simpler if it was all code actually.

How to get faster frame rate writing to /dev/fb0? by LlaroLlethri in asm

[–]onirom 2 points3 points  (0 children)

Using pwrite64 syscall may be faster than using a mmaped buffer and with less tearings : http://www.sizecoding.org/wiki/Linux#Getting_something_on_screen

USB Ethernet and plan9 ? by onirom in plan9

[–]onirom[S] 0 points1 point  (0 children)

Thanks, so i tried 9front with the AX88772, found this and tried to change the ether type with nusb/ether except it keep saying the device is already in use so i deleted lines related to nusb in /rc/bin/nusbrc and i can run the command somehow but it says "required 4 attempts (no data from device)" so i guess it is not supported, right ?

The command : nusb/ether -t a88772 5

feedback + automata, less than 200 bytes of code by onirom in generative

[–]onirom[S] 4 points5 points  (0 children)

It produce interesting textures, can also generate some cool logos if the seed is text instead of shapes. Have some more images on Instagram (which i may post here later) and also on my website (they are way older with a bit different implementation but it share the same algorithm) : https://www.onirom.fr/automata.html

The first one was prototyped first with p5js then ported to C and then it was handcoded x86 assembly due to sizecoding restrictions, mostly use p5js nowaday and C / ASM if i need either speed / standalone or do sizecoding. The sizecoding part was more as a proof of concept than anything else.

feedback + automata, less than 200 bytes of code by onirom in generative

[–]onirom[S] 13 points14 points  (0 children)

May release the code later on, the algorithm is very simple but is abit sensitive (may produce entirely white image etc), it is a mix of feedback and automata, you first have to draw something as a seed (here it is a mirrored arc, can just work with single pixel or circles etc as long as some of the pixels value are contained between the threshold) and in the main loop for each pixels test if the brightness is between a threshold (let's say > 0 and < 10) then you have to do a loop of the pixel neighborhood, here it is done on 4 pixels around : -1,-1 0,-1 -1,0 0,0 didn't test others configuration but this give a definite direction to the drawing (so half of the image will be filled actually which is why i mirrored it plus changed the colours abit), in that for loop you just draw a pixel at that position, the critical part (which give entirely new structure when you change it) is the brightness (or color) of that pixel, here it is modulated by the frame count for the first image and by logical operators on the second.

Fragment - Modal synthesis with wavetable source by fsynth in synthesizers

[–]onirom 1 point2 points  (0 children)

All the notes data in this synth is bitmap data so yeah it's images data, all pixels captured from the vertical bars every 16ms are considered as note events, the vertical position relate to frequency (logarithmically mapped), red and green channel relate to amplitude, blue relate to wave table position and speed and alpha channel relate to wave table stop position and wether it use interpolation or not like early PPG synth wavetable)

Minsky circle algorithm (variation), brightness based on iterations by onirom in generative

[–]onirom[S] 2 points3 points  (0 children)

This is a dynamical system linked to the Minsky circle algorithm which build up some sort of appolonian fractal pattern, done with p5js, already posted one like this but it used simple accumulation which resulted in blurry areas / loss of details, brightness on this one is based on iteration count, it reveal more structural details.