🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3424

Re: readir() II

#3424
From: Rainer Weikusat
Date: Sun, 07 Feb 2010 20:54
82 lines
4726 bytes
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>
>> pjb@informatimago.com (Pascal J. Bourguignon) writes:
>>
>> [...]
>>
>>> I didn't hide anything.  Some programming language are actually high
>>> level programming language, and use normal integer arithmetic, not
>>> modulo 2^w arithmetic.
>>
>> There is no such thing as 'normal integer arithmetic' 
>
> Of course.  Ask anybody in the street how much is 4294967295 + 1.

Since when is the belief of a majority of ignorants (ignorant on this
particular topic) a proof? 

> Arithmetic and integer are things that are defined in mathematic.
> When you use them unqualified, you have an infinite number of
> integers:

An operator is something which performs a somehow defined operation on
the members of a particular set. The combination of some operators the
set they operate on is a so-called algebraic structure. That you have
learnt something about certain algebraic structures in school doesn't
make these more 'normal' (with the presumably intended sense of
'proper') than other algebraic structures. Also, that you usually only
refer to integer arithmetic in the context of a particular set does
not mean I (or anyone else) does this, especially since this wouldn't
be particularly sensible because 'integer arithmetic' on a computer
usually refers to calculations using operators defined a different
set, a so-called [dictionary translation] 'residue class ring which
has a finite set of members. Your special preference for refering to
irreal things (like sets with an infinite number of members) as
'normal', implicitly deriding real things (like CPUs capable of doing
integer arithmetic') as somehow 'not normal' is neither universal
nor normative. It's just a not exactly elaborate philosophical opinion.

[...]

>> and definitions
>> of particular algebraic operations such as +, including the sets they
>> operate on, are not structural properties of programming languages.
>
> Of course they are.  
>
> C specifies that its + is actually addition modulo 2^w.

Mostly, yes (the C-standard only specifies this for unsigned
integers). But 'the meaning of things' in language is the semantic and
what you were writing about ('high-level language' as opposed to
'machine language') is a structural propery of the language itself,
that is, its syntax and grammar. Amusingly, the usual LISP-syntax
(s-expressions) were originally intended to be a machine language (for
a virtual machine) and the m-expression notation which was supposed to
become the high-level pendant of it fell almost completely in disuse.

> On the other hand, Lisp specifies that its + is the mathematic plus
> (restricted to the size of the memory).

As I already wrote above: The +-operator as defined on the set of
integers modulo 2 to the 32th power (for instance) is as 'mathematic'
as any other mathematical operator defined on some set.

[...]

> (On the other hand, if the syntax of C was defined as:
>
>      int a = b + c [2^(sizeof(int)*CHAR_BIT)];
>
>  instead of:
>      
>      int a = b + c;
>
>  a lot less bugs would be written in C.)

Substituting actual learning for the student-routine of memoize -
forget - memoize - forget - memoize - forget could help a lot with this
too, since this is really basic linear algebra. OTOH, discussing if
the rule of three is mathematically correct with graduate students of
the TU Dresden (happened to me once) has its very own charme ...
Technical Details
Message-ID: <87fx5cn4vw.fsf@fever.mssgmbh.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <7sa7rrFg81U1@mid.individual.net> <3a76$4b602b7c$5350c024$19599@cache100.multikabel.net> <7si52rFr64U1@mid.individual.net> <87ljff3eoh.fsf@informatimago.com> <7sjm3uFeofU1@mid.individual.net> <874om32k7g.fsf@informatimago.com> <7t1ufvFu70U1@mid.individual.net> <87vdebo0jz.fsf@galatea.lan.informatimago.com> <87mxzn74qa.fsf@fever.mssgmbh.com> <87mxznnsd9.fsf@galatea.lan.informatimago.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1200bcf240,1d887f475f1c894c
X-Google-Attributes: gid1200bcf240,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups: comp.unix.programmer,gnu.gcc.help
Subject: Re: readir() II
Date: Sun, 07 Feb 2010 21:54:27 +0100
Lines: 82
Message-ID: <87fx5cn4vw.fsf@fever.mssgmbh.com>
References: <7sa7rrFg81U1@mid.individual.net> <3a76$4b602b7c$5350c024$19599@cache100.multikabel.net> <7si52rFr64U1@mid.individual.net> <87ljff3eoh.fsf@informatimago.com> <7sjm3uFeofU1@mid.individual.net> <874om32k7g.fsf@informatimago.com> <7t1ufvFu70U1@mid.individual.net> <87vdebo0jz.fsf@galatea.lan.informatimago.com> <87mxzn74qa.fsf@fever.mssgmbh.com> <87mxznnsd9.fsf@galatea.lan.informatimago.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: individual.net K0R2hIfZOJ2YBJp8DKsUkgt00n3M8K/mhFrNaoSR7wDlRj3ao=
Cancel-Lock: sha1:pSAbKfxwHjGEl+kU1rjsFXXnnoY= sha1:y6uQuLiw34waXzK6bNkjd3JDcL8=
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)