Thinking / playing with the idea of building discr...
# devlog-together
g
Thinking / playing with the idea of building discrete simulations using a command line -> GLSL viewer pipeline. I've built a simple set of tools that allow me to send GLSL code to a browser-based viewer. I used vanandrewngueyn's game of life code and whittled it down to fit the pipeline tools, for testing. Then, I asked Claude to build code to simulate a Brusselator in the same way. At first, it built code based on differential equations. This shows something interesting in the viewer. Then I asked for code to perform a discrete simulation, but, that doesn't give the same results as the differential version. I'm stepping well beyond my area of expertise and need to stop lest I get sucked into a black hole. In case this is of interest to someone else, with more knowledge, I am posting the WIP repository here. See the README.md for usage.
❤️ 1
i
aside from, like, kicking the can on this idea, what are you thinking you might use it for? any particular simulations you want to run?
also, do you have any screenshots? i'd love to see how this looks
k
I'll try to find time to play with this. Making visualizations from command-line tools would be convenient in many situations of computational science. Computational scientists know command-line tools, and they need visualization. BTW, the Brusselator is a classical model for chemical reaction kinetics, showing how you can get oscillations in a system where chemicals move around. The name refers to the University of Brussels where it was developed.
g
The first-order goal was purely technical and was a success. In the process, I needed some test data, which led me to
life.glsl
. This then opened the door to a rabbit hole - surely I could discretely simulate the 4 simple equations of a Brusselator (developed by Nobel Laureate Ilya Prigogene, who claims that functional thinking has set Physics back by at least 100 years) instead of using hoary time differential equations. When that didn’t immediately work, I heard a voice from the darkness down in the rabbit hole whispering to me “tweak me, tweak me”. I slammed the door shut and pushed a snapshot up to github. The first-order goal was inspired by Forth Haiku which takes 2 lines of code, compiles them to 100s of lines of JS then t2t (text-to-text) transmogrifies this to runnable GLSL (I captured some of my analysis here). I wanted to slice this process up: a viewer running in a browser, allowing me to simply throw GLSL source code at it from the command line to eval it and display pretty images (better than a 2D cyan square 😀). Writing code that generates code is what my ‘t2t’ stuff is meant for and that’s where I’m going to take this when I actually learn what GLSL is… various screenshots (life, differential equation Brusselator, failed attempt at discrete Brusselator, current test data)…