ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Henri Menke <henrimenke@gmail.com>
Subject: Re: LuaTeX incompatible with Lua
Date: Thu, 21 Nov 2019 09:18:44 +0100	[thread overview]
Message-ID: <c2e9b6fe-705b-28dd-cf9f-8716e89660e7@xs4all.nl> (raw)
In-Reply-To: <9303d3b5-d2b8-5d80-4f19-3e1f59cdb2d8@gmail.com>

On 11/21/2019 8:17 AM, Henri Menke wrote:
> Dear list,
> 
> The following Lua script behaves differently when executed in Lua vs.
> LuaTeX.
> 
>      print(os.execute("date"))
> 
> It seems that the definition of os_execute in loslibext.c was copied
> over from Lua 5.1 and not adapted to newer versions.
> 
>      $ lua5.1 test.lua
>      0
>      $ lua5.2 test.lua
>      true    exit    0
>      $ lua5.3 test.lua
>      true    exit    0
>      $ texlua test.lua
>      0
>      $ luajit test.lua
>      0
>      $ texluajit test.lua
>      0
> 
> As you can see from the example, this comes with the additional
> complication that LuaJIT has Lua 5.1 behaviour and should also retain
> that.
Indeed, the old interface was kept (also for compatibility reasons as 
lua is used for scripts in texlive etc).

If one used lua as well as luatex as lua engine for the same script one 
can write a wrapper if needed (I have been thinking of that on context 
but again it would also mean adapting older scripts laying around.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2019-11-21  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  7:17 Henri Menke
2019-11-21  7:43 ` Henri Menke
2019-11-21  8:18 ` Hans Hagen [this message]

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=c2e9b6fe-705b-28dd-cf9f-8716e89660e7@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=henrimenke@gmail.com \
    --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).