# [dev-context] Re: lua

Hans Hagen pragma at wxs.nl
Mon Aug 8 23:26:42 CEST 2005

Thanh Han The wrote:

>On Mon, Aug 08, 2005 at 06:53:38PM +0200, Hans Hagen wrote:
>
>
>>Hi,
>>
>>Recently i've started looking into Lua, a language meant for embedding
>>in programs. It has a small footprint, and by reading themanukl i get
>>the impression that it's a pretty well designed and clever language. So
>>(after playing with lua and scite, which has it embedded) i started
>>wondering about including lua in pdftex. Of course i'm dependent on
>>others but i'm curious abotu wat members of this list think of it. It
>>has quite a clever function model. Especially because it has a small
>>footprint (some 100-150 k) it would add a lot to pdftex but at little cost.
>>
>>think of on the one hand:
>>
>>\dimen0=\lua{tex.todimen(tex.thedimen(0)+tex.thedimen(2)}
>>
>>kind of things, or
>>
>>\setbox2=\hbox to \lua{tex.todimen(somevar)}
>> {\lua{tex.text("abcde")}}
>>
>>and alike. Of course the interface is to be determined, but a
>>ability to pipe text (strings) back into teh tex inpt stream.
>>
>>whatdoyouthink ...
>>
>>
>
>sounds interesting. I did a quick search on google to learn
>more on this, and I like more the idea. Lua seems to be
>quite suitable for this purpose: small, fast, simple syntax.
>Having it embedded certainly makes a lot of fun.
>
>Who will give it a try? :)
>
>
i was hoping on you, taco or hartmut but probably we need the three of you because it involves interfacing to low level tex (parsing, input), fonts and whatever

Hans

-----------------------------------------------------------------