Page 1 of 1
Super Small Hello World
Posted: Thu Jan 01, 2009 12:28 am
by m!nus
Could it look any different? I'd like to see your solutions please (i bet there can't be a very small of this, so it's save)
Posted: Thu Jan 01, 2009 12:58 am
by efe
I have the same solution as m!nus!
Posted: Thu Jan 01, 2009 1:02 am
by m!nus
again! *checks for keyloggers* -- oh wait, last time you had it before me
now i only have fast strrev and sorting left, the hardest ones :/
both will maybe work with threading :/
Posted: Thu Jan 01, 2009 1:48 am
by ShardFire
That would be identical to mine too! Any variants?
Posted: Thu Jan 01, 2009 2:59 pm
by efe
I tried a different method. I managed to print "Hello, World" using 29 instructions.
Only one char is missing !
Posted: Tue Jan 06, 2009 12:33 pm
by Yharaskrik
Ufffff...
I finally got it. And I did it in 2 lines of code!
Thanks for your sharings - sometimes THE one idea to solve something (in 1 line) doesn't
come to ones mind...
Here is my solution:
The characters between / and \ in the first line are the "Hello, World!" characters +128.
I needed 3 days to find the tricky 4] solution
By the way... I would like to see more discussions about different solutions in the solved section.
Okay, we have to be carefull about future challenges.
But I use this site to learn something and not to be on top of the list (, if so I had to hide my solution).
What do you think?
Best regards,
Yharaskrik
Posted: Tue Jan 06, 2009 4:35 pm
by Yharaskrik
Hey, efe!
Did my solution help you to shorten your solution?
When I saw that I cannot see my own posting in the forum
(I really don't like these "King of the Hill" challenges

)
I had to start working again...
Posted: Tue Jan 06, 2009 4:50 pm
by efe
Yharaskrik, in fact, your clever solution helped me shortening the 1-liner ! Thank you!
Here is my solution:
Posted: Thu Aug 18, 2011 2:22 am
by arthur
This is one of my solutions.
There is an invisible char in the code so that the size is 30

Posted: Fri Nov 25, 2011 12:00 pm
by harvestsnow
Amazing puzzle!
My first idea was to use numeric representation, pushing digits on the stack and converting them into ascii chars. This is pseudo-base-9:
Code: Select all
10574819781600317848486744@s!@@@@@ 9*+84*+P$
Obviously this method couldn't satisfy the 29-char constraint.
It took me some time to realize that the data could be embedded in the code and find the 32 chars solution that m!nus posted.
Seeking further, I tried to alternate the instructions and the data chars, as arthur did, unfortunately loosing control on the loop. This one has 29 chars but it loops 16 times and so prints 3 extra trailing null bytes:
Working again on the 'easy' solution, I could go down to 30 with the MSB trick by dropping the '%' and taking advantage of the ',':
and finally I found how to drop the useless space that was bothering me since the beginning:
9@s!@@@@@Hello, Worlä¡1^gP1+$
Probably the unique solution, modulo trivial modifications (unless someone finds a voodoo thread-trick).
Posted: Thu May 12, 2016 9:04 pm
by Hippo
Yes, I got the same at the end.
I got following 30 chars solutions ... in order of finding:
Code: Select all
\
@
2
@
H
@
e
@
l
2
l
+
o
x
,
g
P
W
x
o
3
r
9
l
*
d
?
!
$
Code: Select all
\
H
e
l
l
o
,
W
o
r
l
ä
¡
@
s
!
@
@
@
@
@
1
+
x
0
g
P
$
Grrr ... it would be so easy if one would read the state of the thread at the time it was on 30... with optimal layout already mentioned ...
arthur wrote:This is one of my solutions.
(asc(.)<9)
This solution was very close to mine ... using all working characters of the result.