| Bytes | Lang | Time | Link |
|---|---|---|---|
| nan | Rust | 230728T032135Z | Unrelate |
| nan | Beatnik | 190202T085407Z | Esolangi |
| nan | Commentator | 181012T204153Z | Maya |
| nan | Klein 100 | 181012T011610Z | Bubbler |
| nan | CHIP8 | 180929T115023Z | Jo King |
| nan | Trigger | 180912T154547Z | Maya |
| nan | JavaScript | 180926T182023Z | ngm |
| nan | Somme | 180912T084545Z | Bubbler |
| nan | Z80Golf | 180912T043918Z | Jo King |
| nan | Klein 101 | 180911T171849Z | Maya |
| 101 | Hexagony | 180910T033458Z | Bubbler |
| nan | Befunge96 | 180909T131030Z | jslip |
| 096 | ><> | 180909T122253Z | Jo King |
| nan | Brainfuck | 180909T114946Z | Adalynn |
| nan | Lua | 180909T075504Z | boboquac |
| nan | Python 3 | 180909T064048Z | Zachary |
| nan | Python 2 | 180909T061238Z | pizzapan |
| nan | C | 180909T052246Z | Esolangi |
Rust, BrainSpace, ???
fn v(){}
/*{>*}+++++++++++++++++++++++++[[[%]]]*\
\mop+p+p+pox
*/fn main(){print!("17")} //print!(19)$f($f(-x++this::id()++x)++x@);"v2"
//):/
//////////////////////////////////////[]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This prints 17 in Rust, 18 in BrainSpace, and 19 in ???.
Crack explanation
Remembered this existed looking through old messages, figured I could scrape Esolangs for every implemented 2D language where the article body has an o surrounded by non-letters, and fortunately couldn't be bothered to filter out languages that are on TIO because it turns out BrainSpace got added to TIO about five months after it was confirmed not on TIO. (It's also fortunate that it was alphabetically the second candidate out of 48.)
For posterity (as comments can be ephemeral), the full sequence of hints given was:
- The language is not on TIO. (as of 2019/4/3)
- The language is 2D and listed as such on Esolangs.
- The ASCII character 18 is a red herring.
sdoesn't square,[doesn't halve, andodoesn't end the program.operforms output.
BrainSpace is some kind of weird half-Brainfuck-half-fungeoid where {} move the tape head, * is a conditional jump, % is an omnidirectional reflect, all three of pP+ are equivalent increment commands, and all three of oO0 are equivalent output commands. The instruction pointer starts in the top left moving right, so fn avreg(){} sends the pointer down in column 5, {>*} sends it careening into a bunch of increments that it gets bounced through again on the way back then passes it right along to the left, and P0 ++puts++puts[pov] increments 48 to 49, prints that, slaps another 7 on, prints, then terminates the program by leaving the edge--BrainSpace's field is not toroidal.
This should be considerably easier, but you might take some wrong turns.
Beatnik, Rust, ???
fn avreg(){}
fn/*azxzzz avreg k zqyzzz ax quke
>>P0 ++puts++puts[pov]
\@�{>*}++puts++puts++puts++puts++puts++puts++puts++puts%
*/main(){print!("17")}
This prints 16 in Beatnik, 17 in Rust, and 18 in ???.
The � character on line 4 should be replaced with ASCII character 18 (this was not done in the TIO links since it's not relevant to either of them).
Explanation (cracked):
The previous answer's language was Rust: specifically, Rust compiled with mrustc. mrustc is an experimental compiler, and as it is mostly intended for bootstrapping a valid version of rustc, it ignores borrow checking and mutability checking, allowing @NieDzejkob's snippet to compile without errors.
This program will work with the normal Rust compiler, so you don't need to install mrustc to test it.
Hints
Since this answer has now gone the longest without being cracked, I'll leave a hint, and continue to do so regularly until it is cracked:
- The secret language is two-dimensional and can be found on the Esolang wiki page for two-dimensional languages.
- As I mentioned in the comments, the language is not on TIO.
- The
�character is a red herring and has very little significance. Most bytes can be substituted in its place and the program will still work.
Commentator, Beatnik, ???
// k... nak... naKaka pagpAbaGaBag
static answer: Option<&String> = None;
fn llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch(s: &String){
answer = Some(s);
}
fn pneumonoultramicroscopicsilicovolcanoconiosis(){
println!("{}", answer.unwrap());
}
fn main(){
let s = String::from("17");
let t = "Hi! I am a cat. AOOOWRRRWWW! Me need Whiskas! Noow! Mee hungry hast bekommen. Feedme! sudo !!. Sad... six cable hostage wire cable diediediediee # */";
llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch(&s);
pneumonoultramicroscopicsilicovolcanoconiosis();
}
Outputs 15 in Commentator, 16 in Beatnik, and 17 in the hopefully one language you are supposed to find.
Okay, it's clue time:
- The name of the language refers to a compound of two elements, both of which make up your body, but with wildly varying percentages (which way depending on whether you're a robot).
- The language itself is on TIO, but the implementation isn't.
- Oh come on.
Klein (100), Commentator, ???
/@++++2345
start:
program:
db 'function',10
add program,program
jp null+$8
sbc rbp,rbp
jnz program
jr program
add start
halt
ex:
Outputs 14 in Klein (100), 15 in Commentator, 16 in ???.
I'm seriously bad at obfuscating polyglots.
Explanation (Cracked post)
%/ <#> 13
14
+ 15
In Commentator, common comment tokens and spaces are the important commands, and any other characters are ignored.
- Space increments the current memory cell.
<#does XOR 1 on the current memory cell.%is used to reset the current memory cell to zero.
Wait, there are 16 spaces after %, what happened?
It's actually a small bug (or feature?) in the interpreter. / is treated as the start of a 2-char command, so the space after it is consumed. But /<space> is undefined command (thus a no-op), so the space is effectively skipped.
CHIP-8, Klein (100), ???
[ //aТ/\\ ][ //е"6
console.log(111-111+12)]
//!'!/-²6-²52@++++2345
%/ <#> 13
say 14
+ not not 15
Outputs 13 in CHIP-8 (I assume), 14 in Klein, and 15 in ???.
Another Klein topology, tsk tsk. I've preserved the code before the @, since I don't know what will affect CHIP-8.
Clues
I'm kinda overdue for these, sorry. I'll try and add one a day.
- Removing the first half (first three lines) of the program still works.
- This is not a 2D language
- The language is on TIO
- The
nots and thesaycan be removed without affecting the program
For reference, the program without that stuff looks like this:
%/ <#> 13
14
+ 15
Trigger, JavaScript and ???
[ //aТ/\\ ][ //е"6
console.log(111-111+12)]
//!'!/-²6-²52
Prints 11 in Trigger, 12 in JavaScript, and 13 in REDACTED.
Since this has not been cracked for longer than any other answer so far, here are some hints:
- In case you didn't notice, the
Тandеon the first line are multibyte characters. [ //and\\ ][ //are no-ops.- The second line, as well as
-²52, is dead code. - The language does not have a concept of termination, so
²6forms an infinite loop. - To be specific, the second byte of the UTF-8 encoding of
², together with the6, forms an infinite loop. - The number being outputted is encoded by the
/!'!/ - The language is not on Try It Online, Rosetta Code or Esolangs.
- The only available form of output is a 1bpp screen.
- The screen's aspect ratio is 2.
- While the language was not originally intended as machine code, FPGA implementations do exist.
- According to Wikipedia, the intended purpose of the language were video games.
- The only way to access the screen is a special instruction, that takes coordinates in selectable registers, and the height as an immediate, and XORs an 8 by n bitmap onto the screen. To make collision detection easier, as well as make it possible to clear the screen, one of the registers will be set when any pixel gets set back to off.
Explanation
Well, this took some time to get cracked. Let's see how the code looks:
0200 5b20 SE VB, V2 ; Skip the next instruction if VB = V2. Since all
0202 2f2f CALL 0xF2F ; registers start at 0, this call will be skipped. This
; hides the bytecode from JavaScript.
0204 61d0 LD V1, 0xD0 ; A useless load. Necessary to use a UTF-8 continuation
0206 a22f LD I, 0x22F ; byte as an instruction and load the address of
; the sprite.
0208 5c5c SE VC, V5 ; A red herring supposed to suggest symmetry is
; important, as well as a totally intended eliminator
; of inaccurate implementations. Most documentation
; claims that the lowest nibble must be zero, but in
; the original COSMAC VIP implementation it's
; a don't-care.
This means that, while many available emulators behave correctly, the by-the-rules implementation is linked to in the second sentence of the Wikipedia page. Of course, it can't be run directly on an average PC, but I've found the Emma 02 emulator linked to on the COSMAC VIP page to work the best.
020A 205d CALL 0x05D ; Skipped.
020C 5b20 SE VB, V2 ; Same as with the very beginning. Red herring.
020E 2f2f CALL 0xF2F
0210 d0b5 DRW V0, VB, 5 ; Draw the sprite pointed to by I. Since V0 and VB
; haven't been written to yet, the sprite will be drawn
; in the top-left corner of the screen. The height is
; an immediate.
0212 2236 CALL 0x236 ; Jump over the JavaScript and Trigger code. It doesn't
; matter that we never return.
0214-022E *never used*
022F 2f DB %00101111 ; Sprite data.
0230 21 DB %00100001
0231 27 DB %00100111
0232 21 DB %00100001
0233 2f DB %00101111
0234-0235 *never used*
0236 b236 JP V0, 0x236 ; Since V0 is still zero, this is an infinite loop.
0238-023C *never used* ; Together with the previous two lines, it's the
; -²6-²52. It's a red herring supposed to suggest
; prefix, or Polish, notation.
JavaScript, CHIP-8, and ???
[ //aТ/\\ ][ //е"6
console.log(111-111+12)]
//!'!/-²6-²52@++++2345
12 in JavaScript, 13 in CHIP-8, and 14 in ???
I'm going to go out on a limb and call this one cracked, although I can't quite get it to work I'm sure of the language (which seems to be what the rules ask for.)
Here is an imperfect explanation of the cracked post
The code in hexadecimal "is" (I might be slightly off):
[ 0x5b, 0x20, 0x2f, 0x2f, 0x61, 0xD0, 0xA2, 0x2f, 0x5c,
0x5c, 0x20, 0x5d, 0x5b, 0x20, 0x2f, 0x2f, 0xD0, 0xB5,
0x22, 0x36, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x28, 0x31,
0x31, 0x31, 0x2d, 0x31, 0x31, 0x31, 0x2b, 0x31,
0x32, 0x29, 0x5d, 0x0a, 0x2f, 0x2f, 0x21, 0x27,
0x21, 0x2f, 0x2d, 0xb2, 0x36, 0x2d, 0xb2, 0x35, 0x32 ]
You can go here, click "Binary Tools" and paste this into the byte array box. Click "Decompile".
The key elements of the code are: instructions to say where the "number" is, the sprite command that prints the number, the correct amount of junk here and there, and the following:
: label-0
0x2F
0x21
0x27
0x21
0x2F
To see what this represents you can click "Sprite Editor" and paste these hexadecimals into the box underneath. You'll see the answer:
I'm pretty sure you can then put anything you like at the end and the CHIP-8 result will not change, hence the new entry.
I would be delighted if someone could get this fully working, rather than the "proof" of the answer I've given here.
Somme, Trigger and ???
[,,E,D,,$,H,_,K,,$,,_,F,L]=!
[]+[]+!![]+[][111]
_=[111][F+L+E+E];[,J,,A,I,,B,C,S]=
[]+_;$=A+B+C+D+I+H+J+A+I+B+H
R=_[$](H+K+I+J+H+C+S+H+B+B+I)();G=($[$]+[])[14]
R[A+B+C+D+B+E+K][E+B+G](12);`
iP<`
This prints 10 in Somme, 11 in Trigger, and 12 in ???.
Since the last two languages are easy to polyglot, I decided to mix that language in.
Explanation (cracked post)
Trigger sees the whole code as a series of tokens (tokenization is greedy):
- Single byte (denote
A) - Two same bytes followed by a different byte (denote
AAB) - Three same bytes (denoted
AAA) - Four same bytes (denoted
AAAA)
In the source code
!!8@e6v+4>9 \
1((111+111)/111)
00
~tz
the significant tokens are ((1 11+ 111 111, where the first two does nothing and the last two prints 1 each - thus 11.
Z80Golf, Somme, ???
!!8@e6v+4>9 \
1((111+111)/111)
00
~tz
This prints 9 in Z80Golf, 10 in Somme and 11 in ???.
Credit to Bubbler for cracking the previous post as Somme, which takes the column sum as the instructions. The first three columns evaluate to
A.;
Which pushes 10, prints it and exits.
Klein (101), Z80Golf, ???
!!8@e6v+4>9 \
Almost everything you can find on the internet is true
~Albert Einstein
~HUMAN IMAGE MACROS
Prints 8 in Klein (101), 9 in Z80Golf, and 10 in ???.
Hexagony, Klein (101) and ???
xx={puts/}
gets87!@xx=p
main\
>9.*5,6v
This prints 7 in Hexagony, 8 in Klein (101), and 9 in ???.
The 9 does not work if a newline is added at the end of the code. Be careful if you're testing locally.
Edit: Being live for 20 hours is already a record, so I'll give some hints from now on. (Also because the language in question is IMO not yet well-known.)
Hints
- "The
9does not work if a newline is added at the end" is very significant, as well as the first two spaces (which are ignored by both Hexagony and Klein). - The language is on TIO.
- The first two spaces make the program jump to the last line. (It's not a 2D language.)
- There's no explicit output command, and the
vcommand ends the program.
Explanation (cracked post)
In the source code
abcd={} -- a gaffe avoiding tactic in C++/C#
abcd[!1]= 1+2+3+4+5+6+7+8+9+10+11+12+13+17!
print(abcd[0>1+2+3 and 4+8+6<0-0]//35)
if 0>1 then a.next=';' en\
>1+6.@.@
The relevant instructions in Klein (101) are:
IP->.....................^...........IP->/
.........................|...................
.........................8
.........................\<-.............IP<-
@
Klein is fungelike 2D language where crossing the boundary of code area (which is a square) depends on the Klein topology. / and \ are mirrors.
The IP starts at upper left corner facing right. It meets a mirror towards the top boundary, and re-enters the code area on the right side as shown above. Then it hits the mirror again, 8 is pushed, and then (after passing through the boundary several times) stops at @. Then the content of the stack is printed to stdout, which is single 8.
Befunge-96, Hexagony and ???
abcd={} -- a gaffe avoiding tactic in C++/C#
abcd[!1]= 1+2+3+4+5+6+7+8+9+10+11+12+13+17!
print(abcd[0>1+2+3 and 4+8+6<0-0]//35)
if 0>1 then a.next=';' en\
>1+6.@.@
This prints 6 in Befunge-96, 7 in hexagony and 8 in ???.
Explanation
The hexagony code, when "prettified" is:
a b c d = { } -
- a g a f f e a v
o i d i n g t a c t
i c i n C + + a b c d
[ f a l s e ] = 1 + 2 +
3 + 4 + 5 + 6 + 7 + 8 + 9
+ 1 0 + 1 1 + 1 2 + 1 3 + 1
7 ! p r i n t ( a b c d [ 0 >
1 + 2 + 3 a n d 4 + 5 + 6 <
0 - 0 ] / / 3 5 ) i f 0 >
1 t h e n a . n e x t =
' ; ' e n d > 1 + 6 .
@ . . . . . . . . .
. . . . . . . . .
. . . . . . . .
The path of execution begins in the top left heading East. The top row doesn't do much. - changes the current memory edge so the value in it is 0. Execution continues heading east on the middle row where 7! loads 7 in the current memory edge and prints is as an integer. [ changes the instruction pointer to North East starting back at 7. After 7+3, execution then reaches [ which changes the instruction pointer to North West starting in the South East corner. Finally the path is ..@ where @ terminates the program.
><>, Befunge-96 and ???
abcd={} -- a gaffe avoiding tactic in C++
abcd[false]=1+2+3+4+5+6+7+8+9+10+11+12+13+17!
print(abcd[0>1+2+3 and 4+5+6<0-0]//35)
if 0>1 then a.next=';' end
>1+6.@
This prints 5 in ><>, 6 in Befunge-96 and 7 in ???.
I know the intended solution was Befunge-93, but I couldn't resist.
Explanation:
Befunge-96 follows the same path as ><>, but ignores unknown instructions, ending up adding one to the 5 and multiplying it by 9 to get 54, the ascii code for 6.
Brainfuck, ><>, and ???
abcd={} -- a gaffe avoiding tactic in C++
abcd[false]=1+2+3+4+5+6+7+8+9+10+11+12+13+14
print(abcd[0>1+2+3 and 4+5+6<0-0]//35)
if 0>1 then a.next=';' end
>1+9*,@
Prints 4 in Brainfuck, 5 in ><>, and 6 in ???
- In brainfuck, nothing changes.
- In ><>,
vredirects the flow of the program downwards. Thenis numeric output.;ends execution.
Lua, brainfuck, ???
abcd={} -- a gaffe avoiding tactic in C++
abcd[false]=1+2+3+4+5+6+7+8+9+10+11+12+13+14
print(abcd[0>1+2+3 and 4+5+6<0-0]//35)
if 0>1 then a.next=';' end
Prints 3 in Lua, 4 in brainfuck and 5 in ???.
Explanation for cracked post:
a=1+2+3+3+4+5+6+7+8+9 b=1+1+1 f=3--(-1) c=7+9+13+11+12+3--1 g=a+b+c+1+2+3+4+5 j=9+7+g+c+b+a+g+g+g+g+g+g+1+2+3+4+1+1 h=1+1+1+1+333+1+1+1+111+1+1+1+333+1+1+1+1+1. print(f)
- In Python 3,
3--(-1)is 2, soprint(f)prints 2 (the other stuff is unnecessary) - In Lua,
--again is a comment, so3--(-1)is just 3, soprint(f)prints 3 (other stuff is again unnecessary) - In brainfuck, there are 57 plusses and 5 minuses setting the first cell on the tape to 52, and the
.outputs character 52 which is 4.
Python 3, Lua, ???
a=1+2+3+3+4+5+6+7+8+9
b=1+1+1
f=3--(-1)
c=7+9+13+11+12+3--1
g=a+b+c+1+2+3+4+5
j=9+7+g+c+b+a+g+g+g+g+g+g+1+2+3+4+1+1
h=1+1+1+1+333+1+1+1+111+1+1+1+333+1+1+1+1+1.
print(f)
Prints 2 in Python 3, 3 in Lua and 4 in ???.
Explanation for cracked post:
a={1,2}
print(1+#a
--bool(1/2)
)
- In Lua, -- is a comment. In Python 2 and 3, -- indicates double negative in arithmetic.
- In Python 2 and 3, # is a comment. In Lua, # is the length operator.
- In Python 2, 1/2 is floor division, so it evaluates to zero. In Python 3 this is not the case. Because both versions of Python evaluate 0 to False, bool(1/2) evaluates to False in Python 2 and True in Python 3. When used in arithmetic, False is cast to 0 and True is cast to 1.
Python 2, Python 3, ???
a={1,2}
print(1+#a
--bool(1/2)
)
This prints 1 in Python 2, 2 in Python 3, and 3 in ???.
Crack explanation (Cracked post):
#define print(A) main(){puts("0");}
print(1+bool(1/2))
0: C: The first line defines a function-like macroprintthat ignores its single argument and evaluates tomain(){puts("0");}, a full program that prints0and exits. The whole expression1+bool(1/2)is ignored when theprint( )macro on the second line is expanded tomain(){puts("0");}.1: Python 2: The first line is a comment.1/2uses integer division in Python 2, giving 0. This value is then interpreted as a boolean (bool(0)->False) and then added to1(1+False->1), and then printed.2: Python 3: The first line is a comment.1/2uses float division in Python 3, giving 0.5. This value is then interpreted as a boolean (bool(0.5)->True) and then added to1(1+True->2), and then printed.
C, Python 2, ???
#define print(A) main(){puts("0");}
print(1+bool(1/2))
This prints 0 in C, 1 in Python 2, and 2 in ???.
This will be extremely easy to crack for people who know Python, but I wanted a starting-off point for other answers. Subsequent answers should try to obfuscate the third language (I did not do this).
