Questions tagged [ffi]

{ffi} (foreign function interface) is a mechanism for one language to interact with software written in another language. It is available in LuaJITTeX and LuaTeX ≥ 1.0.3.

Filter by
Sorted by
Tagged with
9
votes
2answers
1k views

How to use Julia code in my Latex document?

according to https://towardsdatascience.com/5-ways-julia-is-better-than-python-334cc66d64ae it says (under item 2) the following Julia code is universally executable in R, Latex, Python, and C. I ...
2
votes
1answer
494 views

Where does ffi.load look for dynamic libraries by default in TeXLive?

Failing to compile an amazing piece of code by Henri Menke, he pointed me out in comments that ffi was maybe not able to find the right dynamic library on my system. Here is a MCE to work with (must ...
4
votes
1answer
412 views

Calling Julia from Lua

This example code previously appeared on a blog posting by Aditya, with one minor adjustments. I tried to run it on Debian 10 (buster), but it failed with the following error. texlua julia.lua ERROR: ...
3
votes
1answer
144 views

Which libraries are available via ffi for texlive luatex with no other installation?

Recent versions of luatex (≥ 1.0.3) come with ffi. That means that one can call a C library from lua inside a TeX file. Some (very) recent examples on TeX.sx have proven its power. Assuming current ...