Page 1 of 1

Super Small Hello World

Posted: Tue Jan 06, 2009 3:23 pm
by Tenebrar
How would sizes for SuperHack programs be calculated exactly?

Would:

Code: Select all

123
4
5
and

Code: Select all

123
  4
  5
be of the same length? Would that length be 5 or 9? Or would the first be of length 5 and the last of length 9?

Posted: Tue Jan 06, 2009 3:39 pm
by MerickOWA
both are lengths of 9

Posted: Mon Feb 09, 2009 1:14 am
by theStack
MerickOWA wrote:both are lengths of 9
So the length is always calculated with (MaximumCodeWidth * MaximumCodeHeight)?

This leads me to another question, namely how is "speed" measured?
There is e.g. the "Fast String Reversal" challenge where the upper boundary is something about 35, but you should reverse a string that could be up to 100 chars. Well this seems quite impossible for me, I mean you *have* to process at least every char once, so how should that be possible in 35 cycles?

So, either I have understood the wrong thing in "speed" or it *is* in fact possible and I'm thinking too complex (I have to admit I have only solved one challenge so far with SuperHack...) or whatever.

// EDIT:
Oh sorry, regarding the SuperHack description my questions are quite senseless, they're both answered there. In short:
Code size -> counted as size of bounding rectangle
Speed -> measured in cycles BUT per cycle there can be more than one thread executed

Posted: Sat Mar 28, 2009 1:26 am
by megabreit
I noticed one thing:
" " (Space) does not count as cycle. At least it does not appear in the trace.
Other no-ops like "=" or "|" to beautify program flow do appear in the trace and count as cycle e.g. decrease speed.

Is this true or just a "display" problem?

Posted: Sat Mar 28, 2009 10:20 am
by efe
That is in fact a display problem in the javascript implementation.
Space instructions appear in the trace when using the PHP implementation, however...
and of course they count as cycles!

Posted: Mon May 31, 2010 10:00 am
by laz0r
Why oh why can't 'd' divide S0 by S1?! Then I could simply have something like:
codehereHello, World!
and it would terminate properly and everything, as long as by the end of the code there was a value on the stack. Grr.

Posted: Thu Mar 10, 2016 6:50 am
by Hippo
After a long think I have found a promissing layout to replace my "generic" 32 instruction solution ... I have found 2 other 32 instruction solutions and now 30 instruction solution ... and another 30 instruction one:(.
And now another 2 solutions in 30 (different layouts).