Re: APL lambda question

2024-10-25 Thread Henrik Moller
Re RTLD_LAZY, much appreciated. Re ⎕NC, that's the advantage of some nut writing obscure code: it identifies obscure bugs. Henrik On 10/25/24 08:13, Dr. Jürgen Sauermann wrote: Hi Henrik, thanks for the reminder. Fixed in *SVN 1783*. I also spotted an error which caused ⎕NC to return a wro

Re: APL lambda question

2024-10-25 Thread Dr . Jürgen Sauermann
Hi Henrik, thanks for the reminder. Fixed in *SVN 1783*. I also spotted an error which caused ⎕NC to return a wrong value for ⍺, ⍵, etc. ⍺ and ⍵ came after ⎕NC was first implemented, and I failed to handle them properly. Note also that ⎕NC is slightly different from IBM's by having different

Re: APL lambda question

2024-10-25 Thread Henrik Moller
Hey, Jürgen, Thanks. This is part of continuing work on the mtx native function thing I put up six months ago, and just for the sake of consistency, I was trying make all the mtx functions lambdas, but it's no problem to use a ∇ function when I need ambivalence.  (If I'd looked at how you imp

Re: APL lambda question

2024-10-24 Thread Dr . Jürgen Sauermann
Hi Henrik, I believe I fixed the Segfault. You should now get a DEFN ERROR instead with )MORE information. SVN *1782*. The reason is this: 1, Conditionals, i.e. COND →→ IFSTAT ←→ ELSESTAT ←←     create 2 or 3 statements, one for COND, one for IFSTAT and     optionally one for ELSESTAT. 2. GNU

Re: APL lambda question

2024-10-23 Thread Henrik Moller
Gave it a try:  x←6  y←⍳5  (2=⎕nc'x') →→ x⍴y ←→ ⍴y ←← 1 2 3 4 5 1  )erase x  (2=⎕nc'x') →→ x⍴y ←→ ⍴y ←← 5  tryit←{(2=⎕nc'x') →→ x⍴y ←→ ⍴y ←←} === SEGMENTATION FAULT *** useless apl.lines (no CXXFLAGS=-rdynamic -gdwarf-2) -

Re: APL lambda question

2024-10-23 Thread Dr . Jürgen Sauermann
Hi Hendrik, as far as I remember: in GNU APL a lambda is pretty much a regular defined function. A nomadic lambda is simply a dyadic lambda which test for the presence for its left argument (read: ⎕NC lambda = 2).Tour tryit needs to check that before ⍺ is referenced). Best Regards, Jürgen

Re: APL lambda question

2024-10-23 Thread Bill Daly
Yes viz.:   tryit←{⍺ + ⍵ }   4 tryit 5 9 w On 10/23/24 10:55, Henrik Moller wrote: To all APLers:  In GNU APL, is there any way to define an ambivalent lambda?  I.e., if you define a lambda tryit←{...} is there any way to make it work with both tryit 1 and 1 tryit 2