Post History
SOS, 155 Bytes !+!-!!+!-!!!!+!!-!!+!-!+!-!+!!-!+!!-!!!+!!-!+!!-!!!+!!-!+!!!!-!!+!-!+!!-!!!!+!-!!!!!!+!-!+!-!+!!!-!+!!-!+!!!!-!+!!!-!!+!-!!+!!-!+!!-!!!+!!-!!+!-!!+!-!!!!+! Explanation: Each ! o...
Answer
#3: Post edited
- # [SOS](https://github.com/celtschk/SOS), 155 Bytes
!+!-!!+!-!!!!+!!-!!+!-!+!-!+!!-!+!!-!!!+!!-!+!!-!!!+!!-!+!!!!-!!+!-!+!!-!!!!+!-!!!!!!+!-!+!-!+!!!-!+!!-!+!!!!-!+!!!-!!+!-!!+!!-!+!!-!!!+!!-!!+!-!!+!-!!!!+!
- # [SOS](https://github.com/celtschk/SOS), 155 Bytes
- !+!-!!+!-!!!!+!!-!!+!-!+!-!+!!-!+!!-!!!+!!-!+!!-!!!+!!-!+!!!!-!!+!-!+!!-!!!!+!-!!!!!!+!-!+!-!+!!!-!+!!-!+!!!!-!+!!!-!!+!-!!+!!-!+!!-!!!+!!-!!+!-!!+!-!!!!+!
- Explanation:
- Each `!` outputs a single bit. That bit is 0 if the current stack is empty, and 1 otherwise. Initially the stack is empty. `+` adds something (an empty stack) to it, and `-` removes it. As soon as 8 bits are output, the corresponding byte is sent to stdout. Therefore the sequence up to the 8th `!`, `!+!-!!+!-!!!` outputs the bit sequence 01001000, which is the ASCII code for the letter H.
- The last character uses the fact that if at the end of the program less than 8 bits are output, the value is left-padded with zeros, and the resulting byte is output. So with comments (and spaces to make the output commands line up), the program reads like this:
- ```text
- !+!-! !+!-! ! ! Output 01001000, i.e. H
- !+! !-! !+!-!+! Output 01100101, i.e. e
- -!+! !-!+! !-! ! Output 01101100, i.e. l
- !+! !-!+! !-! ! Output 01101100, i.e. l
- !+! !-!+! ! ! ! Output 01101111, i.e. o
- -! !+!-!+! !-! ! Output 00101101, i.e. comma
- ! !+!-! ! ! ! ! Output 00100000, i.e. space
- !+!-!+!-!+! ! ! Output 01010111, i.e. W
- -!+! !-!+! ! ! ! Output 01101111, i.e. o
- -!+! ! !-! !+!-! Output 01110010, i.e. r
- !+! !-!+! !-! ! Output 01101100, i.e. l
- !+! !-! !+!-! ! Output 01100100, i.e. d
- +!-! ! ! !+! Output 00100001, i.e. exclamation mark
- ```
#2: Post edited
[SOS](https://github.com/celtschk/SOS), 155 Bytes- !+!-!!+!-!!!!+!!-!!+!-!+!-!+!!-!+!!-!!!+!!-!+!!-!!!+!!-!+!!!!-!!+!-!+!!-!!!!+!-!!!!!!+!-!+!-!+!!!-!+!!-!+!!!!-!+!!!-!!+!-!!+!!-!+!!-!!!+!!-!!+!-!!+!-!!!!+!
- # [SOS](https://github.com/celtschk/SOS), 155 Bytes
- !+!-!!+!-!!!!+!!-!!+!-!+!-!+!!-!+!!-!!!+!!-!+!!-!!!+!!-!+!!!!-!!+!-!+!!-!!!!+!-!!!!!!+!-!+!-!+!!!-!+!!-!+!!!!-!+!!!-!!+!-!!+!!-!+!!-!!!+!!-!!+!-!!+!-!!!!+!