[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] using c libs in apl?
From: |
Xiao-Yong Jin |
Subject: |
Re: [Bug-apl] using c libs in apl? |
Date: |
Tue, 7 Feb 2017 11:30:59 -0600 |
It would be nice if one doesn't need to write wrappers and the APL system can
do the
structure conversions within the APL interpreter. In J, you can dlopen a
library
and pass J values directly without writing and compiling C, see
http://www.jsoftware.com/help/user/call_procedure.htm
and the relevant code is at
https://github.com/jsoftware/jsource/blob/master/jsrc/x15.c
It would simplify using external libraries a lot.
> On Feb 4, 2017, at 7:38 AM, Juergen Sauermann <address@hidden> wrote:
>
> Hi,
>
> yes there is: native functions. You can load shared libraries and ⎕FX
> functions in
> them to be called from APL code. The src/native directory contains a few
> templates
> that you can use as a starting point and to call your favourite library from
> them.
>
> Of course you need to provide wrappers from/to APL values to/from the data
> structures expected or produced by the libraries.
>
> Coming back to your other problems, if you do not like the terminal I/O of
> GNU APL, then
> you can write your own one and call libapl from it. I have extended libapl
> recently, giving
> you the full functionality of GNU APL without the specific ways how it
> handles terminal IO.
>
> /// Jürgen
>
>
> On 02/04/2017 02:52 AM, address@hidden wrote:
>> is there method for loading a c lib and using it in apl ? cdecl? like
>> this in fpc?
>>
>>
>> ftp://ftp.freepascal.org/fpc/docs-pdf/CinFreePascal.pdf
>>
>>
>>
>>
>>
>
- [Bug-apl] using c libs in apl?, enztec, 2017/02/03
- Re: [Bug-apl] using c libs in apl?,
Xiao-Yong Jin <=
- Re: [Bug-apl] using c libs in apl?, Juergen Sauermann, 2017/02/07
- Re: [Bug-apl] using c libs in apl?, Elias Mårtenson, 2017/02/07
- Re: [Bug-apl] using c libs in apl?, Juergen Sauermann, 2017/02/08
- Re: [Bug-apl] using c libs in apl?, Elias Mårtenson, 2017/02/08
- Re: [Bug-apl] using c libs in apl?, Juergen Sauermann, 2017/02/08
- Re: [Bug-apl] using c libs in apl?, Elias Mårtenson, 2017/02/09
- Re: [Bug-apl] using c libs in apl?, Juergen Sauermann, 2017/02/09
- Re: [Bug-apl] using c libs in apl?, Elias Mårtenson, 2017/02/09
- Re: [Bug-apl] using c libs in apl?, Xiao-Yong Jin, 2017/02/10
- Re: [Bug-apl] using c libs in apl?, Elias Mårtenson, 2017/02/10