Re: [stack] function/object ambiguity + quotation alternative

Stevan Apter <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
----- Original Message ----- 
From: "John Nowak" <[email protected]>
To: <[email protected]>
Sent: Tuesday, March 03, 2009 3:30 PM
Subject: Re: [stack] function/object ambiguity + quotation alternative


> 
> On Mar 3, 2009, at 2:57 PM, Stevan Apter wrote:
> 
>> this situation simply does not arise in k, or rather, it arises much
>> less frequently.  this is because certain mathematical relations
>> exist between different aggregate types, and the primitives are
>> designed to exploit those relations.  (e.g. the transpose of a
>> dictionary of lists is a table, that is, a list of similar atomic
>> dictionaries.)  so x+y works predictably (and usefully!) on all
>> (conformable) aggregates.
> 
> Is Q similar to K in this regard? Where would you suggest one look to  
> get a deeper understanding of what you're talking about? I've gone  
> through Q for Mortals but I don't feel like I've gotten the full  
> picture.

q is k with keywords for unary primitives, e.g. 'count x' in q for
'#x' in k.  i use q, only a few people use k.  the distinction makes
no difference for the topic at hand.

unfortunately, i don't know what to suggest short of full immersion
in a large-scale k project.  i suppose it's possible to contemplate
a large set of one-liners (e.g. eugene mcdonnell's finger exercises),
or the occasional tour de force from arthur whitney (sudoku), and 
find there some evidence for my opinions about factoring.

> 
> Also, how important to do think it is that primitives in K work on  
> aggregates rather than scalars? For example, would it somehow not work  
> as well if it were required to indicate that you intended to apply a  
> function to each element (using some concise syntax) instead of having  
> it happen "automatically"? I ask because something like this would be  
> necessary for typing the sort of things you do in K, and  
> unfortunately, I'm not interested if I can't type it. Boring, I know.

i don't know if it is necessary for typing.  i've heard lots of claims
over the years that this and that are impossible in k, and of course that's
true ... until someone actually does this and that.  can k be typed?
if not, how close can you get to k with a typed language?  is that close
enough?  

anyway, my goal wasn't to shift the conversation to k per se, but to
suggest that this concern with factoring might be an artifact of certain
types of languages rather than a universal desideratum.

> 
> - John
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.