Once again you belittle people to disagree with you, based on the haughty misconception that they're saying something stupider than they really are.
Where is your alleged alternative to that that I'm allegedly not seeing? Or were you assuming I was saying something stupider?
Your post here matches precisely what I thought you were saying. Here's the relevant paragraph in your reply, highlighted:
if 'div' is the integer division operator, and '/' is only for floats, then if you change one of your int variables to a float or one of your floats to an int, you have to go find everywhere it is used and change the operator for, what is in my opinion no good reason.
That is exactly what you don't need to do. You place a preamble marker at the beginning of new code. There is no change needed in the previous code. This preamble marker declares that in this new code "div" and "int" are properly interpreted rather than using the dangerous overload in C.
You were clearly unaware of this and in fact, believed it is impossible to evolve a language without breaking new code. This is just not so. I suggest you read up on <?xml.. > as an example of how to evolve a language without need of any change whatsoever to previous code.
Technically anything that is compulsory labour is a robot, as long as it is artifical
Actually a definition from the dictionary is anything but technical. A dictionary describes day-to-day English usage, not technical usage.
For example, according to the dictionary Venus is a star, more specifically, the morning star, which in day-to-day English usage is correct, but technically is wrong. Technically, Venus is a planet.
If it doesn't move...
on
Immobile Robots
·
· Score: 2, Insightful
If it doesn't move or cause movement it is not a robot. That is the technical definition of a robot.
According to the International Federation of Robotics (IFR) a robot is a machine which can be programmed to perform tasks which involve manipulative and in some cases locomotive actions under automatic control.
The Swedish Industrial Robotics Association defines a robot as an automatically controlled, reprogrammable, multi-purpose manipulative machine with or without locomotion for use in industrial automation applications.
A robot has three essential characteristics according to the Australian Robotics and Automation Association: It possesses some form of mobility It can be programmed to accomplish a large variety of tasks After being programmed or commanded, it operates automatically
Immobot seems to be a short hand for a control loop computer. It is a good one at least in the sense that it generated PR. After all, when was the last time you saw a slashdot article on control loop software systems?
but we don't go party, if there is a bug announced and say "ha ha, you aren't any better than we".
Hello? For years when IE was still in its infancy, every bug was celebrated and shown as "proof of incompetency" on Microsoft's part.
Even now every time a severe bug is found in Microsoft/.ers celebrate like a bunch of immature teenagers, fogetting that OSS is not going to succeed because how bad the competition is, but because how good a given OSS is.
(1) Getting a million dollar equpiment grant is not too hard if your experiment is half decent. For example look at the National Science Foundation (NSF) awards for this week alone.
(2) There was little interest for renting "locker" space in the ISS.
But nobody with the brains to do the research has the money to use the station.
$10,000 per pound, heck, even $100,000 per pound is well within the grant budget of solid researchers at universities, who often receive million dollar equipment and facilities grants.
Read what I wrote. There simple doesn't seem to be a current need for a zero gravity environment.
I attended a meeting of one of the ISS partner nations. In exchange for their contribution they are allotted space in "lockers" to run their experiments. They had a hard time finding any research institution or private interest who wanted to use the locker (the price was around $10,000 per pound). Apparently there is not much current scientific need for a zero gravity environment.
They were willing to let you fly merchandise if you wanted to, so you could buy a space pen, or perhaps fly your uncle's ashes to outer space.
I left the meeting thinking that the ISS should never have been built, and this comes from somebody who is enthralled about space exploration.
Here we go again... First off, read the example again. The complaint is not with the type conversion, but with the unexpected left to right expansion of the data types. That is, the expression returns a float, but the evaluation combined int and float operations.
Second, this is not the case with every computer language as you moronically state. Pascal doesn't do this, and neither does Python 3 or M or Algol or many other non-C derivatives. They avoid this issue altogether by using a different character for integer division.
Before you reply again, you will be well advised to read the rest of the thread (that is the parent thread of your post).
If you were speaking and offered me "one slash two" million dollars that wouldn't mean anything in "traditional math" since it doesn't use "slash" as a divide operator.
I don't know where you came up with this. The slash has been in use in math for at least a hundred years.
Apparently the Python developers don't give a rat's ass about backward compatable python source code, if they're willing to change something like that and mess up the existing code (way to go guys).
Once again you feel to see the obvious alternatives and then assume there are none.
Languages such as XML, HTML and LaTeX have made non-compatible upgrades while not breaking backward code by prefacing new code with a statement in computerese meaning "this is the new version of the language".
In latex is called \documentclass in xml is .
in traditional math where you didn't have to use the ascii '/' as the division operator. It *has no* previously understood mathematical meaning that predates using it for programming languages
Funny, I have a 1938 math textbook right here (The Theory of Numbers, by Hardy and Wright) using "/" everywhere to denote division. I wonder how they managed to do that, several years before the invention of computers....
I think C's method of "do it the way that matches the types involved" makes a hell of a lot more sense than Pascal's way of "change all the operators in the code if you decide to change the type of the variable in the future."
I wonder if this isn't the case simply because of your familiarity with C rather than anything else...
While I'm at it, integer division in C and Java are textbook definitions of dangerous overloading. It is somewhat surprising to see the reaction my.sig has caused in/. Too many people seem to be offended by the mere suggestion that C evaluation rules might not be ideal (as I said elsewhere they have evolved, with sqrt(2) being the standard example).
It is true, as you point out, that rounding issues also appear in the overloading of floats to be made to look like reals. I don't wish to argue in favour or against this type of overloading. I'll simply pass on two observations, one in favour and one against:
(1) we are somewhat more familiar with this type of overloading. In elementary school we do write things such as 1/3 =0.3333 which are technically not ok.
(2) OTOH there are famous well respected CS researchers out there (Kahn, IIRC) who oppose real/float overloading for similar reasons to the "/" issue, and would be happy to see a model where you would have to write
x = machine_truncate(3.5/4.2);
In fact, I understand one of the motivations of the IEEE floating types was that at least this way we can predict what happens when we write
The alternative when told to do 1/2 * X to get it to come out the way you want is DWIM
That is one alternative. There are other possibilities. For example, you could do what Python 3 and Pascal do which is to have a special symbol for integer division.
Eternally bitching and whining about something that will never change will only annoy people.
About this you might be right. In general, people seem not to care if the complain is valid or substantiated, they are just plain annoyed by the "whiners". Yet every so often, there are people out there big enough to take on suggestions and criticisms (see the Python 3 effort).
I don't know what is the proper thing to do, shut up so as not to annoy the average folk? or carry on the message talking to those who are listening?
Here are two questions for you out there: (1) what would you do in this case? and (2) which of the two types above are you?
Just out of curiosity, what would you have the following snippet of code do under your rule of using / to denote only floating-point arithmetic?
int x = 4, y = 2, z = x / y;
If your language has type coercion, like C does, then you make it z=trunc(x/y). Of course the optimizer would identify this and internally use integer division.
In languages without type coercion this is just an error, unless cast.
Now you're trolling... Im not a beginner, I've desgined CPU's, written compilers
Look, your reply was at a beginner level. To sum it up, I complained about a design choice in C which goes against commonly used math notation. Your original reply, rather than addressing why this design choice is or isn't right was: "yes but we learn how to handle such oddities in the first class". Yes, that we do, so?
and I'd wager I know alot more about you on this subject.
I doubt it. In fact your explanation is not quite right.
The reason integer division works this way is because originally CPUs did not have floating point operations. Heck if you were lucky they had integer division, which you represented in assembler using DIV. Then FORTRAN (version 1.0) came along and mapped assembler almost one-to-one to a "high level language". Along with it came the rule that 1/2 = 0, 'cuz in assembler DIV 1,2 gives AC=0.
All this shows is that this dumb C decision is a legacy decision. It is still wrong and is a common example of improper overloading.
In fact, Python which is one of the few languages out there whose designers seem to be quite comfortable admitting to and fixing design screw-ups (way to go guys!) is slated to replace integer division with the operator//.
Remeber, integer math is valid: sometimes you want 1/2 to equal 0 -
I prefer the Pascal model where integer division is a different character. This conforms to day-to-day math notation usage.
Failing that I would like to see a taint model where the presence of a float in the expression forces a cast on every element in the expression (this is not always possible in polymorphic languages by the way).
Let me give you an example. Consider a language where everytime you wrote "for" it meant if, everytime you wrote "if" it meant while and everytime you wrote "while" it meant for.
It is clear that this is an unnecessary complication, which will only create confusion "if" reading the code. "while" one would expect the average reader to be confused by this "if" gaining nothing in return.
Simply sticking to the traditional math usage of "/" would have made things a lot clearer. C should have used a new symbol for integer division.
It is amazing how beginners like you come to accept bugs in design as the only possible state of the world. Why not use a different symbol for integer division and thus avoid overloading a well known math symbol ("/") in a way that is totally unexpected and absolutely archane. To wit
You signature demonstrates that you completely lack an understanding of the concepts of floating point and integer arithmetic. I'd suggest changing it, as it makes you look both foolish and stupid.
Actually it is you who comes across as ignorant.
There are other ways to implement integer arithmetic, as done for example in Algol or Pascal. A typical solution is to use div instead of / to denote integer operation.
That way the programming language remains consistent with standard math notation.
This was long coming, since the announcement of the merger. Almost immediately we was a revival or the "AOL keyword" in addition to the URL in all Time-Warner owned media. Before that, the "AOL keyword" was nearly gone.
The recent announcement suggests that this has not worked, hence the need for more radical measures. If AOL has critical mass, they can pull it off and make people pay AOL fees just to download, say, Britney's latest CD, or cool Star Wars trailers. If they don't have enough critical mass, all they will achive is to bring down the once mighty TimeWarner online properties along with AOL.
So the real question is, does AOL have critical mass to carve out a proprietary section of the Web?
And you would have expected otherwise? You are doing integer math (which is certainly not confined to C programming).
Actually you are wrong on this one. Before C most languages would have interpreted that as floating point math on two counts: (1) the division sign "/" and (2) the presence of the float x which taints the entire value. This is the natural interpretation under math rules, which are far better known than C rules.
In those languages conversion to int would happen at the end, often only after explicit conversion (truncation, rounding, floor/ceil).
Wrong. Some Win95/98/Me calls thunk down and are handled by DOS, and that's by design.
That it does, but that does not imply DOS is fully operational under it. Win 95 takes over the memory manager, for example. It intercepts and adds several interrupts too.
The reason I use my PDA all the time and not a pen and paper planner is that it bleeps.
A comedian once described his paper agenda as "a book we use to keep track of the appointments missed".
With a PDA the thing starts bleeping obnoxiously until you pick it up and see that you have a meeting with your boss in five minutes... Haven't missed an appointment since I bought a Palm Vx a couple of years back.
You guys deally have to wait for Windows ME to die before you can proclaim DOS dead.
Not really. Win95/98/Me use DOS as a boot loader, but as soon as they are up they take over DOS. Many people think that DOS is running because they see the name in the boot sequence, but that is like saying Linux runs on top of the "lilo" OS just because you see lilo in the boot sequence.
Once again you belittle people to disagree with you, based on the haughty misconception that they're saying something stupider than they really are.
.. > as an example of how to evolve a language without need of any change whatsoever to previous code.
Where is your alleged alternative to that that I'm allegedly not seeing? Or were you assuming I was saying something stupider?
Your post here matches precisely what I thought you were saying. Here's the relevant paragraph in your reply, highlighted:
if 'div' is the integer division operator, and '/' is only for floats, then if you change one of your int variables to a float or one of your floats to an int, you have to go find everywhere it is used and change the operator for, what is in my opinion no good reason.
That is exactly what you don't need to do. You place a preamble marker at the beginning of new code. There is no change needed in the previous code. This preamble marker declares that in this new code "div" and "int" are properly interpreted rather than using the dangerous overload in C.
You were clearly unaware of this and in fact, believed it is impossible to evolve a language without breaking new code. This is just not so. I suggest you read up on <?xml
Technically anything that is compulsory labour is a robot, as long as it is artifical
Actually a definition from the dictionary is anything but technical. A dictionary describes day-to-day English usage, not technical usage.
For example, according to the dictionary Venus is a star, more specifically, the morning star, which in day-to-day English usage is correct, but technically is wrong. Technically, Venus is a planet.
If it doesn't move or cause movement it is not a robot. That is the technical definition of a robot.
:
According to the International Federation of Robotics (IFR) a robot is a machine which can be programmed to perform tasks which involve manipulative and in some cases locomotive actions under automatic control.
The Swedish Industrial Robotics Association defines a robot as an automatically controlled, reprogrammable, multi-purpose manipulative machine with or without locomotion for use in industrial automation applications.
A robot has three essential characteristics according to the Australian Robotics and Automation Association
It possesses some form of mobility
It can be programmed to accomplish a large variety of tasks
After being programmed or commanded, it operates automatically
Immobot seems to be a short hand for a control loop computer. It is a good one at least in the sense that it generated PR. After all, when was the last time you saw a slashdot article on control loop software systems?
but we don't go party, if there is a bug announced and say "ha ha, you aren't any better than we".
/.ers celebrate like a bunch of immature teenagers, fogetting that OSS is not going to succeed because how bad the competition is, but because how good a given OSS is.
Hello? For years when IE was still in its infancy, every bug was celebrated and shown as "proof of incompetency" on Microsoft's part.
Even now every time a severe bug is found in Microsoft
Here's what I know:
(1) Getting a million dollar equpiment grant is not too hard if your experiment is half decent. For example look at the National Science Foundation (NSF) awards for this week alone.
(2) There was little interest for renting "locker" space in the ISS.
But nobody with the brains to do the research has the money to use the station.
$10,000 per pound, heck, even $100,000 per pound is well within the grant budget of solid researchers at universities, who often receive million dollar equipment and facilities grants.
Read what I wrote. There simple doesn't seem to be a current need for a zero gravity environment.
I attended a meeting of one of the ISS partner nations. In exchange for their contribution they are allotted space in "lockers" to run their experiments. They had a hard time finding any research institution or private interest who wanted to use the locker (the price was around $10,000 per pound). Apparently there is not much current scientific need for a zero gravity environment.
They were willing to let you fly merchandise if you wanted to, so you could buy a space pen, or perhaps fly your uncle's ashes to outer space.
I left the meeting thinking that the ISS should never have been built, and this comes from somebody who is enthralled about space exploration.
Here we go again... First off, read the example again. The complaint is not with the type conversion, but with the unexpected left to right expansion of the data types. That is, the expression returns a float, but the evaluation combined int and float operations.
Second, this is not the case with every computer language as you moronically state. Pascal doesn't do this, and neither does Python 3 or M or Algol or many other non-C derivatives. They avoid this issue altogether by using a different character for integer division.
Before you reply again, you will be well advised to read the rest of the thread (that is the parent thread of your post).
If you were speaking and offered me "one slash two" million dollars that wouldn't mean anything in "traditional math" since it doesn't use "slash" as a divide operator.
I don't know where you came up with this. The slash has been in use in math for at least a hundred years.
This gotta be trolling...
Apparently the Python developers don't give a rat's ass about backward compatable python source code, if they're willing to change something like that and mess up the existing code (way to go guys).
Once again you feel to see the obvious alternatives and then assume there are none.
Languages such as XML, HTML and LaTeX have made non-compatible upgrades while not breaking backward code by prefacing new code with a statement in computerese meaning "this is the new version of the language".
In latex is called \documentclass in xml is .
in traditional math where you didn't have to use the ascii '/' as the division operator. It *has no* previously understood mathematical meaning that predates using it for programming languages
Funny, I have a 1938 math textbook right here (The Theory of Numbers, by Hardy and Wright) using "/" everywhere to denote division. I wonder how they managed to do that, several years before the invention of computers....
I wonder if this isn't the case simply because of your familiarity with C rather than anything else...
While I'm at it, integer division in C and Java are textbook definitions of dangerous overloading. It is somewhat surprising to see the reaction my
It is true, as you point out, that rounding issues also appear in the overloading of floats to be made to look like reals. I don't wish to argue in favour or against this type of overloading. I'll simply pass on two observations, one in favour and one against:
(1) we are somewhat more familiar with this type of overloading. In elementary school we do write things such as 1/3 =0.3333 which are technically not ok.
(2) OTOH there are famous well respected CS researchers out there (Kahn, IIRC) who oppose real/float overloading for similar reasons to the "/" issue, and would be happy to see a model where you would have to write In fact, I understand one of the motivations of the IEEE floating types was that at least this way we can predict what happens when we writeregardless of the architecture.
The alternative when told to do 1/2 * X to get it to come out the way you want is DWIM
That is one alternative. There are other possibilities. For example, you could do what Python 3 and Pascal do which is to have a special symbol for integer division.
Eternally bitching and whining about something that will never change will only annoy people.
About this you might be right. In general, people seem not to care if the complain is valid or substantiated, they are just plain annoyed by the "whiners". Yet every so often, there are people out there big enough to take on suggestions and criticisms (see the Python 3 effort).
I don't know what is the proper thing to do, shut up so as not to annoy the average folk? or carry on the message talking to those who are listening?
Here are two questions for you out there: (1) what would you do in this case? and (2) which of the two types above are you?
Just out of curiosity, what would you have the following snippet of code do under your rule of using / to denote only floating-point arithmetic?
int x = 4, y = 2, z = x / y;
If your language has type coercion, like C does, then you make it z=trunc(x/y). Of course the optimizer would identify this and internally use integer division.
In languages without type coercion this is just an error, unless cast.
Now you're trolling ... Im not a beginner, I've desgined CPU's, written compilers
//.
Look, your reply was at a beginner level. To sum it up, I complained about a design choice in C which goes against commonly used math notation. Your original reply, rather than addressing why this design choice is or isn't right was: "yes but we learn how to handle such oddities in the first class". Yes, that we do, so?
and I'd wager I know alot more about you on this subject.
I doubt it. In fact your explanation is not quite right.
The reason integer division works this way is because originally CPUs did not have floating point operations. Heck if you were lucky they had integer division, which you represented in assembler using DIV. Then FORTRAN (version 1.0) came along and mapped assembler almost one-to-one to a "high level language". Along with it came the rule that 1/2 = 0, 'cuz in assembler DIV 1,2 gives AC=0.
All this shows is that this dumb C decision is a legacy decision. It is still wrong and is a common example of improper overloading.
In fact, Python which is one of the few languages out there whose designers seem to be quite comfortable admitting to and fixing design screw-ups (way to go guys!) is slated to replace integer division with the operator
I prefer the Pascal model where integer division is a different character. This conforms to day-to-day math notation usage.
Failing that I would like to see a taint model where the presence of a float in the expression forces a cast on every element in the expression (this is not always possible in polymorphic languages by the way).
Let me give you an example. Consider a language where everytime you wrote "for" it meant if, everytime you wrote "if" it meant while and everytime you wrote "while" it meant for.
Simply sticking to the traditional math usage of "/" would have made things a lot clearer. C should have used a new symbol for integer division.
See Pascal for the way it should have been done.
Well, duh.
Why would you try to express pi/2 as an integer, anyway?
If I offered you 1/2 million dollars what would you expect to get 0 dollars or $500,000 ?
C breaks the standard day-to-day math interpretation of "/".
You signature demonstrates that you completely lack an understanding of the concepts of floating point and integer arithmetic. I'd suggest changing it, as it makes you look both foolish and stupid.
Actually it is you who comes across as ignorant.
There are other ways to implement integer arithmetic, as done for example in Algol or Pascal. A typical solution is to use div instead of / to denote integer operation.
That way the programming language remains consistent with standard math notation.
Are you complaining about that behavior of C? Consider the alternative, if you are.
If you think C integer/float arithmetic rules make any sense, I'll give you 1/2 million dollars, no question asked.
This was long coming, since the announcement of the merger. Almost immediately we was a revival or the "AOL keyword" in addition to the URL in all Time-Warner owned media. Before that, the "AOL keyword" was nearly gone.
The recent announcement suggests that this has not worked, hence the need for more radical measures. If AOL has critical mass, they can pull it off and make people pay AOL fees just to download, say, Britney's latest CD, or cool Star Wars trailers. If they don't have enough critical mass, all they will achive is to bring down the once mighty TimeWarner online properties along with AOL.
So the real question is, does AOL have critical mass to carve out a proprietary section of the Web?
And you would have expected otherwise? You are doing integer math (which is certainly not confined to C programming).
Actually you are wrong on this one. Before C most languages would have interpreted that as floating point math on two counts: (1) the division sign "/" and (2) the presence of the float x which taints the entire value. This is the natural interpretation under math rules, which are far better known than C rules.
In those languages conversion to int would happen at the end, often only after explicit conversion (truncation, rounding, floor/ceil).
Wrong. Some Win95/98/Me calls thunk down and are handled by DOS, and that's by design.
That it does, but that does not imply DOS is fully operational under it. Win 95 takes over the memory manager, for example. It intercepts and adds several interrupts too.
The reason I use my PDA all the time and not a pen and paper planner is that it bleeps.
A comedian once described his paper agenda as "a book we use to keep track of the appointments missed".
With a PDA the thing starts bleeping obnoxiously until you pick it up and see that you have a meeting with your boss in five minutes... Haven't missed an appointment since I bought a Palm Vx a couple of years back.
You guys deally have to wait for Windows ME to die before you can proclaim DOS dead.
Not really. Win95/98/Me use DOS as a boot loader, but as soon as they are up they take over DOS. Many people think that DOS is running because they see the name in the boot sequence, but that is like saying Linux runs on top of the "lilo" OS just because you see lilo in the boot sequence.