News for hackers. Stuff that matters.
Re:Tetris in Haskell by jacquesm on Saturday August 08, 2009 @06:55PM (#749953)
this is a video of somebody playing tetris, it could have been programmed in java, haskell or brainfuck for that matter.

Without the code to go with it haskell hasn't got much to do with it. Would be nice to see the source!

Re:Tetris in Haskell by whalesalad on Saturday August 08, 2009 @07:19PM (#749981)
Yeah, the source code would be very good to see.
Re:Tetris in Haskell by jacquesm on Saturday August 08, 2009 @07:27PM (#749993)
If it is programmed in brainfuck though I'm going to eat my hat or something. Do penance in a major way ;)
Re:Tetris in Haskell by ilyak on Sunday August 09, 2009 @03:47AM (#750507)
I'm afraid most brainfuck implementations don't have non-blockind IO; therefore, you can't. Otherwise it would be very fun.
Re:Tetris in Haskell by jacquesm on Sunday August 09, 2009 @04:37AM (#750534)
hm... time to get coding :)

maybe we can 'memory map' some of it ? Subsequent locations in memory that you plot to a screen on over modificiation (b/w would be ok in this case I guess), a bunch of bitfields that get 'latched' whenever a key is pressed that the brainfuck mainloop has to walk by every now and then, resets and uses as branching points ?

That should do it.

It doesn't need blocking io, see. Polling latched inputs is the way the machines of old did it, it's a bit less efficient but it works.