Hacker News new | ask | show | jobs
by ejk314 4156 days ago
Reminds me of this 'Hello World': http://stackoverflow.com/questions/15182496/why-does-this-co...

I bet these two ideas would go well together.

2 comments

Sadly the libc prng is not specified, and thus non-portable. It might work if things are checked on the same kernel and libc combination, or it might not. The Java PRNG is specified and globally portable.
The seed for the random number generator is not executed though.
I was thinking more along the lines of making the main function (array) call some other function which does this in such a way that it looks like you implemented a random number generator but it actually prints "Hello World". And you could hide the fact that 'main' was a piece of code by making it the initial seed for for the random number generator and using macros in a separate header file to rename it to something like 'SEED'.