TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Brainfuck in one line of Python

80 点作者 JJMalina超过 13 年前

7 条评论

_delirium超过 13 年前
And for our next trick, Python in one line of Brainfuck...
vidarh超过 13 年前
I must admit I was disappointed - v2 of the original AmigaOS Brainfuck compiler is a 240 bytes binary, and the C interpreter is 1047 bytes of <i>unobfuscated</i> C source.<p>1400+ bytes of tightly packed Python just isn't in the same class.
评论 #3312105 未加载
benatkin超过 13 年前
That isn't the normal way of measuring the length of code in code golfing contests. It's number of normal-sized lines, for some measurement of normal that is less than 1400 characters. Pretty neat, though; just a misleading title.
评论 #3312045 未加载
DanielRibeiro超过 13 年前
<i>you can't parse any non-regular language on any given computer</i><p>It is nice how the author completely ignored LALR <i>parsers</i>[1], peg parsers[2], and so on.<p>[1] <a href="http://en.wikipedia.org/wiki/LALR_parser" rel="nofollow">http://en.wikipedia.org/wiki/LALR_parser</a><p>[2] <a href="http://en.wikipedia.org/wiki/Parsing_expression_grammar" rel="nofollow">http://en.wikipedia.org/wiki/Parsing_expression_grammar</a>
评论 #3312175 未加载
评论 #3312042 未加载
pak超过 13 年前
Any program can be called a "one liner" if you just strip newlines and don't limit the line length.
评论 #3312031 未加载
评论 #3312016 未加载
Dylan16807超过 13 年前
So how long would it be if you used a better python interpreter with tail calls?
shubsengupta超过 13 年前
I'm still appalled at the fact that the term 'brainfuck' is used in a Princeton website.
评论 #3313095 未加载
评论 #3312909 未加载