bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: APL lambda question


From: Henrik Moller
Subject: Re: APL lambda question
Date: Thu, 24 Oct 2024 12:15:30 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

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

[Prev in Thread] Current Thread [Next in Thread]