Glenn Vanderburg - Cló: The Algorithms of TeX in Clojure
ClojureTV1 HN recommender · recommended in 1 month, 2014-2017
9K views · 11 years ago · talk · evergreen
Glenn Vanderburg presents Cló, a Clojure library that reimplements TeX's core typesetting algorithms as composable functions. He shows what translating procedural, literate-programming code into functional form teaches.
HN recommends it for its insight into Knuth's TeX algorithms and what changes when they are rewritten functionally.
1:14:52Effective Programs - 10 Years of Clojure - Rich Hickey
ClojureTV
176K views • 9 years ago
1:28:59Clojure for Lisp Programmers Part 1 - Rich Hickey
ClojureTV
25K views • 13 years ago
53:56Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure
jasonofthel33t
119K views • 13 years ago
1:02:26Solving Problems the Clojure Way - Rafal Dittwald
Clojure/north
87K views • 7 years ago
1:00:58The Next Five Years of ClojureScript - David Nolen
Metosin
19K views • 10 years ago
1:05:51The Functional Programmer's Toolkit - Scott Wlaschin
NDC Conferences
79K views • 7 years ago
36:14Barliman: trying the halting problem backwards, blindfolded - William Byrd, Greg Rosenblatt
ClojureTV
8K views • 9 years ago
1:07:22Invited Talk - Guy Steele
ClojureTV
39K views • 9 years ago
41:09ClojureScript for Skeptics - Derek Slager
ClojureTV
72K views • 10 years ago
47:25Introducing SILE: A New Typesetting System
lathosjp
5K views • 11 years ago
41:19Stuart Sierra - Components Just Enough Structure
ClojureTV
36K views • 12 years ago
39:41Anthony Marcar - Clojure At Scale @WalmartLabs
ClojureTV
24K views • 11 years ago
1:48:13Clojure for Java Programmers Part 1 - Rich Hickey
ClojureTV
131K views • 13 years ago
1:54:46Lenses, Folds, and Traversals
Edward Kmett
54K views • 13 years ago
1:31:06William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
367K views • 9 years ago
1:02:15Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript
Fullstack Academy
227K views • 9 years ago
46:18Om Next - David Nolen
ClojureTV
44K views • 11 years ago
39:15The Maximal Graph - Wilker Silva
ClojureTV
8K views • 6 years ago
58:39Tim Ewald - Clojure: Programming with Hand Tools
ClojureTV
48K views • 12 years ago
1:07:10Brian Beckman: Don't fear the Monad
jasonofthel33t
415K views • 13 years ago
3 comments from Hacker News
SILE indeed looks great, promising to come on par with the typesetting quality we have come to expect since TeX: Knuth-Plass line breaking, Unicode and OpenType font features support, complete with contextual shaping, Cassowary constraint solver, parallel text, multiple apparati, foot and marginal notes, vertical typesetting… This is a typographer’s dream! But, like TeX and friends (LaTeX, ConTeXt, etc.), creating stylesheets and document templates still looks like a pain with SILE and alike. At least from the perspective of designers who have come to expect a strict separation of concerns between document structure/semantics and its styling, and who are used to work with a declarative stylesheet-based language like the prevalent CSS, as opposed to the macros of TeX, and its document model which conflates semantical markup with inline styling instructions. Similar initiatives like SILE, which attempt to port TeX to newer languages while untangling macro spaghetti, like Cló¹ and Rinohtype², didn’t consider CSS-based stylesheets either. Which is a pity, especially with highly developed W3C Working Draft open standard specifications³ for paged media being out quite some time now. That’s exactly what makes PDF formatters like Prince⁴, which accepts standard html and css as its input, so immensely attractive: users can continue to use the (Web) technologies they already know (html, javascript, css) and enjoy a strict separation of concerns between document contents, templates and
Perhaps Glenn has different goals than you might expect? The video goes into this better than the InfoQ article. In short, I think Glenn embraced the differences and challenges of adapting TeX in Clojure from an educational perspective. I don't think he intended to port it quickly or verbatim. Glenn wanted to head-to-head comparison to promote education. To explain, in Glenn's talk around 11:36 ( ▶ this video ) he says: > While I'm glad that the source code of TeX is still available to study, I sure wouldn't point a new programmer toward it because we should not be doing programs today like we did then. > But what might be really valuable is to have a modern reimplementation written in a modern functional style to study alongside [the original TeX] to see how much has changed and to appreciate what he have and the value of improved tools and techniques and the tradeoffs that have been made. His slide on his educational goals can be seen at 12:06: > Illustrate what's changed > Demonstrate values of expressive code > Provide real examples of expressing procedural algorithms in functional style > Show how functional programs are easier to reason about > Show different styles of optimization
TL;DR, stack frame all the things. I'm joking (kind of), but I was reminded of this talk about implementing TeX in Clojure [0], in which you are shown the pains Don Knuth took to avoid subroutines calls, ostensibly for performance reasons—such heavy macro usage, for example, that the speaker calls the language a "dialect" of Pascal. Now we have the maxim about programmer cycles versus machine cycles, which is itself getting a little dated because of scale. Anyway, fun times to be in this field. You might also like the "It's 1982 and I can't believe we're still..." part of the talk, (a.k.a. "Everything's amazing and nobody's happy") for putting things into perspective. [0] ▶ this video EDIT Time is on their side though... with tail-call optimization coming to ES6 (just about the only "good part," according to Crockford).