TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

S-expressions

49 pointsby fogusover 12 years ago

14 comments

manaskarekarover 12 years ago
A highly recommended read from defmacro.<p><a href="http://www.defmacro.org/ramblings/lisp.html" rel="nofollow">http://www.defmacro.org/ramblings/lisp.html</a><p>Other articles on the site are very nice as well: <a href="http://www.defmacro.org/" rel="nofollow">http://www.defmacro.org/</a>
评论 #5167025 未加载
chimeracoderover 12 years ago
&#62; Side note: Wouldn't it be awesome if composer supported composer.sexpr files natively, so that we would no longer have to write JSON? No, not really.<p>Why the quick dismissal? I find s-expressions much easier to work with than JSON.
评论 #5165938 未加载
octo_tover 12 years ago
Parsing S-expressions is easy: Dijkstra solved it in a really nice way with the Shunting Yard Algorithm.
评论 #5164510 未加载
评论 #5165545 未加载
splawnover 12 years ago
Was the use of dict and list necessary? This is an actual question, not a rhetorical criticism. I have recently been trying to learn common lisp.
评论 #5165568 未加载
评论 #5165293 未加载
评论 #5165075 未加载
brudgersover 12 years ago
<i>"Stay tuned for follow-up posts."</i><p>For those interested, there was follow-through on the promise to follow-up:<p><a href="https://igor.io/" rel="nofollow">https://igor.io/</a>
评论 #5164913 未加载
ecmendenhallover 12 years ago
&#62; Side note: Wouldn't it be awesome if composer supported composer.sexpr files natively, so that we would no longer have to write JSON?<p>If you, too, think this would be awesome, check out extensible data notation: <a href="https://github.com/edn-format/edn" rel="nofollow">https://github.com/edn-format/edn</a>.
billpgover 12 years ago
You could write code in XML and JSON too, you just need to define meanings.<p>[add][item]1[/item][item]2[/item][/add]
评论 #5166435 未加载
mwexlerover 12 years ago
What's great about this is not only that it's a good quick summary, but it left me wanting more. That means I actually feel like I was getting somewhere with it, instead of it being instantly forgotten.
lttlrckover 12 years ago
Thanks! 30 seconds of reading and I have at least a basic understanding.
japagetover 12 years ago
Near the front of the main article is "(sexpr lexer reader eval forms special-forms macros walker)". Each word in the above parenthesized expression links to another article in the series.
MichaelGGover 12 years ago
Why are the keywords written with a quote?<p>&#62; (keywords '(useless microframework academic swag))<p>Shouldn't it be a list with strings or something? What if the keywords were complex structures not just strings?
评论 #5167158 未加载
评论 #5165553 未加载
评论 #5165341 未加载
informatimagoover 12 years ago
See also Rivest's Sexps: <a href="http://people.csail.mit.edu/rivest/Sexp.txt" rel="nofollow">http://people.csail.mit.edu/rivest/Sexp.txt</a>
juan_juarezover 12 years ago
&#62; I want to know how to parse them in PHP.<p>Step one : Stop using PHP.
jhrobertover 12 years ago
If you love the expressiveness of S-expressions but hate the super noisy parenthesis, check the sugar version, called "sweet-expressions". <a href="http://readable.sourceforge.net/" rel="nofollow">http://readable.sourceforge.net/</a>
评论 #5166515 未加载
评论 #5166586 未加载
评论 #5165888 未加载