Hacker News new | comments | show | ask | jobs | submit login
An IRC bot written in Brainfuck (github.com)
103 points by mappum on Jan 7, 2013 | hide | past | web | favorite | 29 comments



I wrote one in brainfuck++ some years ago: https://github.com/billiob/bfb Brainfuck++ adds opening/closing/reading/writing to files/sockets with 6 new operators. The whole code in a single file is there: https://github.com/billiob/bfb/blob/master/code.bfpp


You sir have inspired me to learn this monstrosity purely so I too can insert art into my code.


If you like code looking like art, you should look at Piet: http://www.dangermouse.net/esoteric/piet.html

It's art that's code


In the sample programs there is even a brainfuck interpreter! http://www.dangermouse.net/esoteric/piet/samples.html


Oh wow, this is really really really cool.

Now I'm thinking of awesome programs to hide in any gfx work I do...


Wait, wat?


For the love of all that is holy, why would anybody subject themselves to this torment?


Brainfuck is to Turing machines what Lisp is to Lambda calculus or Prolog is to predicate logic. There's enough syntactic sugar to make it a practical programming language that is based on a mathematical theory. Learning it will, arguably, make you a better programmer.

This seems to be like a conveniently sized practice project, a little I/O with the real world with a simple computational task that's fun to write.


Brainfuck looks like it is a Turing machine, only you increment/decrement states rather than jumping to them right away.


fun. thinking differently for some days.


I realise this is the beginnings of the bot, but I'm surprised at how small it is.


I'm not pointing out a heinous crime, but it doesn't contain the network code


That's because Brainfuck is omakase


It would be really cool to make some slightly more usable programming language that compiles to Brainfuck so that mortals could write non-trivial programs in it and impress their friends.


Or just a program that writes bf programs, like the (apparently only) way people write Malbolge programs: http://en.wikipedia.org/wiki/Malbolge#Programming_in_Malbolg...


It's not impressive, though. It's not surprising that someone is able to create a program using a Turing-complete language. It's just surprising that they decided to waste their time with an unreadable one. It's far more impressive to do basically anything else related to programming.


/me imagines a IOCCC contest entry that is a non-obfuscated C BF VM.

And when run on its own source-code it exposes a message; obfuscation and steganography being much the same thing.

And it uses every single BF symbol in the source significantly (no hopping over to a payload thats in a comment or something simple)...

I expect someone has already done it!


I had an idea once to make a brainfuck web framework as an April fool's day joke along the lines of Cobol on Cogs.

The trick, I figured, would be to make a simple basic-like language, and actually write the framework in that, and then make a compiler that translated it to brainfuck.

I wonder if that's what this guy did. :)


Oh dear god.


Exactly.

This `netfuck' code is well documented, though. I'm not even sure which questions I'd want to ask first about the author's relationship with programming.


If this is the same SirCmpwn that I am aware of, then I believe his background is in Zilog z80 programming.

Getting started with assembly can do strange things to a man. ;)


I am that SirCmpwn indeed.

Also, who's the jerk that took "SirCmpwn" as a username :(


If you're anything like me, it was you three years ago and you can't remember the password and don't use the associated e-mail address anymore.



With all lower case it does exist: http://news.ycombinator.com/user?id=sircmpwn


Huh. It wouldn't let me register it.


Jesus christ. O.o;; This is the first I've seen the language... I think if I wrote stuff at work in brainfuck they would think I was just wasting time. XD


The node.js equivalent for brainfuck.


...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: