BrainFuck
- thingie-348
-
thingie-348
- Member since: Nov. 27, 2005
- Offline.
-
- Forum Stats
- Member
- Level 07
- Blank Slate
I recently discovered a programming language, called BrainFuck (probably cause is difficult) with the particullaire that it has a local-system variable (ptr) being printcipally zero. Also, it has 8 words, that are operators:
Operator C/C++ equivalent
> ptr++
< ptr--
+ *ptr++
- *ptr--
[ while (*prt) {
] }
. putchar (*ptr) ;
, *prt = getchar()
Is pretty strange, but it can make you think really well (and is easy to do a compiler). For example, to put the character "A" you must put
++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++.
(there are 65 +) cause "A" is the char 65.
Or to copy input:
,[.,]
Have you ever heared about this?
- Mister-Mind
-
Mister-Mind
- Member since: Jul. 1, 2006
- Offline.
-
- Forum Stats
- Member
- Level 07
- Blank Slate
LOL. When I saw the topic as brainfuck. I thought you had a problem in coding. Like an error. I didnt know it was a language! =P
- thingie-348
-
thingie-348
- Member since: Nov. 27, 2005
- Offline.
-
- Forum Stats
- Member
- Level 07
- Blank Slate
Look at the source code (Right button->See source code)
- authorblues
-
authorblues
- Member since: Jun. 21, 2005
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
At 10/20/06 05:47 PM, windymager wrote: Have you ever heared about this?
yeah. theres a niche out there for obscure programming languages. one is called chef, that is written in the same way as a recipe, with operators such as "Boil", "Mix", and such.
another, called intercal is a complex programming language designed to look both daunting and unneccessary. it was designed as a huge joke, since the programming manual is comedic to read.
another, called HQ9+, is designed with only four commands. since there are only four actions that a program must be able to accomplish to be generally accepted as a programming language, it does those four things: p
prints "hello world", prints a quine, prints the words to 99 bottles of beer on the wall, and accumulates (despite the fact that the accumulating variable is impossible to access, making this feature useless).
also, theres a language ive seen about whitespace, where the only useable characters are spaces, tabs, and newlines, and all other symbols are ignored (allowing a code in C++ to be a valid whitespace program as well)
- RageOfOrder
-
RageOfOrder
- Member since: Aug. 30, 2002
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
Speaking of obscure languages...
You should read up on the aptly named "Racecar", written by one of NG's own.
JesusCyborg was his username.
The language used postfix by default ( a + b - c becomes abc-+ )
and other syntacical rules that the compiler was used to.
A compiler, by default, converts anything you enter to postfix anyways, so the idea was to save the compiler as much work as possible, by having the user enter code in they syntax that a compiler would eventually convert everything to anyways.
The result was supposed to be the fastest programming language in the world :) Hence, Racecar.
- thingie-348
-
thingie-348
- Member since: Nov. 27, 2005
- Offline.
-
- Forum Stats
- Member
- Level 07
- Blank Slate
also, theres a languaje called "reversefuck" that is the same that brainfuck, but backwards, I mean that [ means ], + means - , and < means >, and viceversa
- eWhabs
-
eWhabs
- Member since: May. 4, 2006
- Offline.
-
- Forum Stats
- Member
- Level 13
- Blank Slate
At 10/21/06 11:31 AM, windymager wrote: also, theres a languaje called "reversefuck" that is the same that brainfuck, but backwards, I mean that [ means ], + means - , and < means >, and viceversa
THe guys that made this language are (brain)FUCKed :P.
I'm so funny
-Disregard females (fuck bitches)
-Acquire currency (get money)
-Ignite cannabis frequently (smoke sum with your homies)
- elbekko
-
elbekko
- Member since: Jul. 23, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
- CronoMan
-
CronoMan
- Member since: Jul. 19, 2004
- Offline.
-
- Forum Stats
- Member
- Level 06
- Blank Slate
At 10/21/06 11:38 AM, elbekko wrote: Oh noes, not Brainfuck.
Runs in fear of sanity
I'm tired of brainfuck :( Shakespeare is much cooler!
"no sound in ass"
- elbekko
-
elbekko
- Member since: Jul. 23, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 10/21/06 11:41 AM, CronoMan wrote:At 10/21/06 11:38 AM, elbekko wrote: Oh noes, not Brainfuck.I'm tired of brainfuck :( Shakespeare is much cooler!
Runs in fear of sanity
ROFL
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
- JeremysFilms
-
JeremysFilms
- Member since: Feb. 18, 2005
- Offline.
-
- Forum Stats
- Member
- Level 18
- Blank Slate
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 10/21/06 02:06 AM, RageOfOrder wrote: A compiler, by default, converts anything you enter to postfix anyways, so the idea was to save the compiler as much work as possible, by having the user enter code in they syntax that a compiler would eventually convert everything to anyways.
The result was supposed to be the fastest programming language in the world :) Hence, Racecar.
I fail to see how just letting the compiler do less work makes your code any faster. In any HLL, the computer isn't probably going to understand one piece of the code you write verbatim, which is why compilers exist. Complex syntax or simplistic syntax has nothing to do with your end result, the compilers' code generation is the critical stage if that's what you're shooting for.
omg.
Playstation Network tag: muffin-noodle
the empty set
- White-Rhyno
-
White-Rhyno
- Member since: Apr. 28, 2003
- Offline.
-
- Forum Stats
- Member
- Level 38
- Blank Slate
At 10/21/06 07:02 PM, kb-resin wrote:At 10/21/06 02:06 AM, RageOfOrder wrote: A compiler, by default, converts anything you enter to postfix anyways, so the idea was to save the compiler as much work as possible, by having the user enter code in they syntax that a compiler would eventually convert everything to anyways.I fail to see how just letting the compiler do less work makes your code any faster. In any HLL, the computer isn't probably going to understand one piece of the code you write verbatim, which is why compilers exist. Complex syntax or simplistic syntax has nothing to do with your end result, the compilers' code generation is the critical stage if that's what you're shooting for.
The result was supposed to be the fastest programming language in the world :) Hence, Racecar.
RACECAR was actually a scripting language. JesusCyborg was basically trying to stick it to Perl and PHP by creating the fastest scripting language in existence, so the language design was based around what could be parsed and processed the fastest. Hence the postfix.
- Kool-Aid
-
Kool-Aid
- Member since: Aug. 27, 2005
- Offline.
-
- Forum Stats
- Member
- Level 22
- Game Developer
- Sir-Davey
-
Sir-Davey
- Member since: Jul. 9, 2001
- Offline.
-
- Forum Stats
- Supporter
- Level 19
- Blank Slate
The times I've tried using brainfuck, I had a compiler that basically gave me a "locked" memory space. I could only really change some variables in my program itself and have not yet found a way to interact with the windows GUI. It's turing complete, so it should be able to do that, right?
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 10/23/06 02:19 PM, Sir-Davey wrote: It's turing complete, so it should be able to do that, right?
Yes.
omg.
Playstation Network tag: muffin-noodle
the empty set
- Jordan
-
Jordan
- Member since: Apr. 23, 2006
- Offline.
-
- Forum Stats
- Member
- Level 14
- Blank Slate
On a professional software website:
"Our new range of programs, coded with BrainFuck, if you would like our BrainFuck programs then please visit ou BrainFuck forums and click the stick with the title 'Download BrainFuck apps.'"
Yes, very good name for a language...
- Jessii
-
Jessii
- Member since: Feb. 10, 2005
- Offline.
-
- Forum Stats
- Member
- Level 36
- Movie Buff
- amaterasu
-
amaterasu
- Member since: Mar. 7, 2004
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 10/24/06 08:35 PM, amaterasu wrote: If you like brainfuck, you should try (and I know this is old, but,) LISP. It's a language based completely on lists.
Unlike Brainfuck however, LISP is quite a bit more practical to program in. Either that, or I have yet to see a [real] practical application of Brainfuck.
omg.
Playstation Network tag: muffin-noodle
the empty set
- amaterasu
-
amaterasu
- Member since: Mar. 7, 2004
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
At 10/24/06 08:39 PM, kb-resin wrote:At 10/24/06 08:35 PM, amaterasu wrote: If you like brainfuck, you should try (and I know this is old, but,) LISP. It's a language based completely on lists.Unlike Brainfuck however, LISP is quite a bit more practical to program in. Either that, or I have yet to see a [real] practical application of Brainfuck.
That wasn't my point. My point was LISP has an unusual structure, like Brainfuck. That had nothing to do with the usefulness of the language.
beep
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 10/24/06 08:46 PM, amaterasu wrote: That wasn't my point. My point was LISP has an unusual structure, like Brainfuck. That had nothing to do with the usefulness of the language.
I was only commenting, and actually, in the whole, lisp isn't that unusual in structure. Many languages focus around a centeral data type in the same way lisp does, of course many of them are also somewhat dated, but still in use (some also emit homoiconic features.) These days one of the few things that -really- still sets lisp apart is its use of parenthesis. I'm not saying that the languages that share this property are of an enormous amount, but from the larger view, it's not really that unusual of a system to work around.
omg.
Playstation Network tag: muffin-noodle
the empty set
- amaterasu
-
amaterasu
- Member since: Mar. 7, 2004
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
At 10/24/06 09:01 PM, kb-resin wrote:At 10/24/06 08:46 PM, amaterasu wrote: That wasn't my point. My point was LISP has an unusual structure, like Brainfuck. That had nothing to do with the usefulness of the language.I was only commenting, and actually, in the whole, lisp isn't that unusual in structure. Many languages focus around a centeral data type in the same way lisp does, of course many of them are also somewhat dated, but still in use (some also emit homoiconic features.) These days one of the few things that -really- still sets lisp apart is its use of parenthesis. I'm not saying that the languages that share this property are of an enormous amount, but from the larger view, it's not really that unusual of a system to work around.
So you're sayind that there isn't a big difference between lisp and today's more commonly used languages such as python, the C family, ruby, and java? One of the few differences is the parenthesis? Have you ever actually used it?
beep
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 10/24/06 09:23 PM, amaterasu wrote: So you're sayind that there isn't a big difference between lisp and today's more commonly used languages such as python, the C family, ruby, and java?
No, I'm saying that parenthesis is one of the -big- things that set it apart (syntactically anyway.) Many of lisps' other functionalities have been adopted in numerous languages such as functional based programming, homoiconicity, bias twords a data type, recursion, macros, and even the ubiquitous if-than-else statement. These days, lisp has many interesting properties, but nothing that really, ultra sets it apart from most other programming languages. I probably should have rephrased my statement on my part rather than what I said, because the plain fact of the matter is, Lisp was the second HLL ever invented, and it has had a lot of influences on major programming languages today. The syntax has it's differences (parenthesis and a small one is RPN notation), but If you notice, many languages these days adopt lisp based features.
omg.
Playstation Network tag: muffin-noodle
the empty set
- thoughtpolice
-
thoughtpolice
- Member since: Mar. 24, 2003
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
Here's an addon to my previous post. To show you that Lisp has interesting properties but does not offer many exclusive things that aren't seen in other languages, here're some of the major points that Lisp showed off when it was made (some are just parts of its' syntax to show that even the syntax has been adopted):
* Homoiconicity
- This exists in multiple programming languages such as Prolog, SNOBOL, TRAC, Tcl, and Io
* If-then-else
- If I need to show that this isn't exclusive to lisp then you need to die
* Expression-oriented language
This is still one of the things that sets it apart, but to a degree. The main place this takes focus is in the Macro system of Lisp, and while the system is very powerful, I wouldn't quite say they're the most kick-ass thing you've ever seen.
* Lambda Expressions
Lambda functions and whatnot exist in languages such as Python. Because lisp is fundamentally function-based, Lambdas' generally deal with functions anyway.
* Atoms
Exists in numerous languages such as Erlang
* Conses and Lists
This are almost directly equivilant to Linked lists at the fundamentals, so you might say there isn't really anything new in this part of the system. In fact, Lists in Lisp don't offer a *ton* of things that you really can't get with a linked list already.
Those are major points of part of Lisps' syntax, etc.. These have been seen in numerous programming languages. Aside from some syntactical differences (parenthesis obviously being a large portion,) Lisp really does not share a large amount of things that sets it apart (the REPL is also one of those things that sets it apart, but the REPL is hardly a kick-ass point anyway.)
Lisp is perhaps my favorite programming language. It did a lot for programming and it's really quite an amazing language at heart if you ask me - but the fact is, Lisp is really quite similar to many programming languages you'll find today in their fundamentals when you look at it. Syntax is a very irrelivant point in retrospect, but it's one of the few things that it sets it apart (and that fact alone shows the languages' innovations and semantics, etc have had heavy influence in other languages.) There's not much Lisp really has to itself exclusively anymore, as many of its major points have been well-since adopted.
omg.
Playstation Network tag: muffin-noodle
the empty set
- juraj
-
juraj
- Member since: May. 15, 2004
- Offline.
-
- Forum Stats
- Member
- Level 29
- Blank Slate
Yeah, I've heard of it. It's an esoteric programming language.
- whatthedeuce
-
whatthedeuce
- Member since: Jun. 4, 2005
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
At 10/28/06 03:35 AM, JesusCyborg wrote:At 10/27/06 12:59 PM, juraj wrote: Yeah, I've heard of it. It's an esoteric programming language.Thanks for that fantastic contribution.
In other news, have any of you newbs ever tried programming in Haskell? It's a purely functional language, very similiar to Lisp. If you've only used imperative programming languages, it will blow your mind.
I really should get around to learning Haskell. I've been learning some functional languages recently (mainly ocaml, with a bit of Erlang and Lisp on the side), but I've never learned a purely functional language.
- Imbolic
-
Imbolic
- Member since: Oct. 28, 2006
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
- CalumTurner
-
CalumTurner
- Member since: Jun. 25, 2006
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
- Flashweaver
-
Flashweaver
- Member since: Apr. 22, 2006
- Offline.
-
- Forum Stats
- Member
- Level 05
- Blank Slate

