From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85645 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: luatex lunatic Date: Thu, 19 Dec 2013 00:51:36 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0165109475==" X-Trace: ger.gmane.org 1387410707 29438 80.91.229.3 (18 Dec 2013 23:51:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Dec 2013 23:51:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 19 00:51:54 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VtQu9-00009P-86 for gctc-ntg-context-518@m.gmane.org; Thu, 19 Dec 2013 00:51:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6F84B101FA; Thu, 19 Dec 2013 00:51:52 +0100 (CET) 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 4kaOJSFVEm0B; Thu, 19 Dec 2013 00:51:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id BA34F101E2; Thu, 19 Dec 2013 00:51:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9ACB8101E2 for ; Thu, 19 Dec 2013 00:51:45 +0100 (CET) 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 GcvdwStor2IS for ; Thu, 19 Dec 2013 00:51:40 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id D2DA2101DE for ; Thu, 19 Dec 2013 00:51:40 +0100 (CET) Original-Received: from mail-qe0-x236.google.com (mail-qe0-x236.google.com [IPv6:2607:f8b0:400d:c02::236]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rBINpcAa003846 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 19 Dec 2013 00:51:39 +0100 Original-Received: by mail-qe0-f54.google.com with SMTP id cy11so363087qeb.13 for ; Wed, 18 Dec 2013 15:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UCqFc52aWNqqaB/ZRBtpj2WcfHldpT7ysrlaatHOc9M=; b=0pq7WMofkoq97AAr+Yy1CQClB/PbKGjlDtWeQNPexfXlYGxWBSl7woy2U+Rsb+ovGE Bubvb4fPOalpsQSJzVsqnHhkmN6lMMUZZ2CNjU/EwEEE5ZfTK+yNtNhzJwQGrpYZaAix nM40a+nxs0e7R0Y9oiR7/srTo5Wv6gbwDBq/4Ud7EMk6pJjmM/xJibKHYW9Gz2UYVUuR b2pDt96Sdw2zTgkhiedSqfNR3ROOZ3VHhuFy0DRUIYZXQbi2r94Zfx0Db/eDljmFyWGP GSLKyV7RbL8zZwCHZBsbwjBBu+mOCyYouVw5NWpCi4NqUWQ3HDiPjyfKWQyIpNU/X7W8 PPRw== X-Received: by 10.229.194.1 with SMTP id dw1mr58255083qcb.20.1387410697050; Wed, 18 Dec 2013 15:51:37 -0800 (PST) Original-Received: by 10.140.89.101 with HTTP; Wed, 18 Dec 2013 15:51:36 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:400d:c02::236; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07L3bPC7u - 0d6b371e5c2f - 20131219 X-Scanned-By: CanIt (www . roaringpenguin . com) 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:85645 Archived-At: --===============0165109475== Content-Type: multipart/alternative; boundary=001a11c2c736c15f9404edd7b99f --001a11c2c736c15f9404edd7b99f Content-Type: text/plain; charset=UTF-8 On Wed, Dec 18, 2013 at 11:16 PM, DesdeChaves wrote: > Dear sirs > I would like to try luatex lunatic ( > http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic) but i > d'ont find the luatex-0.42. I'm looking in > https://foundry.supelec.fr/frs/?group_id=10&release_id=406#luatex-beta-0.76.0-title-content > > I've been looking for a way to simulate data with different distributions > (normal, poisson, exponential, etc.) in the .tex file. The use of GSL > library is a good option, but it seems impossible to import in luatex. > Another way is using the R-statistical through filter module***, which > seems to work well in luatex. At this time I would try to import the GSL > functions through python script. For that i think that i need the older > luatex 0.42 but I don't find that. > > *** > \defineexternalfilter > [R] > [ > filtercommand={R CMD BATCH -q --save --restore > \externalfilterinputfile\space \externalfilteroutputfile}, > output=\externalfilterbasefile.out, > directory=output, > readcommand=\typefile, > read=no, > cache=yes, > ] > > > Jorge > > I'm sorry to say that I cannot help you with luatex lunatic, luatex 0.42 is too old and today there are other ways to build wrappers . I can suggest to see SWIG (http://www.swig.org), there is a very good section on Lua. In any case the filter module that you use is often a reliable alternative to connect to external programs, so the problem is often to be sure to have a good program. In your case you can also write a python script that uses that gsl module (if there is such module, I don't know exactly) and then call python by mean of the filter module. -- luigi --001a11c2c736c15f9404edd7b99f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Wed, Dec 18, 2013 at 11:16 PM, DesdeChaves <= ;desdechaves@gma= il.com> wrote:
Dear sirs

I've been looking for a way to simulate data with d= ifferent distributions (normal, poisson, exponential, etc.) in the .tex fil= e. The use of GSL library is a good option, but it seems impossible to impo= rt in luatex. Another way is using the =C2=A0R-statistical through filter m= odule***, which seems to work well in luatex. At this time I would try to i= mport the GSL functions through =C2=A0python script. For that i think that = i need the older luatex 0.42 but I don't find that.

***
\defineexternalfilter
=C2= =A0 [R]
=C2=A0 [
=C2=A0 =C2=A0 =C2=A0filtercommand=3D{R= CMD BATCH -q --save --restore \externalfilterinputfile\space \externalfilt= eroutputfile},
=C2=A0 =C2=A0 =C2=A0output=3D\externalfilterbasefile.out,
= =C2=A0 =C2=A0 =C2=A0directory=3Doutput,
=C2=A0 =C2=A0 =C2=A0readc= ommand=3D\typefile,
=C2=A0 =C2=A0 =C2=A0read=3Dno,
=C2= =A0 =C2=A0 =C2=A0cache=3Dyes,
=C2=A0 =C2=A0]

=

Jorge=C2=A0

I'm sorry to say that I cannot help you=C2=A0 with l= uatex lunatic, luatex 0.42 is too old and today there are other ways to bui= ld wrappers . I can suggest to see SWIG (ht= tp://www.swig.org),=C2=A0 there is a very good section on=C2=A0 Lua.
In any case the filter module that you use= is often=C2=A0 a reliable=C2=A0 alternative to connect to external program= s, so the problem
is often to be sure t= o have a good program. In your case you can also write a python script that= uses that gsl module (if there is such module, I don't=C2=A0 know exac= tly) and then call python by mean of the filter module.

--
luigi
--001a11c2c736c15f9404edd7b99f-- --===============0165109475== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0165109475==--