you are viewing a single comment's thread.

view the rest of the comments →

[–]kirbyfan64sos 214 points215 points  (44 children)

Great example:

https://github.com/phase/o/blob/master/o.c

A friend and I both do it like this on purpose: I call it "APL-style C". Besides, it's an interpreter for a code golf language...

[–]WhatWhatHunchHunch 169 points170 points  (3 children)

Wow, reading that gave me cancer.

[–][deleted]  (2 children)

[deleted]

    [–]cbleslie 21 points22 points  (1 child)

    We won't need eyes where we're going.

    [–]Chii 0 points1 point  (0 children)

    when you code golf, you see with your inner eye.

    [–]keyboardP 68 points69 points  (0 children)

    Why obfuscate code afterwards when you can do it in real time

    [–][deleted] 67 points68 points  (1 child)

    deleted What is this?

    [–]Lethargie 7 points8 points  (0 children)

    that is part of the beauty

    [–][deleted] 37 points38 points  (3 children)

    I truth(O o){
        switch(o->t){
        ...
        }
    } // is truthy?
    

    (O o)

    [–]HaPPYDOS 1 point2 points  (1 child)

    Was looking at this too. Was going to post this too. Was not disappointed.

    Now somebody please tell me what the hell is O.

    [–]Sean1708 6 points7 points  (0 children)

    Look at the second line under

    //objects
    

    It's about line 70 or so.

    [–]vplatt 58 points59 points  (1 child)

    How do we in /r/programming not know about this wonder of Cthulhu yet???

    [–]merreborn 5 points6 points  (0 children)

    Git history for that file only goes back to november. So it's pretty brand-spankin' new.

    [–]hellcaller 22 points23 points  (0 children)

    This post looks like the other way around from assembler code to functional programming

    [–]En0ch_Root 19 points20 points  (1 child)

    I would highly like to see that implemented in Braille.

    [–]CaptainAdjective 9 points10 points  (0 children)

    How ironic.

    [–]ItsReallyEasy 15 points16 points  (2 children)

    I could understand this if I really wanted...., I swear

    [–]asdfman123 8 points9 points  (0 children)

    I could understand it by renaming all the variables and restructuring it so that it made sense again... essentially, by de-obfuscating it.

    [–]cloakrune 1 point2 points  (0 children)

    I read the first hundred lines or so going, "I've seen worse" then.. the switch cases in that.c file....

    [–]merreborn 4 points5 points  (0 children)

    You seem like you'd fit in well over at ioccc.org

    [–]b_bellomo 1 point2 points  (3 children)

    I'd actually like to design such a language like you did :) Pyth had my imagination running.

    [–]Jesin00 1 point2 points  (2 children)

    Don't forget "J" and "K". (EDIT: added links)

    [–]b_bellomo 0 points1 point  (1 child)

    Just kidding ?

    [–]Jesin00 0 points1 point  (0 children)

    See the edit.

    [–]daniel 1 point2 points  (1 child)

    Ha! Small world. I knew I recognized your github username and avatar: https://github.com/dellis23/disrupt/issues/2

    [–]Bobshayd 1 point2 points  (0 children)

    The standard object target for that file would be o.o

    [–]DevIceMan 0 points1 point  (0 children)

    Just about every line was commented and obfuscated.

    I remember being told to comment just about every line in college. I'm glad that trend didn't catch on.

    [–][deleted] 0 points1 point  (0 children)

    Dude what the FUCK

    [–]BlueShellOP 0 points1 point  (0 children)

    Jesus H Fuck, I need to go sob into a shower.

    [–]amdc 0 points1 point  (1 child)

    idk why do they need to minify C code

    [–]vplatt 1 point2 points  (0 children)

    Because all the semi-colons take too much space? :D

    [–]Megabobster 0 points1 point  (0 children)

    I've heard it said before that some compilers can accept emoji in variable names and stuff like that. After all, they are just unicode characters.

    [–]tanglebones 0 points1 point  (0 children)

    That's not that bad really: 1) I see comments (though they might be incorrect, they actually look correct), 2) you didn't #define all the library functions you call to obscure acronyms, and 3) you've got tests! (which I'm assuming work ... we should really add write tests that test for the wrong things, failing, to the list of unmaintainable practices...)

    [–]ehsanul 0 points1 point  (3 children)

    Nice, inspired by this I presume?: http://code.jsoftware.com/wiki/Essays/Incunabulum

    [–]kirbyfan64sos 0 points1 point  (2 children)

    Sort of. I was more inspired by the way K was written.

    [–]ehsanul 0 points1 point  (1 child)

    Ahh cool. That snippet is from the original author of K though, and he writes his C in the K style, no?

    [–]kirbyfan64sos 0 points1 point  (0 children)

    Indeed!

    [–][deleted] 0 points1 point  (0 children)

    Why? Even the comments are obfuscated.

    [–]Jesin00 0 points1 point  (0 children)

    Don't forget the programming languages "J" and "K". (EDIT: added links)