I’m tempted to host some silly competion thingy about writing the smallest code to perform some I/O task.
I coded some really silly task, and I’d like you guys to check out whether there is anything dangerous possible.
If so, I’d be very grateful if you’d let me know as fast as possible.
I’m renting this server, and I wouldn’t really like to get my account suspended.
I tried to isolate the running of tasks as much as possible, within the current JVM, but I might have to resort launching a new JVM to avoid any corruption of the HTTP-server-instance hosting this.
http://213.247.55.3:8484/compileandrun/
A (naive) solution for the task would be:
while(true)
{
int a = in.read();
int b = in.read();
if((a|b)<0) break;
out.write(b);
out.write(a);
}
108 bytes, linebreaks don’t count (for readability reasons), but spaces do
Beat that! I didn’t really raise the bar very high, did I…
Anyway, give it a try, and tell me if there’s something I need to know. :-*