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 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 values for user defined and system defined names. Therefore ⍺ has a ⎕NC of 5 if defined.

For example:

*      MINUS←{ (⍺-⍵)⊣⍎"0"⊢[5≠⎕NC'⍺']"⍺←0" }
      5 MINUS 1
4
      MINUS 1
¯1*

Best Regards,
Jürgen


On 10/24/24 18:15, Henrik Moller wrote:
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 implement lambdas and conditionals, I would have known the lambda approach wouldn't work...)

Speaking of mtx, per the note I sent you a couple days ago, have you had a chance to look into making the dlopen() in NativeFunction::try_one_file() use RTLD_LAZY instead of RTLD_NOW?  I don't think anyone but me is using mtx, so it's cool if LAZY isn't in your plans--it just means I patch the line when you put out a new SVN.

Thanks,
Henrik

On 10/24/24 11:30, Dr. Jürgen Sauermann wrote:
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 APL lambdas are limited to one APL expression (= one APL statement)    and the expression must yield a value (and can therefore not be a branch).

3. The normal work-around for this limitation is to use a proper ∇-defined function.

Best Regards,
Jürgen



Reply via email to