Hello (again),
This email is further to my previous "Using ConTeXt-LMTX for modern
Mathematically-Literate-Programming 1/2" email...
My ultimate goal in using ConTeXt-LMTX as a
Mathematically-Literate-Programming tool, is to actually write a
kernel "Mathematical Language" in ANSI-C (wrapped in Lua) which is then
imported back into ConTeXt-LMTX as a standard Lua module (with an ANSI-C
shared library).
This would allow the output of "code" in my "Mathematical Language" to
be directly embedded/typeset in the output of my Mathematical document.
(The ultimate goal is to ensure that there is NO wishful thinking that
the code is "correct" ("just trust me")... all results would be
directly visible in the PDF).
Alas, while, for other reasons, trying to use the Lua-CJSON Lua module
from within ConTeXt-LMTX (which also makes use of a shared library
written in C), I find that the current ConTeXt-LMTX is missing (among
potentially others) the `lua_checkstack` symbol:
> ...Xt/tex/texmf-context/tex/context/base/mkiv/l-package.lua:333: error
> loading module 'cjson' from file '/usr/local/lib/lua/5.4/cjson.so':
> /usr/local/lib/lua/5.4/cjson.so: undefined symbol: lua_checkstack
even when using the ConTeXt/LuaMetaTeX `--permiteloadlib` switch.
(Note that this Lua-CJSON module does work with the native 5.4 Lua).
(The ConTeXt I am using identifies itself as: ConTeXt ver: 2020.11.25
19:18 LMTX fmt: 2020.11.25 int: english/english)
I note that the output of `luametatex --help` includes the following
statement:
> Loading libraries is blocked unless one explicitly permits it (will
> be in 2.08+):
>
> --permitloadlib permit loading of external libraries (coming)
----
QUESTIONS:
1. Is this an oversight and `--permitloadlib` is meant to be working
now?
2. Is this a trivial fix (and might be fixed soon -- time permitting)?
3. Is this a rather complex refactoring of the code/build system (and
hence might take some time before a fix can be rolled
out)?
4. Is this a case of "the `lua_checkstack` symbol will never be part of
luametatex"?
----
Any of the above scenarios is OK (though scenario 4 would be a
disappointment as it means no shared library lua modules could be
used in ConTeXt)...
... it would however be useful to have an idea of which scenario is
most likely.
Again Many thanks for a wonderful (and stable) tool!
Regards,
Stephen Gaito
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________