fuckbrain-master

所属分类:编译器/解释器
开发工具:C/C++
文件大小:331KB
下载次数:1
上传日期:2018-04-04 09:34:24
上 传 者jackdow233
说明:  这是一个fb语言的解释器,供解释器学习者学习。zsbd
(This is an interpreter for fuckbrain language, which is for interpreter learners to learn.)

文件列表:
LICENSE (1078, 2016-06-14)
fuckbrain (0, 2016-06-14)
fuckbrain\__init__.py (0, 2016-06-14)
fuckbrain\__main__.py (46, 2016-06-14)
fuckbrain\fuckbrain.py (812, 2016-06-14)
fuckbrain\install.py (694, 2016-06-14)
fuckbrain\kernel.py (1231, 2016-06-14)
fuckbrain\table.pkl (1465055, 2016-06-14)
fuckbrain\table_gen.py (1545, 2016-06-14)
setup.py (278, 2016-06-14)

Fuckbrain - The Reverse Brain***ing =========== I was learning *brain****, an esoteric programming language which only accepts the following characters: `+-><[],.`. Basically, it's a fairly simple language. It can write ASCII characters to stdout by using `.`, read from stdin by `,`, other characters handle those computatoional stuff. To learn it, I suggest [Learn brain*** in Y minutes](https://learnxinyminutes.com/docs/brain***/). Apparently, it's not an easy job to write a piece of brain*** code, and it hurts. So I found [this](https://copy.sh/brain***/text.html), a text-to-brain*** code generator, which makes life easier. The code generator application was written in JavaScript, but ported from Java, [here](http://codegolf.stackexchange.com/a/5440/3428) is the original Java code. I came up with an idea of building a Jupyter kernel for it, named it "***brain". Basically, you enter some text, and it'll spit out some brain*** code that you won't understand. Usage ----- You can use the kernel with any Jupyter frontends, including console, qtconsole and notebook. For console, use `jupyter console --kernel ***brain` to run a Jupyter Console with ***brain kernel. For notebook users, select "Fuckbrain" kernel when you create a new notebook, then you'll have it. Type in any text you want into the code cell, then execute it, you'll see some brain*** code in the output, that's the code which outputs the text you've entered. There's one magic command in this kernel that you can use: `%%beautiful`. Enter `%%beautiful` in the beginning of code cell, then type in any text you want after that, you'll see the output code with character-to-code mapping comments (oh by the way, any letters except `+-><[],.` are ignored). Installation ------------ ### Install Package Since the package hasn't submitted to PyPI yet, you'll have to clone the source and run `python setup.py install`, or use `pip install -e git+https://github.com/adrianliaw/***brain.git`. ### Install Jupyter Kernel After installing package, run `python -m ***brain install`, then you'll see the "Fuckbrain" kernel option showing up in your kernel list.

近期下载者

相关文件


收藏者