Oop, I forgot the anonymous data may apply to a fork so that the other
branch still needs the unmodified original copy of data.  Sorry for the
noise.

On Oct 7, 2016 9:19 AM, "bill lam" <[email protected]> wrote:

> a=: b=: 1 2
> 'a b'=: 1 2
> both of them make refcount of data increased to 3, but if the refcount of
> data after a copula train is exactly 2. Can we free the anonymous data
> immediately and let the data of stack to be that of the assigned name, so
> that the name can also be inplaceable?
>
> On Oct 7, 2016 4:32 AM, "Henry Rich" <[email protected]> wrote:
>
>> Not so fast.  What about
>>
>> 'a b c' =: i. 3
>> (somenoun) =: somevalue
>> (+: [ 4!:55@((<'fred')"_)) fred =: 5
>>
>> In fact, the verb left of the assignment MUST touch the assigning value
>> directly.
>>
>> Henry Rich
>>
>>
>> On 10/6/2016 4:25 PM, Xiao-Yong Jin wrote:
>>
>>> On Oct 6, 2016, at 2:51 PM, Henry Rich <[email protected]> wrote:
>>>>
>>>> On the other hand the sentence
>>>>>   a =: ('b' ,~ 3 ,~ ]) a=: 3 1 4 1 5 9 2
>>>>>
>>>> This is not inplaceable because the block has a usecount of 2 after the
>>>> assignment
>>>>
>>> I don't understand why the usecount has to increase after the assignment.
>>> I guess it's not related to literal, because the sentence
>>>     a=:('b',~3,~])a=:i.5
>>> is not inplaced either.  So the data (0 1 2 3 4) from the executing of
>>> i.5, have a usecount of 2 after the assignment.  It is very
>>> counterintuitive, because any verb left of the assignment is not able to
>>> touch the result of i.5 directly without going through the reference from
>>> a.  I guess in principle, after massive amount of change to the reference
>>> counting part of the code, we could make it such that the use count is one
>>> after assignment of name=:(data without a name) immediately.
>>> ----------------------------------------------------------------------
>>> 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