HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Glenn Vanderburg - Cló: The Algorithms of TeX in Clojure

ClojureTV1 HN recommender · recommended in 1 month, 2014-2017
YouTube
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.

Functional programmingGraphic design & typography#tex#clojure#functionalprogramming#literateprogramming#linebreaking

3 comments from Hacker News

@rhythmvs2017 · in “SILE Typesetting System”

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

CitesView on HN
@dj-wonk2015 · in “Reimplementing TeX's Algorithms: Looking Back at Thirty Years of Programming”

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

CitesView on HN
@gavinpc2014 · in “Ramda – A practical functional library for Javascript”

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).

RecommendsView on HN
Effective Programs - 10 Years of Clojure - Rich Hickey1:14:52

Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV
176K views • 9 years ago
Clojure for Lisp Programmers Part 1 - Rich Hickey1:28:59

Clojure for Lisp Programmers Part 1 - Rich Hickey

ClojureTV
25K views • 13 years ago
Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure53:56

Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure

jasonofthel33t
119K views • 13 years ago
Solving Problems the Clojure Way - Rafal Dittwald1:02:26

Solving Problems the Clojure Way - Rafal Dittwald

Clojure/north
87K views • 7 years ago
The Next Five Years of ClojureScript - David Nolen1:00:58

The Next Five Years of ClojureScript - David Nolen

Metosin
19K views • 10 years ago
The Functional Programmer's Toolkit - Scott Wlaschin1:05:51

The Functional Programmer's Toolkit - Scott Wlaschin

NDC Conferences
79K views • 7 years ago
Barliman: trying the halting problem backwards, blindfolded - William Byrd, Greg Rosenblatt36:14

Barliman: trying the halting problem backwards, blindfolded - William Byrd, Greg Rosenblatt

ClojureTV
8K views • 9 years ago
Invited Talk - Guy Steele1:07:22

Invited Talk - Guy Steele

ClojureTV
39K views • 9 years ago
ClojureScript for Skeptics - Derek Slager41:09

ClojureScript for Skeptics - Derek Slager

ClojureTV
72K views • 10 years ago
Introducing SILE: A New Typesetting System47:25

Introducing SILE: A New Typesetting System

lathosjp
5K views • 11 years ago
Stuart Sierra - Components Just Enough Structure41:19

Stuart Sierra - Components Just Enough Structure

ClojureTV
36K views • 12 years ago
Anthony Marcar - Clojure At Scale @WalmartLabs39:41

Anthony Marcar - Clojure At Scale @WalmartLabs

ClojureTV
24K views • 11 years ago
Clojure for Java Programmers Part 1 - Rich Hickey1:48:13

Clojure for Java Programmers Part 1 - Rich Hickey

ClojureTV
131K views • 13 years ago
Lenses, Folds, and Traversals1:54:46

Lenses, Folds, and Traversals

Edward Kmett
54K views • 13 years ago
William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]1:31:06

William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]

PapersWeLove
367K views • 9 years ago
Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript1:02:15

Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript

Fullstack Academy
227K views • 9 years ago
Om Next - David Nolen46:18

Om Next - David Nolen

ClojureTV
44K views • 11 years ago
The Maximal Graph - Wilker Silva39:15

The Maximal Graph - Wilker Silva

ClojureTV
8K views • 6 years ago
Tim Ewald - Clojure: Programming with Hand Tools58:39

Tim Ewald - Clojure: Programming with Hand Tools

ClojureTV
48K views • 12 years ago
Brian Beckman: Don't fear the Monad1:07:10

Brian Beckman: Don't fear the Monad

jasonofthel33t
415K views • 13 years ago