[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Array Integrators
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [RFC] Array Integrators |
Date: |
Sun, 2 Jan 2022 00:33:04 +0330 |
On Sat, Jan 01, 2022 at 09:51:18PM +0100, Jose E. Marchesi wrote:
>
> Hi MOhammad.
>
> > Hi, Jose and people!
> >
> > Happy New Year!
>
> Ditto :)
>
> > I think email is a better medium for this discussion than IRC, so I'm
> > writing
> > this email.
> >
> > I will write my understanding of array integrator as a bunch of
> > assertions, so, please tell me your comments on them.
> >
> > One thing to consider is that I think integration should be
> > endian-dependent.
> > Endians matters because we're dealing with "bytes" which will become an
> > integer. We're dealing with the "representation" of integers, not integers.
> > This is different from integral structs which are also integrals, which
> > endianness doesn't matter for them.
>
> I very strongly disagree :-)
>
> IMO endianness should only come into play when reading and writing data
> from/to an IO space. Integer values have constituent bits which are
> ordered from most significative to least significative. That is easy to
> understand and pretty much predictable.
>
> Otherwise, consider this:
>
> (poke) .set endian little
> (poke) int<16> @ 0#B = [0xabUB,0xcdUB] as int<16>
> swap
> swap!
>
> You just wrote the bytes 0xab, 0xcd...
>
You are right!
> > ```c
> > int
> > pkl_ast_type_integratable_p (pkl_ast_node type)
> > {
> > ...
> > }
> > ```
>
> LGTM. But why not `integrable'?
>
OK! It's shorter :)