int main(int args, char ** argv)
{
static int foo[640*1024];
return 0;
}
This compiled into a valid MS-DOS .exe, but spit out "Out of memory" and exited when attempted to run. Was quite handy for getting an extra day to work on lab assignments back at school.Then I re-read is as 640k and went "Oooh"
Lost 5% of my grade to that bug.
These were basically home assignments that we would demo at a lab for a grade. The lab machines had several "resident" programs running on them (some legit, like basic AV, and some installed by lab admins for their own questionable purposes), so the amount of available RAM varied wildly, sometime dipping as low as 300KB. The TAs knew that, but didn't care enough to do anything about it.
So when an assignment that you did on your own machine failed with "oom" at the lab, it was plausible that it was due to all the junk taking up too much space on the lab boxes. The assignments themselves were math-heavy physics modelling tasks, so you they did actually need a lot of memory.
All that said, I think only once someone used this "trick" to get an extension and it was because his truly needed few more hours to hammer its sim into converging.
First, I'd have been able to run it (or grade it even without running it). And yes. I've seen a lot of crappy Haskell code. I've written a good amount of that myself when I was learning Haskell back then.
Second, assuming I didn't know Haskell, I'd have stopped your babbling in the presentation at some point and asked you to run it.
Third, any student that does unusual things is either very good or very cheeky, so those students deserve special attention. So 10 minutes at your and my convenience to run the demo in my office would always have been an option.
(But then, teaching at my university probably was quite different from teaching at your university).