re: 1 .. natural order of writing - yes .. i didn't make explicit the 
culture context.
i actually meant natural order (given our culture - ie. that we write 
L->R and represent time as progressing L->R)

re: 2
it's just a matter of reversal of directon for generating an expression. 
The whole thing is reversed.
ie. your example would become
    f =. y F x
    y =. s G r
    f =. s G r F x      
NB. f =. ((s) G r) F x
evaluate how you would read it being constructed in time (as a human 
being) L->R
begining with evaluating (s) .. and so forth.

monadic operators? .. data item then operator. Ie. when typing we're 
building from the basic items and elaborating towards the final 
constructed outcome.
negation: (x -)
sum of a list: (L/+)

is there a snag with simply reversing the text?
the (.) and (:) things would come before the  base operator char.
hmmm ... how about (10 ^. 3) ?
That would become ( 3 .^ 10) .. does that still read and write simply?
3 log base 10.  That seems ok. I think the (.) before the base operator 
doesn't make any problems in visual scanning)

I think the general idea for the dyadic operations is that the control 
is on the left and the data is on the right.  That'd just be reversed so 
it'd be: (data .. operation .. control) :instead of: (control .. 
operation .. data).

oh .. given everything else is backwards, the expression (a^b) is 
already in the: (data .. operation .. control) :order so that doesn't 
need to be reversed.   Which complicates the simple "reverse everything" 
ploy. Dagnabit!

.. course .. this is all just idle meandering thought examining an idea. 
And it's all because, generally, typing goes in the wrong direction for 
maths and makes constructing an expression awkward.


On 2011-08-14 16:52, Alan Stebbens wrote:
> Mijj,
>
> Two points I wish to make:
>
> 1. There is no "natural" order of writing or reading arithmetic - it is all 
> learned behavior, based on your culture.
>
> 2. Given x F y, it should be clear that both x and y must be evaluated before 
> it can be passed by value to the function F.
>
> But if y is an expression itself?  Say, r G s, then the original expression 
> would have been, with substitution:
>
> x F r G s
>
> Surely you can see that the value of s must be evaluated before being passed 
> by value to the function G?
>
> Even more interesting is to consider the possibility of nomadic vs dyadic 
> functions.  This requires parsing the function name or expression to 
> determine the valence before it can be determined whether to pass y or both x 
> and y.
>
> The problem of function modifiers (adverbs) is left to others to reflect on.
>
> So, we may think in order of L->R, but the computer must evaluate in R->L in 
> order to pass values or parse function valences.
>
> Sent from my iPhone
>
> On Aug 14, 2011, at 5:07 AM, mijj<[email protected]>  wrote:
>
>> but J .. beautiful as it is, isn't just for looking at .. it's for
>> constructing.  Design may be top down, but our thoughts in terms of
>> construction form an expression beginning with the detail and develop
>> towards the final outocome - and our characters appear on the page from
>> L->R.
>>
>> So, taking the example from
>> http://www.jsoftware.com/papers/EvalOrder.htm
>>
>> to determine the divisiblity of a number(n) by 9 ...
>> (d : n's digits)
>>
>> L->R flows naturally from the keyboard
>> d/+|9=0
>> .. unlike L<-R ( 0=9|+/d ) , there's no having to keep in mind an
>> imagined expression which is being operated on on the right while
>> construction is taking place.
>>
>> for L<-R there's conflict between natural direction of construction and
>> the direction of the expression on the line.
>>
>>
>>
>>
>> On 2011-08-14 06:56, Raul Miller wrote:
>>> On Sat, Aug 13, 2011 at 11:05 PM, mijj<[email protected]>   wrote:
>>>> .. plus .. while on the subject of direction .. why was APL thus J
>>>> direction of evaluation set to be right to left? .. wouldn't it'd be
>>>> more natural as left to right? (ie. the same direction as writing, or
>>>> the direction which represents the progression of time)
>>>
>>> If you look at J top down, it is left to right.
>>>
>>> If you look at J bottom up, it is right to left.
>>>
>>> V=: 1 + 1
>>>
>>> If J reversed its evaluation order, how would that work?
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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