Live data from Hacker News

2048 implemented in 487 bytes of C

gist.github.com

21–30 of 47 posts

Re: 2048 implemented in 487 bytes of C

#21
post #7

Doesn't run correctly under windows. The code relies on the system call "stty cbreak", which is linux specific. 'stty' is not recognized as an internal or external command, operable program or batch file. I would love to read comments instead of downvotes. Where am I wrong?

Were you expecting WINAPI wMainMain(...)?

Re: 2048 implemented in 487 bytes of C

#25
post #21
post #7

Doesn't run correctly under windows. The code relies on the system call "stty cbreak", which is linux specific. 'stty' is not recognized as an internal or external command, operable program or batch file. I would love to read comments instead of downvotes. Where am I wrong?

Were you expecting WINAPI wMainMain(...)?

As an obfuscated c example I was expecting portable code. Anyone hoping that as many people as possible try their code should aim for that.

Re: 2048 implemented in 487 bytes of C

#27
post #25
post #21

Earlier quoted context omitted.

Were you expecting WINAPI wMainMain(...)?

As an obfuscated c example I was expecting portable code. Anyone hoping that as many people as possible try their code should aim for that.

Same here. stty is available through cygwin, although I didn't result in a playable game.

Re: 2048 implemented in 487 bytes of C

#29
post #25
post #21

Earlier quoted context omitted.

Were you expecting WINAPI wMainMain(...)?

As an obfuscated c example I was expecting portable code. Anyone hoping that as many people as possible try their code should aim for that.

Obfuscated C is always with caveats. The fact that it uses terminal escapes and stty suggests its not going to work on anything other than a colour xterm, if you're lucky, there are no sunspots and the wind is blowing in the correct direction...

Re: 2048 implemented in 487 bytes of C

#30
post #25
post #21

Earlier quoted context omitted.

Were you expecting WINAPI wMainMain(...)?

As an obfuscated c example I was expecting portable code. Anyone hoping that as many people as possible try their code should aim for that.

I'm not sure that's a common goal for obfuscated c code
Post reply on HN