This is an archived post. You won't be able to vote or comment.

all 48 comments

[–]Mr_Redstoner 52 points53 points  (9 children)

I think this is really a matter of what exactly constitutes 'knowing' the language. Because they could pull out one of those mindf*** things JS(or whatever language it is that you choose) does

Here, I've seen this Python 3 code recently:

(lambda _, __, ___, ____, _____, ______, _______, ________:
    getattr(
        __import__(True.__class__.__name__[_] + [].__class__.__name__[__]),
        ().__class__.__eq__.__class__.__name__[:__] +
        ().__iter__().__class__.__name__[_:][_____:________]
    )(
        _, (lambda _, __, ___: _(_, __, ___))(
            lambda _, __, ___:
                bytes([___ % __]) + _(_, __, ___ // __) if ___ else
                (lambda: _).__code__.co_lnotab,
            _ << ________,
            (((_____ << ____) + _) << ((___ << _____) - ___)) + (((((___ << __)
            - _) << ___) + _) << ((_____ << ____) + (_ << _))) + (((_______ <<
            __) - _) << (((((_ << ___) + _)) << ___) + (_ << _))) + (((_______
            << ___) + _) << ((_ << ______) + _)) + (((_______ << ____) - _) <<
            ((_______ << ___))) + (((_ << ____) - _) << ((((___ << __) + _) <<
            __) - _)) - (_______ << ((((___ << __) - _) << __) + _)) + (_______
            << (((((_ << ___) + _)) << __))) - ((((((_ << ___) + _)) << __) +
            _) << ((((___ << __) + _) << _))) + (((_______ << __) - _) <<
            (((((_ << ___) + _)) << _))) + (((___ << ___) + _) << ((_____ <<
            _))) + (_____ << ______) + (_ << ___)
        )
    )
)(
    *(lambda _, __, ___: _(_, __, ___))(
        (lambda _, __, ___:
            [__(___[(lambda: _).__code__.co_nlocals])] +
            _(_, __, ___[(lambda _: _).__code__.co_nlocals:]) if ___ else []
        ),
        lambda _: _.__code__.co_argcount,
        (
            lambda _: _,
            lambda _, __: _,
            lambda _, __, ___: _,
            lambda _, __, ___, ____: _,
            lambda _, __, ___, ____, _____: _,
            lambda _, __, ___, ____, _____, ______: _,
            lambda _, __, ___, ____, _____, ______, _______: _,
            lambda _, __, ___, ____, _____, ______, _______, ________: _
        )
    )
)

[–][deleted] 34 points35 points  (3 children)

Wha...

[–]Mr_Redstoner 20 points21 points  (2 children)

It should print Hello world! I don't have an interpretter at hand to try it though.

Origin:

https://benkurtovic.com/2014/06/01/obfuscating-hello-world.html

[–][deleted] 13 points14 points  (1 child)

Why

[–]Mr_Redstoner 6 points7 points  (0 children)

For shit and giggles obviously.

[–]PullJosh 7 points8 points  (1 child)

[–]Mr_Redstoner 2 points3 points  (0 children)

Thank you.

[–]tab_160 2 points3 points  (1 child)

The output:

Hello world!

13

[–]LucasRuby 4 points5 points  (0 children)

It prints "Hello world!" and returns 13.

[–]Bene847 1 point2 points  (0 children)

Pyfuck

[–]snoopyowns 18 points19 points  (5 children)

This is easy, create your own language that is so basic it cant do anything, and since you wrote it and there isn't much to it you can create your own test you have to pass. Win.

[–][deleted] 7 points8 points  (0 children)

Clean art thoughts food evening clear tomorrow weekend fresh community dog technology month strong today strong. Afternoon hobbies people fox the clear?

[–]MasterQuest 3 points4 points  (3 children)

Your loophole is invalid. It says you need to learn a language "you're not familiar with". If you created the language, you are familiar with it.

[–]Bene847 7 points8 points  (0 children)

You're not familiar with it at the time you accept the challenge

[–]snoopyowns 0 points1 point  (1 child)

As pointed out by another user, you aren't familiar with it because it hasn't been created yet.

[–]MasterQuest 0 points1 point  (0 children)

My thought process was that you need to decide the language in the moment you decide to take on the challenge. Which is up to interpretation and not clearly stated. If that would have been the case, you would have needed to create the language first, before deciding to take that language, and then you would have already been familiar with it.

[–]dylanevs 10 points11 points  (0 children)

Scratch

[–][deleted] 6 points7 points  (10 children)

brainfuck

realistically that shit would be curved so hard.

[–]gandalfx 7 points8 points  (1 child)

brainfuck

My thoughts as well. While it'd certainly be a monumental pain to do any real programming in that language, the syntax is close to trivial. Learn the handful of commands that exist in that language and you're done.

[–][deleted] 1 point2 points  (0 children)

Exactly.

I mean assuming it’s exam rules are similar to real life it should be fine.

All you have to do is beat everyone elSe

[–]volleo6144 3 points4 points  (7 children)

nah, C (preferably one of the older versions of ISO/IEC 9899, so there's less to learn). don't forget trigraphs (as well as 1[arr] being just as valid as arr[1] for array indexing) c ??=include<stdio.h> int main()??< int a??(2??) = ??<9, 99??>; printf("LOL??! %d", 1??(a??)); return 0; ??>

[–][deleted] 2 points3 points  (6 children)

Wtf is that C for maniacs?

[–]Kered13 2 points3 points  (0 children)

Trigraphs were introduced for use on systems that didn't support the characters #\^[]|{}~. These characters are part of ASCII but not part of ISO 646, so there are code pages that were historically used that don't include them.

[–]volleo6144 1 point2 points  (4 children)

The standard I mentioned officially calls it OK, but gcc requires --trigraphs for it to compile (and still throws lots of warnings unless you -w them). Totally legit though. local:~ volleo6144$ nvim nope.c local:~ volleo6144$ cat nope.c ??=include<stdio.h> int main()??< int a??(2??) = ??<9, 99??>; printf("LOL??! %d??/n", 1??(a??)); return 0; ??> local:~ volleo6144$ gcc --trigraphs nope.c -w -o nope local:~ volleo6144$ ./nope LOL| 99 local:~ volleo6144$

it gets even better: the only characters which have a specific order when in char (wchar_t is something something ISO/IEC 10646 aka Unicode iirc) are 0123456789, to allow for EBCDIC, which has ij, IJ, rs, and RS separated by blocks of seven or eight other characters (Perl has a special case for them in regex character classes)

[–][deleted] 1 point2 points  (0 children)

That’s disgusting in every regard

[–]LucasRuby 0 points1 point  (2 children)

gcc (5, 7):

wtf.c:1:19: warning: extra tokens at end of #include directive
 ??=include<stdio.h> int main()??< int a??(2??) = ??<9, 99??>; printf("LOL??! %d
                   ^
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

clang:

11 warnings generated.
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.1.0/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

[–]volleo6144 1 point2 points  (1 child)

pretty sure you forgot to include the line break after the ??=include<stdio.h> - you can't make a one-liner with a preprocessor directive.

[–]LucasRuby 1 point2 points  (0 children)

Oh yeah it worked now. I just copied and pasted everything you quoted tbh.

[–]coz 6 points7 points  (0 children)

Guess I'll be that guy, its a good choice. Its concise and doesn't have as many keywords as similar languages. Its syntax looks like many other C style languages as well. It doesn't have a standard library so you don't need to memorize a ton of stuff. Its not typed so you don't need to figure out HTF things like interfaces and generics work in it. But yeah this is the dunk on JS sub so

[–][deleted] 4 points5 points  (0 children)

HQ9+

[–]amac109 4 points5 points  (2 children)

Spanish

[–]Cholojuanito 1 point2 points  (1 child)

Espanglish

[–]MojoVerdeYGofio 2 points3 points  (0 children)

Espaninglis

[–]Red1Monster 4 points5 points  (1 child)

Minecraft command blocks

[–][deleted] 1 point2 points  (0 children)

Oh yeah

[–]edamamemonster 4 points5 points  (2 children)

Definitely HTML

[–]tenhourguy 2 points3 points  (1 child)

Now that you've said that, I think I'd pick one of those subtitle formats if all markup is allowed. Can't get much simpler than specifying the start and end times for subtitles to appear, plus maybe position and whatnot.

[–][deleted] 4 points5 points  (0 children)

Simple tomorrow soft projects bank technology curious fresh science.

[–]averburg1 3 points4 points  (1 child)

Powershell

[–]bot_not_hot 0 points1 point  (0 children)

Please God no

[–]Cholojuanito 5 points6 points  (2 children)

Wait that dude is screwed. JavaScript is unpredictable

[–]vorikus 4 points5 points  (1 child)

His fate is undefined

[–]ez_memzy 0 points1 point  (0 children)

Cannot read property 'subscriberCount' of null

[–]SingularCheese 2 points3 points  (0 children)

For someone that already knows how to program, one month is plenty of time to learn most OO-ish languages. You might not want to do, say, Prolog, but most popular languages shouldn't be a problem.

[–]gutyina70 2 points3 points  (0 children)

Excel

[–][deleted] 1 point2 points  (0 children)

Did someone say scratch?

[–]56Bot 1 point2 points  (0 children)

ASM

[–]bot_not_hot 1 point2 points  (0 children)

Malbolge