From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40217 Path: news.gmane.org!not-for-mail From: "Wolfgang Werners-Lucchini" Newsgroups: gmane.comp.tex.context Subject: Re: mplib Date: Tue, 15 Apr 2008 01:13:49 +0200 Message-ID: <4804014D.22013.2B10B16@wwl.musensturm.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208214413 5961 80.91.229.12 (14 Apr 2008 23:06:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 23:06:53 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 15 01:07:22 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JlXlh-0003cx-LG for gctc-ntg-context-518@m.gmane.org; Tue, 15 Apr 2008 01:07:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E09561FBC1; Tue, 15 Apr 2008 01:06:40 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00565-01; Tue, 15 Apr 2008 01:05:48 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 98FD31FC57; Tue, 15 Apr 2008 01:05:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B7ADB1FC57 for ; Tue, 15 Apr 2008 01:05:46 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32381-03-4 for ; Tue, 15 Apr 2008 01:05:11 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by ronja.ntg.nl (Postfix) with ESMTP id 062091FBC9 for ; Tue, 15 Apr 2008 01:05:10 +0200 (CEST) Original-Received: from [192.168.178.20] (frnk-590d0057.pool.einsundeins.de [89.13.0.87]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JlXjY0l4x-000334; Tue, 15 Apr 2008 01:05:08 +0200 Priority: normal In-reply-to: X-mailer: Pegasus Mail for Windows (4.41, DE v4.41 R1) Content-description: Mail message body X-Provags-ID: V01U2FsdGVkX1/Tw3bj5GdQ1ApRtQI2tFvzpZ1+fyRJ/P+C74F VT+HWJ6Xc0uCQptYPDbVhAI2aJMj70i4Kf6yYFwjI2Ebzb0cFC bGgJLCwPrzVRBsVaCvwPkqc3r9EFm5H X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40217 Archived-At: On 13 Apr 2008 at 13:31, ntg-context-request@ntg.nl wrote: Hallo Taco, thank you for your example. > % start low-level > \startlua > local function finder(name, mode, ftype) > if mode=="w" then > return name > else > return kpse.find_file(name,ftype) > end > end > mp = mplib.new ( { > hash_size = 100000, > main_memory = 2000000, > param_size = 100000, > find_file = finder, > ini_version = true > } ) > if mp then > res = mp:execute('plain') > mp:finish() > end this first step runs with res=0, but there is no 'plain.mem' dumped. (I have temporary appended 'dump;' to plain.mp) this first step runs with res=0 with mp:execute('mpost'), but no 'mpost.mem' the first step even runs with res=0 and mp:execute('\\plain; dump;'), but no 'plain.mem' after that I produced 'plain.mem' executing 'texmfstart texexec --make plain' > > mp = mplib.new ( { > hash_size = 100000, > main_memory = 2000000, > param_size = 100000, > find_file = finder, > } ) > > if mp then > res = mp:execute( > "\\beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;" ) > tex.print("[" .. tostring(res.status) .. "]") > mp:finish() > end > \stoplua > % stop low-level > this second step returns res=3. Is there a find_file function necessary to find the mem-file given in 'mem_name' or is such a function only necessary for file-names in 'mp:execute'? Wolfgang -- Musensturm-Verlag -- Postfach 1249 -- 36126 Gersfeld >>> http://www.musensturm.de ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________