Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #5126

Re: 64-bit bytes

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: 64-bit bytes
Date 2015-01-13 00:51 +0000
Organization A noiseless patient Spider
Message-ID <871tmzsdtw.fsf@bsb.me.uk> (permalink)
References (8 earlier) <RGOsw.496550$lM6.489669@fx22.am4> <y%Osw.742376$MH.437411@fx12.am4> <874mrwmazc.fsf@ixod.org> <87lhl8t7a2.fsf@bsb.me.uk> <KXQsw.1051659$il4.619865@fx06.am4>

Show all headers | View raw


BartC <bc@freeuk.com> writes:

> On 12/01/2015 14:15, Ben Bacarisse wrote:
>> Mark Carroll <mtbc@bcs.org> writes:
>
>>> Exactly. For instance, Erlang, being designed to run on various odd
>>> computer architectures, lets one ask,
>>>
>>> 	erlang:system_info(wordsize)
>>>
>>> which is documented as,
>>>
>>> ] Returns the size of Erlang term words in bytes as an integer, i.e. on
>>> ] a 32-bit architecture 4 is returned, and on a pure 64-bit architecture
>>> ] 8 is returned.
>>>
>>> which clearly implies 8-bit bytes.
>>
>> I would not call 32-bit and 64-bit architectures "odd"!  What would it
>> do on a 36-bit or a 60-bit machine?
>
> At the time the language was created (1986 according to Wikipedia), it
> must already have been clear that the machine word sizes the language
> would be likely to run on, would be 16 or 32 or 64 bits. In other
> words, be based on powers-of-two and therefore multiples of a byte.

I agree it's a reasonable limitation.  I'm just saying that these are
not examples of odd computer architectures.

> This is unlike C which is still (even now) expected to work on all
> sorts of genuinely odd microprocessor architectures.
>
> (BTW what would C's sizeof(int) return on a 36-bit or 60-bit machine?)

The only conforming C compiler I know of for such a systems reports 4
for sizeof(int) because ints have 36 bits and bytes 9.  It's for a system
running on Unisys machines.

<snip>
-- 
Ben.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

64-bit bytes fir <profesor.fir@gmail.com> - 2015-01-05 01:38 -0800
  Re: 64-bit bytes robin.vowels@gmail.com - 2015-01-08 00:46 -0800
    Re: 64-bit bytes fir <profesor.fir@gmail.com> - 2015-01-08 00:53 -0800
      Re: 64-bit bytes robin.vowels@gmail.com - 2015-01-11 15:46 -0800
        Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 00:32 +0000
          Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 01:35 +0000
            Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 09:07 +0000
              Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 11:43 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 11:59 +0000
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 12:21 +0000
                Re: 64-bit bytes Mark Carroll <mtbc@bcs.org> - 2015-01-12 12:36 +0000
                Re: 64-bit bytes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-12 14:15 +0000
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 14:34 +0000
                Re: 64-bit bytes "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-01-12 16:35 +0100
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 17:42 +0000
                Re: 64-bit bytes "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-01-12 19:11 +0100
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 19:18 +0000
                Re: 64-bit bytes "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-01-12 21:34 +0100
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 22:01 +0000
                Re: 64-bit bytes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-13 00:51 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 13:18 +0000
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 14:16 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 14:48 +0000
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-12 15:05 +0000
                Re: 64-bit bytes Robert Wessel <robertwessel2@yahoo.com> - 2015-01-12 15:43 -0600
              Re: 64-bit bytes Kaz Kylheku <kaz@kylheku.com> - 2015-01-12 21:05 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 22:12 +0000
            Re: 64-bit bytes "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-01-12 10:12 +0100
          Re: 64-bit bytes robin.vowels@gmail.com - 2015-01-11 20:56 -0800
            Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 09:19 +0000
              Re: 64-bit bytes robin.vowels@gmail.com - 2015-01-12 06:22 -0800
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-12 14:51 +0000
                Re: 64-bit bytes robin.vowels@gmail.com - 2015-01-12 15:46 -0800
                Re: 64-bit bytes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-13 01:16 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-13 01:53 +0000
                Re: 64-bit bytes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-13 13:28 +0000
                Re: 64-bit bytes Richard Heathfield <invalid@see.sig.invalid> - 2015-01-13 13:57 +0000
                Re: 64-bit bytes "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-01-13 15:32 +0100
                Re: 64-bit bytes fir <profesor.fir@gmail.com> - 2015-01-13 06:33 -0800
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-13 16:41 +0000
                Re: 64-bit bytes fir <profesor.fir@gmail.com> - 2015-01-13 15:25 -0800
                Re: 64-bit bytes BartC <bc@freeuk.com> - 2015-01-13 23:49 +0000
                Re: 64-bit bytes fir <profesor.fir@gmail.com> - 2015-01-13 23:57 -0800

csiph-web