Hello

Programming, for all ages and all languages.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Zacariaz wrote:I still don't get what is so <BLEEP!>ing interesting about brain<BLEEP!>.
Absoluetley nothing, It's a horrible language.. :roll:

People just like the fact that they can swear at work, and not get fired... :P
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Solar wrote:I counter with a quote from the same page you linked, italics are mine:
bf_to_f.py
... a translator from byte-cell Brainfuck to F
(a second proof that F is Turing complete, given that byte-cell Brainfuck is T.C.)
Touche, sir! (imagine that there's an acute accent on that 'e'...)
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Brynet-Inc wrote:
Zacariaz wrote:I still don't get what is so <BLEEP!>ing interesting about brain<BLEEP!>.
Absoluetley nothing, It's a horrible language.. :roll:
Actually, if I were to hold classes of the "programming from the ground up" kind, my first lesson would be held in Brainfuck. No kidding!

It is as syntactically simple as a Turing-complete language could get, yet it allows to introduce many very important concepts right at the start:
  • source - compiler - executable,
  • memory as an array of bytes,
  • variables and pointers,
  • importance of commenting your source,
  • even if you understand an algorithm intuitively ("take two numbers and calculate their sum"), you still have to break it down so the computer understands.
Then I would go on to C, and show them how wonderful even a crufty old language like C can be when compared to BF. And once they got some more concepts down by heart (functions, data structures, call by value, call by reference, deep vs. shallow copy, ...), I could go on to whatever language they really have to learn.

BF isn't a great language per se, but there is no better way to show how simplicity in a language leads to complexity in solutions.
Every good solution is obvious once you've found it.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

There's a BASIC to BF compiler. It had commands to change the colour of the screen but they never worked :(

I've heard rumours (but still looking for) a C to BF compiler.
My OS is Perception.
Post Reply