Page 1 of 1

Super Small Quine

Posted: Tue Dec 30, 2008 8:54 pm
by gfoot
Hmm, I'm getting penalised for printing a newline after the last line. If my input ends with a newline, the area calculation charges me for a whole additional line. I think that's a bit unfair - the next line should only be counted if it's non-empty. The final newline ought to be considered a terminator for the previous line.

Posted: Tue Dec 30, 2008 9:25 pm
by adum
good point, i'll fix that

Posted: Tue Dec 30, 2008 10:03 pm
by therethinker
Whoo! That was tricky!

As for the extra newline: is it also fixed for the normal quine? I remember running into that problem aswell...

Posted: Wed Dec 31, 2008 12:02 am
by adum
okay, should be fixed

Posted: Wed Dec 31, 2008 6:00 am
by therethinker
efe: I'm assuming you're doing a 1-liner too?
Do you want to share code?

Posted: Wed Dec 31, 2008 3:04 pm
by efe
@therethinker:

My solution:

Code: Select all

0@@@@@@ 01^gx?s!P1+$
Have you got the same? If not, please post yours too!

Posted: Wed Dec 31, 2008 3:57 pm
by gfoot
Yeah, the trick seems to be working out how to do bounded loops on one line. Mine is a bit different, but it comes out the same length.

It would be nice if $ with an empty call stack terminated the current thread, ending the program if all threads have finished.

Posted: Wed Dec 31, 2008 6:01 pm
by ShardFire
I took a completely different approach for this which seems to work by luck :lol:

Code: Select all

0@s!@~@~@@@~01^gP1+$

Posted: Wed Dec 31, 2008 6:31 pm
by m!nus
efe: i got exactly the same as you :D

Posted: Wed Dec 31, 2008 6:38 pm
by therethinker
I also had the same exact code as efe & m!nus!

Posted: Wed Dec 31, 2008 10:40 pm
by gfoot
Mine was identical to ShardFire, except I used spaces instead of tildes, and put them in slightly different places (there's some flexibility there).

Posted: Sun Jan 04, 2009 11:30 pm
by teebee
My solution is essentially the same as the one of ShardFire and gfoot.

Posted: Wed Dec 14, 2011 7:33 pm
by swgr
mine:

Code: Select all

0@s!@ @@@ @ 01^gP1+$
And, it seems that printing some more \0 will result in 'incorrect', but the return message will not contain those \0 in the tail. So I gets something like:

Code: Select all

<font color=red>Expected: 
'0@s!@@@@@@ x01vgP1+$', got: 
'0@s!@@@@@@ x01vgP1+$'</font><br> Your King of the Hill score is 20. <font color=aa0000><b>'0@s!@@@@@@ x01vgp1+$' is incorrect.</b></font><p>

Posted: Thu Dec 31, 2015 10:11 am
by Hippo
I posted the same as gfoot except I have used ShardFires positions, I was lazy to submit vertical one using x instead of 1^.

Actually vertical solution is a nonsense:(.
I have improved my solution to @s!@0@ @@@ 01^gP1+$? length 19 with a dummy char.
With option to use @0@@ @@ instead and write all except the $ just to shorten it one char...