Do you mean that an exploit to give full user powers is not practically very different from an exploit to give full root powers? Well yes and no.
On my machine (I am the only user), you're right. Anything getting full user powers could run servers, access/modify/delete all my documents and so on. To fix it, yeah I'd have to wipe my user and start again. But I'd only have to wipe my user. I wouldn't have to reinstall all my apps and reconfigure the machine.
And your second point is that they could find an exploit to get root (since my user has sudo powers, granted you need a password but yes, a possibility). So... I haven't heard of such an exploit (besides a "social engineering" exploit where the user actually did type the password and then ran a malicious script).
So yes, not total security, but it provides a layer of protection.
However, the big advantage of the root/normal user distinction is on the platform UNIX was designed for - a multi-user system. In a true multi-user system, most users have absolutely no capability to run with sudo powers. I'm quite confident that ANY malicious threat could at very worst completely destroy a single user account. The way unix is designed, it couldn't affect any other users, or root, and it couldn't get root powers since the user account it's running on doesn't have root powers either.
Basically, an animated cursor is just one way to exploit a problem with Windows' GDI (graphical device interface) implementation. Windows runs this as part of the user's session and it is, in part, in kernel mode.
This is why I've been saying this problem has NOT been caused by a mere "bug in the code". Bugs happen to everyone, and it's not about blaming people. It's an accident.
But this issue has not been caused by a mere bug. It's been caused by a catastrophic design flaw in Windows itself (which I personally believe is a side-effect of Microsoft's marketing strategy) - and that is that EVERYTHING is in the kernel. In UNIXes, the GUI is nowhere near the kernel. There is no hope in hell in a UNIX environment of a mouse cursor taking control of your computer. This is caused by the fact that the GUI in windows runs partly in kernel mode. It's the architecture's fault.
If you ask me, this goes right down to the name of the OS - "Windows". It says it all. "This operating system is based on the GUI". And it literally is. The side-effect is that the GUI itself (the windows) can attack your computer.
That's a separate issue, and one that is being addressed by freedesktop.org. Give it some time and you'll have consistent look and feel, theming, etc. over all your GNOME and KDE apps. It's also worth pointing out that this isn't a problem only with F/LOSS and multiple DEs. Windows apps often have many different looks, and Microsoft is one of the worst offenders. In particular, they seem to feel a need to make their office suite (including IE and Outlook) look different from everything else on the system.
Oh god, don't get me started on Microsoft's interfaces:p I don't think that's something we should be trying to compare ourselves to!
OK well, I'll have to check out this FreeDesktop.org.
Of course, users have another option as well, which is simply not to mix apps from the different DEs. If you install standard Ubuntu, you get a pure GNOME environment and everything is very consistent, for example.
Yes, well I use Kubuntu (I very much prefer KDE). It seems that GNOME has "everything" and KDE have "some things with holes filled in by GNOME apps". Most of the preinstalled stuff is KDE. But then other apps like GIMP, Inkscape, GAIM (better than Kopete but uglier), Dia, and so on, are all "GNOME look and feel". (Funny, most of those are graphics programs).
I think the thing which really really annoys me about GNOME apps is the god awful open/save as dialog. But I think that's being improved. Firefox uses the GNOME dialog which shits me!
Anyway I think you're right, in the future we're going to see better integration.
I completely disagree. That would slow development and dramatically reduce innovation. If your goal is to clone Windows faster, it would probably work better, but that's not what I want, and not what most Linux users want.
No, I'm very much into the open source way. And, yes I suppose you're right. The open source way is to have thousands of bees buzzing around whatever they like and ultimately making something (or several things) awesome. I find it difficult to support my own arguments from yesterday, so I'll just side with you;)
However, I will say that the KEY to this is the open source licenses themselves. It's the fact that code is so readily available and able to be mixed that we can get this rapid development and integration.
Please, yes. Take a look at what the OLPC project has been doing with the new environment they're developing. While it's rather special-purpose and tailored to some very specific requirements, there are a lot of really innovative ideas coming out there, ideas that will gradually make their way into other environments. Variety is a good thing, it's how new ideas get implemented and how the human-computer interface evolves.
Yes. So with reference to what I said above, yes it's good to have other projects on the side which are trying new ideas which eventually come back into the mainstream. I'm still not sure if it would be beneficial to have a 3rd major DE though, because of the additional confusion it would create. (and the additional letter that would have to be prefixed to "ubuntu").
Heh, a friend of mine was using the term "shaped". I assumed it was some very regal pronunciation of the word "capped".
Yeah... it sucks. When I said 14kbps, I didn't actually look it up (sorry if I sounded more authorative than I am... someone above said it's actually 64kbps). All I know is that it really isn't usable. Just doing basic web browsing is a major pain. I have to wait for text to gradually appear on the screen.
I can't remember if this is better or worse than what dialup used to be. But I certainly don't remember dialup being this crappy.
Well, if you had full-speed broadband for a month which never got slowed down or cut off, I'd consider the total amount of bandwidth I can download continually for a month to be effectively "unlimited". (In particular since I could just keep rolling over to the following month at the same speed).
But you're right, this plan is really going to effectively cap us at about 14GB.
In Australia, no plans are truly unlimited (I think it's because of the high cost to connect us to the rest of the world). For example, I'm with Bigpond. We have the plan called... surprise, "Unlimited". It's actually 10GB broadband, and after that, capped at about 14kbps or some ridiculous sub-modem speed, and that is truly unlimited.
It isn't as draconian as Verizon (you don't get "terminated" or charged extra). It just isn't *really* unlimited because the Internet these days is pretty much unusable at 14kbps.
That actually still isn't against the terms of service. The TOS prohibits *continuous* uploading/downloading/streaming.
I can download 5GB in a few hours - and it may just well be Linux distributions, YouTube videos, free podcasts, and so on. Those few hours, spread across a month, are in no way "continuous".
The assumption is fundamentally flawed.
Not to mention, this isn't how you're supposed to write a legal contract. A legal contract is supposed to be:
You are allowed to do A, B and C. You are not allowed to do X, Y and Z.
Whereas this one is:
You are allowed to do A and B. You are not allowed to do X and Y. If you do Z, we'll assume it's because you're doing X or Y and cut you off.
Now, I don't mind being told in the TOS "I am not allowed to do Z". But it should just say it, not make piss-wavy inferences that it's based on X and Y. Note that they never explicitly said you're not allowed to do Z.
It seems that this is because they're trying to justify having a 5GB cap. I'd be much happier as a customer if they just made an arbitrary 5GB cap, as part of the TOS, instead of justifying it.
I'll tell you how much better it would be: at least half of the developers would quit and development would slow to a crawl as the mailing lists were taken over by arguments about UI philosophy and code structure.
Yes, you're right about this.
For example, I have tried to work on GNOME stuff. I hate it. I get lost in the code, I forget required steps, I'm annoyed at the redundant code I have to write, etc. If I were paid to work on it, I could, but there's no way I would do it for fun, because it's not fun. KDE, on the other hand, strikes me as elegant with all sorts of clever yet clean and obvious tidbits, and I find it a pleasure to work with. Others, who prefer the GNOME style, think I'm crazy and find the situation to be exactly reversed, because they find KDE to be excessively object-oriented, to the point where it's hard to figure out what actually does what.
So it's good for developers to have the two - since they can choose which to work on. I don't think it's good for end users. It just means that there is a major inconsistency in the interface of Linux apps. Users go "why do half my apps look one way while the other half look another way?" It's confusing and I don't think it's in the best interests of the project, as a product.
So the first thing you have to realize is that combining the projects would NOT combine the developer base. You wouldn't have twice as many coders working on one project. At best you'd have about the same number as worked on one project.
It would be sad, but as far as the "pure public good" is concerned, that would probably be the best thing. Having the same number of developers working on a single unified project is probably better than having that many developers working on two different projects.
But as you've said, they'd have major philosophy differences so it wouldn't work out.
Arguably, if you want to really speed development, we need *another* DE project, one that uses yet another development style.
I don't think we (the population of the Earth at large) can be considered "Intel lovers". We're just using the only viable architecture.
The funnyman above correctly pointed out that it's all about installed base. The current engineers are doing their best to migrate this architecture up to a clean implementation. While it's true that Alpha had all of this 10 years ago, there hasn't yet been a 64-bit architecture WITH the installed base. It's very important.
You're right. It's usually not a very animous rivalry. But it's still a rivalry nonetheless and the community would be better served if they were one product.
I often wonder how much better it would be if KDE and GNOME were to merge, but... that would be a tremendous effort and I don't think either side would want to.
Of course it is technically possible to do anything in Javascript.
Also what the original poster was saying with "it is technically possible to do anything" is that JavaScript, like most programming languages, is turing complete.
This means any algorithm you can write in one language you can write in another, including JavaScript.
A lot of turing-complete languages (eg. Java) are not self-modifying, but they can still code up any algorithm. They just have to find another way to do it, and this computability theory proves that it is technically possible (even if you have to code up a C interpreter in Java, it's still possible).
A good example of this is that some languages, such as Haskell (mostly pure functional languages) have no for loops, while loops, or any form of iteration. They only have recursion. But you can still simulate all iterative algorithms with recursion. Likewise you can write any recursive algorithm using iterative-only languages (such as the original Fortran), by implementing your own stack. The implementation is different, but it's still possible.
(Sorry for writing two huge replies to your single-line post!)
Can you make a self modifying javascript application? I don't think it's possible.
There are two types of self-modifying programs: programs that physically modify their machine code (which is possible for assembly, C or other really low-level apps), and functional languages.
Firstly, you're right, Javascript and most other high level languages can't modify their machine code because it's entirely protected (not to mention, usually interpreted).
But, high-level functional languages can create code at runtime. This is possible in Javascript with code like "var f = new Function("Source code as string")", which stores the new code in the variable f.
Now I'm pretty sure that in Javascript, you can re-assign an existing function with new code. In other words, if a function f does one thing, you can go "f =..." and assign a new function object (functor) to it. This is technically self-modifying code.
It's very different from unsafely modifying machine code. It's modifying it at the function / semantic level, not at the machine instruction level.
Yes, you're right. It was my mistake: I wanted to define x==y as x>=y & x<=y, but wrote instead what you show to be false.
OK I see. Using the same explanation as above, (x>=y && x<=y) would equate to (x>y && x<y), since there's "no such thing as equality". Which is therefore exclusive.
It doesn't help much though, since basically all this has proven is that "if == is always false, then an expression equivalent to == is also always false".
I'm just wondering how far one can get without == for floats.... I also can't remember using == on floats
So either you haven't done much programming, or "quite far".;)
using x==x+y as a check for underflows or end of iteration;
Hm.. underflows, meaning "y is too small to make any change to the value"? Aha... good point. That's quite cool actually. Because I'm saying mathematically it makes no sense to do so, due to the problems of FP representation. And you've said, OK but what if your algorithm is directly dealing with FP representation - then you need to use it. OK, I accept this!
also expression x=y/(b-a+epsilon) used for avoiding overflows or divisions by zero
Not quite sure what this is about (but I'm very tired!) It may be an instance of the above (or something similar).
If it's trying to see if two floats are "close enough to be equivalent", those sorts of calculations should be done with an epsilon, but you should be computing it using > and < within a given range. This is why I started thinking about this in the first place - because any real "equality comparison" needs to actually be an "is-it-close-enough" comparison.
Side note: Wow, having conversations on slashdot with excessive use of the "<" sign is hard work;)
In real time games it relies almost entirely on its superior reaction speed. Strategic thinking is almost completely absent.
Maybe you're playing the wrong games;)
Warcraft III has a perfect mix of macro strategic thinking and micro skills. And as I said, it's in the macro that the computer fails to think properly.
Hmm... I don't quite follow what that would prove. Conventional logic says that that is just "False". I'm not sure if you're therefore supporting me or refuting me. But anyway, here's how I see it.
Firstly, I know that it *is* possible to do == on floats. I just don't think it's "safe" in the sense that, just because two numbers are equal doesn't mean they're actually supposed to represent the same number (since they could just be rounded to the same number). Therefore == is semantically meaningless.
Having made this assumption, I can then go on to assume that >= and > are equivalent (since there is no "equals" case, "greater than or equal to" is just the same as saying "greater than"). And by the same logic, <= and < are equivalent.
Your expression: (x >= y) && !(x >= y) By demorgans: = (x >= y) && (x < y) By my above assumed equivalences: ~= (x > y) && (x < y)
= False
In other words, where I define x == y to be perpetually false, I would also define (x >= y) && !(x >= y) to be false.
I'm not sure what the point of all of this is though. From a practical viewpoint, I just never do == on floats, because it's meaningless.
Actually, I challenge people to come up with a practical and valid use for == on floats.
That depends entirely on the genre of the game. You probably play FPS games, and there you're right. It's a simulation of a human setting with humans trying to spot other humans, reacting at human speeds with human accuracy, and bots who never miss aren't much fun. For strategy games, the goal should really be the "best AI possible".
Lol, no, actually I almost solely play RTS games. Though yes, you're right that it's more important to have human "reaction" time in an FPS.
So far, most strategic AI plays like a distracted teenager with a serious case of ADD and no real sense of what it's doing. I don't doubt those people exist, but they're not my favourite opponents for a game.
Exactly. That's not like a "proper" human opponent. And you're right that since RTS AI is so weak at the moment they really do just need to focus on making the best AI possible.
But even in current RTSs, the AI acts too much like a machine. The problem is, computer AI has shit macro control, but awesome micro. Basically, they can't plan strategies, they can't design defensive bases, they can't do effective counters. Their overall macro strategy is crap.
But when you look at a computer AI on the battlefield, they have superhuman micro. (Maybe not when measured to the Koreans... but anyway)... the computer can basically control every unit on the screen at the same time, and still be able to construct his base. It can automatically cast spells for its entire army at the same time, it doesn't suffer from not being quick enough to select units, or target spells, etc. So in that regard, the computer doesn't act "human" enough.
(It would be more human if it actually simulated a physical screen and mouse pointer inside each computer opponent, so it could physically only select and give commands to a limited number of units at a time, as a human would. But that would be a huge waste of resources).
* Just for a point of reference, I'm picturing Warcraft III here (or Warcraft: Heroes of Azeroth, which BTW I totally want). * Also note that the AI in WC3 is a lot fairer than that of WC1, which pretended to mine gold for show and then secretly had an unlimited amount;)
Why is the most human intelligence the best? If you're playing against an alien, wouldn't you want to be playing against a good approximation of alien intelligence; against a robot a robot intelligence; against a shark a shark etc?
Well if you're playing against a robot, then it should be a very mechanical non-human-error-prone intelligence. An alien or a shark is probably going to think more like a human (they will make value judgements instead of mechanical decisions) so a more human-like intelligence is better for such players.
But in the very general sense - particularly for "multiplayer games with bots", (ie. First Person Shooter bots, Real-Time Strategy opponents, etc), you want the opponents to feel as human as possible - because the idea is that you're simulating a real opponent.
That's why the "best" game AI isn't necessarily the smartest or most responsive - it's the most human.
Writing an AI that makes the occasional "human error", or responds in a reasonable time is harder than writing the "best AI possible", but makes for a more believable (and of course, enjoyable (since who likes getting beaten all the time)) game experience.
There are lots and lots of people leaving serious/joke/semi-joke responses to this from the perspective of various disciplines.
All the jokes aside, can I just say that as a programmer (in particular, someone who uses strongly-typed languages), 4 is an int and 4.0 is a float. Programmers know that these are two entirely different beasts - 4 means 4, the number 4. 4.0 could mean "the literal float 4.0", "the integer 4, having been coerced to a float", "4.000683731 displayed to one decimal place", "4.000000000000000000000000000000058 rounded to 32 bits", or any combination of factors.
Therefore, saying that 4.0 equals 4 is entirely folly. In fact, saying 4.0 equals 4.0 is folly as well - in general it isn't really safe to do equality comparisons on floats - only greater or less than comparisons.
3. Applications must ALL be uniform in operation of common functions..
Same as #1... The only problem with standardisation I've seen is a lot of apps are GTK... so this isn't KDE's fault, it's just a side-effect of the GNOME/KDE split.
4. Uniform operation of input devices (mouse)..
Er... what's the problem here?
5. Easily customizable..
This is... KDE we're talking about here right?
7. Some kind of direct video support (games, etc...).
It doesn't need it. KDE runs on top of X11, the low-level video server. X11 has direct video support (see SDL). SDL creates X windows which run independent of KDE or GNOME. The window manager should have nothing to do with low level video support.
Games are fine on Linux. It's just that there aren't very many. This has nothing to do with the technical capabilities of the system, but rather, convincing developers to actually write games for Linux (or better still, make them cross platform with tools like SDL so they run on anything).
Your question: "The GPL has never been tested in court, is it really legal?" is way over-hyped. It originated as FUD from the SCO case. Legally, the GPL is on really solid ground - even moreso than EULAs for commercial software. It's a copyright license. Either the user agrees to it and gets to take actions not normally allowed by copyright law in exchange for whatever terms are in the license, or they don't and are restricted by copyright law.
Much more so than EULAs - EULAs often ask for outrageous unlawful things.
But... even if the GPL needed a test case, this wouldn't be it. This case would be about whether $30 was a "reasonable" fee to distribute source code, and given that USB keys are like $15 the judge would probably rule that it's close enough to the cost of media to be OK. Even if the judge ruled that $30 was too much, the penalty would probably only consist of a requirement to charge $25 in the future and refund $5 to anyone who payed $30 and asks for the refund.
Yeah... I've always been skeptical about the "cost of media" thing. Maybe that worked in 1989. But nowadays it is entirely possible for anyone to distribute online. Charging for media is pretty dodgy when you could put it on a web server - PARTICULARLY if that media is far far more expensive than a CD (a USB stick?)
Why not distribute GPL programs on portable hard drives next time, and charge the full price of a hard drive?
Having said this, I think it's still a GPL vio. End users need to be able to get the source code out, and redistribte it any way they like. That doesn't sound like it's happening here.
Do you mean that an exploit to give full user powers is not practically very different from an exploit to give full root powers? Well yes and no.
On my machine (I am the only user), you're right. Anything getting full user powers could run servers, access/modify/delete all my documents and so on. To fix it, yeah I'd have to wipe my user and start again. But I'd only have to wipe my user. I wouldn't have to reinstall all my apps and reconfigure the machine.
And your second point is that they could find an exploit to get root (since my user has sudo powers, granted you need a password but yes, a possibility). So... I haven't heard of such an exploit (besides a "social engineering" exploit where the user actually did type the password and then ran a malicious script).
So yes, not total security, but it provides a layer of protection.
However, the big advantage of the root/normal user distinction is on the platform UNIX was designed for - a multi-user system. In a true multi-user system, most users have absolutely no capability to run with sudo powers. I'm quite confident that ANY malicious threat could at very worst completely destroy a single user account. The way unix is designed, it couldn't affect any other users, or root, and it couldn't get root powers since the user account it's running on doesn't have root powers either.
But this issue has not been caused by a mere bug. It's been caused by a catastrophic design flaw in Windows itself (which I personally believe is a side-effect of Microsoft's marketing strategy) - and that is that EVERYTHING is in the kernel. In UNIXes, the GUI is nowhere near the kernel. There is no hope in hell in a UNIX environment of a mouse cursor taking control of your computer. This is caused by the fact that the GUI in windows runs partly in kernel mode. It's the architecture's fault.
If you ask me, this goes right down to the name of the OS - "Windows". It says it all. "This operating system is based on the GUI". And it literally is. The side-effect is that the GUI itself (the windows) can attack your computer.
OK well, I'll have to check out this FreeDesktop.org.Yes, well I use Kubuntu (I very much prefer KDE). It seems that GNOME has "everything" and KDE have "some things with holes filled in by GNOME apps". Most of the preinstalled stuff is KDE. But then other apps like GIMP, Inkscape, GAIM (better than Kopete but uglier), Dia, and so on, are all "GNOME look and feel". (Funny, most of those are graphics programs).
I think the thing which really really annoys me about GNOME apps is the god awful open/save as dialog. But I think that's being improved. Firefox uses the GNOME dialog which shits me!
Anyway I think you're right, in the future we're going to see better integration.No, I'm very much into the open source way. And, yes I suppose you're right. The open source way is to have thousands of bees buzzing around whatever they like and ultimately making something (or several things) awesome. I find it difficult to support my own arguments from yesterday, so I'll just side with you
However, I will say that the KEY to this is the open source licenses themselves. It's the fact that code is so readily available and able to be mixed that we can get this rapid development and integration.Yes. So with reference to what I said above, yes it's good to have other projects on the side which are trying new ideas which eventually come back into the mainstream. I'm still not sure if it would be beneficial to have a 3rd major DE though, because of the additional confusion it would create. (and the additional letter that would have to be prefixed to "ubuntu").
Anyway cheers on a good discussion
Heh, a friend of mine was using the term "shaped". I assumed it was some very regal pronunciation of the word "capped".
Yeah... it sucks. When I said 14kbps, I didn't actually look it up (sorry if I sounded more authorative than I am... someone above said it's actually 64kbps). All I know is that it really isn't usable. Just doing basic web browsing is a major pain. I have to wait for text to gradually appear on the screen.
I can't remember if this is better or worse than what dialup used to be. But I certainly don't remember dialup being this crappy.
Hehe, good point.
Well, if you had full-speed broadband for a month which never got slowed down or cut off, I'd consider the total amount of bandwidth I can download continually for a month to be effectively "unlimited". (In particular since I could just keep rolling over to the following month at the same speed).
But you're right, this plan is really going to effectively cap us at about 14GB.
Yeah, I totally agree.
... surprise, "Unlimited". It's actually 10GB broadband, and after that, capped at about 14kbps or some ridiculous sub-modem speed, and that is truly unlimited.
In Australia, no plans are truly unlimited (I think it's because of the high cost to connect us to the rest of the world). For example, I'm with Bigpond. We have the plan called
It isn't as draconian as Verizon (you don't get "terminated" or charged extra). It just isn't *really* unlimited because the Internet these days is pretty much unusable at 14kbps.
I can download 5GB in a few hours - and it may just well be Linux distributions, YouTube videos, free podcasts, and so on. Those few hours, spread across a month, are in no way "continuous".
The assumption is fundamentally flawed.
Not to mention, this isn't how you're supposed to write a legal contract. A legal contract is supposed to be:Whereas this one is:Now, I don't mind being told in the TOS "I am not allowed to do Z". But it should just say it, not make piss-wavy inferences that it's based on X and Y. Note that they never explicitly said you're not allowed to do Z.
It seems that this is because they're trying to justify having a 5GB cap. I'd be much happier as a customer if they just made an arbitrary 5GB cap, as part of the TOS, instead of justifying it.
I don't think it's "lazier". I think it's "more marketing-friendly".
But as you've said, they'd have major philosophy differences so it wouldn't work out.Please, no?
I don't think we (the population of the Earth at large) can be considered "Intel lovers". We're just using the only viable architecture.
The funnyman above correctly pointed out that it's all about installed base. The current engineers are doing their best to migrate this architecture up to a clean implementation. While it's true that Alpha had all of this 10 years ago, there hasn't yet been a 64-bit architecture WITH the installed base. It's very important.
You're right. It's usually not a very animous rivalry. But it's still a rivalry nonetheless and the community would be better served if they were one product.
... that would be a tremendous effort and I don't think either side would want to.
I often wonder how much better it would be if KDE and GNOME were to merge, but
Lol, yes I did get it ;) That doesn't mean I wouldn't want my favourite game to be re-released with a cool new name ;)
This means any algorithm you can write in one language you can write in another, including JavaScript.
A lot of turing-complete languages (eg. Java) are not self-modifying, but they can still code up any algorithm. They just have to find another way to do it, and this computability theory proves that it is technically possible (even if you have to code up a C interpreter in Java, it's still possible).
A good example of this is that some languages, such as Haskell (mostly pure functional languages) have no for loops, while loops, or any form of iteration. They only have recursion. But you can still simulate all iterative algorithms with recursion. Likewise you can write any recursive algorithm using iterative-only languages (such as the original Fortran), by implementing your own stack. The implementation is different, but it's still possible.
(Sorry for writing two huge replies to your single-line post!)
Firstly, you're right, Javascript and most other high level languages can't modify their machine code because it's entirely protected (not to mention, usually interpreted).
But, high-level functional languages can create code at runtime. This is possible in Javascript with code like "var f = new Function("Source code as string")", which stores the new code in the variable f.
Now I'm pretty sure that in Javascript, you can re-assign an existing function with new code. In other words, if a function f does one thing, you can go "f =
It's very different from unsafely modifying machine code. It's modifying it at the function / semantic level, not at the machine instruction level.
It doesn't help much though, since basically all this has proven is that "if == is always false, then an expression equivalent to == is also always false".So either you haven't done much programming, or "quite far".
If it's trying to see if two floats are "close enough to be equivalent", those sorts of calculations should be done with an epsilon, but you should be computing it using > and < within a given range. This is why I started thinking about this in the first place - because any real "equality comparison" needs to actually be an "is-it-close-enough" comparison.
Side note: Wow, having conversations on slashdot with excessive use of the "<" sign is hard work
Warcraft III has a perfect mix of macro strategic thinking and micro skills. And as I said, it's in the macro that the computer fails to think properly.
Hmm... I don't quite follow what that would prove. Conventional logic says that that is just "False". I'm not sure if you're therefore supporting me or refuting me. But anyway, here's how I see it.
Firstly, I know that it *is* possible to do == on floats. I just don't think it's "safe" in the sense that, just because two numbers are equal doesn't mean they're actually supposed to represent the same number (since they could just be rounded to the same number). Therefore == is semantically meaningless.
Having made this assumption, I can then go on to assume that >= and > are equivalent (since there is no "equals" case, "greater than or equal to" is just the same as saying "greater than"). And by the same logic, <= and < are equivalent.
Your expression:
(x >= y) && !(x >= y)
By demorgans:
= (x >= y) && (x < y)
By my above assumed equivalences:
~= (x > y) && (x < y)
= False
In other words, where I define x == y to be perpetually false, I would also define (x >= y) && !(x >= y) to be false.
I'm not sure what the point of all of this is though. From a practical viewpoint, I just never do == on floats, because it's meaningless.
Actually, I challenge people to come up with a practical and valid use for == on floats.
But even in current RTSs, the AI acts too much like a machine. The problem is, computer AI has shit macro control, but awesome micro. Basically, they can't plan strategies, they can't design defensive bases, they can't do effective counters. Their overall macro strategy is crap.
But when you look at a computer AI on the battlefield, they have superhuman micro. (Maybe not when measured to the Koreans... but anyway)... the computer can basically control every unit on the screen at the same time, and still be able to construct his base. It can automatically cast spells for its entire army at the same time, it doesn't suffer from not being quick enough to select units, or target spells, etc. So in that regard, the computer doesn't act "human" enough.
(It would be more human if it actually simulated a physical screen and mouse pointer inside each computer opponent, so it could physically only select and give commands to a limited number of units at a time, as a human would. But that would be a huge waste of resources).
* Just for a point of reference, I'm picturing Warcraft III here (or Warcraft: Heroes of Azeroth, which BTW I totally want).
* Also note that the AI in WC3 is a lot fairer than that of WC1, which pretended to mine gold for show and then secretly had an unlimited amount
But in the very general sense - particularly for "multiplayer games with bots", (ie. First Person Shooter bots, Real-Time Strategy opponents, etc), you want the opponents to feel as human as possible - because the idea is that you're simulating a real opponent.
That's why the "best" game AI isn't necessarily the smartest or most responsive - it's the most human.
Writing an AI that makes the occasional "human error", or responds in a reasonable time is harder than writing the "best AI possible", but makes for a more believable (and of course, enjoyable (since who likes getting beaten all the time)) game experience.
There are lots and lots of people leaving serious/joke/semi-joke responses to this from the perspective of various disciplines.
All the jokes aside, can I just say that as a programmer (in particular, someone who uses strongly-typed languages), 4 is an int and 4.0 is a float. Programmers know that these are two entirely different beasts - 4 means 4, the number 4. 4.0 could mean "the literal float 4.0", "the integer 4, having been coerced to a float", "4.000683731 displayed to one decimal place", "4.000000000000000000000000000000058 rounded to 32 bits", or any combination of factors.
Therefore, saying that 4.0 equals 4 is entirely folly. In fact, saying 4.0 equals 4.0 is folly as well - in general it isn't really safe to do equality comparisons on floats - only greater or less than comparisons.
Games are fine on Linux. It's just that there aren't very many. This has nothing to do with the technical capabilities of the system, but rather, convincing developers to actually write games for Linux (or better still, make them cross platform with tools like SDL so they run on anything).
Thanks for your review. I'll definately take this on board. (Particularly in light of today's confirmation)
Why not distribute GPL programs on portable hard drives next time, and charge the full price of a hard drive?
Having said this, I think it's still a GPL vio. End users need to be able to get the source code out, and redistribte it any way they like. That doesn't sound like it's happening here.