You are welcome, Ian.

My reconstruction must be a bit more brute-force than Gene's version.

I ran this on 64 bit J on a system with 5G of memory:

   7!:2 'BLT 8'
7247762688

This is with 8 byte integers, but still exceeds the 1073741824 bytes Gene's 
formula would estimate.

--
David Mitchell


Ian Clark wrote:
> Thank you, David, for your reconstruction of verb BLT. It works fine
> and gives the expected results. I have inserted it in
> http://www.jsoftware.com/jwiki/Doc/Articles/Play171 after the first
> mention of BLT.
> 
> I will also include you in the list of those acknowledged in the
> production of APWJ Edn 2.
> 
> What follows is not needed for APWJ Edn 2 but interests me nonetheless...
> 
>    #BLT 7
> 47293     (...which accords with Gene's figures)
>    #BLT 8
> |out of memory: BLT
> |   ~.    bl"1(y#y)#:i.y^y
> 
> Gene too says in the paper in question that he can't use BLT beyond 7.
> He calculates the space needed for BLT 8 (admittedly by his version)
> as 536,870,912 bytes -- say half a GB. But my iMac has 4GB of
> installed memory. I would have thought off-hand it would have managed
> BLT 8 (though certainly not BLT 9, which would need roughly 14GB by
> Gene's calculations).
> 
> What's going on? How much of my 4GB is available for J? ...to malloc
> in one go? Or are my integers taking up two/four/eight times the bytes
> of Gene's?
> 
> Ian
> 
> 
> On Wed, Oct 21, 2009 at 11:11 AM, David Mitchell <[email protected]> 
> wrote:
>> Oleg Kobchenko wrote:
>>> In the article 24 "Blists in OLEIS"
>>>
>>>   http://www.jsoftware.com/jwiki/Doc/Articles/Play171
>>>
>>> the definition of the BLT verb is missing.
>>>
>>> It is needed to complete the publication of
>>> At Play with J.
>>>
>>> I guess if we should come up with a substitute,
>>> it might as well be a best shot.
>>>
>>>
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> In the keeping of brute force:
>>
>> bl =: ] i.~ [: /:~ ~.
>>
>> BLT=: 3 : 0
>> ~. bl"1 (y#y)#: i.y^y
>> )
>>
>> --
>> David Mitchell
>> ----------------------------------------------------------------------
>> 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