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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: A programming language that uses only parentheses

55 点作者 c4m大约 13 年前

22 条评论

jbert大约 13 年前
See also CPAN's Acme::Bleach module (language written only in whitespace).<p>As a bonus, the Acme::Bleach module will take an existing perl program and convert it (overwrite it) with a version written in whitespace.<p>"The first time you run a program under use Acme::Bleach, the module removes all the unsightly printable characters from your source file. The code continues to work exactly as it did before, but now it looks like this:"<p><a href="http://search.cpan.org/~dconway/Acme-Bleach-1.13/lib/Acme/Bleach.pm" rel="nofollow">http://search.cpan.org/~dconway/Acme-Bleach-1.13/lib/Acme/Bl...</a>
评论 #3893325 未加载
BasDirks大约 13 年前
<p><pre><code> Error handling If your program has a runtime error or a compiletime error the interpreter will print "Parenthesis Mismatch" to standard output and then exit. </code></pre> Priceless. The sad thing is that most "modern" programming language offer basically identical erro reporting.
评论 #3893141 未加载
ctdonath大约 13 年前
Considering how numbers are represented, I'm reminded of John Horton Conway's article on <i>Surreal Numbers</i>, wherein he starts with an empty set and one rule, and derives the totality of all numbers. Could make for an interesting basis for a language.
评论 #3895000 未加载
SkyMarshal大约 13 年前
This looks like somebody made a mistake using sed on lisp code accidentally deleted everything but the parenthesis. I don't know which is cooler, this or brainfuck.
评论 #3892980 未加载
avmich大约 13 年前
In pure functional programming, so well mentioned in some PG's articles, you have only functions - no numbers. You can make numbers from functions, though. Then, you may have a basis - a set of functions which are sufficient to represent arbitrarily complex algorithm, i.e., Turing complete set; see here - <a href="http://dkeenan.com/Lambda/" rel="nofollow">http://dkeenan.com/Lambda/</a> .<p>Such a set may consist from only one function. So, the whole program is a structure of calling that function. Writing down such a program, we obviously don't need to write the function - it comes by default; we only need to write the structure, which can be represented by ( and ) . In a different way, than what I see here, but still - one bit per parenthesis, very simple processor, lots of memory and lots of steps for simple operations - a Turing tarpit...
drostie大约 13 年前
I have two related ideas for a useless language, this is very close to the first one.<p>The first idea is that you normally use at least 2 symbols for a programming language, but you can in principle get away with just one. The "vanilla" form of this idea is to use the length of the processed string as the instruction itself -- that is, it has a bit pattern which gives you two symbols to play with in principle. Of course that's pretty ugly so you can instead do something slightly more "advanced" and use a non-character as a delimiter; the most obvious choice is file boundaries on a filesystem, but in principle any data structure boundary can be used.<p>The second useless language that I want to create is one which I'm not even completely sure works. The idea is that you have some number of nodes -- let's say 256 -- which each contain some number of bytes -- let's say 4. Those bytes represent two (node pointer, instruction) tuples. These get initialized to a definite 1KB prelude, and the computer starts at node 0. The instructions can also manipulate registers and a much larger memory space, and can load ints from that memory into other nodes, but the 1 KB is needed for the interpreter.<p>The idea for this useless language is that, the computer chooses one of the two tuples randomly, performs its instruction, and then goes to the node it points to. &#62;:D<p>The basic idea is that all esoteric languages seem to be about "how do you program familiar thing X if you don't have Y?", but I have 256 instructions so I'll give you all sorts of wonderful functions to call on your registers. The problem is really just that the computer does not natively want to follow a deterministic path, and you have to "herd it" into that mentality.
评论 #3893168 未加载
saintfiends大约 13 年前
I can pass subtle messages to astute readers by carefully crafting parenthesis in blog posts. This should be fun.
samikc大约 13 年前
If this is Lambda Calculus Tarpit like Turing Tarpit[1]? It seems like that to me.<p>[1]<a href="http://en.wikipedia.org/wiki/Esoteric_programming_language#Turing_tarpit" rel="nofollow">http://en.wikipedia.org/wiki/Esoteric_programming_language#T...</a>
listrophy大约 13 年前
My programming language that uses only ellipses got buried last week. Yes, a programming language with one character, and no whitespace.<p><a href="http://listrophy.github.com/ellipsis/" rel="nofollow">http://listrophy.github.com/ellipsis/</a>
duck大约 13 年前
Last week there was the semicolon language (<a href="http://news.ycombinator.com/item?id=3854130" rel="nofollow">http://news.ycombinator.com/item?id=3854130</a>), now parentheses. My guess is next week we'll see the tilde language.
评论 #3893826 未加载
roop大约 13 年前
Cool. A Brainfuck-ish langauge, but more powerful.<p>I initially thought it would have been a pain to write just the test programs, but I guess they were just programatically search-replaced from Lisp programs?
asmala大约 13 年前
I am impressed by the purity. Takes homoiconicity to the next level.
tferris大约 13 年前
Clojure 2
cafaro大约 13 年前
Hey! I made a programming language that only uses 1s and 0s... oh wait, never mind.
arunoda大约 13 年前
Wow. The first ever modern langage I have seen in years. :+p
zupa大约 13 年前
You are a complete idiot :D (good fun thumbs up)
chinnikrishna55大约 13 年前
Whats the point!!
zalew大约 13 年前
(.)(.)
评论 #3893302 未加载
maak大约 13 年前
This made my day
debelbot大约 13 年前
.-less
krsunny大约 13 年前
(Why?)
jjaredsimpson大约 13 年前
Seems like a "how can i design a bad intermediate language" project.