[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Request for feature: Back-channel interaction

From: Elias Mårtenson
Subject: Re: [Bug-apl] Request for feature: Back-channel interaction
Date: Mon, 30 Dec 2013 23:24:13 +0800

I did take a look at the version of the FX stuff that is in the source right now, and I can see that your approach is similar to that of JNI, the native interface for Java. I.e. you write some native code that acts as glue to integrate the underlying native library with the APL runtime.

My problem is that it's more complicated (although not impossible) to build an Emacs module with native code dependencies. There are very few such modules, and I don't know of a standardised way of distributing these. It would certainly add a lot of complexity to the install process (a process which is very simple right now, which is why I would love to be able to keep it as such).

I'm not entirely sure what I'm asking of you. :-)  I mean, it kind of works now, given the caveats I mentioned (in particular, never use any features that talk to the runtime unless the commandline is at the ready prompt). I guess I'm just trying to highlight the situation I'm in right now. I'll use whatever features you decide yo build into the runtime.


On 30 December 2013 22:12, Juergen Sauermann <address@hidden> wrote:
Hello Elias,

I believe that the new native functions in GNU APL are the way go.

Instead of messing around with commands and their responses, you can
write C++ functions that have direct access to all the internals of GNU APL.

Put these functions into a shared library, say emacs.so. You can then
'emacs.so' ⎕FX 'EMACS' to get a user defined APL function EMACS that you
can "call" via stdin of GNU APL with their output on stdout. That makes
you filters simple and you still have access to everything you need.

See src/native for examples. I am currently working on a native FILE_IO that
shall provide all file related functions (fopen(), fclose(), ...) to GNU APL. You
may take that as a blueprint of how to use native functions.

/// Jürgen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]