The problem is getting fills on functions that cause fills in the other items 
processed by that function

   ,(!.'*')&'d'^:('c'={.)"1 ] 3 2 $ 'abc' 
ab 
cad 
bc 

if !. could apply to fills of any function then it could be written like this 
(without a domain error):

   ,&'d'^:('c'={.)"1(!.'*')  3 2 $ 'abc' 
ab* 
cad 
bc* 



----- Original Message -----
From: robert therriault <[email protected]>
To: [email protected]
Cc: 
Sent: Thursday, August 28, 2014 8:52:42 PM
Subject: Re: [Jprogramming] fit conjunction

Hi Pascal,

Would something like this not be the way to deal with trailing blanks?

   8{.!.'*' 'ab'
ab******

My guess is that the ways you are considering its use would lead to 
inefficiencies if this solution was used, but I thought I'd toss the idea out 
anyway.

Cheers, bob

On Aug 28, 2014, at 5:05 PM, 'Pascal Jasmin' via Programming 
<[email protected]> wrote:

> I have no idea how much work it is, but I was assuming it wasn't much.  The 
> benefit is being able to use unboxed data when your data will not have _ in 
> it.  That is you gain an ability to remove fills later.  
> 
> As for a specific example, quicksort using power was what I would have liked 
> to implement without boxing.  But this can happen with strings too, where 
> trailing space might be meaningful.
> 
> 
> 
> 
> ----- Original Message -----
> From: Raul Miller <[email protected]>
> To: Programming forum <[email protected]>
> Cc: 
> Sent: Thursday, August 28, 2014 7:27:45 PM
> Subject: Re: [Jprogramming] fit conjunction
> 
> But this is saying the feature is needed because the feature is needed.
> 
> The question is: what is a compelling example of a significant problem
> which would be made easier by this change? (Note also that my understanding
> is that this change would involve a lot of work - so you can think of my
> question as being really about the topic: why would that work be more
> compelling than other work?)
> 
> Thanks,
> 
> -- 
> Raul
> 
> 
> On Thu, Aug 28, 2014 at 7:20 PM, 'Pascal Jasmin' via Programming <
> [email protected]> wrote:
> 
>> fills are a core part of the language or working with arrays.  Being able
>> to fill with _ is very convenient if 0 is a normal data item that needs to
>> be distinguished from.  Always Be Boxing avoids these issues, and so I can
>> just keep on Always Be Boxing...
>> 
>> Maybe there is a way to invoke # (copy) in such a way that it creates
>> fills, but its not clear how !. was meant to apply to it in the first place.
>> 
>> 
>> ----- Original Message -----
>> From: Raul Miller <[email protected]>
>> To: Programming forum <[email protected]>
>> Cc:
>> Sent: Thursday, August 28, 2014 6:28:46 PM
>> Subject: Re: [Jprogramming] fit conjunction
>> 
>> I guess the issue here is: what problem would this solve?
>> 
>> (There's a generic problem with solving tautological problems. So it's good
>> to have some larger situation in mind, to avoid cluttering up the language
>> with overspecialized forms of generality.)
>> 
>> Thanks,
>> 
>> --
>> Raul
>> 
>> 
>> 
>> On Thu, Aug 28, 2014 at 1:44 PM, 'Pascal Jasmin' via Programming <
>> [email protected]> wrote:
>> 
>>> It is a domain error to place the fit conjunction elsewhere.  Perhaps a
>>> useful language enhancement would be that fit is defined for arbitrary
>>> verbs outside of the "whitelist" to be fill?
>>> 
>>> 
>>> ----- Original Message -----
>>> From: Raul Miller <[email protected]>
>>> To: Programming forum <[email protected]>
>>> Cc:
>>> Sent: Thursday, August 28, 2014 1:38:07 PM
>>> Subject: Re: [Jprogramming] fit conjunction
>>> 
>>> The 0 comes from the derived verb, not from #
>>> 
>>> Thus:
>>> 
>>>     2#^:|"+ 1 2 3
>>> 1 1
>>> 2 0
>>> 3 3
>>>     2(1+#^:|)"+ 1 2 3
>>> 2 2
>>> 3 0
>>> 4 4
>>> 
>>> So you'll have to synthesize the _ on your own. Perhaps something like
>>> this:
>>> 
>>>     (+_*_1&=)<:2(1+#^:|)"+ 1 2 3
>>> 1 1
>>> 2 _
>>> 3 3
>>> 
>>> Thanks,
>>> 
>>> --
>>> Raul
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Thu, Aug 28, 2014 at 1:21 PM, 'Pascal Jasmin' via Programming <
>>> [email protected]> wrote:
>>> 
>>>>            (2#(!._)])^:(2|])"0 ] 1 2 3
>>>> 1 1
>>>> 2 0
>>>> 3 3
>>>> 
>>>> the fit conjunction here has no effect, is there a way to get the 0
>> fill
>>>> to be replaced with _
>>>> ----------------------------------------------------------------------
>>>> 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
>>> 
>> ----------------------------------------------------------------------
>> 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
> 
> ----------------------------------------------------------------------
> 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