User:Xifeng
Jump to navigation
Jump to search
Xifeng is a data analyst from sunny Seattle, Washington, who has been an esoterica enthusiast since childhood.
Current Projects
Short Circuit Language
I've lately been thinking about short-circuit logic as a primary means of flow-control, possibly within a single outer loop. So far the main outcome of this has been:
int main() { int i=0; while(i < 84) { (((++i)%3)&&(i%7)&&printf("%d ",i))||((!(i%3))&&(!(i%7))&&printf("fizzbuzz\n"))||((!(i%3))&&printf("fizz "))||((!(i%7))&&printf("buzz ")); } }
I'm trying to make a language around this structure, something a bit prettier like:
[[t mod 3] and [t mod 7] and print t and print " "] or [[not [t mod 3]] and [not [t mod 7]] and puts "fizzbuzz"] or [[not [t mod 3]] and print "fizz "] or [[not [t mod 7]] and print "buzz "]
So I'm working on a simple compiler in sed.
LHOOQ
lhooq came out of some tinkerings with relational tables during a lull at work, and is basically a simulation of a balls-and-chutes toy. I'm working on implementing it, but I'm pretty bad at legitimate programming so it is going slowly.