Should we create a domain-specific language for CA searches?
Posted: August 6th, 2021, 10:08 pm
I just watched a talk by Brian Kernighan about programming language design. The main takeaway from it for me was that the ideal time to create a new DSL (Domain Specific Language) is when you keep encountering problems that, intuitively, feel like they should be one line, but are not; which, I argue, occurs in this community regularly. For example, here are some problems I've personally solved, that feel like they should be one-liners:
Find x*y planes that are oscillators in rule r.
Find MAP rules where a single cell is a spaceship.
Find constellations of dots that reflect a spaceship 90 degrees without changing.
Simulate an explosive rule like /2/3 and list the spaceships that occur in the chaos. (debatable)
There's also the old problem of "simulate combinations of numerals and run a general census on them". Or "Collide this spaceship with this object in every possible way and do a general census on the results". Or "Test a bunch of soups and check for some property being exceptional, like lifespan being high or final population being 0".
Right now, we have half-solutions (most of which I admit I have no experience with) like Golly scripting, libraries like lifelib, or in some sense lls. But I don't think anyone's gone all the way and created a new language. If it is created, I think it will be followed by a sudden wave of discoveries that were technically possible before, but the scripts to find them were too tedious to implement; the DSL, however, would make them ~10 characters long. It would also cause people to think of problems that are easy to solve with the DSL that they otherwise wouldn't have thought of, further exacerbating the wave (maybe even being its main driver).
I don't know for sure if a CA search DSL would be a good idea in practice or if anyone would use it. But I feel compelled to make this post because I just can't shake the feeling that so many problems like the ones I've mentioned really should be one line. Don't you agree?
Any thoughts?
Find x*y planes that are oscillators in rule r.
Find MAP rules where a single cell is a spaceship.
Find constellations of dots that reflect a spaceship 90 degrees without changing.
Simulate an explosive rule like /2/3 and list the spaceships that occur in the chaos. (debatable)
There's also the old problem of "simulate combinations of numerals and run a general census on them". Or "Collide this spaceship with this object in every possible way and do a general census on the results". Or "Test a bunch of soups and check for some property being exceptional, like lifespan being high or final population being 0".
Right now, we have half-solutions (most of which I admit I have no experience with) like Golly scripting, libraries like lifelib, or in some sense lls. But I don't think anyone's gone all the way and created a new language. If it is created, I think it will be followed by a sudden wave of discoveries that were technically possible before, but the scripts to find them were too tedious to implement; the DSL, however, would make them ~10 characters long. It would also cause people to think of problems that are easy to solve with the DSL that they otherwise wouldn't have thought of, further exacerbating the wave (maybe even being its main driver).
I don't know for sure if a CA search DSL would be a good idea in practice or if anyone would use it. But I feel compelled to make this post because I just can't shake the feeling that so many problems like the ones I've mentioned really should be one line. Don't you agree?
Any thoughts?