Show HN: Smile - executable ASCII art (2011 remastered)
github.com
github.com
When ASCII art is the executable....
Executables consisting exclusively of alpha-numeric characters. The digits "0123456789" are used for dark, the letters "acemnorsuvwxz" for light.
Removing instructions that are not alpha-numerical, strips functionality down to the minimum:
- 4.5 of the 7 registers available (%bx, %si, %di, %bp, %ah)
- 4 of the ~80 instructions groups available (XOR,IMUL,CMP,Jcc)
- constant values start from 48, (only range 0x30-0x39,0x61-0x79)
By cosmic coincidence, the 2 instructions needed to jailbreak are available.
On top of that, self-modifying code and radix13 encoding.This should have been released a decade ago. As compensation, it has been remastered. The reward was making it 30% smaller.
>This is like telling the waiter that you don’t eat poultry but eggs are okay, and then they bring you an egg, but that egg hatches into a chicken right after they bring it to you. Come on. [...] While self-modifying code is a powerful technique, it makes this problem "too easy;" I want to explore what programs can be written natively in the printable subset of X86.
A real challenge would be, how far can you cripple an instruction set such that it still can do something useful.
Crippling is done by reducing the 192 printable characters to 36 alphanumeric characters. That leaves 4 instructions with limited addressing modes.
This problem is hard because what you need, even for self modifying code is not available. What smile does is to make that available with the only two instructions left over that modify values: XOR and IMUL.
While smile is also impressive, I think you are unfairly downplaying tom7's work. While it uses bigger instruction set, it never executes any non-printable instruction at all.