What you describe is exactly the facility provided by cd and it has been in J for years.

----- Original Message ----- From: "Don Guinn" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Friday, July 13, 2007 2:25 PM
Subject: Re: [Jprogramming] J API


STSC's PC/APL+ had a []CALL function which I found quite useful when I
really needed to make a program perform. I used STSC's memory management
etc. and put assembly programs into variables which were executed via
[]CALL. Very efficient because there was no environment switch. I did
similar things with PLI on IBM mainframes. Using the tools provided by the
caller and staying in the environment of the caller really helps
performance. I doubt that JSoftware would want to provide something like
this.


On 7/13/07, Eric Iverson <[EMAIL PROTECTED]> wrote:

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" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
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

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to