Toy interpreters/compilers (20)

9 Name: #!/usr/bin/anon 2006-02-12 10:18 ID:Heaven

>>7
You can shave off a couple of bytes by losing the brackets: eval while<>

And you can then shave off a few more by changing the while loop to a for loop: eval for<>. However, this also changes it from reading a line at a time to reading the whole input file at once (into a list), so it'll be potentially memory-heavy (arguably defeating the purpose of shaving those bytes off to begin with...)

This thread has been closed. You cannot post in this thread any longer.