[Jprogramming] J API

Eric Iverson eiverson at sympatico.ca
Fri Jul 13 22:55:59 HKT 2007


I haven't had time to properly study the issues you raise. I don't 
understand why you would require copying j.dll to jj.dll.

Let me sketch out what you can do with the current mehanisms.

A C program can:

1. load the j.dll and access the J API functions
2. the J API functions can run arbitrary J sentences and check results
3. the J API functions can set and get the data of J nouns

The key thing that is missing in J601 is the ability of J to call a C 
function through the C function memory address. This is because the current 
J cd facility can only call functions that are accessed via a dll module 
name and function name. As Oleg has pointed out this is a known shortcoming 
and the additionaly facility has already been promised for the 602 release. 
In particular in 602 it will be possible for the J cd mechanism to call a c 
function directly through its memory address. This means you could provide J 
with the address of the C routine and that with cd J could call that routine 
as required.

----- Original Message ----- 
From: "Jack Andrews" <effbiae at gmail.com>
To: "Programming forum" <programming at jsoftware.com>
Sent: Friday, July 13, 2007 6:38 AM
Subject: Re: [Jprogramming] J API


> >Could you give more information of what
>>you are going to achieve?
>
> well,it's clear that i can achieve what i want
> without the need to pass a
> c function pointer to j in order to call c functions.
> the c function simply has to reside in a dll/so.
>
> my point is that it is a desirable feature if you
> want to embed J in any other program.  without
> being able to pass a c function to act as a j verb,
> there's only pain messing about with dlls.
> (and copying j.dll to jj.dll)
>
> how hard can it be to define this mechanism?
> i'm sure something like this is currently in use in
> the j internals.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm 



More information about the Programming mailing list