Skip to main content
OCD sorry
Source Link
MD XF
  • 14.3k
  • 5
  • 70
  • 108

Diagrams generated with Timwi'sTimwi's amazing HexagonyColorer.

Diagrams generated with Timwi's amazing HexagonyColorer.

Diagrams generated with Timwi's amazing HexagonyColorer.

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

After writing a brute force scripta brute force script for my Truth Machine answer, I set it to find an error-free 6-byte solution for the cat program as well. Astonishingly, it did find one - yes, exactly one solution in all possible 6-byte Hexagony programs. After the 50 solutions from the truth machine, that was quite surprising. Here is the code:

Diagrams generated with Timwi'sTimwi's amazing HexagonyColorer.

After writing a brute force script for my Truth Machine answer, I set it to find an error-free 6-byte solution for the cat program as well. Astonishingly, it did find one - yes, exactly one solution in all possible 6-byte Hexagony programs. After the 50 solutions from the truth machine, that was quite surprising. Here is the code:

Diagrams generated with Timwi's amazing HexagonyColorer.

After writing a brute force script for my Truth Machine answer, I set it to find an error-free 6-byte solution for the cat program as well. Astonishingly, it did find one - yes, exactly one solution in all possible 6-byte Hexagony programs. After the 50 solutions from the truth machine, that was quite surprising. Here is the code:

Diagrams generated with Timwi's amazing HexagonyColorer.

grammar
Source Link
izzyg
  • 42.3k
  • 5
  • 79
  • 216

The first time (purple path) we pass through ~ it's a no-op. The / reflects the IP into the North-West diagonal. The grey path now reads a character and multiplies it'sits character code by -1. This turns the EOF (-1) into a truthy (positive) value and all valid characters into falsy (non-positive) values. In the case of EOF, the IP takes the red path and the code terminates. In the case of a valid character, the IP takes the green path, where ~ undoes negation and ; prints the character. Repeat.

The first time (purple path) we pass through ~ it's a no-op. The / reflects the IP into the North-West diagonal. The grey path now reads a character multiplies it's character code by -1. This turns the EOF (-1) into a truthy (positive) value and all valid characters into falsy (non-positive) values. In the case of EOF, the IP takes the red path and the code terminates. In the case of a valid character, the IP takes the green path, where ~ undoes negation and ; prints the character. Repeat.

The first time (purple path) we pass through ~ it's a no-op. The / reflects the IP into the North-West diagonal. The grey path now reads a character and multiplies its character code by -1. This turns the EOF (-1) into a truthy (positive) value and all valid characters into falsy (non-positive) values. In the case of EOF, the IP takes the red path and the code terminates. In the case of a valid character, the IP takes the green path, where ~ undoes negation and ; prints the character. Repeat.

added 291 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
added 457 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
added 457 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
added 202 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
added 710 characters in body
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading
Source Link
Martin Ender
  • 198.3k
  • 67
  • 455
  • 999
Loading