Skip to main content
added 98 characters in body
Source Link
MD XF
  • 13.9k
  • 4
  • 66
  • 104
ZóßZ(Z]%ZóßZ]-101)&

:)


Side note: The shortest Implicit program to perform this task would be (;.%ß<100ö.

ZóßZ(Z]%ZóßZ]-101)

:)

ZóßZ(Z]%ZóßZ]-101)&

:)


Side note: The shortest Implicit program to perform this task would be (;.%ß<100ö.

added 2240 characters in body
Source Link
MD XF
  • 13.9k
  • 4
  • 66
  • 104

Obviously this is not C, it's my language. Stripping no-ops gives us this:

intf(intx_1)inti,foóßar=;int*arr=x23d3f44e>>xa;for(i=']';%foóßar++,*(arr+i/1234)+=']';-101)putchar(&

The & ends the program.

All alphabetical characters push their codepage value to the stack. Let's replace every run of alphabetical characters we don't care about with Z.

Z(Z_1)Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(Z=']';%ZóßZ++,*(Z+Z/1234)+=']';-101)Z(&

( starts a loop and ) ends it. The loop continues while the top of stack is nonzero. Pushing an ASCII character and then performing _1 always sets the top of stack to zero, so we can completely ignore the first loop.

Pushng Z and then dividing by 1234 also always results in zero, so we can ignore the inner loop (and all the code inside it) too.

The last loop is only an open-loop and immediately exits, so we can kill that too. Our code thus becomes:

Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(=']';%ZóßZ++,*+=']';-101)Z&

; means 'pop'. If we take out any code that pushes to the stack and then is immediately popped, the code becomes:

Z,óßZ*Z=Z23Z3Z44Z>>Z(=']%ZóßZ++,*+=']-101)Z&
  • The first comma swaps the top two stack values, but there's only one, so we can remove it.
  • The Z23Z3Z44Z>>Z just pushes a ton of Zs to the stack, which are never used, so we might as well just be pushing Z.
  • Most of the mathematical operations are never used, so let's replace those with Z too.
  • ' (read string) is useless because we never provide any input.

Our code golfs down to:

ZóßZ(Z]%ZóßZ]-101)

Okay, so now we reveal what's really going on.

  • ó is equivalent to ].[ (pull register to stack, increment, push to register).
  • ß is equivalent to @10 (print ASCII 0x10).

Since we pull the register every time we actually care to interact with memory, we can completely ignore everything non-register-related that interacts with the stack when the register isn't the top of stack:

óß(]%óß]-101)&

So, the program increments the register, prints a space, opens a loop, pulls the register, prints it, prints a space, pulls the register, subtracts 101, and loops while register - 101 is nonzero. Then it exits.

:)


Obviously this is not C, it's my language. Stripping no-ops gives us this:

intf(intx_1)inti,foóßar=;int*arr=x23d3f44e>>xa;for(i=']';%foóßar++,*(arr+i/1234)+=']';-101)putchar(&

The & ends the program.

All alphabetical characters push their codepage value to the stack. Let's replace every run of alphabetical characters we don't care about with Z.

Z(Z_1)Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(Z=']';%ZóßZ++,*(Z+Z/1234)+=']';-101)Z(&

( starts a loop and ) ends it. The loop continues while the top of stack is nonzero. Pushing an ASCII character and then performing _1 always sets the top of stack to zero, so we can completely ignore the first loop.

Pushng Z and then dividing by 1234 also always results in zero, so we can ignore the inner loop (and all the code inside it) too.

The last loop is only an open-loop and immediately exits, so we can kill that too. Our code thus becomes:

Z,ZóßZ=;Z*Z=Z23Z3Z44Z>>Z;Z(=']';%ZóßZ++,*+=']';-101)Z&

; means 'pop'. If we take out any code that pushes to the stack and then is immediately popped, the code becomes:

Z,óßZ*Z=Z23Z3Z44Z>>Z(=']%ZóßZ++,*+=']-101)Z&
  • The first comma swaps the top two stack values, but there's only one, so we can remove it.
  • The Z23Z3Z44Z>>Z just pushes a ton of Zs to the stack, which are never used, so we might as well just be pushing Z.
  • Most of the mathematical operations are never used, so let's replace those with Z too.
  • ' (read string) is useless because we never provide any input.

Our code golfs down to:

ZóßZ(Z]%ZóßZ]-101)

Okay, so now we reveal what's really going on.

  • ó is equivalent to ].[ (pull register to stack, increment, push to register).
  • ß is equivalent to @10 (print ASCII 0x10).

Since we pull the register every time we actually care to interact with memory, we can completely ignore everything non-register-related that interacts with the stack when the register isn't the top of stack:

óß(]%óß]-101)&

So, the program increments the register, prints a space, opens a loop, pulls the register, prints it, prints a space, pulls the register, subtracts 101, and loops while register - 101 is nonzero. Then it exits.

:)

added 92 characters in body
Source Link
MD XF
  • 13.9k
  • 4
  • 66
  • 104

???Implicit, 212 bytes, cracked by Dennis

int f(int x_1)
{
    int i, foóßar = 1;
    int *arr = 0x23d3f44e >> 0xa;

    for (i = ']'; 100 % foóßar++, *(arr+i/1234) += ']'; 0-101)
        putchar(&arr[i]);

    return -8;
}

int main(void)
{
    f(42);
}

???, 212 bytes

int f(int x_1)
{
    int i, foóßar = 1;
    int *arr = 0x23d3f44e >> 0xa;

    for (i = ']'; 100 % foóßar++, *(arr+i/1234) += ']'; 0-101)
        putchar(&arr[i]);

    return -8;
}

int main(void)
{
    f(42);
}

Implicit, 212 bytes, cracked by Dennis

int f(int x_1)
{
    int i, foóßar = 1;
    int *arr = 0x23d3f44e >> 0xa;

    for (i = ']'; 100 % foóßar++, *(arr+i/1234) += ']'; 0-101)
        putchar(&arr[i]);

    return -8;
}

int main(void)
{
    f(42);
}
Sorry about editing, I'd broken it during "golfing"
Source Link
MD XF
  • 13.9k
  • 4
  • 66
  • 104
Loading
Source Link
MD XF
  • 13.9k
  • 4
  • 66
  • 104
Loading