bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] libapl load problem....UPDATE 2


From: Juergen Sauermann
Subject: Re: [Bug-apl] libapl load problem....UPDATE 2
Date: Wed, 13 Jun 2018 19:58:57 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Hi Peter,

a simple C program, say libapl_test.c  would be this:


#include "libapl.h"

int
main(int argc, char * argv[])
{
   init_libapl(argv[0], 0);
   return apl_exec("⎕←2 3⍴⍳6");
}



Compile it in src like so:


gcc -o libapl_test libapl_test.c -L .libs -lapl


Executing it gives:


address@hidden:~/projects/juergen/apl-1.7/src$ ./libapl_test
1 2 3
4 5 6



/// Jürgen



On 06/13/2018 05:34 PM, Peter Teeson wrote:
Hi Dirk:

Please tell me what OS you were using? 

thanks….

Peter
On May 20, 2018, at 4:59 PM, Dirk Laurie <address@hidden> wrote:
I did this three years ago, using SVN 570 of GNU APL. In an ideal
world, I would have checked after every SVN update that my application
still works. In the real world, I have not touched it since and cannot
remember much. :-(

I currently have SVN 1048. When I tried it my application [1] (which
runs GNU APL in parallel with Lua) just now, the Lua 5.2 version that
I made on 29 May 2015 still works in a simple test.

$ lua -l gnuapl
Lua 5.3.4  Copyright (C) 1994-2017 Lua.org, PUC-Rio

        
…/gnuapl$ lua5.2 -l gnuapl
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
=gnuapl.exec"4 4⍴⍳16"
1  2  3  4
5  6  7  8
9 10 11 12
13 14 15 16

        
This seems to confirm that there is nothing wrong with libapl.so.

Unfortunately I have no simple C main program, since everything runs
through Lua. In particular, Lua's 'package.loadlib' function is used
to load the current libapl.so. The code for that function is way above
my code-reading ability.

Sorry that I can't offer more help.

-- Dirk

[1] Those that are reasonably fluent in Lua and its C API can try it
out: https://github.com/dlaurie/lua-gnuapl


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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