Star T EX Didier Verna Introduction Star T EX: the Next Generation Why? Implementing T EX in Common Lisp Common Lisp Built-in paradigms Extensibility How? API Didier Verna Compatibility Conclusion didier@lrde.epita.fr @didierverna facebook/didier.verna http://www.lrde.epita.fr/˜didier TUG 2012, July 16 – 18 1/21
Star T EX T EX Didier Verna The [final] frontier. Introduction These are the voyages, Why? Of a software enterprise. Common Lisp Built-in paradigms Its continuing mission: Extensibility To explore new tokens, How? API To seek out a new life, Compatibility New forms of implementation. . . Conclusion 2/21
Don Knuth @ TUG 2010 Why did you design T EX as a macro-expansion based system? Star T EX 1 Wanted something simple to use for my secretary Didier Verna 2 Computational resources at the time were limited Introduction Why? 1 Is T EX simple to use, really? Common Lisp Built-in paradigms 2 Computational resources are not limited anymore Extensibility How? API Compatibility Conclusion 4/21
A better T EX? What would that be? Star T EX T EX’s strength is in the quality of its typesetting, not in its Didier Verna programmatic interface. Introduction Keep the typesetting functionality but provide. . . Why? Common Lisp Built-in paradigms A more modern and consistent API Extensibility Real programming capabilities How? API Compatibility Still simple to use (at least for simple things) Conclusion Extensibility / customizability Backward Compatibility 5/21
Alternatives eval4tex , perlT EX, Q A T EX, PyT EX, python , sT EXme, LuaT EX, iT EX. . . Star T EX Wrap T EX in a programming language Didier Verna Wrap a programming language in T EX Introduction Why? Writing macros in another language Common Lisp Built-in paradigms Getting rid of macros Extensibility How? API Synchronous dual-process ( std redirection / file I/O) Compatibility Conclusion Multi-pass What about a fully integrated approach? I know, NTS is dead. . . 6/21
Outline Star T EX Didier Verna Introduction 1 Introduction Why? Why Common Lisp? 2 Common Lisp Common Lisp Built-in paradigms Extensibility Built-in paradigms How? API Extensibility Compatibility Conclusion How to do it? 3 API Compatibility Conclusion 4 7/21
Why Common Lisp? A language that doesn’t get in the way Star T EX Old language ( � = obsolete, = mature and modern) Didier Verna ANSI standard (1994) ⇒ stable Introduction Industrial-scale general purpose language Why? ◮ Multi-paradigm Common Lisp Built-in paradigms ◮ Highly optimizable Extensibility ◮ Pletora of libraries How? API Scripting / extension language Compatibility ◮ Highly dynamic Conclusion ◮ Highly reflexive ◮ Easy to learn (no syntax) 9/21
Built-in paradigms Free of charge Star T EX key/value interface: functions lambda-lists Didier Verna Packages: ASDF systems Introduction Namespaces: Common Lisp packages Why? Common Lisp Interactive behavior: conditions and restarts Built-in paradigms Extensibility Dumping: Lisp images (idea: user-level dumping) How? API Performance: Compatibility ◮ Interpretation / Compilation / JIT-Compilation Conclusion ◮ Static typing ◮ And again, dumping . . . 10/21
Extensibility / Customizability Tweak at will Star T EX Reflection (introspection / intercession) Didier Verna Structural: Introduction ◮ Package internals ( :: ) Why? ◮ . . . Common Lisp Built-in paradigms Behavioral: Extensibility ◮ Reader-macros How? API ◮ . . . Compatibility Conclusion 11/21
Objectives Remember them? Star T EX ✗ A more modern and consistent API Didier Verna ✔ Real programming capabilities Introduction ✔ Still simple to use (at least for simple things) Why? Common Lisp ✔ Extensibility / customizability Built-in paradigms Extensibility ✗ Backward Compatibility How? API Compatibility Conclusion 13/21
A more modern and consistent API Programmatic T EX primitives Star T EX Parameters ⇒ Lisp variables Didier Verna badness Introduction Quantities ⇒ Lisp objects Why? (setf baselineskip #g(b :plus x :minus y)) Common Lisp Built-in paradigms Commands ⇒ Lisp functions Extensibility How? API (input file) Compatibility (hbox material) Conclusion (hbox material :to dim) (hbox material :spread dim) (hbox-to dim material) (hbox-spread dim material) The typesetting subset of T EX No \def , \relax and friends 14/21
Backward Compatibility With good’old T EX Star T EX Implement traditional T EX on top of procedural T EX Didier Verna (part of) T EX’s digestive engine Introduction Provide a way to plug Lisp code in T EX files Why? T EX macros written in Lisp or direct Lisp code Common Lisp Built-in paradigms Extensibility How? API Compatibility Conclusion 15/21
TiCL architecture An overly simplified, extremely naive, totally wrong view Star T EX Didier Verna Introduction Why? Common Lisp Built-in paradigms Extensibility How? API Compatibility Conclusion 17/21
Recommend
More recommend