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

2017-02-06 Thread Xiao-Yong Jin
In terms of how interpreters should do with multiple arguments in the #! line, perl's behavior is useful. The following is from 'perldoc perlrun' The "#!" line is always examined for switches as the line is being parsed. Thus, if you're on a machine that allows only one argument with the

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

2017-02-06 Thread Alexey Veretennikov
Hi, Yes exactly, I was using zsh! Xiao-Yong Jin writes: > I would guess he is using zsh instead of bash. > zsh allows interpreter after #! without an absolute path, irrelevant of the > OS kernel. > > Try running the following script under zsh: > > SCRIPT BEGIN > #!bash > echo 'this w

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

2017-02-06 Thread Juergen Sauermann
Hi Xiao-Yong, thanks a lot for this explanation! /// Jürgen On 02/06/2017 08:25 PM, Xiao-Yong Jin wrote: I would guess he is using zsh instead of bash. zsh allows interpreter after #! without an absolute path, irrelevant of the OS kernel. Try running the following script under zsh: SC

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread Juergen Sauermann
Hi Louis, thanks, now I understand. The reason is most likely the way in which GNU APL executes scripts. If one does )COPY script (as opposed to )COPY a workspace) then this causes the script to be executed when APL returns to immediate executi

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

2017-02-06 Thread Xiao-Yong Jin
I would guess he is using zsh instead of bash. zsh allows interpreter after #! without an absolute path, irrelevant of the OS kernel. Try running the following script under zsh: SCRIPT BEGIN #!bash echo 'this will fail' SCRIPT END You will get OUTPUT BEGIN bash: e

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread Louis de Forcrand
If I understood correctly, you are asking why executing ')COPY SQL.apl' with the execute primitive inside another function does not copy the SQL workspace until after the surrounding function has ended. I regret that I cannot answer you, but I am sure others here can. It would make their task

Re: [Bug-apl] ⍝ comment ignored?

2017-02-06 Thread Juergen Sauermann
Hi, I don't want to restart the "A Comment is a Comment" discussion, but if I remember correctly then the argument to the )FNS command (!) is the prefix of the function names that shall be displayed. GNU APL is a bit lazy in commands in t

[Bug-apl] ⍝ comment ignored?

2017-02-06 Thread Louis de Forcrand
Wrong address (again). Begin forwarded message: > From: Louis de Forcrand > Date: 6 February 2017 at 19:45:50 GMT+1 > To: enz...@gmx.com > Subject: Re: [Bug-apl] ⍝ comment ignored? > > System commands are not expressions, and cannot be followed by a comment. > > Louis > >> On 06 Feb 2017, at

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

2017-02-06 Thread Juergen Sauermann
Hi Alexey, very odd indeed. It very much looks like OSX is starting apl but then not piping the subsequent lines of the script into APL. As if they are opening the script with popen() instead of execve(). Its probably more a problem of the shell

Re: [Bug-apl] ⍝ comment ignored?

2017-02-06 Thread enztec
full testing in workspace and in script )clear CLEAR WS )fns )fns ⍝ aaa )fns ⍝ SQL∆Connect )fns ⍝ doesn't show SQL∆Connect bad range argument ⍝ doesn't show SQL∆Connect, expecting from - to )copy SQL.apl DUMPED 2017-01-27 16:05:06 (GMT-7)

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread enztec
yea the code in the script being run in the workspace with fns - not taking the code pieces out and running it in immediate execution in the workspace i sure hope you see the difference between running immediate execution in a workspace and as a fns in a workspace On Mon, 6 Feb 2017 18:54:23

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

2017-02-06 Thread Alexey Veretennikov
Hi! Finally I've down to something. So the difference is whether I specify full path to apl in a file header. Consider: head -1 aaa.apl #!apl -l 37 --script -- sizeof(Svar_record) is328 sizeof(Svar_partner) is 28 increasing rlimit RLIMIT_NPROC from 709 to infinity initializing paths from a

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread Juergen Sauermann
Hi, maybe i am stupid, but for me it looks like you are opening a function called sqlite in your script (between 1 and 2. If so then the subsequent lines belong to your function sqlite) ? And further down I reads: it is the same behavior in

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

2017-02-06 Thread Juergen Sauermann
Hi Alexey, but then everything is just fine, isn't it? I believe in an earlier post you said that in OSX you don't see any output and have to type )OFF blindly (which suggest that you didn't have a working stdin)? /// Jürgen

[Bug-apl] ⍝ comment ignored?

2017-02-06 Thread enztec
in a workspace )fns )fns ⍝ shows SQL∆Connect bad range argument ⍝ shows SQL∆Connect, expecting from - to

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

2017-02-06 Thread Alexey Veretennikov
Hi, Here are the results: sizeof(Svar_record) is328 sizeof(Svar_partner) is 28 increasing rlimit RLIMIT_NPROC from 709 to infinity initializing paths from argv[0] = apl initializing paths from $PATH = /Users/alexeyv/Applications:/Users/alexeyv/Development/stm32tools:/Users/alexeyv/Develo

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread enztec
I am trying to help YOU and your code i spent time doing this and you only took what you wanted out of the post in some kind of 'coding self-defense' and what you said worked for you was in no relation to what i posted but you are correct i will be more polite. run it as a script - (chmod it

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread Elias Mårtenson
I did. And I read it again. It's not at all clear that you ate explaining that the behaviour can only be seen in a script. I think everybody would be much happier if you tried to be a bit more polite. Especially when talking to people who are trying to help you. Regards, Elias On 7 Feb 2017 00

Re: [Bug-apl] location of cursor on new apl session

2017-02-06 Thread enztec
i have the latest documentation that you include with the source On Sun, 5 Feb 2017 19:23:03 +0100 Juergen Sauermann wrote: > > I just stumbled upon the --rawCIN command line option of GNU APL. > On Mon, 6 Feb 2017 11:35:21 +0100 Juergen Sauermann wrote: > Hi, > > this option is very old

Re: [Bug-apl] scripting )copy question

2017-02-06 Thread enztec
did you read the post? i didn't ask about it in a workspace - my example was in a SCRIPT On Mon, 6 Feb 2017 11:33:51 +0800 Elias Mårtenson wrote: > It works for me: > > Network listener started. Connection information: mode:tcp addr:40267 > * )fns* > * )copy 5 SQL* > DUMPED 2017-02

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

2017-02-06 Thread Juergen Sauermann
Hi, i have added a check if stdin is open when GNU APL starts, SVN 881. If you start the following script: #!/usr/local/bin/apl -l 37 --script -- ]BOXING ¯8 ⎕ARG )off Then we can see if

Re: [Bug-apl] location of cursor on new apl session

2017-02-06 Thread Elias Mårtenson
I remember it well, because the Emacs mode depends on it. :-) Regards, Elias On 6 February 2017 at 18:35, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi, > > this option is very old (so old that I had already forgotten it) and has > been in *info apl* for a long time. > > It migh

Re: [Bug-apl] location of cursor on new apl session

2017-02-06 Thread Juergen Sauermann
Hi, this option is very old (so old that I had already forgotten it) and has been in info apl for a long time. It might be, however, that you have an older version of the documentation below, say, /usr/share/doc/apl and a newer one in /usr/loca

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

2017-02-06 Thread Juergen Sauermann
Hi Alexey, yes. I changed it recently to fix the '--' issue. A GNU APL script assumes that it was called by execve().  The expand_argv() function "undoes" the behavior of execve(), which lumps together all arguments on the first script line