Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Ideas on RTTI support?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 50 of 53 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
cr88192  
View profile   Translate to Translated (View Original)
 More options 24 June, 22:17
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Wed, 24 Jun 2009 14:17:50 -0700
Local: Wed 24 June 2009 22:17
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:mv65ymz5j45s$.2vjcwt609bi6.dlg@40tude.net...

integers hold however many values will fit in the bits...

>>> It is not only wrong to think in that, it is just wrong. Consider
>>> modular
>>> integer of the range 1..3. Again, type is a set of values and operations
>>> defined on them, period. Nothing beyond that.

>> then, the integer "can" be 8 bits, but more likely is 32...

> It cannot be, since 2+2 = 1 (mod 4)

> This illustrates the principle. The type is a set of values and
> operations.
> The operations of the ring modulus 4 are sufficiently different from ones
> of the ring 256 (if "8-bits" means modulus 2**8).

not really, all that has to happen is that the compiler inserts a hidden
modulus operator or mask, and maybe some extra hidden logic.

same difference though...

>>> Yes, if the implementation is poor... (:-))

>> well, you see if you can figure out how to allocate things without using
>> any
>> memory...

> That depends on what has to be in the memory...

if certain types are runtime objects (such as classes), then necessarily
they need to be in memory.

OTOH, unmanaged classes don't (necessarily) need runtime memory, but one
can't create them dynamically either (since the class is a fixed part of the
code to be compiled, and even templates/generics are fixed post-compile).

you were making the claim that structural equivalence (or whatever is
currently being argued against) would not support  multi-methods (which can
be noted are more or less analogous to overloaded methods), which is
incorrect, since method overloading clearly works with structural
equivalence (only that, in a hidden way, the signature is regarded as a part
of the name...).


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 25 June, 08:36
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Thu, 25 Jun 2009 09:36:21 +0200
Local: Thurs 25 June 2009 08:36
Subject: Re: Ideas on RTTI support?

Integer hold integer values. Your "plain integer" is not an integer at all.
Because if X is an integer, then any provable proposition about integer set
holds for X. Take the proposition if X is integer then X+1 is integer.
q.e.d.

The moral: You are using a model of integers. This model is inadequate.
There are other competing models, which are inadequate as well. None is
"better" than other, without further considerations. Therefore there is no
"plain integers". Equivalently, there is no "plain number".

>>>> It is not only wrong to think in that, it is just wrong. Consider modular
>>>> integer of the range 1..3. Again, type is a set of values and operations
>>>> defined on them, period. Nothing beyond that.

>>> then, the integer "can" be 8 bits, but more likely is 32...

>> It cannot be, since 2+2 = 1 (mod 4)

>> This illustrates the principle. The type is a set of values and operations.
>> The operations of the ring modulus 4 are sufficiently different from ones
>> of the ring 256 (if "8-bits" means modulus 2**8).

> not really, all that has to happen is that the compiler inserts a hidden
> modulus operator or mask, and maybe some extra hidden logic.

That is an irrelevant implementation detail.

>>>> Yes, if the implementation is poor... (:-))

>>> well, you see if you can figure out how to allocate things without using
>>> any memory...

>> That depends on what has to be in the memory...

> if certain types are runtime objects (such as classes), then necessarily
> they need to be in memory.

No. You don't need full descriptions of a class in the memory. That was the
starting point: what would be possible to do in order to support RTTI.
Note, not reflection, nor introspection, nor type marshaling. Only RTTI.

No, I claimed that you cannot have "class = list of slots for method". That
is inconsistent with multi-methods.

> since method overloading clearly works with structural
> equivalence (only that, in a hidden way, the signature is regarded as a part
> of the name...).

That depends on the scope of the name:

declare
   procedure Foo is begin null; end Foo;
begin
   declare
      procedure Foo is begin null; end Foo;
   begin
      null;
   end;
end;

But I fail to see how this is relevant to run-time. Run-time just does not
care about equivalence of the objects Foo and Foo.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 25 June, 16:29
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Thu, 25 Jun 2009 08:29:34 -0700
Local: Thurs 25 June 2009 16:29
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:z4pud70x3xae$.1ton4ahqn2jsx$.dlg@40tude.net...

int i;
...
i=i+1;

always true (even when there is an overflow).

bounds-checked arithmetic and saturating arithmetic are possible though.

> The moral: You are using a model of integers. This model is inadequate.
> There are other competing models, which are inadequate as well. None is
> "better" than other, without further considerations. Therefore there is no
> "plain integers". Equivalently, there is no "plain number".

they are called integers.
int=32 bits.

then we use longs or int128 if we need more, or short or char/sbyte if we
need less...

implementation detail?...
then what the hell then is the rest of this thread?...

grr...

but, yes, as I see it, the implementation is primarily, and the conceptual
model is secondary.
we will still have the implementation even with no model, but we have no (or
at least, no useful) model without the implementation.

RTTI, to work at all, needs at least a basic skeleton of the type-system and
class heirarchy (in C++, this much is usually generated by the compiler).

but, for my framework, for it to operate much at all (given the nature of
the project), much of this ends up existing in memory.

?...

a class is:
a list of fields;
a list of methods;
...

I am not sure what you are claiming here...

it depends on how ones' project is implemented.

my project lies on the border between a (traditional) compiler and a VM, and
between a static and dynamic typesystem.

actually, a lot of it is "soft-static typing", AKA, the implementation is
largely statically typed in many places, but the machinery is sufficiently
flexible as to allow simulation of dynamically-typed behavior.

dynamic typing can be used in some places, but I try to use it less as it is
less efficient (and is less "provable"...).


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Balmos  
View profile   Translate to Translated (View Original)
 More options 25 June, 16:50
Newsgroups: alt.os.development
From: Scott Balmos <sbal...@fastmail.fm>
Date: Thu, 25 Jun 2009 08:50:25 -0700 (PDT)
Local: Thurs 25 June 2009 16:50
Subject: Re: Ideas on RTTI support?
On Jun 21, 11:32 am, "Aaron Gray" <ang.use...@gmail.com> wrote:

Quite useful, and somewhat readable. It's actually fairly close to
what I thought had to be implemented. The rest of this thread seems to
have been taken over. :) Thanks Aaron!

--S


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 25 June, 17:34
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Thu, 25 Jun 2009 18:34:23 +0200
Local: Thurs 25 June 2009 17:34
Subject: Re: Ideas on RTTI support?

Are you kidding?

> bounds-checked arithmetic and saturating arithmetic are possible though.

Neither is the integer arithmetic. You consider them integer because you
ignore how arithmetic operations are implemented there. That is exactly the
point. If they are supposed to implement THE integer arithmetic then they
are WRONG. Otherwise they implement something ELSE, i.e. it is not integer
type.

>> The moral: You are using a model of integers. This model is inadequate.
>> There are other competing models, which are inadequate as well. None is
>> "better" than other, without further considerations. Therefore there is no
>> "plain integers". Equivalently, there is no "plain number".

> they are called integers.

They are not. They are called *machine numbers*.

Yes, an irrelevant to the issue what is the type.

> then what the hell then is the rest of this thread?...

It was about types and their equivalence.

> but, yes, as I see it, the implementation is primarily, and the conceptual model is secondary.

No the model is primary, its implementation is of no interest. In the
context of type equivalence, the implementation is strictly irrelevant. The
same type can be implemented differently at the *same* machine in the
*same* program.

> we will still have the implementation even with no model, but we have no (or
> at least, no useful) model without the implementation.

Implementation without model is garbage, just because you don't know what
it does implement.

>> No, I claimed that you cannot have "class = list of slots for method". That
>> is inconsistent with multi-methods.

> ?...

> a class is:
> a list of fields;
> a list of methods;
> ...

> I am not sure what you are claiming here...

Class is neither from above.

If you put forward an existing implementation. But the question was how
RTTI could/should be, rather than how it is.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pawel Dziepak  
View profile   Translate to Translated (View Original)
 More options 25 June, 18:11
Newsgroups: alt.os.development
From: Pawel Dziepak <pdzie...@quarnos.org>
Date: Thu, 25 Jun 2009 19:11:51 +0200
Local: Thurs 25 June 2009 18:11
Subject: Re: Ideas on RTTI support?

Scott Balmos wrote:
> Quite useful, and somewhat readable. It's actually fairly close to
> what I thought had to be implemented. The rest of this thread seems to
> have been taken over. :) Thanks Aaron!

Itanium C++ ABI [1] may be very useful (apart from gcc and its
additional libraries source code) while implementing any runtime
routines for C++.

[1] http://www.codesourcery.com/public/cxx-abi/abi.html#rtti

Pawel Dziepak


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 25 June, 18:58
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Thu, 25 Jun 2009 10:58:38 -0700
Local: Thurs 25 June 2009 18:58
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:896rus71oc2k.1nk85oajodq9x$.dlg@40tude.net...

if integer means:
scalar with no fractional part.

then an integer is an integer.
even overflow does not add a fractional part or require changing the type,
so all is well...

>> bounds-checked arithmetic and saturating arithmetic are possible though.

> Neither is the integer arithmetic. You consider them integer because you
> ignore how arithmetic operations are implemented there. That is exactly
> the
> point. If they are supposed to implement THE integer arithmetic then they
> are WRONG. Otherwise they implement something ELSE, i.e. it is not integer
> type.

none has a fractional part...

if you mean unbounded range, well maybe, but that is a different issue, and
can't be practically solved.

VLIs can help though (I use these sometimes...). but, a VLI is still limited
to whatever type is used to implement the arithmetic, even if storage takes
less...

>>> The moral: You are using a model of integers. This model is inadequate.
>>> There are other competing models, which are inadequate as well. None is
>>> "better" than other, without further considerations. Therefore there is
>>> no
>>> "plain integers". Equivalently, there is no "plain number".

>> they are called integers.

> They are not. They are called *machine numbers*.

you call them that.

most people call them integers (though usually with a size qualifier...).

it is like how floats are also called floats, but have little real relation
to either water or concrete...

I guess byte/word/dword/qword/... could also be used, but these are usually
considered ASM-specific...

type is what type is.
if the type is a 32 bit integer, the type is a 32 bit integer.
that is how the type is usually defined...

one types 'int', they usually expect 32 bits.

>> then what the hell then is the rest of this thread?...

> It was about types and their equivalence.

yes, ok.

none the less, i=i, l=l, x=x, ...

i!=x, because 32bits!=64bits...

>> but, yes, as I see it, the implementation is primarily, and the
>> conceptual model is secondary.

> No the model is primary, its implementation is of no interest. In the
> context of type equivalence, the implementation is strictly irrelevant.
> The
> same type can be implemented differently at the *same* machine in the
> *same* program.

this makes little sense, things are not done this way...

when we say we have a type (say, a 64-bit double), we expect a 64 bit
double.
to do otherwise is in error...

when we say a struct is layed out a certain way, we can assume that it is
layed out as defined, otherwise, again, this is in error...

>> we will still have the implementation even with no model, but we have no
>> (or
>> at least, no useful) model without the implementation.

> Implementation without model is garbage, just because you don't know what
> it does implement.

we have ASM without C;
we have the CPU without ASM;
we have physics without the CPU;
...

just because people don't know something does not mean it is not there...
even if everyone and everything were dead (and thus, no ideas or models),
rocks/light/... would remain.

ok, inheritence then, if you must.
inheritence was implied though...

I am not sure I see the distinction.

things are how things are, granted possibilities are possible, one is bound,
inherently, to one of any number of possible implementations.

now, as for how one implements dynamic cast, one can make some
generalizations:

dynamic_cast<classname> classinstance

since we know already that the value is an class-instance, all we have to do
is verify (at runtime) that the instance is a compatible class.

if we are casting up the heirarchy, than in most cases this can be
degenerated to a normal cast.
if the classes are unrelated, then a warning or error may be appropriate
(compiler may then treat it like a downwards cast, or reject the code).

in other cases, rejection or type-checking can be done as appropriate.

in this case, signature checking should not be necessary (and would not
likely produce the correct information anyways).

the IA-64 ABI uses special info embedded in the object files (basically, a
bunch of linked structures standing in for the class heirarchy...). the JVM
uses the class heirarchy directly (internally via use of several special
opcodes).

my approach is to do how I normally do other things in my compiler+object
system:
the compiler produces references to special "magic functions" (basically,
link-time generated code), which would serve to return the class handle in
question, and probably another intrinsic to do the check.

then again, I could merge them, thus giving me something analogous to the
JVM's "instanceof" opcode.

internally, when generating the code (link-time), it requests info (such as
the class handle) from the object system, and may generate a call into the
object system for completing certain tasks (later, I may make the system
tighter-integrated, such that the automatic code generation generates the
code to implement tasks directly, rather than redirecting many of them into
internal API calls...).

for checking inheritence, my system first checks the classes via a special
hash table, and failing this, walks the heirarchy.

the reason I will not, as of yet, directly generate code to perform certain
tasks, is that this will essentially lock down the internals of the object
system, as well as possibly the physical layout of objects. a partial
solution here would be to allow many classes to be declared "immutable"
(basically, telling the object system that no runtime modification of the
class layout will take place), allowing these classes to have more efficient
code be generated (such as accessing a field being a single 'lea'
instruction), but at the cost that altering the layout would break running
code (that or make use of special linker/code generation ninjitsu...).

but, accessing the field with the current approach in within the 2-digit
clock cycles range, so for now it is probably good enough...

note that I use link-time code generation, ...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pawel Dziepak  
View profile   Translate to Translated (View Original)
 More options 25 June, 19:34
Newsgroups: alt.os.development, comp.lang.misc
From: Pawel Dziepak <pdzie...@quarnos.org>
Date: Thu, 25 Jun 2009 20:34:01 +0200
Local: Thurs 25 June 2009 19:34
Subject: Re: Ideas on RTTI support?

cr88192 wrote:
> then an integer is an integer.
> even overflow does not add a fractional part or require changing the type,
> so all is well...

If there is an overflow it is an undefined behavior (C++03 5/5).

> type is what type is.
> if the type is a 32 bit integer, the type is a 32 bit integer.
> that is how the type is usually defined...

> one types 'int', they usually expect 32 bits.

Not really. C/C++ programmer should expect 'int' to "have the natural
size suggested by the architecture of the execution environment", which
not always equals 32 bits.

>> Implementation without model is garbage, just because you don't know what
>> it does implement.

> we have ASM without C;
> we have the CPU without ASM;
> we have physics without the CPU;
> ...
> just because people don't know something does not mean it is not there...
> even if everyone and everything were dead (and thus, no ideas or models),
> rocks/light/... would remain.

Even if you know something that does not mean that it is good to depend
on it. Specification tells you what you can do, implementation makes it
possible. If you start to take advantage of implementation details then
your code may become incompatible with the specification.

Pawel Dziepak


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 25 June, 20:18
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Thu, 25 Jun 2009 12:18:37 -0700
Local: Thurs 25 June 2009 20:18
Subject: Re: Ideas on RTTI support?

"Pawel Dziepak" <pdzie...@quarnos.org> wrote in message

news:h20fur$5pa$1@news.eternal-september.org...

> cr88192 wrote:
>> then an integer is an integer.
>> even overflow does not add a fractional part or require changing the
>> type,
>> so all is well...

> If there is an overflow it is an undefined behavior (C++03 5/5).

technically, maybe...
usually this "undefined behavior" is simply to wrap around though...

>> type is what type is.
>> if the type is a 32 bit integer, the type is a 32 bit integer.
>> that is how the type is usually defined...

>> one types 'int', they usually expect 32 bits.

> Not really. C/C++ programmer should expect 'int' to "have the natural
> size suggested by the architecture of the execution environment", which
> not always equals 32 bits.

in practice, on current computers, it is de-facto defined as 32 bits.

typically, the specification and implementation are closely linked.

it makes little sense to consider that the specification is somehow isolated
from the implementation...

it makes about as much sense and then regarding their use by humans as an
"implementation detail"...

anyways, as I see it, a specification is a description of an implementation,
or an abstraction over, an implementation. a specification is in no way
"more fundamental" than the implementation, only that it makes it easier to
gloss over the details, and allow multiple possible implementation
strategies to be in use.

people speaking of "implementation detail" as a prejorative just annoys me
though.

it is the implementation which is the real part, and a specification is
little more than formalisms...

specifying something, similarly, does no good if it is not possible to
implement it effectively.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 25 June, 21:29
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Thu, 25 Jun 2009 22:29:52 +0200
Local: Thurs 25 June 2009 21:29
Subject: Re: Ideas on RTTI support?

On Thu, 25 Jun 2009 10:58:38 -0700, cr88192 wrote:
> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
> news:896rus71oc2k.1nk85oajodq9x$.dlg@40tude.net...
>> On Thu, 25 Jun 2009 08:29:34 -0700, cr88192 wrote:

>> Are you kidding?

> if integer means:
> scalar with no fractional part.

No, integer means:

http://en.wikipedia.org/wiki/Integer

> most people call them integers (though usually with a size qualifier...).

> it is like how floats are also called floats, but have little real relation
> to either water or concrete...

Float numbers are machine numbers of certain type used to model real
numbers:

http://en.wikipedia.org/wiki/Real_number

> one types 'int', they usually expect 32 bits.

No, one usually expects a reference in the language or compiler manual
which describes the semantics of int. A description there defines the type,
of which name is int.

>>> but, yes, as I see it, the implementation is primarily, and the
>>> conceptual model is secondary.

>> No the model is primary, its implementation is of no interest. In the
>> context of type equivalence, the implementation is strictly irrelevant. The
>> same type can be implemented differently at the *same* machine in the
>> *same* program.

> this makes little sense, things are not done this way...

Of course they are. Our software works with many numeric models at once,
because it communicates with sensors and actuators deploying a great
variety of numeric representations.

> when we say we have a type (say, a 64-bit double), we expect a 64 bit
> double.

64-bit double has no meaning. There exist a dozen of floating-point
representations of 64-bit length.

> just because people don't know something does not mean it is not there...

Regarding programs it means exactly this. A program without a specification
is a random collection of bits. The purpose of a program cannot be
determined. This is a hard mathematical fact (see halting problem).

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 26 June, 00:23
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Thu, 25 Jun 2009 16:23:39 -0700
Local: Fri 26 June 2009 00:23
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:12v66dbfgzpen.1j9hqvpsci4bp.dlg@40tude.net...

> On Thu, 25 Jun 2009 10:58:38 -0700, cr88192 wrote:

>> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
>> news:896rus71oc2k.1nk85oajodq9x$.dlg@40tude.net...
>>> On Thu, 25 Jun 2009 08:29:34 -0700, cr88192 wrote:

>>> Are you kidding?

>> if integer means:
>> scalar with no fractional part.

> No, integer means:

> http://en.wikipedia.org/wiki/Integer

which property do you feel is "absent"?...

>> most people call them integers (though usually with a size qualifier...).

>> it is like how floats are also called floats, but have little real
>> relation
>> to either water or concrete...

> Float numbers are machine numbers of certain type used to model real
> numbers:

> http://en.wikipedia.org/wiki/Real_number

yes, but "real" is not "float".
"float" represents "real", none the less, the term is different, so in the
same way your objection to "integer" is pointless...

it might have some validity if "float" were somehow realted to water or
concrete, however...

>> one types 'int', they usually expect 32 bits.

> No, one usually expects a reference in the language or compiler manual
> which describes the semantics of int. A description there defines the
> type,
> of which name is int.

most code for maybe about the past decade has expected 'int' to be 32 bits.
before this, much code was around which expected it to be 16 bits...

>>>> but, yes, as I see it, the implementation is primarily, and the
>>>> conceptual model is secondary.

>>> No the model is primary, its implementation is of no interest. In the
>>> context of type equivalence, the implementation is strictly irrelevant.
>>> The
>>> same type can be implemented differently at the *same* machine in the
>>> *same* program.

>> this makes little sense, things are not done this way...

> Of course they are. Our software works with many numeric models at once,
> because it communicates with sensors and actuators deploying a great
> variety of numeric representations.

yet, I don't have to "know" much about any of these, and yet they still keep
working despite this...

FWIW, my "conceptual model" of most of this crap is pointless, it is the
implementation which makes it work...

>> when we say we have a type (say, a 64-bit double), we expect a 64 bit
>> double.

> 64-bit double has no meaning. There exist a dozen of floating-point
> representations of 64-bit length.

yet, only a few that we can bother to care about, this is besides the
point...

>> just because people don't know something does not mean it is not there...

> Regarding programs it means exactly this. A program without a
> specification
> is a random collection of bits. The purpose of a program cannot be
> determined. This is a hard mathematical fact (see halting problem).

no, we just will be sitting around stupidly looking at something and not
knowing how it works...

by this reasoning, because for most of human history, no one had any damn
idea about DNA, does this mean that humans could not exist?...

humans were around, and maybe had almost no idea about "how" they exist,
only that they did. similarly, many people had some rather stupid ideas
about biology (such that parents physically contained all of their offspring
and all future generations, at the same time, or for that matter,
spontaneous generation...).

yet, all the same, people continued to exist.

similarly, physics works even though, throughout history, people didn't know
their physics either...
the "implementations" existed, but there was no "conceptual model".
humans figured out all this crap through figuring it out...

thus "existence" / "the implementation" is primary, and "the model" is
secondary.

referencing the halting problem here is, also, pointless...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 26 June, 09:15
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Fri, 26 Jun 2009 10:15:26 +0200
Local: Fri 26 June 2009 09:15
Subject: Re: Ideas on RTTI support?

forall n in Z exists n + 1 in Z and n + 1 > n

>>> most people call them integers (though usually with a size qualifier...).

>>> it is like how floats are also called floats, but have little real
>>> relation to either water or concrete...

>> Float numbers are machine numbers of certain type used to model real
>> numbers:

>> http://en.wikipedia.org/wiki/Real_number

> yes, but "real" is not "float".
> "float" represents "real", none the less, the term is different, so in the
> same way your objection to "integer" is pointless...

"float" is an abbreviation of "floating-point", which refers to a
representation of real in the form:

   Fraction * Radix ** Exponent

where fraction is usually normalized.

>>> one types 'int', they usually expect 32 bits.

>> No, one usually expects a reference in the language or compiler manual
>> which describes the semantics of int. A description there defines the
>> type, of which name is int.

> most code for maybe about the past decade has expected 'int' to be 32 bits.
> before this, much code was around which expected it to be 16 bits...

Broken code. Every decent programming guide line on C/C++ requires an
explicit use of int32 (or equivalent) when the program requires the
corresponding range of values.

> FWIW, my "conceptual model" of most of this crap is pointless, it is the
> implementation which makes it work...

How do you know if it does? Heard anything about testing, verification and
validation?

>>> when we say we have a type (say, a 64-bit double), we expect a 64 bit
>>> double.

>> 64-bit double has no meaning. There exist a dozen of floating-point
>> representations of 64-bit length.

> yet, only a few that we can bother to care about, this is besides the
> point...

How do you identify these "few"?

> by this reasoning, because for most of human history, no one had any damn
> idea about DNA, does this mean that humans could not exist?...

You are confusing the program with its medium and the execution platform.

> thus "existence" / "the implementation" is primary, and "the model" is
> secondary.
> referencing the halting problem here is, also, pointless...

It is not a reference, it is a proof. You cannot create a program which
could tell the purpose of other programs.

"Existence" without specifying what does exist is either tautology or else
meaningless. So any formal system either postulates existence of certain
entities axiomatically, otherwise it proves existence *after* defining what
is we are looking for. There is no third way.

So either you specify your program and them prove, verify etc, that the
junk of bits is indeed the thing, or else you just present that garbage
as-is giving your word that it is, well, is. (The customer must be happy,
with that.)

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pawel Dziepak  
View profile   Translate to Translated (View Original)
 More options 26 June, 09:55
Newsgroups: alt.os.development, comp.lang.misc
From: Pawel Dziepak <pdzie...@quarnos.org>
Date: Fri, 26 Jun 2009 10:55:26 +0200
Local: Fri 26 June 2009 09:55
Subject: Re: Ideas on RTTI support?

cr88192 wrote:
> in practice, on current computers, it is de-facto defined as 32 bits.

The fact that in most cases sizeof(int) equals 4 doesn't mean that you
should expect it on all hardware architectures (e.g. gcc makes int 16
bit on AVR). AFAIK char is 9 bits on PDP-10, so even though sizeof(int)
is 4, int is 36 bits. That's not common situation (only if you
concentrate on PCs), but if one doesn't make such assumptions it will be
possible to easily port programs to other architectures.

> anyways, as I see it, a specification is a description of an implementation,
> or an abstraction over, an implementation. a specification is in no way
> "more fundamental" than the implementation, only that it makes it easier to
> gloss over the details, and allow multiple possible implementation
> strategies to be in use.

> people speaking of "implementation detail" as a prejorative just annoys me
> though.

> it is the implementation which is the real part, and a specification is
> little more than formalisms...

Specification is an abstract. I think it can be compared to interfaces
in OOP. In general it is always better to depend only on interface (or
specification) instead of implementation. Even if the latter changes,
code may not require any corrections.
The other reason why it is vital to base on language specification is
that, for example C++, still evolves. Even though everybody is trying to
keep backward compatibility, they rather don't bother thinking about
UDs. In other words, new version of the standard might force
implementation to change behavior that is not covered by the specification.

Pawel Dziepak


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 26 June, 14:34
Newsgroups: alt.os.development, comp.lang.misc
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Fri, 26 Jun 2009 09:34:25 -0400
Local: Fri 26 June 2009 14:34
Subject: Re: Ideas on RTTI support?
"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:12v66dbfgzpen.1j9hqvpsci4bp.dlg@40tude.net...

> On Thu, 25 Jun 2009 10:58:38 -0700, cr88192 wrote:
> > "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
> > news:896rus71oc2k.1nk85oajodq9x$.dlg@40tude.net...
> >> On Thu, 25 Jun 2009 08:29:34 -0700, cr88192 wrote:

> > if integer means:
> > scalar with no fractional part.

> No, integer means:

> http://en.wikipedia.org/wiki/Integer

OK.  You two have been going back and forth on this long enough.  That link
is "integer" as defined by mathematics.  Right at the top it directs you to
another definition of "integer" as defined by computer science...:
http://en.wikipedia.org/wiki/Integer_(computer_science)

The C and C++ standards also _imply_ the definition of integers also.  They
can't explicitly define what they are, although the language appears to do
so - it actually doesn't, since the standards are abstracted from real
systems.  That is they can't require int's or integers to be signed or
unsigned, or a certain size, or one's or two's complement.  Some cpu
architecture might not have signed integers, even though an "int" in C has
historically been a signed value and most cpu architectures since the
mid-70's do have signed integers.  So, the language strongly implies an int
is signed, but it can't require it.  That's the problem with abstracting a
model from implementation: nothing can be required.

A byte has been 8-bits since Bob "The Father of ASCII" Bemer standardized
8-bit groupings, and Dr. Werner Buchholz coined the term "byte" in 1960.
However, the C specification in 1989 redefined a byte to be something else
(for portability).  So, there is a whole group of people who don't
understand that a byte is 8-bits because their reference definition is
something else.

Rod Pemberton


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 27 June, 22:29
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Sat, 27 Jun 2009 14:29:33 -0700
Local: Sat 27 June 2009 22:29
Subject: Re: Ideas on RTTI support?

"Pawel Dziepak" <pdzie...@quarnos.org> wrote in message

news:h222e1$jb4$1@news.eternal-september.org...

> cr88192 wrote:
>> in practice, on current computers, it is de-facto defined as 32 bits.

> The fact that in most cases sizeof(int) equals 4 doesn't mean that you
> should expect it on all hardware architectures (e.g. gcc makes int 16
> bit on AVR). AFAIK char is 9 bits on PDP-10, so even though sizeof(int)
> is 4, int is 36 bits. That's not common situation (only if you
> concentrate on PCs), but if one doesn't make such assumptions it will be
> possible to easily port programs to other architectures.

whoever brought up universal portability?...

the usual idea is this:
a person as 1..N targets they actually care about (usually in decreasing
order), past this point, they could care less...

as such, although "some" architectures may have a quirk/issue/... if it is
not in the N they care about, they are not likely to care.

"well, on the z80 and m68k there is 'this' particular issue?..."
"who cares?... the targets are x86, x86-64, and PPC...".

I was not saying that people should ignore the generalities and only target
specific implementations, rather, that what IS the underlying implementation
should not be ignored.

it would be like if an engineer designed structures, only to have them
collapse later, since they regard it as a mere "implementation detail" that
a steel cable does not have a tensile strength of 1000000 lbs or a melting
poing greater than 2000F...

then they refuse to acknowledge the complaints of the contractors that the
design is absurd and that "all these trivial details" will prevent it from
working as desired...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 27 June, 22:49
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Sat, 27 Jun 2009 14:49:57 -0700
Local: Sat 27 June 2009 22:49
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:rsxktggkb2wi.1cv48nzcbggs3.dlg@40tude.net...

at this point, one can simply say that intergers (in computers) are a finite
bounded subset of the integer space...

yes, but alas, none of this is water or concrete, for which the word "float"
implies (you can "float" a boat, or use the "float" to level the concrete
slab).

otherwise, one need not bother arguing about the difference between
'integer' in computers, and 'integer' in mathematics, and simply note that,
in the case of computers, integers do not hold the complete set of integers.

>>>> one types 'int', they usually expect 32 bits.

>>> No, one usually expects a reference in the language or compiler manual
>>> which describes the semantics of int. A description there defines the
>>> type, of which name is int.

>> most code for maybe about the past decade has expected 'int' to be 32
>> bits.
>> before this, much code was around which expected it to be 16 bits...

> Broken code. Every decent programming guide line on C/C++ requires an
> explicit use of int32 (or equivalent) when the program requires the
> corresponding range of values.

but, really, why does this matter?...
after all, code can be edited easily enough...

>> FWIW, my "conceptual model" of most of this crap is pointless, it is the
>> implementation which makes it work...

> How do you know if it does? Heard anything about testing, verification and
> validation?

one can test, but this tests that the code is not broke, and says nothing
about the universal ontology...

>>>> when we say we have a type (say, a 64-bit double), we expect a 64 bit
>>>> double.

>>> 64-bit double has no meaning. There exist a dozen of floating-point
>>> representations of 64-bit length.

>> yet, only a few that we can bother to care about, this is besides the
>> point...

> How do you identify these "few"?

we know them because we know them, it does not exactly require a lot of
thinking to figure these things out...

>> by this reasoning, because for most of human history, no one had any damn
>> idea about DNA, does this mean that humans could not exist?...

> You are confusing the program with its medium and the execution platform.

the "program" IS the "medium and execution platform"...

it just happens to be the case that source code happens to be easy to
transport and mechanically translate (AKA: compile...).

>> thus "existence" / "the implementation" is primary, and "the model" is
>> secondary.

>> referencing the halting problem here is, also, pointless...

> It is not a reference, it is a proof. You cannot create a program which
> could tell the purpose of other programs.

it is not necessary to do so in the first place.

> "Existence" without specifying what does exist is either tautology or else
> meaningless. So any formal system either postulates existence of certain
> entities axiomatically, otherwise it proves existence *after* defining
> what
> is we are looking for. There is no third way.

we know what exists, as it is already there, and simply requires looking at
it enough to know how to best describe what is already there...

people study what exists, and people make new things, which then proceed to
exist as well...
(now, whether anything new is "created" is itself debatable, as it would all
be said to just be an elaborate combination of patterns and internal
reorganizations).

> So either you specify your program and them prove, verify etc, that the
> junk of bits is indeed the thing, or else you just present that garbage
> as-is giving your word that it is, well, is. (The customer must be happy,
> with that.)

as I see it, your view of things is backwards...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 28 June, 09:36
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Sun, 28 Jun 2009 10:36:37 +0200
Local: Sun 28 June 2009 09:36
Subject: Re: Ideas on RTTI support?

Wrong. A bounded subset of Z is not Z. That is the whole point.

When we talk about the integer type, we mean Z and operations defined on
it. Take anything out, and the result will be another type, not integer.
You can call in "int", bounded int, whatever, but that is not integer, it
has properties different from Z, like that (2**32 - 1) + 1 /= 2**32.

> otherwise, one need not bother arguing about the difference between
> 'integer' in computers, and 'integer' in mathematics, and simply note that,
> in the case of computers, integers do not hold the complete set of integers.

Wrong. Computer integers are exactly same as in mathematics. Computer "int"
as a type can be (and is) perfectly described mathematically. The resulting
mathematical structure is not of Z, yet it is a perfectly mathematical
structure.

>>>>> one types 'int', they usually expect 32 bits.

>>>> No, one usually expects a reference in the language or compiler manual
>>>> which describes the semantics of int. A description there defines the
>>>> type, of which name is int.

>>> most code for maybe about the past decade has expected 'int' to be 32 bits.
>>> before this, much code was around which expected it to be 16 bits...

>> Broken code. Every decent programming guide line on C/C++ requires an
>> explicit use of int32 (or equivalent) when the program requires the
>> corresponding range of values.

> but, really, why does this matter?...
> after all, code can be edited easily enough...

I don't understand this remark.

>>> FWIW, my "conceptual model" of most of this crap is pointless, it is the
>>> implementation which makes it work...

>> How do you know if it does? Heard anything about testing, verification and
>> validation?

> one can test, but this tests that the code is not broke, and says nothing
> about the universal ontology...

How do you test without specifications? What do you test without specifying
it?

>>>>> when we say we have a type (say, a 64-bit double), we expect a 64 bit
>>>>> double.

>>>> 64-bit double has no meaning. There exist a dozen of floating-point
>>>> representations of 64-bit length.

>>> yet, only a few that we can bother to care about, this is besides the
>>> point...

>> How do you identify these "few"?

> we know them because we know them, it does not exactly require a lot of
> thinking to figure these things out...

So what does "double" mean without "lot of thinking"?

>>> by this reasoning, because for most of human history, no one had any damn
>>> idea about DNA, does this mean that humans could not exist?...

>> You are confusing the program with its medium and the execution platform.

> the "program" IS the "medium and execution platform"...

Nonsense. A program can be printed on paper, painted on a T-shirt,
represented by a composition of used beer cans...

>> "Existence" without specifying what does exist is either tautology or else
>> meaningless. So any formal system either postulates existence of certain
>> entities axiomatically, otherwise it proves existence *after* defining
>> what is we are looking for. There is no third way.

> we know what exists, as it is already there, and simply requires looking at
> it enough to know how to best describe what is already there...

What an impressing argument... (:-))

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 28 June, 14:52
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Sun, 28 Jun 2009 06:52:58 -0700
Local: Sun 28 June 2009 14:52
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:1cwr1of458xeo.1q0n62ber19cp.dlg@40tude.net...

close enough, and it is traditionally called 'int' or 'integer' either
way...

to do anything differently is a violation of long-held and authoritative
programmer tradition.

if code only works in one case, and can be edited to work in another, it is
thus not "broken"...
one can argue, why does it matter, if one can just edit it and make it work
as-needed?...

>>>> FWIW, my "conceptual model" of most of this crap is pointless, it is
>>>> the
>>>> implementation which makes it work...

>>> How do you know if it does? Heard anything about testing, verification
>>> and
>>> validation?

>> one can test, but this tests that the code is not broke, and says nothing
>> about the universal ontology...

> How do you test without specifications? What do you test without
> specifying
> it?

one tests for behaviors, and that nothing "out of place" happens.

none the less, it is the combination of the code and implementation that
defines the "reality" of the matter (it runs, and we see the results, ...).

editing and testing thus forges it more into what we want it to be and do,
and as it so happens, code is not too difficult to edit.

IEEE 754 / IEEE 754r

it also means that the CPU architecture is x86, x86-64, or (maybe) PPC...

since the CPU does something a certain way, the CPU is the authority for
what is double.
since given CPU types are in common use, they are the authority.
given the dependence of the existing software base on particular CPUs, the
software base gives the CPU authority.
the mass of users/developers/... give the software authority.
...

it is much like how a governments/... are composed of large numbers of
individuals, and thus become the rightful authority over the lives and
behaviors of said individuals...

>>>> by this reasoning, because for most of human history, no one had any
>>>> damn
>>>> idea about DNA, does this mean that humans could not exist?...

>>> You are confusing the program with its medium and the execution
>>> platform.

>> the "program" IS the "medium and execution platform"...

> Nonsense. A program can be printed on paper, painted on a T-shirt,
> represented by a composition of used beer cans...

these are different representations, and due to their difference in
representation, are essentially different entities.

only that it is possible to convert from one representation to another.

for example, source code and machine code are different simply by a matter
of translation, yet the compiled program is a different entity from the
source representation of the program.

the machine code version is more solidly connected to existence than is the
source-code, but the source code is anchored into existence in large part
because of the existence of compilers.

both exist in large part due to the existence of CPU's and hard drives, ...

>>> "Existence" without specifying what does exist is either tautology or
>>> else
>>> meaningless. So any formal system either postulates existence of certain
>>> entities axiomatically, otherwise it proves existence *after* defining
>>> what is we are looking for. There is no third way.

>> we know what exists, as it is already there, and simply requires looking
>> at
>> it enough to know how to best describe what is already there...

> What an impressing argument... (:-))

yep.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 28 June, 16:47
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Sun, 28 Jun 2009 17:47:15 +0200
Local: Sun 28 June 2009 16:47
Subject: Re: Ideas on RTTI support?

On Sun, 28 Jun 2009 06:52:58 -0700, cr88192 wrote:
> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
> news:1cwr1of458xeo.1q0n62ber19cp.dlg@40tude.net...
>> Wrong. Computer integers are exactly same as in mathematics. Computer "int"
>> as a type can be (and is) perfectly described mathematically. The resulting
>> mathematical structure is not of Z, yet it is a perfectly mathematical
>> structure.

> close enough, and it is traditionally called 'int' or 'integer' either way...

> to do anything differently is a violation of long-held and authoritative
> programmer tradition.

I never heard about such. Maybe you meant a tradition of buffer overruns in
C programs? Anyway, no tradition can serve as an excuse for ignorance.

This is called "fixing broken code".

If the code weren't broken there would be no need to fix it. If it were
designed properly in first place, e.g. following C/C++ guide lines and
elementary common sense, you would not need to fix this kind of errors.

>>>>> FWIW, my "conceptual model" of most of this crap is pointless, it is the
>>>>> implementation which makes it work...

>>>> How do you know if it does? Heard anything about testing, verification
>>>> and validation?

>>> one can test, but this tests that the code is not broke, and says nothing
>>> about the universal ontology...

>> How do you test without specifications? What do you test without
>> specifying it?

> one tests for behaviors, and that nothing "out of place" happens.

How "behaviours" and "out of place" are specified? Note the word
"specified".

> none the less, it is the combination of the code and implementation that
> defines the "reality" of the matter (it runs, and we see the results, ...).

Buggy code defines bugs. That's is only reality.

So, how are you talking about "double" without mentioning the CPU? What are
you talking about? About CPU? Mass culture? Program? In the program, you
have:

   #define double char*

what is double?

>>>>> by this reasoning, because for most of human history, no one had any
>>>>> damn
>>>>> idea about DNA, does this mean that humans could not exist?...

>>>> You are confusing the program with its medium and the execution
>>>> platform.

>>> the "program" IS the "medium and execution platform"...

>> Nonsense. A program can be printed on paper, painted on a T-shirt,
>> represented by a composition of used beer cans...

> these are different representations, and due to their difference in
> representation, are essentially different entities.

One nonsensical statement derived from another. A program remains the same
entity independently on whether it is stored at the hard drive or memory
steak.

That is one of the key ideas of programming to separate means of computing
from algorithms.

Instructions how to walk to the next bus station can be followed by anybody
who has a head and feet.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cr88192  
View profile   Translate to Translated (View Original)
 More options 28 June, 18:16
Newsgroups: alt.os.development, comp.lang.misc
From: "cr88192" <cr88...@hotmail.com>
Date: Sun, 28 Jun 2009 10:16:12 -0700
Local: Sun 28 June 2009 18:16
Subject: Re: Ideas on RTTI support?

"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:5ejfdcqynoc9.1d6ph1h33llz2.dlg@40tude.net...

C, C++, Java, C#, ... all generally use the terms 'int' and 'integer' to
refer to fixed-size subsets of the integer space...

since these are some of the main programming languages, their use of terms
is authoritative.

it is only needed to change it:
firstly, if the behavior is depended on;
in porting to an arch where this is not upheld...

'int32_t' and friends were not added until C99, and so it is an ongoing
tradition (from pre-C99) to use base types and assume that they are the
intended sizes...

languages such as Java and C# also standardize the size of these various
base types (for example, standardizing on int being 32 bits and long being
64).

we generally "know" when a behavior is out of place, and so usually it is
not necessary to say what is not the expected behavior, only what is the
expected behavior.

now, that one can say what they want code to do, however, says little about
which aspect is more fundamental.

>> none the less, it is the combination of the code and implementation that
>> defines the "reality" of the matter (it runs, and we see the results,
>> ...).

> Buggy code defines bugs. That's is only reality.

yes, and these bugs are a part of the reality of the compiled program...
so, what is the issue?...

bugs are just as much apart of reality as non-bugs.
things like sickness and death also just happen to exist.

we don't write somewhere that someone will get sick, and then they do.
rather, they get sick, and we note that they have gotten sick.

this is a preprocessor issue, and so in the code "double" no longer refers
to double...

I disagree...

a copy of a program on a hard-drive and on a memory stick are different
entities (one is located in the hard drive, and the other may go in ones'
pocket...).

they, however, may remain as a single conceptual entity due to all of the
machinery existing to translate from one form to another.

> That is one of the key ideas of programming to separate means of computing
> from algorithms.

even as such, this is itself an abstraction over the implementation, and
does not change which is more fundamental.

> Instructions how to walk to the next bus station can be followed by
> anybody
> who has a head and feet.

yes, however, one person is not another, and said "instructions" do not
exist apart from either the individuals or the mediums and forms by which
they are transferred...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 28 June, 21:35
Newsgroups: alt.os.development, comp.lang.misc
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Sun, 28 Jun 2009 16:35:41 -0400
Local: Sun 28 June 2009 21:35
Subject: Re: Ideas on RTTI support?
"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:5ejfdcqynoc9.1d6ph1h33llz2.dlg@40tude.net...

> If the code weren't broken there would be no need to fix it. If it were
> designed properly in first place, e.g. following C/C++ guide lines and
> elementary common sense, you would not need to fix this kind of errors.

Oh, well, I just see that claim as untrue...  C has had quite a few changes
to the way the language works.  Implicit int's which are allowed in K&R C
create parsing conflicts with typedef's in ANSI C.  Use of ANSI C's void and
void *'s catch a few common programming errors, but are unavailable in K&R
C.  The defintion of NULL changed.  pre- and post-decrement operators no
longer work properly due to ANSI C's insertion of "sequence points".  The
language has been continually reworked to support larger integer types or
generic parameters behind the scenes. etc. etc.

> Buggy code defines bugs. That's is only reality.

Um...  humorously:

So, buggy code can't define non-bugs?  ;-)

So, non-buggy code can't define non-bugs, since that would imply an
alternate and additional reality...?  :)

Seriously, having done my fair share of professional and non-professional
software development, I can say that the bugs that are found relatively soon
are those that are either expected and tested for, or those that expose
themselves through basic usage of the program.  Unfortunately, you only test
for problems where you expect problems are likely to occur, and you can test
a program only so thoroughly in a development environment.  Your production
environment will reveal bugs that were missed in the most painful way.  Bugs
that are in low use code, are trivially incorrect, are due to unforeseen
logic complexities or unexpected interactions of code modifications, or
require review by other "experts" such as accountants and lawyers, are
likely to not be found for a long time.

Rod Pemberton


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 29 June, 08:41
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Mon, 29 Jun 2009 09:41:48 +0200
Local: Mon 29 June 2009 08:41
Subject: Re: Ideas on RTTI support?

On Sun, 28 Jun 2009 10:16:12 -0700, cr88192 wrote:
> "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
> news:5ejfdcqynoc9.1d6ph1h33llz2.dlg@40tude.net...
>> On Sun, 28 Jun 2009 06:52:58 -0700, cr88192 wrote:

>> I never heard about such. Maybe you meant a tradition of buffer overruns
>> in C programs? Anyway, no tradition can serve as an excuse for ignorance.

> C, C++, Java, C#, ... all generally use the terms 'int' and 'integer' to
> refer to fixed-size subsets of the integer space...

> since these are some of the main programming languages, their use of terms
> is authoritative.

And the Moon is made of cheese...

>>>> How do you test without specifications? What do you test without
>>>> specifying it?

>>> one tests for behaviors, and that nothing "out of place" happens.

>> How "behaviours" and "out of place" are specified? Note the word
>> "specified".

> we generally "know" when a behavior is out of place, and so usually it is
> not necessary to say what is not the expected behavior, only what is the
> expected behavior.

How this "knowledge" is communicated? Or is it so that all humankind is
born with this knowledge?

>>> none the less, it is the combination of the code and implementation that
>>> defines the "reality" of the matter (it runs, and we see the results,
>>> ...).

>> Buggy code defines bugs. That's is only reality.

> yes, and these bugs are a part of the reality of the compiled program...
> so, what is the issue?...

The issue is that bug is defined as a behavior different from specified.
There is neither bug, nor behavior, nor even program without a
specification. It is the specification of sine, which makes a program
computing sine what it is. With the specification of text processor this
program is garbage.

> bugs are just as much apart of reality as non-bugs.
> things like sickness and death also just happen to exist.

> we don't write somewhere that someone will get sick, and then they do.
> rather, they get sick, and we note that they have gotten sick.

Ask physicians for a definition of sickness.

Which code you are talking about? The source code is the content of the
text files with the extensions .h and .c.

I have nothing to add to this. It speaks for itself.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 29 June, 09:00
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Mon, 29 Jun 2009 10:00:50 +0200
Local: Mon 29 June 2009 09:00
Subject: Re: Ideas on RTTI support?

So? The point is, when the range of an integer number is known, the program
shall use an integer type which range is 1) defined and 2) corresponds to
the required range. What is here to disagree with?

My opponent claimed, something like that a long standing tradition of
indiscriminate use of int everywhere, should justify its use to represent
readings of a sensor with the range of 0..2**93-1 even if the machine
number corresponding to int is -2**15-1..2**15. That is an obvious rubbish.

>> Buggy code defines bugs. That's is only reality.

> Um...  humorously:

> So, buggy code can't define non-bugs?  ;-)

False |= True (:-))

> So, non-buggy code can't define non-bugs, since that would imply an
> alternate and additional reality...?  :)

The inverse wrong. (:-))

> Seriously, having done my fair share of professional and non-professional
> software development, I can say that the bugs that are found relatively soon
> are those that are either expected and tested for, or those that expose
> themselves through basic usage of the program.  Unfortunately, you only test
> for problems where you expect problems are likely to occur, and you can test
> a program only so thoroughly in a development environment.  Your production
> environment will reveal bugs that were missed in the most painful way.  Bugs
> that are in low use code, are trivially incorrect, are due to unforeseen
> logic complexities or unexpected interactions of code modifications, or
> require review by other "experts" such as accountants and lawyers, are
> likely to not be found for a long time.

Yes. This can be stated in a simpler way: what happens with the bugs in the
specifications? They are worse, much worse than "first-order" bugs.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 29 June, 09:35
Newsgroups: alt.os.development, comp.lang.misc
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Mon, 29 Jun 2009 04:35:40 -0400
Local: Mon 29 June 2009 09:35
Subject: Re: Ideas on RTTI support?
"Dmitry A. Kazakov" <mail...@dmitry-kazakov.de> wrote in message
news:w9tbp6x90lp7.1vhwoz3dnplg3.dlg@40tude.net...

All examples of situations where the C code isn't broken, but must be fixed.

> My opponent claimed, something like that a long standing tradition of
> indiscriminate use of int everywhere, should justify its use to represent
> readings of a sensor with the range of 0..2**93-1 even if the machine
> number corresponding to int is -2**15-1..2**15. That is an obvious

rubbish.

With what do you intend to read in a value of range of 0..2**93-1, if you
can only read in values with a range of -2**15-1..2**15?

I think it's clearly not rubbish.  In general, you can't read a float or
double directly from a device, but you can read in data via bounded integers
or more typically via bytes.

For example, you'll need to construct an artificial type with the range of
0..2**93-1 to represent the data received from the sensor.  Then, you'll
need to read in the value from the sensor using multiple reads of values
with range of -2**15-1..2**15.  Then, you'll need to convert those multiple
values of -2**15-1..2**15 to your artificial type with the range of
0..2**93-1.

Rod Pemberton


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile   Translate to Translated (View Original)
 More options 29 June, 13:22
Newsgroups: alt.os.development, comp.lang.misc
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Mon, 29 Jun 2009 14:22:14 +0200
Local: Mon 29 June 2009 13:22
Subject: Re: Ideas on RTTI support?

I see. No, it was broken. When you change the language that may break the
code. You can argue that it is rather the language which is broken, but
that is equivalent. (And regarding C, it was always broken... (:-))

>> My opponent claimed, something like that a long standing tradition of
>> indiscriminate use of int everywhere, should justify its use to represent
>> readings of a sensor with the range of 0..2**93-1 even if the machine
>> number corresponding to int is -2**15-1..2**15. That is an obvious
>> rubbish.

> With what do you intend to read in a value of range of 0..2**93-1, if you
> can only read in values with a range of -2**15-1..2**15?

Who said that? Surely I can read values. I need to deploy an integer type
with the range of the value read.

Formally: between the model type and the domain type there must be a
bijective mapping of the sets of values.

> I think it's clearly not rubbish.  In general, you can't read a float or
> double directly from a device, but you can read in data via bounded integers
> or more typically via bytes.

No, there is plenty of hardware (some I have on my desk) that communicates
floating-point numbers.

Automation makes some progress too, believe me. (:-))

> For example, you'll need to construct an artificial type with the range of
> 0..2**93-1 to represent the data received from the sensor.  Then, you'll
> need to read in the value from the sensor using multiple reads of values
> with range of -2**15-1..2**15.

That depends on the hardware protocol. Whether acquiring a value requires
multiple I/O operations is irrelevant. Normally there are multiple layered
protocols which connects you to the sensor.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 26 - 50 of 53 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google