Hacker News new | past | comments | ask | show | jobs | submit login

I only skimmed, but parts of this article read as just another pro-LISP piece... A rant against other languages (which the author terms "DSLs" simply because they're not Turing complete) like LaTeX, HTML, regex, SQL etc. and lists alternatives, all of which are S-expression-based. Well, the superiority of S-expressions is just, like, your opinion, man. Personally, I consider them inferior to pretty much any other syntax (joke languages like Brainfuck, Whitespace, JavaScript excluded). An in absolute terms, the whole civilisation was built on syntax-full DSLs (law, math, engineering, ...).

I mean, how is this (Skribilo):

     (define (freedom . body)
       (ref :url "http://www.gnu.org/philosophy/free-sw.html" :text body))

     (p [Skribilo is a ,(freedom [free]) document production tool that takes a structured document ...])
better than this (LaTeX):

    Skribilo is a \href{http://www.gnu.org/philosophy/free-sw.html}{free} document production tool that takes a structured document ...



Seems like the top defines a reusable construct. Couldn't this be

     (p [Skribilo is a ,
     (ref :url "http://www.gnu.org/philosophy/free-sw.html": text "free")
     document production tool that takes a structured document ...])
vs

\par Skribilo is a \href{http://www.gnu.org/philosophy/free-sw.html}{free} document production tool that takes a structured document ...

If we further examine

     (ref :url "http://www.gnu.org/philosophy/free-sw.html":text "free")

     \href{http://www.gnu.org/philosophy/free-sw.html}{free}
The first example defines a url with (ref :url :text) and latex is \href{}{} this is about the same amount of syntax being very similar to a function with 2 arguments

The enclosing scope is (p []) so basically 5 extra characters to define structure.


The article is for the bigger part about operating systems, only a minor part is about programming languages (which is important for the matter at hand). It's not pro-Lisp in particular, it's pro-"general-purpose, well tested and well designed programming languages". I don't exlude other programming languages from the picture. The alternative I gave as examples are the ones that I know of, but sure thing there are others out there in Python, Lua, Ruby, you name it.

I personally like S-expressions because they are very general and have deep semantic implications (eval-apply, a.k.a. code is data) that go beyond mere syntactic considerations.

Regarding your examples, if I understand correctly they are not equivalent, so they don't exactly compare.

Here LaTeX would require the \begin{document}...\end{document} bits.

But regardless, TeX is very painful to program with (lack of proper data structures and control structures). It's very important in my opinion.


TeX itself is Turing-complete, if not exactly an ideal language for computing things not directly related to typography.

But Lua(La)TeX exists, which allows for more user-friendly scripting in Lua (not my favourite language, but...), and I think that is the only real 'competitor' of (La)TeX.

I love Lisp, but the majority of what I write is in (La)TeX, and I don't know of anything comparable for dealing with creating and typesetting academic-type work. Most of its 'competitors' use TeX on the back-ends, and though I've tried writing more in Org mode and exporting to LaTeX, in the end for anything beyond trivial text, it's easier just to write directly in LaTeX.


All this is definitely true, but in my opinion not ideal. LuaTeX adds a significant layer of complexity to an already way-too-complex system.

At this point we might want to step back and wonder why this has become so hard.

TeX is a poor foundation to build upon, so I don't think LuaTeX, despite being the best solution currently, is the right direction to explore.


> TeX is a poor foundation to build upon

I still disagree with this characterisation. TeX is a really beautiful solution to a non-trivial problem, and its implementation in WEB is really quite interesting. LaTeX adds quite a lot of complexity and messiness, but does also add very useful functionality and abstraction away from low-level typesetting. Org-mode and similar 'mark-up' languages are very nice in more rigidly-defined domains, but they don't have the power of (La)TeX for academic writing. I don't see any real 'competitors' to (La)TeX that aren't themselves just adding layers on top of TeX (for better or worse). TeX is nearly as old as (original) Emacs and has similarly become complex in perhaps not-entirely-ideal ways, but - like Emacs - there's no substitute.


I'm not criticizing the power of TeX in terms of typesetting, I'm only referring to the _language_ here. (And you are aboslutely right, Org and other markup languages are not competing with TeX.)

Imaging the capabilities of TeX with a good programming language.

I don't find WEB beautiful. In my opinion, literate programming (at least in this case) is a pretext to hide a terrible, unexpressive programming language.

As you're saying, Emacs had the good taste to use a Lisp back in those days, so it really is a pity that TeX didn't.


Well, I agree a Lisp or at least more Lispy interface with TeX would be much preferable. But I am dubious how anything comparable to TeX and the TeX-ecosystem would be developed at this point.


Additional: I did come across https://github.com/mbattyani/cl-typesetting , though its homepage seems to have disappeared.


Nice! Thanks for sharing!


This would be extremely demanding a project indeed, which is probably one no such thing has really taken off in many decades.


Instead of a pro-scheme rant one could interpret it also as a NixOS pitch using a scheme API instead of a DSL.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: