KTHXBYE!

Discussion in 'Techforge' started by Patch, Jun 1, 2007.

  1. Patch

    Patch Version 2.7

    Joined:
    Aug 26, 2006
    Messages:
    3,450
    Ratings:
    +904
    Found this on the web today.

  2. Powaqqatsi

    Powaqqatsi Haters gonna hate.

    Joined:
    Apr 15, 2004
    Messages:
    8,388
    Ratings:
    +1,341
    It's almost as good as the Brainfuck programming language, a turing-complete language that is designed to have the smallest compiler ever:
    Code:
    > Increment the pointer.
    < Decrement the pointer.
    + Increment the byte at the pointer.
    - Decrement the byte at the pointer.
    . Output the byte at the pointer.
    , Input a byte and store it in the byte at the pointer.
    [ Jump forward past the matching ] if the byte at the pointer is zero.
    ] Jump backward to the matching [ unless the byte at the pointer is zero.
    [?=Click to view a sample program!]
    Code:
    >+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>
    [-]<<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<
    -]<<-<-]+++++++++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<
    [>>+>+<<<-]>>>[<<<+>>>-]>[<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<+++
    +++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-
    ]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]<++.>+
    ++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>
    >>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<+++++++
    +>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<------
    ---->-]<.>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++
    ++[<---------->-]<--.>+++++++++[<+++++++++>-]<--.-.>++++++++
    [<---------->-]<++.>++++++++[<++++++++++>-]<++++.-----------
    -.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.
    >++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<
    -----.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>+++
    +[<++++++>-]<--.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.
    ><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++
    ++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<++
    +++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++
    +++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]<
    -.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.
    ------.>+++++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.
    -.---------.>+++++++[<---------->-]<+.>+++++++[<++++++++++>-
    ]<--.+++++++++++.++++++++.---------.>++++++++[<---------->-]
    <++.>+++++[<+++++++++++++>-]<.+++++++++++++.----------.>++++
    +++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<----->
    -]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<
    ++++++++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++
    .>+++++[<+++++++++++++>-]<.>+++[<++++++>-]<-.---.++++++.----
    ---.----------.>++++++++[<----------->-]<+.---.[-]<<<->[-]>[
    -]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]
    >[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-]>>+>[<[-]<
    <+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<
    <-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+
    <<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>
    -]<.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..---
    -----.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++
    .>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<+++++++++>-]<-
    -.---------.>+++++++[<---------->-]<.>++++++[<+++++++++++>-]
    <.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[
    <+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++
    ++++++++>-]<++++.------------.---.>+++++++[<---------->-]<+.
    >++++++++[<+++++++++++>-]<-.>++[<----------->-]<.+++++++++++
    ..>+++++++++[<---------->-]<-----.---.+++.---.[-]<<<]
    
    [/?]
    • Agree Agree x 1
  3. Patch

    Patch Version 2.7

    Joined:
    Aug 26, 2006
    Messages:
    3,450
    Ratings:
    +904
    Looking at that makes my head hurt.
  4. K.

    K. Sober

    Joined:
    Mar 29, 2004
    Messages:
    27,298
    Ratings:
    +31,281
  5. Order2Chaos

    Order2Chaos Ultimate... Immortal Administrator

    Joined:
    Apr 2, 2004
    Messages:
    25,221
    Location:
    here there be dragons
    Ratings:
    +21,470
    I used to be able to read Brainfuck as easily as C. Sadly those days have passed for me. :(
  6. Powaqqatsi

    Powaqqatsi Haters gonna hate.

    Joined:
    Apr 15, 2004
    Messages:
    8,388
    Ratings:
    +1,341
    BTW: the followiing would've been much more appropriate:
    Code:
    KTHXBAI
    ggkthxnore
  7. Order2Chaos

    Order2Chaos Ultimate... Immortal Administrator

    Joined:
    Apr 2, 2004
    Messages:
    25,221
    Location:
    here there be dragons
    Ratings:
    +21,470
    Woohoo! It only took me about 10 seconds to realize that the first part of the Brainfuck program posted is essentially a variable initialization (mem[1] = 10; ), and another 10 to realize the first [] section is a while loop that adds 10 to mem[0] every iteration and decrements mem[1] in the process.

    Brainfuck is an elegant language, once you learn it. :blush:
    • Agree Agree x 1
  8. mburtonk

    mburtonk mburtonkulous

    Joined:
    Dec 6, 2004
    Messages:
    10,508
    Location:
    Minnesnowta
    Ratings:
    +7,627
    Does it just count up and down, or what?
  9. MayDayAli

    MayDayAli Communist Prize Fighter

    Joined:
    Mar 19, 2007
    Messages:
    172
    Location:
    USA
    Ratings:
    +132
    Uh, IDK, my BFF Jill?
  10. BearTM

    BearTM Bustin' a move! Deceased Member

    Joined:
    Mar 27, 2004
    Messages:
    27,833
    Ratings:
    +5,276
    And here's a scan of the manual cover... and some more script examples.


    [​IMG]


    LOLCODE FTW
    HAI
    BTW HUGSTIME? is system functions for determining hugs time
    CAN HAS HUGSTIME?
    CAN HAS STDIO?
    I HAS A LOVINGU
    BTW NAO is automagically set to time right now
    I HAS A NAO
    IZ NAO HUGSTIME?
    YARLY
    VISIBLE "<3"LOVINGU IZ KNOWAI
    VISIBLE "</3"LOVINGU IZ NOES
    KTHXK
    THXBYE