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.

Lambda Operator in LaTeX

35 pointsby miguelmurcaover 2 years ago

7 comments

zauguinover 2 years ago
You don&#x27;t have to define `\First` and `\Second` since these are predefined as `\@firstoftwo` and `\@secondoftwo`. Also the Unicode bytes are already active so setting their catcode is useless. Also redefining the first octet breaks LaTeX&#x27;s UTF-8 handling and the else case forms an infinite loop. Changing the catcodes of `(` and `)` means that this command doesn&#x27;t work in the arguments of other commands and it breaks other uses of `(` and `)` in the argument.<p>Instead you could do this as<p><pre><code> \documentclass{article} \usepackage{xparse} \NewDocumentCommand \LambdaCalc {u{.} r()} {% [arg:(#1) body:(#2)] } \DeclareUnicodeCharacter {03BB} {\LambdaCalc} \begin{document} λx.(2x) \end{document}</code></pre>
评论 #33298456 未加载
MayeulCover 2 years ago
A bit disapointing. It&#x27;s mostly about parsing, not usage.<p>Half of the post is about handling UTF-8, which AFAIK both LuaTeX and XeTeX (you really shoulduse either) do natively.
评论 #33294322 未加载
xeonmcover 2 years ago
Combine this with that paper of C compiler written entirely in lambda terms[0], now LaTeX is a compilation platform as well!<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33115719" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33115719</a>
评论 #33297603 未加载
c7bover 2 years ago
Sums up the LaTeX experience quite well imho:<p>&gt; LaTeX is great for typesetting math.<p>Q: Ok, great! So how do I typeset this bit of common math?<p>A: a 20-line barrage of import statements, makeatletter&#x27;s and definitions that you copy-paste into your preamble and cross your fingers that it won&#x27;t conflict with the half-dozen other barrages that you copied there to do other bits of common math, often hidden between other Google results with wildly different answers.
评论 #33298286 未加载
评论 #33297903 未加载
ngcc_hkover 2 years ago
Is it possible to do something like Jupiter notebook like so you can demonstrate some (commonn lisp) and then show their result. Like Notebook support some tex.<p>Too much to ask for I guess. Continue waiting.
titzerover 2 years ago
Having spent most of the day stepping on LaTeX rakes, I am really at a loss how anyone could think that making it <i>more</i> programmable would think that&#x27;s a good idea.<p>There are very few bits of software that are more arcane and broken by default than this absolute crapstraction of a platform.
评论 #33295680 未加载
评论 #33295736 未加载
b215826over 2 years ago
&quot;Your scientists were so preoccupied with whether or not they could, they didn&#x27;t stop to think if they should.&quot;