ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: [Dev-luatex] new/missing feature in luamplib
       [not found] <30B8277D-B6D7-4920-A050-F51B9DA459E6@web.de>
@ 2012-08-07  8:12 ` Hans Hagen
  2012-08-07  8:33   ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2012-08-07  8:12 UTC (permalink / raw)
  To: Keith J. Schultz; +Cc: mailing list for ConTeXt users, dev-luatex

On 7-8-2012 09:29, Keith J. Schultz wrote:
> Hi Manuel, Everybody,
>
> I am just getting into LuaLaTeX.
>
> I needed to do some work with MetaPost.
>
> While working I came across a kudo. That is once inside the mblibcode
> environment one can not call Lua. THIS I consider a missing feature and
> a VERY important one.

Some (simple) support for lua calls is on the (long term) agenda but not 
before the current mplib extensions project is done (i.e. the decimal 
calculation plugins).

Calling lua in itself is not so much an issue; after all one can just do 
a \directlua inside a blob of mp passed to mplib (I do that all the 
time). For an lua 'primitive' in mplib (which then probably would just 
be called just 'lua') we first need to figure out:

1 - how to access mp internals (and that relates to the mentioned 
decimal extensions, as we might need to get and set)
2 - if and how we can share the state with the (main) tex lua instance
3 - how we want to print back to mp (like tex.[s]print)

It's one of those feature we have discussed (maybe too) long ago, but 
because it has to be more than just (3) it never ended up first on the 
todo list (first finishing the main lib).

The problem with these things is that it has to be mostly 'right from 
the start' in order not to conflict too much with long term usage).

Anyhow, if you play with such things, best have something

   lua "mp.print(123)"

Given mp's somewhat different parsing and expansion compared to tex 
there are also some conceptual issues involved. It also relates to input 
buffers (and file reading) and io is somewhat messy in mp and on the 
agenda for cleaning up.

(Luigi Scarso has done this with metafont, so that might be a starting 
point for experimenting.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Dev-luatex] new/missing feature in luamplib
  2012-08-07  8:12 ` [Dev-luatex] new/missing feature in luamplib Hans Hagen
@ 2012-08-07  8:33   ` Taco Hoekwater
       [not found]     ` <86A1AFB8-7483-4B6A-9A52-758DECEF6B96-KIERECuABvX/D1n+0JDH9g@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2012-08-07  8:33 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users, dev-luatex

Hi,

On Aug 7, 2012, at 10:12 AM, Hans Hagen wrote:

> On 7-8-2012 09:29, Keith J. Schultz wrote:
>> Hi Manuel, Everybody,
>> 
>> I am just getting into LuaLaTeX.
>> 
>> I needed to do some work with MetaPost.
>> 
>> While working I came across a kudo. That is once inside the mblibcode
>> environment one can not call Lua. THIS I consider a missing feature and
>> a VERY important one.
> 
> Some (simple) support for lua calls is on the (long term) agenda but not before the current mplib extensions project is done (i.e. the decimal calculation plugins).
> 
> Calling lua in itself is not so much an issue; after all one can just do a \directlua inside a blob of mp passed to mplib (I do that all the time). 

I was under the impression that this was all that the proposed patch does. Luamplib
did not allow any (tex nor lua) escapes within the block, if I understand correctly.

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: new/missing feature in luamplib
       [not found]     ` <86A1AFB8-7483-4B6A-9A52-758DECEF6B96-KIERECuABvX/D1n+0JDH9g@public.gmane.org>
@ 2012-08-07  9:00       ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2012-08-07  9:00 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users, dev-luatex-wvrSQK3plZs

On 7-8-2012 10:33, Taco Hoekwater wrote:
> Hi,
>
> On Aug 7, 2012, at 10:12 AM, Hans Hagen wrote:
>
>> On 7-8-2012 09:29, Keith J. Schultz wrote:
>>> Hi Manuel, Everybody,
>>>
>>> I am just getting into LuaLaTeX.
>>>
>>> I needed to do some work with MetaPost.
>>>
>>> While working I came across a kudo. That is once inside the mblibcode
>>> environment one can not call Lua. THIS I consider a missing feature and
>>> a VERY important one.
>>
>> Some (simple) support for lua calls is on the (long term) agenda but not before the current mplib extensions project is done (i.e. the decimal calculation plugins).
>>
>> Calling lua in itself is not so much an issue; after all one can just do a \directlua inside a blob of mp passed to mplib (I do that all the time).
>
> I was under the impression that this was all that the proposed patch does. Luamplib
> did not allow any (tex nor lua) escapes within the block, if I understand correctly.

ok, so it's not a luatex/mplib issue but something for the maintainer of 
that package as deciding what characters need what catcode is a package 
issue (probably obeying \ { } is enough then)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-07  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <30B8277D-B6D7-4920-A050-F51B9DA459E6@web.de>
2012-08-07  8:12 ` [Dev-luatex] new/missing feature in luamplib Hans Hagen
2012-08-07  8:33   ` Taco Hoekwater
     [not found]     ` <86A1AFB8-7483-4B6A-9A52-758DECEF6B96-KIERECuABvX/D1n+0JDH9g@public.gmane.org>
2012-08-07  9:00       ` Hans Hagen

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