ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: why lua?
Date: Sat, 18 Dec 2010 00:56:52 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.01.1012180048390.12324@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <AANLkTinNw0J0eNco5XME0hBofXyXMJ+8WKARy3Wbnuyc@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1432 bytes --]

On Sat, 18 Dec 2010, Philipp A. wrote:

> my dream for luatex/context would be a built-in lua interpreter (because lua
> is so fucking small) and optional modules for other, heavier, scripting
> languages (perl, ruby), which you don’t have to install. i don’t care if
> python is embedded or extended, i just want to write \directpython{for num
> in [9,2,4,8]: ctx.print(num**3)} (or sth. like that)

luatex is more than lua (or any prog/scripting language) embedded in tex; 
it is a programming language with acess to tex's internals. For example, 
you can find the dimension of each node in a vlist and use a different 
line-breaking algorithm or tweak the node list after line breaking is done 
(something like this is done in arabic line-breaking). If you do not 
want easy access to tex's internals, embedding/extending tex is relatively 
easy: see for example perltex. Whether the binary of the prog language is 
embedded in the tex binary, or in the wrapper script for calling tex is 
immaterial. On the other hand, if you want acess to tex's internals, you 
can either code it for a specific language (like luatex does), or provide 
an API interface to the internals. My understanding is that given the 
complexity of the tex codebase, the latter was more too much effort for 
too little gain. After all, python vs lua is a minor difference, compared 
to the programing abilities of TeX.

Aditya

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2010-12-18  5:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 15:20 Jonas Stein
2010-12-17 21:46 ` Martin Schröder
2010-12-17 22:35 ` Philipp A.
2010-12-17 22:51   ` Hans Hagen
2010-12-18  8:35     ` luigi scarso
2010-12-17 22:48 ` Hans Hagen
2010-12-17 23:27 ` Philipp Gesang
2010-12-17 23:46   ` Hans Hagen
2010-12-18  0:50     ` Philipp A.
2010-12-18  5:56       ` Aditya Mahajan [this message]
2010-12-18 11:03       ` Philipp Gesang
2010-12-18 11:35         ` Hans Hagen
2010-12-18 13:06           ` Philipp Gesang
2010-12-18 13:20             ` Hans Hagen
2010-12-18 14:17               ` Philipp Gesang
2010-12-18 18:54                 ` Hans Hagen
2010-12-18 11:31       ` Taco Hoekwater
2010-12-18 13:04       ` Hans Hagen
2010-12-18 13:18         ` luigi scarso
2010-12-18 13:24           ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.01.1012180048390.12324@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).