3 ms·
That's neat! A number of years ago I attempted to create a program that would exhaustively evaluate short, digitless "dc" programs to find the shortest program
by jepler 3y ago
That's neat!
A number of years ago I attempted to create a program that would exhaustively evaluate short, digitless "dc" programs to find the shortest programs for all numbers under a million: https://emergent.unpythonic.net/01518231512 https://emergent.unpythonic.net/01518231512 & a database of all my results for numbers up to 1 million: https://emergent.unpythonic.net/01525128151 https://emergent.unpythonic.net/01525128151
While dc does have looping and function calls, my program didn't investigate their use; only straight-line dc programs are checked.
(dc is an rpn calculator available on many unix systems)
- mdl_principle 3y agoCool - looks like we both walked similar paths: Using a stack-based language, pruning invalid programs, even having similar bugs (I too had one related to excluded prefixes). It's sad that things like this are nearly impossible to find on Google unless you already know the exact title.