Developers' News: L3 Kernel and the Glue mechanism

Since the above pull request authored by JK and reviewed by Darcy. In Mogan Editor, we will use lua to generate the cpp glue. Why Lua? Because, using lua, it is integrated with xmake in a seamingless way.

And based on JK’s work, now, Darcy is busy working on the L3 Kernel.

L3 Kernel is the subset of GNU TeXmacs:

  • Jolly C++ collections (L1 Kernel)
  • Jolly IO and Memory (L2 Kernel)
  • S7 Scheme and related Glues

When L3 Kernel is ready, it will be much easier for us to switch between Scheme Implementations.


That naming might be confusing given that the L3 and L4 kernels already exist and are something else entirely:

The Library of L3 Kernel is ready with the following pull request merged:

With the L3 Kernel Library, we can built a L3 Scheme Interpreter. And in this interpreter, the following glue symbols will be availabe:

  • url related
  • tree related

With the L3 Scheme Kernel, we can use Scheme with L1/L2/L3 glue symbols to do batch processing via the scheme programming language on TeXmacs documents.


L4 Kernel is similar to the Vau project:
(FYI @mgubi )
For now, I’m still busy on making L3 Kernel better. And I have not started my work on L4 Kernel.


In Vau I experimented with Glue made via C++ templates. I still have mixed feelings about it, but works ok. My idea is that the glue code should be declared near the sources where it is implemented. I would also like to have more Glue, e.g. to programmatically generate PDF or edit PDF via PDF Hummus, but I guess this requires some more work.

1 Like

A good idea! The only bad part is that it may slow down the build process.

In Mogan Editor 1.2.x, just put the glue code here:

I do not think so. Glue is declared locally in every compilation unit in which it is declared. If you do not recompile a file then it will not reprocess that glue. I guess it is even faster than the current centralised way of doing it. See e.g.

these macros use template metaprogramming to instantiate the glue. No Scheme preprocessor is needed, just C++. Templates declared here:

It requires some name disambiguation for calling overloaded functions, but otherwise it is working well.

1 Like