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.

π: A Pattern Language

35 pointsby jedi_stannisover 15 years ago

6 comments

raganwaldover 15 years ago
Going deep into the shed, SNOBOL was an early homoiconic language where the primary idiom was pattern-matching over strings. A little like regular expressions with control over backtracking, side effects during pattern matching, and many other features. SNOBOL provided a very unique paradigm in its day, and I can attest that "Thinking in SNOBOL" required letting go of almost everything FORTRAN taught you about programming :-)<p>The first implementation actually compiled SNOBOL programs into FORTRAN programs. My mind boggles at the thought.<p><a href="http://en.wikipedia.org/wiki/SNOBOL" rel="nofollow">http://en.wikipedia.org/wiki/SNOBOL</a>
andreyfover 15 years ago
pegasus_f from the "Who?" section seems even more interesting:<p><pre><code> action bring (several folders) from (an office) to (an archive) { go to (the office); enter (it), take (the folders) and leave; go to (the archive); search (the right place for (the folders)) and leave (them) (there); go back; }</code></pre>
评论 #910403 未加载
teiloover 15 years ago
Could someone explain this to me? If, as they say, "There is only one language construct in π: the pattern", why is there flow control, blocks, etc.? Wouldn't it be more accurate to say that a pattern is a specialized function, and the only type of function in π?
评论 #910442 未加载
mark_hover 15 years ago
This was just on LtU: <a href="http://lambda-the-ultimate.org/node/3662" rel="nofollow">http://lambda-the-ultimate.org/node/3662</a><p>Only a couple of comments right now, but it might be worth cross-referencing later.
mbrubeckover 15 years ago
This reminds me a lot of <a href="http://tinlizzie.org/ometa/" rel="nofollow">http://tinlizzie.org/ometa/</a> (another general-purpose programming language built around pattern matching).
评论 #910329 未加载
felideonover 15 years ago
Ok, I found that Alt+26 on Windows gives you the single arrow (→). But how do you type the ⇒ hollow arrow? (Without charmap or copy&#38;paste)<p>Edit: I haven't really been able to get it to run on my Windows machine at work. I'll have to try at home later.
评论 #911093 未加载