Re:Valgrind and memory leaks
on
KDE 3.0 is Out
·
· Score: 3, Insightful
Not that I don't believe you but my impression of C++ was that memory issues were worse because the compiler makes it easy to get a bitwise copy of an object and the first destructor that runs could leave dangling pointers in every other copy.
C++ doesn't make bitwise copies of objects. The default copy constructors in C++ does a per-member assignment; that's important. And in order to avoid bad pointers, you disable the default copy constructors. That's easy to do and hard to overlook (in fact, you can grep for its occurrence).
You've always had to pair allocate/free constructs in C and C++. The syntax being different shouldn't make them less likely to occur.
It's not a question of syntax. With almost no exceptions, the only places new/delete should occur in well-written C++ code are in constructors and destructors. That, and a few other rules, ensure that you can't get memory leaks while still being able to express whatever you could in C. If KDE code calls new or delete anywhere else, it's unnecessarily inviting memory leaks.
Re:Valgrind and memory leaks
on
KDE 3.0 is Out
·
· Score: 3, Interesting
I haven't had memory leaks in C++ in years--they are straightforward to avoid with consistent use of constructors/destructors. Where do those leaks occur in KDE code? Don't the KDE style guidelines make memory leaks impossible? If not, why not?
JavaScript is just not the language to write 10k programs in--it has some serious problems in its object model and scoping rules. JavaScript is barely up to the task of writing web pages.
The premise also seems wrong to me. People who are so inexperienced that they can't figure out a scripting language like Python or Perl probably shouldn't be writing GUI applications in the first place. And Python and Perl both already have excellent GUI toolkits available to them.
SashXB also falls short in the installation area. It depends on half a dozen other packages to be installed on the user's machine. Sorry, but something like this should be a single download for the user, and a single click install.
We can watch a lonely guy run around punching codes into combination locks for four hours. Wait, on the other channel, they are showing grass grow. I think I'll rather watch that.
By that argument, let's get rid of HTTP. I mean, HTTP invokes remote procedures on the web server, in the form of servlets and CGI scripts. In different words, SOAP is no less secure than HTTP. If your firewall passes HTTP to the wrong internal servers, you have a security problem, no matter whether you are running SOAP or not.
The problem with Microsoft is not that they are closed source, it is that they keep reinventing the wheel, often badly and with a view towards market domination. MS Windows could easily be based on POSIX-compliant APIs, use forward slashes, and offer the standard UNIX command line utilities. They'd lower their development costs, too, because they wouldn't have to waste time on implementing and fixing stuff that has been implemented before. Microsoft should drop IIS--its functionality is subsumed by Apache. And I think (though this is politically touchy) both Microsoft and Apple should adopt X11 for their low-level graphics; X11 is far from perfect, but it is as fast (or faster) and full featured as GDI and Quartz, and it's an open standard.
But, you see, it is profitable for a company like Microsoft to reinvent the wheel. Making a proprietary, non-interoperable kernel interface or web server ties people to their platform and it saves Microsoft the expense and uncertainty of actually having to come up with innovative products.
Any admin that thinks he can secure a box is braindead alright, Windows or not. The reason your machine hasn't gotten hacked is either that you haven't noticed it or that nobody knows or cares about it. Put up a challenge on one of the hacker mailing lists, and you'll be out of business before you know it.
That seems completely backwards to me. People who are out and about generate data (audio, video) that they want to transmit home. The thing should be faster coming from the phone, not going to the phone.
Re:If only it were true...
on
OS X for Intel
·
· Score: 3, Interesting
Porting OSX to x86 would be pointless. Apple has no unique technology in their OS; Linux with KDE already gives you pretty much the same functionality and a similarly nice GUI. What Linux with KDE doesn't give you is the Apple user community, third party software, and integrated hardware/software. That's what makes Apple valuable, and you'd lose that if they ever ported to something other than their own hardware.
I'd much rather see more companies like Apple: companies that pick an OS, build nice hardware, and sell it all together.
Well, one can pretty obviously do this: you get a tamperproof box, put in a GPS receiver and whatever else, and only when the GPS receiver believes it is receiving the right signals does it release the data. Of course, what this is supposed to achieve is another question. Without two-way communications, you can simply receive and rebroadcast the signals to the box wherever it is. If you are careful with the timing, the adversary can be anywhere in the world where he can see the right kinds of satellites and retransmit the signals with the right kind of timing. And if you manage to build a tamperproof box, there are a lot much more useful ways of locking up information than that.
There are intersting things you can do with spatial location and cryptography, but this isn't it.
Let me put in another word for Maxima. It is based on Macsyma, and it is very powerful.
Still, people have learned quite a bit about algorithms, software engineering, and software reuse since Macsyma, Maple, and Mathematica were originally implemented, and it might well be worth thinking about having another go at a modern computer algebra system. I suspect that implementing it in something like ML or Haskell might help a lot with correctness and extensibility.
First of all, it is foolish to derive results using any system, or by hand, without being able to check them.
Second, the suggestion that commercial, single-developer computer algebra systems are somehow more reliable than bazaar, open source ones flies in the face of reality. For years, Mathematica was released with really serious and subtle bugs, for example in its polynomial code; it would compute results that simply didn't survive even the simplest checks. And Wolfram Research didn't bother fixing them for a long time (for all I know they may still be there). The equivalent code in Macsyma, which was a bazaar-like effort and is now open source, worked just fine.
Microsoft insists a modular Windows would be a technical nightmare: Removing parts of the operating system could cripple the rest of it.
Microsoft is probably right: Windows is incredibly poorly designed. Everything can just call everything else, willy nilly. Driver installation programs may assume that they can just pop up IE if they feel like it, scanner drivers invoke user interface components, etc.
The states are right to insist on this, though. It is entirely reasonable to demand that the market-leading OS satisfies minimal modularity requirements. If Microsoft can't hack this, they deserve to go out of business. If they comply and fix Windows, we'll all be better off.
Well, not all free speech seems to involve moving one's lips. Bribing politicians, pardon me, donating money to various political causes, has been ruled a free speech issue...
Why do people always put down X11? X11 with FLTK is smaller than Qt/Embedded, for example. X11 is a lot more efficient and considerably smaller than Quartz, the Macintosh graphics system, while offering similar functionality (including hardware acceleration, antialiasing, and transparency). And X11 also does as well or better than Microsoft's GDI. And on top of all that, X11 gives you the ability to use whatever toolkit you like and to mix applications running on different hosts on the same screen. If X11 didn't exist (and hadn't been widly successful already for the past 20 years), it would have to be invented.
In the DeCSS case, the First Amendment isn't cited for fair use issues at all; it is cited because the public discussion of mathematics and algorithms ought to be possible in a free society unless there are highly exceptional circumstances. But First Amendment issues also come in when technology exists to control in detail who can say and publish what and where. The technological mechanisms used to "combat piracy" and restrict what have traditionally been fair use provisions are the same technological mechanisms that the people who hold the technological keys to those media can use to ban speech they don't like.
Another conflict between copyright and technological copy protection measures is that the Constitution defines copyright terms to be limited; the intent was clearly that afterwards, works pass into the public domain. Technological protections undermine this, keeping copyrighted works under technological protection forever locked up.
Copyright is special privilege granted by the government with the policy goal of encouraging people to create and publish works. It is justified only by a clause in the Constitution that balances various interests against one another. If one side doesn't live up to its side of the bargain, the whole deal falls apart.
Overall, I can't figure out whether the author of that article is disingenuous or just stupid. Of course, the Constitution doesn't allow piracy. But it also doesn't allow corporate theft of the commons. The question is where the dividing line is. We can't expect much help from our current "constructionist" supreme court with that, who, by their own admission, will vote for big business in these cases to the point of absurdity. So, in that sense, yes, it is up to the legislature to put a stop to piracy--of the copyright system by big media companies.
BeOS may be a nicely engineered system, but it wouldn't have attracted a lot of new people to the platform. OSX's full UNIX support has made it a viable choice again in academia and research, and it gives Apple a huge developer base and software base to draw on. I think any choice other than OSX would have doomed Apple.
Complain to your politicans, not to your scientists. Most scientists don't like the megaprojects, and if there were a vote among scientists, I'm sure the hot fusion projects would get killed quickly (probably along with manned space flight). Politicians like them because they bring big bucks into their state.
But given that comparatively little money is left for other science, when even many well-founded projects can't be funded, there just is no money left for odd-ball things.
As for cold fusion, that would be commercially such an attractive proposition that I'm sure that the investment community has given it all the funding it deserves.
Well, as I said, there are some desktops that are misconfigured. This particular problem is, ironically, the same problem that many OSX fonts have (although not quite as pronounced).
The main mistake there is to turn on anti-aliasing for small fonts. Anything smaller than 12 pixels should probably not be anti-aliased.
If linux is to really move ahead on the desktop, it needs a standard set of high quality fonts and a standard printing system that all linux distros use and support.
Maybe you want that, but why the hell would I want that? X11 has excellent, hand-designed bitmapped fonts that display more nicely than anything on Windows or MacOS. Since I use TeX, it makes no difference to me that those fonts don't print out nicely. Similarly, there is not single printing system that works everywhere. Microsoft and Apple have tried, and they have failed.
I hate this "eveybody must work just the way I like it" attitude. There are Linux distributions that use scalable, anti-aliased fonts by default and have picked a "standard" printing system. And there are other Linux distributions that have other priorities. If you can't deal with the choice, go use Windows.
If it weren't for Apple and MS pushing TrueType and releasing fonts for free, we would still be stuck with eight-bit encoded fonts that are not hinted at all
That's an absolutely ridiculous statement. There were hinted outline fonts available before TrueType even came along; we didn't need Apple or Microsoft to create the TrueType format. And TrueType fonts are a huge pain to create in the first place.
Some standard would have come along no matter what. This particular standard happens to come with patent strings attached, and that's not particularly nice.
I'm looking at these screenshots on my Titanium PowerBook G4, and I just glance back and forth between the screenshots and Aqua, and I laugh.
Funny, I'm looking at it from my Titanium PowerBook G4 as well, and I see nothing wrong with most of the fonts in the screenshots. Some people picked what I would consider ugly fonts in some screenshots, but that's their right. OSX, in comparison, for better or worse, gives people very little choice.
I see plenty wrong with your attitude, however. Apple has only been able to spend that much time and money on graphic design because they got much of the nitty-gritty work done for them by open source folks. If it weren't for open source, OSX wouldn't be here and Apple would likely be out of business soon.
And maybe Apple should spend some time on their own font rendering as well, because, frankly, Apple's anti-aliasing on PowerBooks sucks.
I just have trouble believing that in the year 2002 you guys still don't have nice hinted fonts shipping and in-use by default with X.
In part, that's Apple's fault, actually. Their software patents on the particular hinting methods used in TrueType have held back the development of open source renderers for TrueType.
And X11 actually has had good hinting technology for years, but because Apple and Microsoft managed to push their own, new, proprietary font standards, the X11 folks had to start from scratch.
So, be nice. Apple has plenty of bad history to make up for with the open source community, and they need all the help they can get.
People are nearsighted because their eyeball has grown too long for their cornea. You can't reverse that through exercise (conceivably, you might be able to prevent it in children somehow). There is no muscle involved. And the muscle that you use for focussing needs to relax in order to focus at a distance, so "strengthening" that wouldn't help you with nearsightedness.
You'll probably need bigger fonts, but whether you go with a bigger or smaller monitor is your preference. Some great work has been done on 80x24 CRTs.
The only thing that probably makes a difference as far as buying a monitor is concerned is to get a monitor that's bright. A bright monitor will make it more likely that your pupils are small, and that makes the images you are getting sharper. I think bright, sharp, and big are more difficult to get in the same monitor, so perhaps a smaller, lower resolution, but brighter monitor is a better choice overall. Paying attention to office lighting probably also helps a lot.
My personal impression is that light-text-on-dark-background also improves readability, but that's something you can experiment with afterwards.
Also, think about the software you will be using. Interfaces will lots of buttons and tiny, fixed-size dialog boxes will not be your friend, while a command line at which you type succinct commands works no matter how poor your vision gets. While Windows has some low-vision hooks, aiming for working on a command line system may be a better career move.
Training nearsightedness away is right up there with various devices to increase the size of certain private body parts, or spot exercise to remove fat deposits. It may make sense to you, but it doesn't work. At best, someone can perhaps learn to get by a little better with the fuzzy image they are seeing. If someone who needs glasses doesn't get them, he'll just miss out on a lot of things.
And by the time you reach your 40s, you'll invariably need reading glasses anyway; there is no escaping it. Sorry, eyes just aren't built to last.
C++ doesn't make bitwise copies of objects. The default copy constructors in C++ does a per-member assignment; that's important. And in order to avoid bad pointers, you disable the default copy constructors. That's easy to do and hard to overlook (in fact, you can grep for its occurrence).
You've always had to pair allocate/free constructs in C and C++. The syntax being different shouldn't make them less likely to occur.
It's not a question of syntax. With almost no exceptions, the only places new/delete should occur in well-written C++ code are in constructors and destructors. That, and a few other rules, ensure that you can't get memory leaks while still being able to express whatever you could in C. If KDE code calls new or delete anywhere else, it's unnecessarily inviting memory leaks.
I haven't had memory leaks in C++ in years--they are straightforward to avoid with consistent use of constructors/destructors. Where do those leaks occur in KDE code? Don't the KDE style guidelines make memory leaks impossible? If not, why not?
The premise also seems wrong to me. People who are so inexperienced that they can't figure out a scripting language like Python or Perl probably shouldn't be writing GUI applications in the first place. And Python and Perl both already have excellent GUI toolkits available to them.
SashXB also falls short in the installation area. It depends on half a dozen other packages to be installed on the user's machine. Sorry, but something like this should be a single download for the user, and a single click install.
We can watch a lonely guy run around punching codes into combination locks for four hours. Wait, on the other channel, they are showing grass grow. I think I'll rather watch that.
By that argument, let's get rid of HTTP. I mean, HTTP invokes remote procedures on the web server, in the form of servlets and CGI scripts. In different words, SOAP is no less secure than HTTP. If your firewall passes HTTP to the wrong internal servers, you have a security problem, no matter whether you are running SOAP or not.
But, you see, it is profitable for a company like Microsoft to reinvent the wheel. Making a proprietary, non-interoperable kernel interface or web server ties people to their platform and it saves Microsoft the expense and uncertainty of actually having to come up with innovative products.
Any admin that thinks he can secure a box is braindead alright, Windows or not. The reason your machine hasn't gotten hacked is either that you haven't noticed it or that nobody knows or cares about it. Put up a challenge on one of the hacker mailing lists, and you'll be out of business before you know it.
See, as soon as they switch from FreeBSD to Windows, it goes down. That should tell you something.
That seems completely backwards to me. People who are out and about generate data (audio, video) that they want to transmit home. The thing should be faster coming from the phone, not going to the phone.
I'd much rather see more companies like Apple: companies that pick an OS, build nice hardware, and sell it all together.
There are intersting things you can do with spatial location and cryptography, but this isn't it.
Still, people have learned quite a bit about algorithms, software engineering, and software reuse since Macsyma, Maple, and Mathematica were originally implemented, and it might well be worth thinking about having another go at a modern computer algebra system. I suspect that implementing it in something like ML or Haskell might help a lot with correctness and extensibility.
Second, the suggestion that commercial, single-developer computer algebra systems are somehow more reliable than bazaar, open source ones flies in the face of reality. For years, Mathematica was released with really serious and subtle bugs, for example in its polynomial code; it would compute results that simply didn't survive even the simplest checks. And Wolfram Research didn't bother fixing them for a long time (for all I know they may still be there). The equivalent code in Macsyma, which was a bazaar-like effort and is now open source, worked just fine.
Microsoft is probably right: Windows is incredibly poorly designed. Everything can just call everything else, willy nilly. Driver installation programs may assume that they can just pop up IE if they feel like it, scanner drivers invoke user interface components, etc.
The states are right to insist on this, though. It is entirely reasonable to demand that the market-leading OS satisfies minimal modularity requirements. If Microsoft can't hack this, they deserve to go out of business. If they comply and fix Windows, we'll all be better off.
Well, not all free speech seems to involve moving one's lips. Bribing politicians, pardon me, donating money to various political causes, has been ruled a free speech issue...
Why do people always put down X11? X11 with FLTK is smaller than Qt/Embedded, for example. X11 is a lot more efficient and considerably smaller than Quartz, the Macintosh graphics system, while offering similar functionality (including hardware acceleration, antialiasing, and transparency). And X11 also does as well or better than Microsoft's GDI. And on top of all that, X11 gives you the ability to use whatever toolkit you like and to mix applications running on different hosts on the same screen. If X11 didn't exist (and hadn't been widly successful already for the past 20 years), it would have to be invented.
Another conflict between copyright and technological copy protection measures is that the Constitution defines copyright terms to be limited; the intent was clearly that afterwards, works pass into the public domain. Technological protections undermine this, keeping copyrighted works under technological protection forever locked up.
Copyright is special privilege granted by the government with the policy goal of encouraging people to create and publish works. It is justified only by a clause in the Constitution that balances various interests against one another. If one side doesn't live up to its side of the bargain, the whole deal falls apart.
Overall, I can't figure out whether the author of that article is disingenuous or just stupid. Of course, the Constitution doesn't allow piracy. But it also doesn't allow corporate theft of the commons. The question is where the dividing line is. We can't expect much help from our current "constructionist" supreme court with that, who, by their own admission, will vote for big business in these cases to the point of absurdity. So, in that sense, yes, it is up to the legislature to put a stop to piracy--of the copyright system by big media companies.
BeOS may be a nicely engineered system, but it wouldn't have attracted a lot of new people to the platform. OSX's full UNIX support has made it a viable choice again in academia and research, and it gives Apple a huge developer base and software base to draw on. I think any choice other than OSX would have doomed Apple.
But given that comparatively little money is left for other science, when even many well-founded projects can't be funded, there just is no money left for odd-ball things.
As for cold fusion, that would be commercially such an attractive proposition that I'm sure that the investment community has given it all the funding it deserves.
Well, as I said, there are some desktops that are misconfigured. This particular problem is, ironically, the same problem that many OSX fonts have (although not quite as pronounced).
The main mistake there is to turn on anti-aliasing for small fonts. Anything smaller than 12 pixels should probably not be anti-aliased.
If linux is to really move ahead on the desktop, it needs a standard set of high quality fonts and a standard printing system that all linux distros use and support.
Maybe you want that, but why the hell would I want that? X11 has excellent, hand-designed bitmapped fonts that display more nicely than anything on Windows or MacOS. Since I use TeX, it makes no difference to me that those fonts don't print out nicely. Similarly, there is not single printing system that works everywhere. Microsoft and Apple have tried, and they have failed.
I hate this "eveybody must work just the way I like it" attitude. There are Linux distributions that use scalable, anti-aliased fonts by default and have picked a "standard" printing system. And there are other Linux distributions that have other priorities. If you can't deal with the choice, go use Windows.
That's an absolutely ridiculous statement. There were hinted outline fonts available before TrueType even came along; we didn't need Apple or Microsoft to create the TrueType format. And TrueType fonts are a huge pain to create in the first place.
Some standard would have come along no matter what. This particular standard happens to come with patent strings attached, and that's not particularly nice.
Funny, I'm looking at it from my Titanium PowerBook G4 as well, and I see nothing wrong with most of the fonts in the screenshots. Some people picked what I would consider ugly fonts in some screenshots, but that's their right. OSX, in comparison, for better or worse, gives people very little choice.
I see plenty wrong with your attitude, however. Apple has only been able to spend that much time and money on graphic design because they got much of the nitty-gritty work done for them by open source folks. If it weren't for open source, OSX wouldn't be here and Apple would likely be out of business soon.
And maybe Apple should spend some time on their own font rendering as well, because, frankly, Apple's anti-aliasing on PowerBooks sucks.
I just have trouble believing that in the year 2002 you guys still don't have nice hinted fonts shipping and in-use by default with X.
In part, that's Apple's fault, actually. Their software patents on the particular hinting methods used in TrueType have held back the development of open source renderers for TrueType.
And X11 actually has had good hinting technology for years, but because Apple and Microsoft managed to push their own, new, proprietary font standards, the X11 folks had to start from scratch.
So, be nice. Apple has plenty of bad history to make up for with the open source community, and they need all the help they can get.
People are nearsighted because their eyeball has grown too long for their cornea. You can't reverse that through exercise (conceivably, you might be able to prevent it in children somehow). There is no muscle involved. And the muscle that you use for focussing needs to relax in order to focus at a distance, so "strengthening" that wouldn't help you with nearsightedness.
The only thing that probably makes a difference as far as buying a monitor is concerned is to get a monitor that's bright. A bright monitor will make it more likely that your pupils are small, and that makes the images you are getting sharper. I think bright, sharp, and big are more difficult to get in the same monitor, so perhaps a smaller, lower resolution, but brighter monitor is a better choice overall. Paying attention to office lighting probably also helps a lot.
My personal impression is that light-text-on-dark-background also improves readability, but that's something you can experiment with afterwards.
Also, think about the software you will be using. Interfaces will lots of buttons and tiny, fixed-size dialog boxes will not be your friend, while a command line at which you type succinct commands works no matter how poor your vision gets. While Windows has some low-vision hooks, aiming for working on a command line system may be a better career move.
And by the time you reach your 40s, you'll invariably need reading glasses anyway; there is no escaping it. Sorry, eyes just aren't built to last.