Re: [Bug-apl] using c libs in apl?

2017-02-07 Thread Christian Robert
I love that. Of course it will possibly/eventually crash your APL session if you do the smallest error in your parameters definition. "libffi" as mentioned by Elias is also a great possibility, already available by default on Fedora, CentOS-7, debian, ... I just had to install libffi-devel to

Re: [Bug-apl] strange behavior of --

2017-02-07 Thread Elias Mårtenson
I think having a specific flag to use that disables all the input and output magic is the correct way to go. --rawCIN does this for input. Is there a --rawCOUT? Regards, Elias On 7 February 2017 at 19:54, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi Elias, > > that would tell y

Re: [Bug-apl] SVN 881 compile error

2017-02-07 Thread Peter Teeson
Sorry forgot to include this ./configure --with-libapl --with-android -- > On Feb 7, 2017, at 10:44 PM, Peter Teeson wrote: > > macOS 10.10.5 using Terminal > In file included from libapl.cc :36: > ./libapl.h:88:1: error: struct 'Value' was previously declared as a class > [-

[Bug-apl] SVN 881 compile error

2017-02-07 Thread Peter Teeson
macOS 10.10.5 using Terminal In file included from libapl.cc:36: ./libapl.h:88:1: error: struct 'Value' was previously declared as a class [-Werror,-Wmismatched-tags] struct Value; ^ ./Value.hh:52:7: note: previous use is here class Value : public DynamicObject ^ ./libapl.h:88:1: note: did y

Re: [Bug-apl] using c libs in apl?

2017-02-07 Thread Elias Mårtenson
This would be really neat to have, but as someone who has written a lot of FFI (foreign function interface) code in Common Lisp which has a very powerful such interface, there are a lot of nuances that needs to be covered in order to have a decent FFI. For example, what if you need to call a funct

Re: [Bug-apl] Setting LIBREF-0 from command line

2017-02-07 Thread Alexey Veretennikov
Hi, Aah actually after this message I've tried ⊣⍎')copy ./funcs.apl' and it works without need to redefine LIBREF-0! Thanks! Juergen Sauermann writes: > Hi again, > > I just remembered that you can also use an absolute path instead of the > library > numbers. > For that path, even tab-expans

Re: [Bug-apl] Setting LIBREF-0 from command line

2017-02-07 Thread Juergen Sauermann
Hi again, I just remembered that you can also use an absolute path instead of the library numbers. For that path, even tab-expansion should work. /// Jürgen On 02/07/2017 09:13 PM, Alexey Veretennikov wrote: Is where a way to set LIBREF-0 from command line when running the script? I want to

[Bug-apl] Setting LIBREF-0 from command line

2017-02-07 Thread Alexey Veretennikov
Is where a way to set LIBREF-0 from command line when running the script? I want to override the default setting when I run the script and point it to the current directory, so the )copy commands in the script first will try to look at the current directory. -- Br, /Alexey

Re: [Bug-apl] using c libs in apl?

2017-02-07 Thread Juergen Sauermann
Hi Xiao-Yong, I believe this could be achieved by a single "master"-native function which then loads the actual DLL as specified by the arguments of the master function. Referring to the example in link you gave below: a=: 'kernel32 GetPro

Re: [Bug-apl] using c libs in apl?

2017-02-07 Thread Xiao-Yong Jin
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

[Bug-apl] thanks for the fun

2017-02-07 Thread enztec
Hi I've attached 2 pngs of some coding i did making a test apl form fns in a script that hooks some basic gtk2 libs i've started to use the component file functions with the sqlite functions but encompassed a lot of errors in using their code so i just used large matrices instead Thanks for t

Re: [Bug-apl] strange behavior of --

2017-02-07 Thread Juergen Sauermann
Hi Elias, that would tell you if your stdin is a terminal. But as we have seen below this is always the case with zsh even if apl is called from a script. zsh behaves exactly as if the first script line (but without the leading #!**) was entered manually but then does not do the same with subs

Re: [Bug-apl] strange behavior of --

2017-02-07 Thread Elias Mårtenson
Shouldn't you be able to simply call isatty(0) to determine this? Regards, Elias On 7 February 2017 at 19:21, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi Xiao-Yong, > > yes, and GNU APL is doing a similar thing. However, the problem seems to > be that the > shell is not piping

Re: [Bug-apl] strange behavior of --

2017-02-07 Thread Juergen Sauermann
Hi Xiao-Yong, yes, and GNU APL is doing a similar thing. However, the problem seems to be that the shell is not piping the rest of the script into the stdin of the called interpreter, but instead cloning its own stdin. And according to th