hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Super Quine

 
Reply to topic    hacker.org Forum Index » Challenges View previous topic
View next topic
Super Quine
Author Message
lechat



Joined: 27 Feb 2008
Posts: 12

Post Super Quine Reply with quote
Hi adum,
I wrote a program for the Super Quine, it works fine (I hope) in ptest.php but on the challenge page I get always 503 Error:

Code:
Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


Is it due to errors in the program or glitches on the server?

Regards,
lechat
Tue Dec 30, 2008 9:26 am View user's profile Send private message
lechat



Joined: 27 Feb 2008
Posts: 12

Post Reply with quote
Got it!
Errors in the program Twisted Evil
Tue Dec 30, 2008 10:42 am View user's profile Send private message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
In this challenge, what end of the line character(s) should we print? 0xd... 0xa... or 0xd 0xa? Wink

Is the challenge picky about differences in trailing end of lines printed or not printed vs the code we enter?

I have a program which seems to print itself out. When i submit it, it tells me my program is wrong, but the expected vs got looks identical to me, even with end of line characters matching exactly (at least from what I can see). I've tried all the 3 different end of line characters above. Maybe I'm suppose to output something different?
Tue Dec 30, 2008 3:51 pm View user's profile Send private message
gfoot



Joined: 05 Sep 2007
Posts: 269
Location: Brighton, UK

Post Reply with quote
I just printed newline (e.g. 91+P) at the end of each line.
Tue Dec 30, 2008 5:11 pm View user's profile Send private message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
Hrm, then i'm at a loss as to what the differences between the program and the output. Its not long at all (compared to HVM version), and only takes 2175 cycles to run.
Tue Dec 30, 2008 7:17 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 391

Post Reply with quote
the newline stuff is a bit of a pain. i remove all \r instances. so basically you should try for just \n.
Tue Dec 30, 2008 7:21 pm View user's profile Send private message Visit poster's website
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
Ok, pretty sure i'm just doing \n now. I even tried replacing all my spaces with an alternate character to make sure something wasn't eating multiple whitespaces in my code (as the php version seems to when it prints the output).

I've noticed playing around that printing a '\0' wont show up in the output but caused my string reversal program to be illegal.

Is there something crazy with needed to write an extra '\0' or some other end of file or end of string character?
Tue Dec 30, 2008 8:32 pm View user's profile Send private message
therethinker



Joined: 28 Mar 2008
Posts: 144
Location: #hacker.org on Freenode

Post Reply with quote
I had a problem where I was printing an extra \n at the end of the program; I don't know if its related to yours but its worth checking.

I noticed that there aren't any goto calls besides @ and $. It'd be nice to be able to jump to a specific location.
Tue Dec 30, 2008 9:22 pm View user's profile Send private message AIM Address
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
Ah, finally found the problem. Had to use firefox to see the actual differences between the output.
I had a few '\0' that my program printed out before the '\n' at the end of each line (padding each line to be the same length) and that caused my program to fail.
Tue Dec 30, 2008 10:09 pm View user's profile Send private message
m!nus



Joined: 28 Jul 2007
Posts: 202
Location: Germany

Post Reply with quote
is the solution accepted if your program gives all output and then crashes? (stack underflow for example)
Tue Dec 30, 2008 10:29 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 391

Post Reply with quote
no, you have to exit successfully.
Wed Dec 31, 2008 12:03 am View user's profile Send private message Visit poster's website
ShardFire



Joined: 30 May 2007
Posts: 26
Location: United Kingdom

Post Reply with quote
The v instruction doesn't appear to be functioning as expected when there are multiple threads with stacks on the same memory row. This is in both the javascript and the checker code. However, the ^ instruction does work (as far as I know).
Wed Dec 31, 2008 5:16 am View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 391

Post Reply with quote
hmmn, that is not something i've tested, so i can certainly believe it's not working right. can you give some sample code that behaves differently from what you would expect? thanks.
Wed Dec 31, 2008 5:34 am View user's profile Send private message Visit poster's website
ShardFire



Joined: 30 May 2007
Posts: 26
Location: United Kingdom

Post Reply with quote
This seems like a good example:

Code:
432&\10....ppppp!
~~~~1~
~/\~v~
~\/s/


It's quite clear what it should print I think so I shall say no more. This example fails on both implementations... Note that both threads write 1 on the same cycle (by design) so the correct value is there for both.
Wed Dec 31, 2008 5:03 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Challenges All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.