> PS:  I love reading your (Ian's) posts because they always teach me
> interesting new English idioms.

Thanks, Dan, for your bouquet -- if it was a bouquet ;-)
But be warned... my daughter says my attitudes and turn-of phrase are
seriously out-of-date.

I'm beginning to realise my knowledge of APL is out-of-date as well.
And as for my J...!

Ian


On Mon, Oct 25, 2010 at 6:07 PM, Dan Bron <[email protected]> wrote:
> Ian wrote:
>> If I input:
>>
>> foo=: +/
>> fie=: foo&99"_
>> fie f.
>> foo=: i. 9
>> fie f.
>>> ...is [fie or foo] now a pronoun, whereas it was hitherto a proverb?
>
> Certainly foo is now a pronoun.  But that its definition has changed
> shouldn't be surprising, as you've intentionally and explicitly redefined it
> (if you think of your IJS like a page in a dictionary, where you used to
> have "foo /v/, ...." and then you edited it to read  "foo /n/, ...." you
> wouldn't be surprised if people reading it came away thinking "foo" was a
> noun, right?).
>
> The nature of fie is a bit murkier.  But first we must be clear that in
> redefining foo, upon which word fie's definition depends, you've also
> redefined fie (I expect this statement is uncontroversial but I wanted to be
> sure).  So the question isn't why fie's definition changed, but what it
> changed to.
>
> The answer is, I don't know.  The reason I don't know is because m&n is not
> defined in the DoJ.  So fie's definition is similarly undefined.  If m&n
> were defined, then I'd say fie is whatever (i.9)&99"_ is.
>
> That said, I'm not sure the interpreter would agree.  For example,
>
>           foo =: 1:
>           fie =: foo + 99"_
>
>           fie f.
>        1: + 99"_
>
>           fie 0
>        100
>
>           foo =: 1  NB. Changed verb to noun
>           fie f.
>        |domain error
>        |       fie f.
>           fie 0
>        |domain error: foo
>        |       fie 0
>
>
> Here, changing the class of a name upon which a definition depends just
> confuses the interpreter; this is in contrast to simply changing its value,
> which doesn't:
>
>           foo =: 2:  NB.  Change to a different verb
>           fie f.
>        2: + 99"_
>           fie 0
>        101
>
>
> All that said, I see your motives for asking this question (teaching APLers
> J, without going back to square one) are different from my normal MO
> (understanding J from first principles), so I'm not this is the style of
> answer that you're looking for.
>
> I will say that when I was learning APL, knowing J was an immense jumpstart
> (and a bit of a bias :).
>
> -Dan
>
> PS:  I love reading your (Ian's) posts because they always teach me
> interesting new English idioms.
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to