Hello again!
For a while now I have been aware of a bug within my Algodoo Computers that allows said computer to run any thyme script you want (with limitations of course).
This scene assumes you have used the computer before -- if not, it is booted into a manual that can help you learn how to use it before continuing!
This bug stems from the usage of Algonet, a feature that's been in these computers for quite some time now that allows for persistent storage of data on named files that any Algodoo computer on the same installation of Algodoo can access.
The way it works is simple -- Algonet uses global variables (i.e. variables that persist across scenes) with a naming scheme of algonet_domain_name, where name is the name of the file.
The way the computer does this is also simple -- to read, it simply runs geval("algonet_domain_name"), which simply returns the contents of the file. To write, it runs geval("algonet_domain_name = scene.my.netcache"), for example (note that I haven't actually looked in the code in a while so it might not be named netcache!
Contrary to the name, Algonet does not connect to the internet -- its name is based on the fact that any Algodoo computer within your installation of Algodoo can access it, but don't worry -- your best friend who uses Algodoo as well cannot access them, as they are just regular global variables.
Anyway, you may have noticed a problem with this implementation -- and if you have, good eye!
For reading, it would be fairly trivial to do something after reading the file, as "name" can be anything you like, including thyme scripts.
So, if we try to read the file ";App.GUI.ShowMessage("Hello, World!")", the computer will access the Algonet variable "" and then go on to execute our Hello World script!
In Chives, this would look like this:
set 0 ;App.GUI.ShowMessage("Hello, World!")
netread 1 vr0
This exact program can be found on the Hello, World! floppy.
Note that this should theoretically work in AHOX Basic as well, but because of the way it handles strings it would be quite a bit more complicated -- hence why there aren't any examples...
Before we do anything else, remember how I said "with limitations of course"?
Since the glitch takes advantage of gval, it doesn't have direct access to the actual computer running the code.
But yeah!
I definitely thought this bug was interesting!
It's not practical though, and I don't really know how or why I could fix it
You could easily execute Thyme scripts by just opening the script menu on an object or opening the console, no computer required!
You could even put a script inside of a floppy disk, which is a large part of why I really don't think this is worth trying to fix. It's a neat bug, but it's also a very niche bug that can't do anything out of the ordinary.
Have phun~!
2017 - 2025 Little (AHOX)