Once, when I asked Roger why J did not have true bit arrays, he told me I
was welcome to fund it.  These days that would mean modifying the source
myself.

However, early APL implementers noted that the size of an interpreter is
proportional to the square of the number of data-types it supports.  In
practical terms, this means that if I wanted to put bit arrays into J, I
would have to modify every piece of code where there is interaction between
any two arrays of different type and figure out things like: can I make the
other array a bit array or do I have to promote my bit array to the more
complex type?

So, I can see that that would be more work than I am willing to put in for
the marginal utility it would give me.


On Tue, Aug 3, 2021 at 5:37 PM Raul Miller <[email protected]> wrote:

> I am not sure why you are talking about unicode, floats and arbitrary DLLs
> here.
>
> The example I showed did not involve either of those.
>
> And, especially if you are working with fixed width 1 dimensional
> arrays, in many cases you can use the b. derived verbs directly. It's
> only when you're not using array-at-a-time operations that you need
> concern yourself with packing/unpacking and/or padding operations,
>
> Take care,
>
> --
> Raul
>
>
> On Tue, Aug 3, 2021 at 5:00 PM greg heil <[email protected]> wrote:
> >
> > Raul
> >
> > indeed i can make up anything
> > using various b.
> > storing seems to be reliable
> > only as 8b characters
> > i think some 16b Unicode's
> > are illegal
> > so i cannot store and manipulate
> > 16 bit floats that way
> > to do 12b floats
> > i might store pairs
> > in 3 bytes
> >
> > i suppose one could
> > communicate with the many
> > DLL's that access the
> > BFloat16 hiding in every AVX machine
> > by sifting in and out of
> > that format
> > though bytes are rather inconvenient
> > due to the vagaries
> > of how sign, multiplier and multiplicand
> > bits are stored
> >
> > one would prefer that that was all handled
> > and could check for positivity with
> > a simple >0
> > rather than make a DLL call
> > or another sift
> >
> > ~greg heil
> > https//picsrp.github.io
> >
> > --
> >
> > from: Raul Miller <[email protected]>
> > to: Programming forum <[email protected]>
> > date: Aug 2, 2021, 10:12 PM
> > subject: Re: [Jprogramming] Two implementation questions
> >
> > https://www.jsoftware.com/help/dictionary/dbdotn.htm
> >
> >    #~.(i.1024) 32 b. 1
> > 64
> >
> > >Or, on my machine, the bitwise operations give me 64 bits packed in a J
> atom.
> >
> > >Constructing mechanisms which make an array of such things appear to be
> a bit array of arbitrary dimensions should be straightforward for someone
> with your background. (Though you could also use them "as is" with an
> implicit trailing dimension of 64.)
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > --
> >
> > from: greg heil <[email protected]>
> > to: Programming forum <[email protected]>
> > date: Aug 2, 2021, 8:33 PM
> > subject: Re: [Jprogramming] Two implementation questions
> >
> > Henry
> >
> > Hmm, how would one create an array of bits?
> > use packed 8-bit characters?
> > would one use a similar strategy
> > for 16-bit floats?
> > (which i am more interested in,
> > and is directly supported in most hardware
> > -for its utility in Deep Learning)
> >
> > Seems a serious amount of
> > packing unpacking
> > indexing chopping and inverting
> > just for matrix multiplication
> > i could be wrong
> > but i do not see the algorithm
> >
> > ~greg heil
> > https//picsrp.github.io
> >
> > --
> >
> > from: Henry Rich <[email protected]>
> > to: [email protected]
> > date: Aug 2, 2021, 8:07 PM
> > subject: Re: [Jprogramming] Two implementation questions
> >
> > >Rather than having a new datatype, you could create arrays of bits and
> use bitwise booleans on them.
> >
> > >Can you list a set of operations on bit arrays that would suffice to
> solve the problems you were working on?
> >
> > Henry Rich
> >
> > --
> >
> > from: greg heil <[email protected]>
> > to: Programming forum <[email protected]>
> > date: Aug 2, 2021, 7:07 PM
> > subject: Re: [Jprogramming] Two implementation questions
> >
> >
> >
> > i did my undergraduate and doctoral thesis
> > on the categories of Graphs
> > with multiplication (and/or) as the operator
> > both were done using APL's bit-boolean's
> >
> > much more than just multiplication
> > were done on these graphs
> > homomorphism, isomorphism
> > clustering cliquing
> > transitive/closures
> > all benefited from the simpler
> > bit-boolean's
> >
> > as categories of graphs
> > run the full gamut
> > from 0-100% full
> > one cannot use
> > any form of linked list
> >
> > a size multiplication by 8
> > would (at least in those days)
> > have caused a LOT of cache misses
> >
> > even now caching would
> > be a lot happier
> > because the Social Networks
> > under investigation
> > (the object of the studies)
> > have grown a LOT bigger!-)
> >
> > ~greg heil
> > https//picsrp.github.io
> > .
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to