Re: [Bug-apl] recursive functions - ackerman

2015-04-15 Thread Frederick H. Pitts
Fausto, In general, both m and n will be nonzero. In that case (m - 1) ack ( m ack (n - 1)) has to be invoked before other paths through the code can return to the caller. As a consequence the above expression has to return the final result (in general, that is). S

Re: [Bug-apl] recursive functions - ackerman

2015-04-15 Thread Fausto Saporito
Hi Fred, maybe I understood but I expected the control was returned to caller when the m=0 condition was met and not before. If I look better at the program... i can understand that after all the "ack" evaluation the program must exit... but in my case was performing the n-increment. This could

Re: [Bug-apl] recursive functions - ackerman

2015-04-15 Thread Frederick H. Pitts
On Wed, 2015-04-15 at 23:24 +0200, Fausto Saporito wrote: Hello Fausto, Because during the recursion each time (m - 1) ack ( m ack (n - 1)) is evaluated, control (with the intermediate result) must be returned to the caller of ack (which will be ack itself except for the init

Re: [Bug-apl] recursive functions - ackerman

2015-04-15 Thread Fausto Saporito
Hi Fred, thanks a lot. Now it works... but (maybe it's a stupid question) why that change? :-) regards, Fausto 2015-04-15 22:37 GMT+02:00 Frederick H. Pitts : > Fausto, > > Try changing the fourth line to > > z←(m-1) ack (m ack (n-1))⋄ →0 > > Regards, > > Fred > > On Wed, 2015-04-15 at

Re: [Bug-apl] recursive functions - ackerman

2015-04-15 Thread Frederick H. Pitts
Fausto, Try changing the fourth line to z←(m-1) ack (m ack (n-1))⋄ →0 Regards, Fred On Wed, 2015-04-15 at 21:03 +0200, Fausto Saporito wrote: > Hello all, > > > I'm trying to implement ackerman function, but I got no luck ... and I > cannot understand why this code doesn't work: > >

[Bug-apl] recursive functions - ackerman

2015-04-15 Thread Fausto Saporito
Hello all, I'm trying to implement ackerman function, but I got no luck ... and I cannot understand why this code doesn't work: z←m ack n →(m=0)/∆1 →(n=0)/∆2 z←(m-1) ack (m ack (n-1)) ∆1: z←n+1 ⋄ →0 ∆2: z←(m-1) ack 1 is the double recursion permitted in APL2 ? thanks, fausto

[Bug-apl] Why does make clean not remove the src .o files?

2015-04-15 Thread Peter Teeson
Hi Jürgen: Gandalf:apl-svn pteeson$ make clean Making clean in doc test -z "apl.dvi apl.pdf apl.ps apl.html" \ || rm -rf apl.dvi apl.pdf apl.ps apl.html rm -rf .libs _libs rm -rf apl.t2d apl.t2p rm -f *.lo Making clean in gnu-apl.d rm -rf .libs _libs rm -f *.lo Making clean in src rm -f ma

[Bug-apl] Bug in 8○ function?

2015-04-15 Thread Elias Mårtenson
According to my documentation that I copied from the ISO spec, 8○ should be equivalent to: (¯1-R⋆2)⋆0.5 and ¯8○ should be equal to -(¯1-R×2)⋆0.5. In GNU APL the opposite happens. I.e. ¯8○ returns what 8○ is supposed to return and vice versa. Is my analysis correct? Regards, Elias

Re: [Bug-apl] Why is there a stack trace when I caused a length error?

2015-04-15 Thread Juergen Sauermann
Hi Alex, the stack trace is probably explicitly triggered for debugging purposes. The parallel code is not yet complete, in particular error cases are not handled yet. Most likely what happens is that one thread stops due to an error

[Bug-apl] SEV_ERASED not sent to monitored variables when workspace is cleared on )LOAD

2015-04-15 Thread Elias Mårtenson
If I trace a variable (used for live-updates of variable content in an Emacs buffer) and then do )LOAD, the workspace gets cleared. At this point I'd expect to get an update notification for the variable with an event type of SEV_ERASED. Since this does not happen, I'm getting a crash when I later