Re: [Bug-apl] Error building on OSX

2014-07-08 Thread Juergen Sauermann
Hi Kacper, yes - many names for 6 over the rime. I just need a confirmation that IPPROTO_TCP exists on OS-X. /// Jürgen On 07/08/2014 06:43 PM, Kacper Gutowski wrote: On 2014-07-08 18:03:21, Juergen Sauermann wrote: SOL_SOCKET is 1 on linux but according to the man page of TCP(7) SOL_TCP (

Re: [Bug-apl] Defined operator won't accept right constant function

2014-07-08 Thread Elias Mårtenson
On 9 July 2014 11:17, David B. Lamkins wrote: > On Wed, 2014-07-09 at 11:14 +0800, Elias Mårtenson wrote: > > I'm still wondering what ⌺ (quad-diamond), ¢ (cent-sign) and £ > > (pound-sign) are used for. > > > > Well, the currency symbols are pretty obvious... At least to an > American. ;) > Wel

Re: [Bug-apl] Defined operator won't accept right constant function

2014-07-08 Thread David B. Lamkins
On Wed, 2014-07-09 at 11:14 +0800, Elias Mårtenson wrote: > I'm still wondering what ⌺ (quad-diamond), ¢ (cent-sign) and £ > (pound-sign) are used for. > Well, the currency symbols are pretty obvious... At least to an American. ;) > > Oh, and having support for ⍣ (star-diaeresis) as in Dyalog w

Re: [Bug-apl] Defined operator won't accept right constant function

2014-07-08 Thread Elias Mårtenson
I'm still wondering what ⌺ (quad-diamond), ¢ (cent-sign) and £ (pound-sign) are used for. Oh, and having support for ⍣ (star-diaeresis) as in Dyalog would be nice. Should it be implemented? Regards, Elias On 9 July 2014 11:10, David B. Lamkins wrote: > That's only because I wondered what χ is

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Elias Mårtenson
Yeah, and neither would Jürgen. Seems like I was in the minority on that one. :-) Regards, Elias On 9 July 2014 11:10, Blake McBride wrote: > I wouldn't do that! > > > > On Tue, Jul 8, 2014 at 10:01 PM, Elias Mårtenson > wrote: > >> I suggested some time ago that very large data sets shouldn'

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Elias Mårtenson
I suggested some time ago that very large data sets shouldn't be displayed at all, since they are not only slow, they are also largely useless in an interactive session. It was decided that this approach would not be taken, but I don't remember the justification for it. Regards, Elias On 9 July

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Elias Mårtenson
I was looking specifically at the results of grade on a two-dimensional array. I missed the fact that both APL2 and NARS fails on arrays of depth 2. What does Dyalog and APLX do in these cases? Regards, Elias On 9 July 2014 10:52, Blake McBride wrote: > No, same results as IBM APL 2. > > > >

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Blake McBride
I think the layout function need two modifications: 1. enable ^C 2. at least for large data, output as you go rather than format the whole thing and then output the whole thing --blake On Tue, Jul 8, 2014 at 9:27 PM, Elias Mårtenson wrote: > There is already the SIGINT signal which is pro

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Blake McBride
No, same results as IBM APL 2. On Tue, Jul 8, 2014 at 9:42 PM, Elias Mårtenson wrote: > So NARS is giving the same results as GNU APL then? > > > On 8 July 2014 22:50, Blake McBride wrote: > >> Interestingly, in NARS200 I get all of the same results as in IBM APL 2 >> except the following: >>

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Elias Mårtenson
So NARS is giving the same results as GNU APL then? On 8 July 2014 22:50, Blake McBride wrote: > Interestingly, in NARS200 I get all of the same results as in IBM APL 2 > except the following: > > ⍋⊃z > 1 3 2 4 > > > > > > On Tue, Jul 8, 2014 at 9:41 AM, Blake McBride wrote: > >> For wha

Re: [Bug-apl] Defined operator won't accept right constant function

2014-07-08 Thread Elias Mårtenson
Wow. This is the first I heard of χ. Shouldn't it be mapped to the keyboard somewhere? Regards, Elias On 9 July 2014 00:44, David Lamkins wrote: > Thanks, Jüergen. Confirmed fixed. > > > > On Sun, Jul 6, 2014 at 7:45 AM, Juergen Sauermann < > juergen.sauerm...@t-online.de> wrote: > >> Hi Davi

Re: [Bug-apl] Request: lib_file_io additions

2014-07-08 Thread Juergen Sauermann
Hi David, fixed in SVN 366. FILE_IO[28] now returns an N by 5 matrix with columns ordered like in struct dirent. I used -1 instead of ⍬ for missing fields because I found it a bit awkward to produce different depths on different platforms. I also added FILE_IO[29] which returns only the fi

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Elias Mårtenson
There is already the SIGINT signal which is processed by GNU APL to interrupt a function execution. However, this interruptability is not extended to the layout function. On 9 July 2014 09:09, Peter Teeson wrote: > In Sharp APL (IPSA) we had a "panic int" which interrupted whatever was > being

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Peter Teeson
In Sharp APL (IPSA) we had a "panic int" which interrupted whatever was being computed after a predetermined time. It was inherent to the interpreter because we ran a timesharing system. I don't recall the exact details but it went something like this; 1) Workspace gets swapped in for execution a

[Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Blake McBride
If I do: z←⍳100 the operation is very fast. But if I do: ⍳100 it is very slow, presumably because it is formatting the whole thing for display. No problem. The problem is that during its effort to format for display, I cannot use ^C. ^C appears to work fine in normal sit

Re: [Bug-apl] Can't break out of the middle on a display operation

2014-07-08 Thread Blake McBride
I just tried this on IBM APL 2 on a machine with much less memory than the machine I use for GNU APL. Interestingly, the ⍳100 had no delay. It started printing immediately. Perhaps we can use a different algorithm for display. One that starts printing immediately, and one that, presumably,

Re: [Bug-apl] format by example and comma

2014-07-08 Thread David Lamkins
Thank you. Confirmed fixed. On Sun, Jul 6, 2014 at 6:21 AM, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi David, > > thanks, it is a bug. Fixed in SVN 361. > > /// Jürgen > > > > On 07/06/2014 05:48 AM, David B. Lamkins wrote: > >>'5,550.05' ⍕9 >> 9.0 >>'5,5

Re: [Bug-apl] Request: lib_file_io additions

2014-07-08 Thread David Lamkins
Agreed. As noted, I had been using fileio's popen() to run a shell command for ls. It's a bit more work, but it's portable. The main difficulty of popen is that it requires a bit of effort to detect failure of the shell command, given that there's only one stream and no exit status. It is nice (no

Re: [Bug-apl] Defined operator won't accept right constant function

2014-07-08 Thread David Lamkins
Thanks, Jüergen. Confirmed fixed. On Sun, Jul 6, 2014 at 7:45 AM, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi David, > > thanks, fixed in SVN 363. > > Please note that using a value as right function argument of an operator > is IMHO a rather dubious construct. I know that I

[Bug-apl] AF_UNIX (aka AF_LOCAL) sockets

2014-07-08 Thread Juergen Sauermann
Hi, Following an earlier proposal from Elias, I have changed from *TCP *sockets to *AF_UNIX* sockets for the communication between *apl* and *APserver* if the platform supports it (*linux* does). See SVN 368. The long-term goal is to get rid of the *APnnn* processes that are forked with every

Re: [Bug-apl] Error building on OSX

2014-07-08 Thread Juergen Sauermann
Hi, SOL_SOCKET is 1 on linux but according to the man page of TCP(7) SOL_TCP (=6) should be used. I have changed the code to use he number 6 instead of SOL_TCP. SVN 368. /// Jürgen On 07/08/2014 03:51 PM, Elias Mårtenson wrote: The value should be SOL_SOCKET (also true for Linux). Regards,

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Blake McBride
Interestingly, in NARS200 I get all of the same results as in IBM APL 2 except the following: ⍋⊃z 1 3 2 4 On Tue, Jul 8, 2014 at 9:41 AM, Blake McBride wrote: > For what it is worth, IBM APL 2 gives: > > ⍋'AAA' 'Y' 'BBB' 'CC' > DOMAIN ERROR > ⍋'AAA' 'Y' 'BBB' 'CC' >

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Blake McBride
For what it is worth, IBM APL 2 gives: ⍋'AAA' 'Y' 'BBB' 'CC' DOMAIN ERROR ⍋'AAA' 'Y' 'BBB' 'CC' ∧ Z←'AA' 'XX' 'AAA' 'XXX' ⎕UCS¨Z 65 65 88 88 65 65 65 88 88 88 ⍋⎕UCS¨Z DOMAIN ERROR ⍋⎕UCS¨Z ∧ ⊃Z AA XX AAA ⍋⊃Z DOMAIN ERROR ⍋⊃

Re: [Bug-apl] Error building on OSX

2014-07-08 Thread Elias Mårtenson
The value should be SOL_SOCKET (also true for Linux). Regards, Elias On 8 July 2014 21:42, Juergen Sauermann wrote: > Hi Elias, > > how is it called then? And what is its value? 6 for PROTO_TCP? > > /// Jürgen > > > > On 07/08/2014 03:05 PM, Elias Mårtenson wrote: > > A new error when buildin

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Juergen Sauermann
Hi Elias, nice trick! /// Jürgen On 07/08/2014 08:58 AM, Elias Mårtenson wrote: By the way, I found a workaround to the string ordering. The workaround requires memory on the order of ↑(⍴V)×⌈/⍴¨V for a vector V. This should be enough justification for the proposed extension. Here's what I

Re: [Bug-apl] Error building on OSX

2014-07-08 Thread Juergen Sauermann
Hi Elias, how is it called then? And what is its value? 6 for PROTO_TCP? /// Jürgen On 07/08/2014 03:05 PM, Elias Mårtenson wrote: A new error when building on OSX: g++ -DHAVE_CONFIG_H -I. -I../..-I .. -g -O2 -DAP_NUM=210 -g -MT AP210-UdpSocket.o -MD -MP -MF .deps/AP210-UdpSocket.Tpo -c

[Bug-apl] Error building on OSX

2014-07-08 Thread Elias Mårtenson
A new error when building on OSX: g++ -DHAVE_CONFIG_H -I. -I../..-I .. -g -O2 -DAP_NUM=210 -g -MT AP210-UdpSocket.o -MD -MP -MF .deps/AP210-UdpSocket.Tpo -c -o AP210-UdpSocket.o `test -f '../UdpSocket.cc' || echo './'`../UdpSocket.cc *../Svar_DB.cc:94:25: **error: **use of undeclared identifi

Re: [Bug-apl] Incorrect library path when installed in non-default location

2014-07-08 Thread Juergen Sauermann
Hi, there was something wrong in gnu-apl.d/Makefile.am. Hopefully fixed in SVN 367. /// Jürgen On 07/08/2014 12:54 PM, Elias Mårtenson wrote: You are right. The system preferences file has not been properly updated with the correct --prefix setting from the configure script: This is from th

Re: [Bug-apl] Incorrect library path when installed in non-default location

2014-07-08 Thread Elias Mårtenson
You are right. The system preferences file has not been properly updated with the correct --prefix setting from the configure script: This is from the file /home/emartenson/src/apl/dist/etc/gnu-apl.d/preferences: LIBREF-3 /usr/local/lib/apl/wslib3 LIBREF-4 /usr/local/lib/apl/wslib4 LIBREF-5

Re: [Bug-apl] Question about behavior of ⍋

2014-07-08 Thread Juergen Sauermann
Hi, the reason is roughly this: In GNU APL there is an order between *all* APL values, not only between numeric vectors or character vectors. The order should also include nested APL values. Once such an order is defined, not only ⍋ but also other operators can be generalized to use it inste