Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread Peter Teeson
FWIW Apple moved away from GC and instead uses ARC <=> Automatic Reference Counting. In my experience it has radically reduced the MRR <=> Manual Retain Release effort for the programmer. If anyone is interested here is a link that may be of interest.

Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread David B. Lamkins
I'll add to that: The Boehm collector is in the family of "conservative" collectors. Briefly, since there's no way to give the collector a precise list of roots to the data structures in the heap (this is true, for example, of pointers on the stack and in structures), the collector instead uses th

Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread Elias Mårtenson
I agree fully, and that is why I haven't spent much time on the issue lately. Also, now that I've been thinking about it some more, I realise that the issues would be identical regardless of GC or not. The problem is still how to share references to values, but still clone them when needed (but ne

Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread Blake McBride
Dear Elias, First, no generic GC for C can compact because it changes locations of objects, and pointers would be invalid. The only way to fix that would be pointers to pointers, and that changes the entire system. I am very interested in reducing clones. That is extremely important IMO, especi

Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread Elias Mårtenson
Well, a good compacting garbage collector has definitely better performance than non-compacting reference counting. That said, the Boehm GC is not compacting and, as you stated yourself, it has to work within the confines of C++, so the difference is much less clear. It is in fact likely that you a

Re: [Bug-apl] Boehm garbage collector

2014-05-29 Thread Blake McBride
Dear Elias, I have experience with the Boehm collector and thought I would share some opinions. 1. Since C/C++ was not designed with GC in mind, the Boehm collector is forced to take into account many very system specific factors. These factors vary widely from system to system, and from system

Re: [Bug-apl] Revisiting the APL 2 empty-array display behavior

2014-05-29 Thread Jay Foad
On 29 May 2014 15:28, Juergen Sauermann wrote: > The method for discarding a value *Z *seems to be *0 0⍴**Z* instead > of *0⍴Z* these days. A smarter one could be monadic ⍪ ("table") > which turns an empty vector into an empty matrix (as does *0 0⍴*). > In Dyalog APL you can also use an empty d

Re: [Bug-apl] Revisiting the APL 2 empty-array display behavior

2014-05-29 Thread Elias Mårtenson
Would it make sense to implement Dyalog's ⎕FMT function? It should actually be possible to mostly implement it in pure APL. Or, we could implement something better (i.e. easier to use). It's definitely something that would be useful in a generic library. Regards, Elias On 29 May 2014 22:28, Juer

Re: [Bug-apl] Revisiting the APL 2 empty-array display behavior

2014-05-29 Thread Juergen Sauermann
Hi, output formatting is one of the most challenging tasks in an APL2 interpreter. The rules governing this are spread over different chapter in the APL2 language reference and seem to be different in the ISO standard. Even the examples in the language reference and in the standard differ occasio

[Bug-apl] Boehm garbage collector

2014-05-29 Thread Elias Mårtenson
I've been playing around with the Boehm (Böhm, I suppose) garbage collector, and it's pretty amazing. Jürgen, do you have any experience with it? Updating the GNU APL code to (conditionally, with a compiler option) to support using the collector for at least Value objects should be fairly simple.

Re: [Bug-apl] )COPY copies extra stuff - sometimes

2014-05-29 Thread Blake McBride
I sent you the sample WS and DUMP files privately only because I didn't want the half-finished stuff floating around forever. (I will release them once working.) Thanks. Blake On Thu, May 29, 2014 at 8:49 AM, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi Blake, > > I am a l

Re: [Bug-apl] Rank error

2014-05-29 Thread Blake McBride
Yes, I use GIT & SVN all over the place. I also do daily backups. The problem I had would have been between any of those backups. On Thu, May 29, 2014 at 8:45 AM, Elias Mårtenson wrote: > I'm always using source control, even for my personal local projects. That > allows me to revert back to

Re: [Bug-apl] ?(3⍴5) (2 3⍴10) gives a domain error.

2014-05-29 Thread Juergen Sauermann
Hi Akiva, thanks, should be fixed in SVN 299. /// Jürgen On 05/29/2014 12:54 AM, Akiva Avraham wrote: http://i.imgur.com/7vMrDan.jpg ?(3⍴5) (2 3⍴10) DOMAIN ERROR ?(3⍴5)(2 3⍴10) ^^ (3⍴5) (2 3⍴10) 5 5 5 10 10 10 10 10 10 ?(3⍴5

Re: [Bug-apl] )COPY copies extra stuff - sometimes

2014-05-29 Thread Juergen Sauermann
Hi Blake, I am a little behind in the mailing list. But your )COPY problems are next. I believe the problems caused by ⎕IO missing should be fixed. So what I believe is missing is: 1. )COPY copies extra stuff - sometimes 2. "but the original problem (May 27, 2014 at 9:23 PM) remains." Regarding

Re: [Bug-apl] Rank error

2014-05-29 Thread Elias Mårtenson
I'm always using source control, even for my personal local projects. That allows me to revert back to previous versions without any problems. I also use it for my local Emacs configuration. Very useful for keeping my machines in sync. Regards, Elias On 29 May 2014 21:35, Blake McBride wrote:

Re: [Bug-apl] Rank error

2014-05-29 Thread Blake McBride
At times, yes. The particular case I am in, I am actually editing the .apl file directly because I have a lot of global search/replace operations. I am migrating some code from one WS to another. )COPY messed me up bad yesterday. I ended up throwing away my work and going to a backup. I am rea

Re: [Bug-apl] Rank error

2014-05-29 Thread Elias Mårtenson
Wouldn't it make more sense to edit your code in files, and load it when needed? I.e. to keep the canonical version in the file instead of the workspace. The fact that you are protected from interpreter crashes should be reason enough I think. Regards, Elias On 29 May 2014 21:12, "Blake McBride"

Re: [Bug-apl] )COPY copies extra stuff - sometimes

2014-05-29 Thread Blake McBride
Re-reading the issue, I see I left out an additional fact that may be helpful. When I said "Where did ∆LPH and ∆RD come from?", I didn't mean I never saw those before. They are in the Devices WS. What I meant was that they weren't requested in the )COPY so they shouldn't be there. Thanks. Blak

Re: [Bug-apl] Rank error

2014-05-29 Thread Blake McBride
Sorry about that. I oversimplified an actual case I had. I'll re-raise the issue if and when I hit it again. (I don't remember where that was.) On another note, the two )COPY issues have become a bit of a stumbling block for me. I actually lost work yesterday because of them. (I am finishing

Re: [Bug-apl] Rank error

2014-05-29 Thread Juergen Sauermann
Hi Blake, according to IBM [] binds stronger than vector notation (APL2 language reference, page 34). IBM APL2 also gives RANK ERROR in the examples below. Eg. 1 2 3[2] is evaluateded as 1 2 ( 3[2] ). /// Jürgen On 05/28/2014 06:41 PM, Blake McBride wrote: )CLEAR CLEAR WS 1 2 3

Re: [Bug-apl] Leftover debug code?

2014-05-29 Thread Juergen Sauermann
Hi David, thanks, will be removed in the next SVN version 299. /// Jürgen On 05/29/2014 07:52 AM, David B. Lamkins wrote: QuadFunction.cc:1425 ⎕es 'DOMAIN ERROR' error.error_code:'1' at QuadFunction.cc:1425 DOMAIN ERROR ⎕ES 'DOMAIN ERROR' ^

Re: [Bug-apl] Restrictions on localization of system variables?

2014-05-29 Thread Juergen Sauermann
Hi Kacper, I believe it is OK to do something useful when otherwise you would have to raise an error. Most extensions work like that, e.g. dyadic ⎕CR, ⍬. And we have seen that even ISO isn't always right. /// Jürgen On 05/27/2014 06:30 PM, Kacper Gutowski wrote: On 2014-05-27 18:06:06, Juergen