From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77791 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context,gmane.comp.tex.luatex Subject: Re: [Dev-luatex] new/missing feature in luamplib Date: Tue, 07 Aug 2012 10:12:44 +0200 Message-ID: <5020CDFC.50208@wxs.nl> References: <30B8277D-B6D7-4920-A050-F51B9DA459E6@web.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344327191 30323 80.91.229.3 (7 Aug 2012 08:13:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 08:13:11 +0000 (UTC) Cc: mailing list for ConTeXt users , dev-luatex@ntg.nl To: "Keith J. Schultz" Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 07 10:13:10 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Syeua-0004Im-Ca for gctc-ntg-context-518@m.gmane.org; Tue, 07 Aug 2012 10:13:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4CFD910220; Tue, 7 Aug 2012 10:13:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QUBl-lCdPcNi; Tue, 7 Aug 2012 10:13:05 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 671CD10206; Tue, 7 Aug 2012 10:13:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1EA9E10206 for ; Tue, 7 Aug 2012 10:13:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id kfQ517Xu5W3d for ; Tue, 7 Aug 2012 10:13:03 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 1D8AF10200 for ; Tue, 7 Aug 2012 10:13:03 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (localhost [127.0.0.1]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q778D22B002707 for ; Tue, 7 Aug 2012 10:13:02 +0200 Original-Received: (from defang@localhost) by filter1-ams.mf.surf.net (CanIt-Domain-PRO/Streamed) id q778ClSF014137 for ; Tue, 7 Aug 2012 10:12:47 +0200 Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-ams.mf.surf.net (envelope-sender ) (CanIt-Domain-PRO/Pre-stream) with ESMTP id q778CkhW002641; Tue, 7 Aug 2012 10:12:47 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 1829-1713362 for multiple; Tue, 07 Aug 2012 10:12:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <30B8277D-B6D7-4920-A050-F51B9DA459E6@web.de> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=03; city=Hattem; latitude=52.4724; longitude=6.0696; http://maps.google.com/maps?q=52.4724,6.0696&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NHHId21t - d52663cfcb50 - 20120807 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77791 gmane.comp.tex.luatex:2808 Archived-At: 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 ___________________________________________________________________________________