Re: Nice "bug" to loose a contest

2007-04-12 Thread aspineux
On 8 avr, 13:40, "aspineux" <[EMAIL PROTECTED]> wrote: > This code works like the python one, > I dont use buffered stdio f... functions, > but the more 'system call' read and write > > int main() > { > char buf[120]; > int len; > > while (len=read(1, buf, sizeof(buf))) { > writ

Re: Nice "bug" to loose a contest

2007-04-09 Thread azi . stdout
On Apr 9, 2:47 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 09 Apr 2007 09:19:16 -0300, <[EMAIL PROTECTED]> escribió: > > > Yeah, I've noticed that too, altough I'm clueless on how stdio handles > > that differently. Now I'm wondering, what's the behaviour of the > > Python snippet

Re: Nice "bug" to loose a contest

2007-04-09 Thread Gabriel Genellina
En Mon, 09 Apr 2007 09:19:16 -0300, <[EMAIL PROTECTED]> escribió: > Yeah, I've noticed that too, altough I'm clueless on how stdio handles > that differently. Now I'm wondering, what's the behaviour of the > Python snippet that reads from stdout in Windows.. Can someone on > Windows try it and rep

Re: Nice "bug" to loose a contest

2007-04-09 Thread azi . stdout
On Apr 8, 1:40 pm, "aspineux" <[EMAIL PROTECTED]> wrote: > This code works like the python one, > I dont use buffered stdio f... functions, > but the more 'system call' read and write > > int main() > { > char buf[120]; > int len; > > while (len=read(1, buf, sizeof(buf))) { > wr

Re: Nice "bug" to loose a contest

2007-04-08 Thread aspineux
This code works like the python one, I dont use buffered stdio f... functions, but the more 'system call' read and write int main() { char buf[120]; int len; while (len=read(1, buf, sizeof(buf))) { write(1, buf, len); } return 0; } I dont understand what is appening,

Nice "bug" to loose a contest

2007-04-08 Thread stdazi
Hello, Yesterday, I was at a programming competition. We programmed on Linux liveCD's and Python was one of the allowed languages (among C and Java). I cared just about the algorithmic approach so I used Python. One of the main rules is, that the code reads its standard input and dumps the result