Results 1 to 30 of 30

Thread: Anybody heard of a language called Brainf***?

  1. #1

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Question

    Here's a quick snippet of code that apparently produces the lyrics to "99 bottles of beer on the wall":
    Code:
    >+++++++++[<+++++++++++>-]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>>>
    [-]<<<+++++++++<[>>>+<<[>+>[-]<<-]>[<+>-]>[<<++++++++++>>>+<
    -]<<-<-]+++++++++>[<->-]>>+>[<[-]<<+>>>-]>[-]+<<[>+>-<<-]<<<
    [>>+>+<<<-]>>>[<<<+>>>-]>[<+>-]<<-[>[-]<[-]]>>+<[>[-]<-]<+++
    +++++[<++++++<++++++>>-]>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-
    ]<<<<<<.>>[-]>[-]++++[<++++++++>-]<.>++++[<++++++++>-]<++.>+
    ++++[<+++++++++>-]<.><+++++..--------.-------.>>[>>+>+<<<-]>
    >>[<<<+>>>-]<[<<<<++++++++++++++.>>>>-]<<<<[-]>++++[<+++++++
    +>-]<.>+++++++++[<+++++++++>-]<--.---------.>+++++++[<------
    ---->-]<.>++++++[<+++++++++++>-]<.+++..+++++++++++++.>++++++
    ++[<---------->-]<--.>+++++++++[<+++++++++>-]<--.-.>++++++++
    [<---------->-]<++.>++++++++[<++++++++++>-]<++++.-----------
    -.---.>+++++++[<---------->-]<+.>++++++++[<+++++++++++>-]<-.
    >++[<----------->-]<.+++++++++++..>+++++++++[<---------->-]<
    -----.---.>>>[>+>+<<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>>+++
    +[<++++++>-]<--.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.
    ><+++++..--------.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++
    ++++++++++++.>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<++
    +++++++>-]<--.---------.>+++++++[<---------->-]<.>++++++[<++
    +++++++++>-]<.+++..+++++++++++++.>++++++++++[<---------->-]<
    -.---.>+++++++[<++++++++++>-]<++++.+++++++++++++.++++++++++.
    ------.>+++++++[<---------->-]<+.>++++++++[<++++++++++>-]<-.
    -.---------.>+++++++[<---------->-]<+.>+++++++[<++++++++++>-
    ]<--.+++++++++++.++++++++.---------.>++++++++[<---------->-]
    <++.>+++++[<+++++++++++++>-]<.+++++++++++++.----------.>++++
    +++[<---------->-]<++.>++++++++[<++++++++++>-]<.>+++[<----->
    -]<.>+++[<++++++>-]<..>+++++++++[<--------->-]<--.>+++++++[<
    ++++++++++>-]<+++.+++++++++++.>++++++++[<----------->-]<++++
    .>+++++[<+++++++++++++>-]<.>+++[<++++++>-]<-.---.++++++.----
    ---.----------.>++++++++[<----------->-]<+.---.[-]<<<->[-]>[
    -]<<[>+>+<<-]>>[<<+>>-]>>>[-]<<<+++++++++<[>>>+<<[>+>[-]<<-]
    >[<+>-]>[<<++++++++++>>>+<-]<<-<-]+++++++++>[<->-]>>+>[<[-]<
    <+>>>-]>[-]+<<[>+>-<<-]<<<[>>+>+<<<-]>>>[<<<+>>>-]<>>[<+>-]<
    <-[>[-]<[-]]>>+<[>[-]<-]<++++++++[<++++++<++++++>>-]>>>[>+>+
    <<-]>>[<<+>>-]<[<<<<<.>>>>>-]<<<<<<.>>[-]>[-]++++[<++++++++>
    -]<.>++++[<++++++++>-]<++.>+++++[<+++++++++>-]<.><+++++..---
    -----.-------.>>[>>+>+<<<-]>>>[<<<+>>>-]<[<<<<++++++++++++++
    .>>>>-]<<<<[-]>++++[<++++++++>-]<.>+++++++++[<+++++++++>-]<-
    -.---------.>+++++++[<---------->-]<.>++++++[<+++++++++++>-]
    <.+++..+++++++++++++.>++++++++[<---------->-]<--.>+++++++++[
    <+++++++++>-]<--.-.>++++++++[<---------->-]<++.>++++++++[<++
    ++++++++>-]<++++.------------.---.>+++++++[<---------->-]<+.
    >++++++++[<+++++++++++>-]<-.>++[<----------->-]<.+++++++++++
    ..>+++++++++[<---------->-]<-----.---.+++.---.[-]<<<]
    Now if you didn't know about this language before, you'll see where it gets its name. So what the f*** is all that code about eh? I figure it's something to do with pushes and pops, or shifts, or.... f*** knows.

    Anyone met this curious language before?
    Harry.

    "From one thing, know ten thousand things."

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    [joke][blinded people]
    i checked the Qur'an, i coudn't find it so its not a language
    [/blinded people][/joke]

  3. #3
    Guest
    I've seen it before... it's supposed to confuse dumb people and make them tell religious jokes that nobody laughs at...

  4. #4

  5. #5
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274

    Wink Brainf****???

    Isn't that what all you guys try to do to each other on this Chit-Chat Forum????

  6. #6

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well if your brain survived that one, try this out, it's a language called Befunge:

    Code:
    ----- begin beer.bf -----
    v v0\1:\1:\0\0\!:p15-<     Bottles of Beer for Befunge
    0 \ {befunge} >" ekaT">v   written by Brian Raiter, 5/97
    0>>.0"llaw eht no "v<#,:   [email protected]
    "\,     >"eno"^>0 #"^1^_v
    c1,>51g#^_"ti"^. >vr :  $
    "::^" down, pass "^|\*25,<^     # i e ^g1< 
      ,>052*":dnuor t"vbv:<
    v0_^    .      , ^< " "
    >52*".ll"v   >,^   fb e
    v"aw eht no r"v
    """ ,:  >" ;"^      f ^<@
    meo >^"bottle"<    "o   $
    o m^"re:"52*^>"s"^v"les"<,:
    "^<  ^"99 bott"<    >^>^<
    >" yub ,erots eht ot oG"^
    ------ end beer.bf ------
    Notice that some of the strings are written backwards.

    .yhw aedi on evah I
    Harry.

    "From one thing, know ten thousand things."

  7. #7
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    where exactly did you find these languages, they look like they were written by an expert panel of mental patients.

  8. #8

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I found them here.
    Harry.

    "From one thing, know ten thousand things."

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    <-------<
     >-------<
    >------<
     >---<
       <-------<
        <---->
    <----->
    <-------<
     >-------<
        >------<
      >-------<
    <---------------<
     <------<
      >----<
     <------->
      >----<
    <---------->
    <---->
    <------>
    >--------->
     <------<
       >-<
      >------<
        >------<
    Guess what this does?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  10. #10

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Confuses me?
    Harry.

    "From one thing, know ten thousand things."

  11. #11
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224

    Wink

    This is the left over food of a shark in an aquarium.
    If you can't pronounce my name, call me GURU

  12. #12
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    it puts some -ve numbers into memory.


  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    it shows a diagram of my sleeping habits
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    I like Orthogonal better

  15. #15
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Kedaman: A Hello World program?

    or:

    Hm, what this does... maybe: Confusing us?

  16. #16
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Hello Fox program actually!
    nope, as i said, it does something more than that
    Can be translated to visual smiley code too:
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  17. #17
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    No idea I hate these difficult languages... why can't you just use Orthogonal?

  18. #18

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Hey, I just remembered this thread and thought I'd add another language that makes my ears bleed.... I hope yours do too. Enjoy!

    Code:
    >9999*++000s1100sXv<     >#v100g5-v
    X              >100g3-   |v       _@
                   |-2g001_ v
    v *39s1010pg000  s0012-#<  <
    vv*35s1010pg000<      1
    v##      *47s1011s0014g# <
    v*35s10103100sv              0
    ^      <              1
                          ^
    {
    000              >         x
    v        s100+1g100   <
    >001g101g9gp001g201g -|
    s                     0
    1                     0
    0                     0
    2        xv#    <     1
    ^         >000v       s
              v0pg<       P
              0           x
              g
             ^_5100s^
    {
    100 bottles of beer.
    {
    In BefDC - a derivative of Befudge and dc, by Sam Holden
    {
    This code by Sam Holden, 1997.
    {
    Note: this language was actually designed to do my cryptography assigments,
          which is why it is defined with 'infinite' precision math.
    {
    {
    {
    {
     bottles of beer on the wall
    Take one down, pass it around
    Harry.

    "From one thing, know ten thousand things."

  19. #19
    Guest

    Cool INTERCAL

    Ever heard of a language called Intercal?

    Every statement must start with the phrase PLEASE !

    Otherwise the error message generated is "The programmer is insufficiently polite"..

    Smart ?

  20. #20
    Guest

    INTERCAL 2

    Heres a sample Intercal program

    Code:
            DO (5) NEXT
        (5) DO FORGET #1
            PLEASE WRITE IN :1
            DO .1 <- '?":1~'#32768$#0'"$#1'~#3
            DO (1) NEXT
            DO :1 <- "'?":1~'#65535$#0'"$#65535'
                    ~'#0$#65535'"$"'?":1~'#0$#65535'"
                    $#65535'~'#0$#65535'"
            DO :2 <- #1
            PLEASE DO (4) NEXT
        (4) DO FORGET #1
            DO .1 <- "?':1~:2'$#1"~#3
            DO :1 <- "'?":1~'#65535$#0'"$":2~'#65535
                    $#0'"'~'#0$#65535'"$"'?":1~'#0
                    $#65535'"$":2~'#0$#65535'"'~'#0$#65535'"
            DO (1) NEXT
            DO :2 <- ":2~'#0$#65535'"
                    $"'":2~'#65535$#0'"$#0'~'#32767$#1'"
            DO (4) NEXT
        (2) DO RESUME .1
        (1) PLEASE DO (2) NEXT
            PLEASE FORGET #1
            DO READ OUT :1
            PLEASE DO .1 <- '?"':1~:1'~#1"$#1'~#3
            DO (3) NEXT
            PLEASE DO (5) NEXT
        (3) DO (2) NEXT
            PLEASE GIVE UP
    Note the last line (he he)

    Here is an excerpt from its manual...
    2.2 Uses for INTERCAL
    INTERCAL's main advantage over other programming languages is its strict simplicity. It has few capabilities, and thus there are few restrictions to be kept in mind. Since it is an exceedingly easy language to learn, one might expect it would be a good language for initiating novice programmers. Perhaps surprising, than, is the fact that it would be more likely to initiate a novice into a search for another line of work. As it turns out, INTERCAL is more useful (which isn't saying much) as a challenge to professional programmers.
    Want to know more about Intercal? You just need to post a reply!!

  21. #21

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Is that a threat?
    Harry.

    "From one thing, know ten thousand things."

  22. #22
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Talking befunge

    took me an hour to make this befunge app:
    Code:
    v >*"namadek"v
    2 5   v,_v#<:< <
    5 2   >:^$   
    * 0   v<  >"eb"^
    >1|:-1<|:<^"fung"<
      >0"!!!looc s'e"^
           @
    guess what this does?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  23. #23
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425
    Does it print "Kedaman" to the screen?

  24. #24
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    yep, but it does more than that
    Code:
       v
     v   v
    v?<?>?v
    12 v 56
    v<3?4>v
    >.@^@.<
    
    
    ?  v @#
     ?  1v4
      ? 2v5
       ?3v6
    >^^^ 
    vvvvv.
    i wrote two other apps just for the fun of it, they do the exact same thing though.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  25. #25
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    the last one has a bug, it should be
    Code:
    ? vv @#
     ?  1v4
      ? 2v5
    ## ?3v6 
    >v   .
    and now it's the most compact one too
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  26. #26
    Lively Member amesjustin's Avatar
    Join Date
    Feb 2001
    Location
    Orange County, California, USA
    Posts
    116

    Talking

    Don't all women speak Brainf**k?

  27. #27

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Less of a language, more of a lifestyle.
    Harry.

    "From one thing, know ten thousand things."

  28. #28
    Guest
    Originally posted by kedaman
    the last one has a bug, it should be
    Code:
    ? vv @#
     ?  1v4
      ? 2v5
    ## ?3v6 
    >v   .
    and now it's the most compact one too
    Where did you learn to write that?!?

  29. #29
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I looked up befunge on altavista and found some source, forgot to bookmark it though, befunge is really cool once you learn it
    the sixth and last version of befungdice i made looks like this:
    Code:
    ?1v>#3v#
    >5>?1+>.@
    yep it prints a random number from 1 to 6
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  30. #30

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    "You're weird." -- John Cleese as Roman Centurion, Life of Brian
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width