Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement brainfuck language support #9

Open
devyn opened this issue Nov 10, 2012 · 6 comments
Open

Implement brainfuck language support #9

devyn opened this issue Nov 10, 2012 · 6 comments

Comments

@devyn
Copy link
Member

devyn commented Nov 10, 2012

< devyn> bf> ++++++++++[>++++++++++<-]+++[>>++++++++++<<-]>++++.+.>++.<----.---.+++++++++++++.++++++++++. 
< oftn-bot> devyn: [0, 32, (121)] hi eboy

Not really sure how input would work. Maybe just give it the next thing they say if it's hanging on a ',' command.

@mathiasbynens
Copy link
Member

Brainfuck programs get big really quickly. Aren't we gonna hit the IRC message length?

@FireyFly
Copy link
Member

Doesn't matter; has brainfuck.

Really though, you can do enough interesting things in a single IRC-line of brainfuck for it to be a fun (although gimmicky) feature.

@prophile
Copy link
Member

Hi chaps-

Doesn't matter; has brainfuck.

What about the inevitable infinite loops? +[]?

Alistair

@FireyFly
Copy link
Member

Re. infinite loops, just limit the execution to, say, 100 000 brainfuck instructions.

Not really sure how input would work.

IIRC what fungot (another IRC bot) does is to separate code and input by a '!'.

@emberian
Copy link

Separating code and input by a ! is something a bunch of things do, especially self-interpreters.

@devyn
Copy link
Member Author

devyn commented Nov 11, 2012

We already have multiline execution support:

|> +++[>
|>   ++++++++++
|> <]
bf> ++.

This works for all languages.

As for input, yes, ! seems the best way to go. I had forgotten about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants