Sometimes we do trial-and-error on the trickier code in order to make them right. If you tried 3 times and the code still has some small problem, so you fixed that last bug and your code works, how many of you will re-comment the code?
And don't tell me to think before coding. If you are going to write a heap-sort program, of course you should have a clear idea on the algorithm, but it is just HARD not to make a few mistakes (like n/2 vs. (n+1)/2) in the code, especially when implementing such an algorithm for the first time.
Maybe because it is 1.3 or something like that, not 1.3.1_02.
Most of these people don't need fast disks
on
Extreme Cooling
·
· Score: 1
If he wants to calculate Pi to the one-billionth digit (using Super Pi or something like that), it would be a good idea to use a 3600rpm ATA/33 drive, and then he can make the CPU a little better...
(Assuming the system does not need to swap, of course)
I have that question too. I'm an EE student, and I also enjoy studying (56 hrs/week), coding (20 hrs/week). I DO play games like Doom (solo), and spend most of the remaining time slashdotting, but I have no interest in SW or similar fantasy things. On Friday my roommate (who is an all-work-no-play person, but for some reason loves SW) made me watch the 5th episode on VCD, and I just felt that my brain is twisted.
I have spent several days writing a rudimentary MMIX operating system, and found that the processor has some flaws for operating systems, and the MMMIX simulator simulates some OS-oriented operations (like cache flushing) quite terribly. Therefore I think the design should get some improvement before it is ever hardware-ized.
During the last six months Doom II (mostly add-ons like Eternal or Hell Revealed) has almost been my sole game which I play for two hours a week in average. It is just COOL to shoot at 30~50 enemies, and to avoid twenty fireballs of various kinds, all at once. Of course, I play in Ultra Violence god mode, just with my damage counted. My computer is a PII with a Riva128 video card, so it can even run GLQuake2 like a dream, but I just don't like it (or Quake1, etc.) because (1) not enough enemies, (2) having to aim vertically is really not cool.
IANAL, but I think according to the GPL, they should offer the kernel sources of the beta versions anyway, since beta versions aren't that different from real versions.
So I think FSF is right in giving the company a note about potential GPL violation --- just don't do real things (like firing lawsuits) before that caused any real trouble.
And the Lindows company should provide the sources, maybe with the note "This software is beta, so if it breaks, please try not to spread bad words about our company", etc.
Seems as if we need free (as in speech) hardware to make free software work best. Companys that hold a lot of intellectual property on the hardware just have to make them undisclosed, so they either make no drivers at all for non-windows systems, make closed-source drivers (bad for many non-windows users, bad for hw developer), or put more and more things in hardware (better but more costly for user, still bad for hw developer).
Maybe the WiFi thing is best done in hardware, but sooner or later we will find some hardware that have parts best implemented with software that runs on the host computer (lower cost, and not very high overhead), and then what shall we linux users choose from? A $40 soft one with crappy linux support (closed-source drivers that crashes every two hours), or a $500 hard one? Or otherwise make a totally-free soft solution?
20M samples/s ADC to receive 95MHz FM?
on
GNU Radio
·
· Score: 2, Interesting
Does the ADC mix down the frequency prior to A/D conversion?
Once I was a kernel-patching enthusiast, but a recent incident changed this.
When I tried a kernel patched by some arbitrary person (i.e., not -ac or -aa, but rather someone appearing just several times a month on lkml) so that it contains all kinds of new things like the new scheduler (which DOES help) and preempt, I found that the system was very stable after two days of desktop use. Then I decided to try `nice -n 30 make -j' PRBoom, and the system is still as responsive as ever. I was happy and posted on Slashdot about how slick it is just after the compilation ended successfully. Wanting to verify my results, I `make clean' and retried. Guess what? Solid lockup without any logs. I hit the reset button and tried the compilation again in console mode with only `top' running. 2 out of 3 times the system locked up solid, Alt-Sysrq just shows messages without doing real things.
I then rebooted and ran the kernel for another two days with constant fear that it may mysterically lock up at any minute. Luckily it didn't, and I then replaced the kernel with a -aa one, without most of the new features, but at least it is rock solid, hasn't crashed since. I think I will add the preempt (or ll) patches only after Marcelo or A.C. or A.A. incorporate it, or when I decide to do some kernel hacking.
So my advice is that try arbitrarily patched (I mean putting patches together by yourself or by someone else who did not test it extensively) kernels only in deep-kernel-hack-mode, just like when you try a kernel in which you modified several lines by yourself. After all, many of us has been spoilt by Linux's stability, and our nerves are not quite prepared for a lock-up when facing a screen with WindowMaker (rather than Win98) on it.
I'm afraid 20% of the leaks in C/C++ programs are not simple enough to be detected by garbage collectors (for example, you forget to remove an object from a global hash table, so a lot of things are magically referenced), Yet if you use garbage collection, these remaining leaks can be hard to find.
Well, I do agree that Java or Python makes development faster by not requiring the programmer to write destructors. However, garbage collection is not magic. It cannot cure all memory-leak problems.
As for ease of learning, making people write correct destructors does not make one language much more difficult --- mostly it just make the language a bit more verbose to use. Perl has garbage collection, but IMHO it is even more hellish than C++ to learn (well, it is nevertheless a good language for its purpose), because both are so hairy.
We should REALLY try to figure out how to put the "drag and middle-click" magic in the docs so that every newbie can find it. Maybe we should make a tip window containing all these things show when the user start Gnome or Kde or whatever window manager (of course the last tip should be "how to turn tips off").
A linux lover for years that don't know how to cut 'n' paste between Emacs and Mozilla! Guess how un-newbie-friendly the system is. In fact, I learned such a trick just by accident, after a whole year of experience.
So stop laughing at how Windows put Windows-key tricks and the Shift-restart trick in obscure places. Often linux UI people do worse.
I have used linux at home comfortably for 2.5 years now, but I still run everything (except maybe forkbombs or make -j's or other system stress testers) as root. SU's are really inconvenient, especially if you want to edit something in/etc when your Emacs is running as a normal user --- the most convenient way is maybe to restart Emacs as root anyway. What's worse, I just don't like to make symlinks to the config files whenever I install something new so that I get consistent settings, as normal user or as root.
I hope Emacs (or whatever) will have a switch like `--can-run-as-root', so that it still runs as the normal user, but can temporarily switch to root when saving some system config files, after confirmation, but not requiring me to type the password. After all, I trust Emacs won't get things wrong just for such a sort time as root, and if it does get things wrong, accidentally erasing everything in my home directory as the normal user is worse anyway.
I remember that Alan Cox wrote a patch to deal with Hyperthreading just a few months ago. One thing it does is to avoid putting two threads on the same hyperthreaded CPU when there are spare physical CPUs, i.e., distinguish between physical and hyperthreaded CPUs.
I'm also in Shanghai. Truly cnn.com is banned, but not most other news sites. It just make English learners like myself have less to read.
Strangely *.sourceforge.net are banned at 210.52.130.126 --- seems to be the last gateway before the Pacific optic fiber. So these `firewalls' aren't doing their jobs all the time.
Frankly I don't care about politics or censorship, but I really do not want to be banned from really innocent information like software info in *.sourceforge.net, or unix humor in geocities.com. What's more, all these can be accessed from google's cache. Nothing is truly banned --- they are just making them inconvenient to access.
In fact a GUI is not too much different from a somewhat readable text configuration file (which is everything except maybe sendmail.cf). If things does not work, most of the time is spent figuring out "why it doesn't work", rather than spent in reading the configuration file format, which only a small part need to be actually read for tweaking.
Therefore I suggest the following:
1. The docs should contain something about "when things breaks, where to look at (and what to read)". When some gateway are not correctly configured, telling me where to tcpdump is more useful than giving me another GUI. Also, for each config option, try to give an example that shows the difference with and without the option, especially when the option is hard to understand.
2. Software should give better error messages. When a net admin get a cryptic "Invalid argument" (EINVAL) from route(8), how does he know whether he has mistyped the command, misunderstood its syntax, or added a route that the kernel didn't like for one of 10 different reasons?
3. Software should come with enough configuration files that should in most cases basically work. If a sys admin have to write a 30-line config file all by himself just to get "YetAnotherHTTPd" serve static pages to localhost, and add another 20 lines to make it serve CGI, he will probably try something else before getting YetAnotherHTTPd to work. What sysadmins should do is things like setting security by Copy'n'Paste'n'Uncomment, and performance tweaks.
I'm now running 2.4.18pre9mjc2 with preempt & O(1) patches. Now I'm running a crazy prime-factoring program that forks a new process to do one division. It is now niced to 19. The system is running quite smoothly. (X is niced to -10)
The only problem is that now any unniced process that does real cpu-intensive work (as opposed to interactive ones) can get only about 20% of cpu. It is just blatantly unfair to let one unniced process compete with 500+ others, even though they are niced to 19.
Of course, the programs I'm running does not take too much memory. When one run out of memory (like make -j), the system will swap like crazy, then it IS unresponsive.
When things other than strings and vectors are used, the standard C++ operators are just not enough. For example, we can have > for streams just because we have such built-in (and entirely irrelevent) operators *by sheer luck*. This is ugly. Things are even worse for mathematical stuff. There are much more math ops than C++ ops.
That's where extensible syntax like the ability of defining new operators are needed. Then overloading will no longer be a half-formed feature.
Now when I'm surfing the net, I turn off Flash (for saving CPU time mainly) and graphics from other sites than the one I'm viewing. Seems that such things will be banned since I see a lot less ads.
Then maybe someone will sue the writer of Galeon or other browsers that let me do that. Or worse, I won't have any open-source browsers any more since giving me the source means that I can modify it just by a little bit (if the program is well structured) and filter out most ads.
However, I don't have a spare machine, and running the kernel in bochs is just slow enough to make the timer interrupt handler take 100% CPU.
Is there anyone who can give me a spare 386 so that I can type "target remote /dev/ttyS0" instead of "target remote /dev/ttya0"?
And don't tell me to think before coding. If you are going to write a heap-sort program, of course you should have a clear idea on the algorithm, but it is just HARD not to make a few mistakes (like n/2 vs. (n+1)/2) in the code, especially when implementing such an algorithm for the first time.
Maybe because it is 1.3 or something like that, not 1.3.1_02.
If he wants to calculate Pi to the one-billionth digit (using Super Pi or something like that), it would be a good idea to use a 3600rpm ATA/33 drive, and then he can make the CPU a little better... (Assuming the system does not need to swap, of course)
I DO watch realistic movies, mostly old ones.
I have spent several days writing a rudimentary MMIX operating system, and found that the processor has some flaws for operating systems, and the MMMIX simulator simulates some OS-oriented operations (like cache flushing) quite terribly. Therefore I think the design should get some improvement before it is ever hardware-ized.
Because they didn't include bloody things like gcc 3.1 that will break binary compatibility (at least for C++)
During the last six months Doom II (mostly add-ons like Eternal or Hell Revealed) has almost been my sole game which I play for two hours a week in average. It is just COOL to shoot at 30~50 enemies, and to avoid twenty fireballs of various kinds, all at once. Of course, I play in Ultra Violence god mode, just with my damage counted. My computer is a PII with a Riva128 video card, so it can even run GLQuake2 like a dream, but I just don't like it (or Quake1, etc.) because (1) not enough enemies, (2) having to aim vertically is really not cool.
What a pity it does not wrap around its uptime in 498 days like my linux/x86 machine.
Probably because it does not support precompiled headers.
So I think FSF is right in giving the company a note about potential GPL violation --- just don't do real things (like firing lawsuits) before that caused any real trouble.
And the Lindows company should provide the sources, maybe with the note "This software is beta, so if it breaks, please try not to spread bad words about our company", etc.
Maybe the WiFi thing is best done in hardware, but sooner or later we will find some hardware that have parts best implemented with software that runs on the host computer (lower cost, and not very high overhead), and then what shall we linux users choose from? A $40 soft one with crappy linux support (closed-source drivers that crashes every two hours), or a $500 hard one? Or otherwise make a totally-free soft solution?
Does the ADC mix down the frequency prior to A/D conversion?
The binaries does not work for me (at least 641c). They quit silently, and I cannot find out why after several times of strace-ing.
When I tried a kernel patched by some arbitrary person (i.e., not -ac or -aa, but rather someone appearing just several times a month on lkml) so that it contains all kinds of new things like the new scheduler (which DOES help) and preempt, I found that the system was very stable after two days of desktop use. Then I decided to try `nice -n 30 make -j' PRBoom, and the system is still as responsive as ever. I was happy and posted on Slashdot about how slick it is just after the compilation ended successfully. Wanting to verify my results, I `make clean' and retried. Guess what? Solid lockup without any logs. I hit the reset button and tried the compilation again in console mode with only `top' running. 2 out of 3 times the system locked up solid, Alt-Sysrq just shows messages without doing real things.
I then rebooted and ran the kernel for another two days with constant fear that it may mysterically lock up at any minute. Luckily it didn't, and I then replaced the kernel with a -aa one, without most of the new features, but at least it is rock solid, hasn't crashed since. I think I will add the preempt (or ll) patches only after Marcelo or A.C. or A.A. incorporate it, or when I decide to do some kernel hacking.
So my advice is that try arbitrarily patched (I mean putting patches together by yourself or by someone else who did not test it extensively) kernels only in deep-kernel-hack-mode, just like when you try a kernel in which you modified several lines by yourself. After all, many of us has been spoilt by Linux's stability, and our nerves are not quite prepared for a lock-up when facing a screen with WindowMaker (rather than Win98) on it.
I'm afraid 20% of the leaks in C/C++ programs are not simple enough to be detected by garbage collectors (for example, you forget to remove an object from a global hash table, so a lot of things are magically referenced), Yet if you use garbage collection, these remaining leaks can be hard to find.
Well, I do agree that Java or Python makes development faster by not requiring the programmer to write destructors. However, garbage collection is not magic. It cannot cure all memory-leak problems.
As for ease of learning, making people write correct destructors does not make one language much more difficult --- mostly it just make the language a bit more verbose to use. Perl has garbage collection, but IMHO it is even more hellish than C++ to learn (well, it is nevertheless a good language for its purpose), because both are so hairy.
We should REALLY try to figure out how to put the "drag and middle-click" magic in the docs so that every newbie can find it. Maybe we should make a tip window containing all these things show when the user start Gnome or Kde or whatever window manager (of course the last tip should be "how to turn tips off").
A linux lover for years that don't know how to cut 'n' paste between Emacs and Mozilla! Guess how un-newbie-friendly the system is. In fact, I learned such a trick just by accident, after a whole year of experience.
So stop laughing at how Windows put Windows-key tricks and the Shift-restart trick in obscure places. Often linux UI people do worse.
I hope Emacs (or whatever) will have a switch like `--can-run-as-root', so that it still runs as the normal user, but can temporarily switch to root when saving some system config files, after confirmation, but not requiring me to type the password. After all, I trust Emacs won't get things wrong just for such a sort time as root, and if it does get things wrong, accidentally erasing everything in my home directory as the normal user is worse anyway.
I remember that Alan Cox wrote a patch to deal with Hyperthreading just a few months ago. One thing it does is to avoid putting two threads on the same hyperthreaded CPU when there are spare physical CPUs, i.e., distinguish between physical and hyperthreaded CPUs.
Is it in the test kernel?
800MHz Itanium: SPECint2000_base = 370, SPECfp2000_base=711
The P4 is a Dell Precision Workstation 340.
The Itanium is what mentioned on the intel site.
So it isn't really worthwhile to use an Itanium to run compilers or similar things.
I'm also in Shanghai. Truly cnn.com is banned, but not most other news sites. It just make English learners like myself have less to read.
Strangely *.sourceforge.net are banned at 210.52.130.126 --- seems to be the last gateway before the Pacific optic fiber. So these `firewalls' aren't doing their jobs all the time.
Frankly I don't care about politics or censorship, but I really do not want to be banned from really innocent information like software info in *.sourceforge.net, or unix humor in geocities.com. What's more, all these can be accessed from google's cache. Nothing is truly banned --- they are just making them inconvenient to access.
In fact a GUI is not too much different from a somewhat readable text configuration file (which is everything except maybe sendmail.cf). If things does not work, most of the time is spent figuring out "why it doesn't work", rather than spent in reading the configuration file format, which only a small part need to be actually read for tweaking.
Therefore I suggest the following:
1. The docs should contain something about "when things breaks, where to look at (and what to read)". When some gateway are not correctly configured, telling me where to tcpdump is more useful than giving me another GUI. Also, for each config option, try to give an example that shows the difference with and without the option, especially when the option is hard to understand.
2. Software should give better error messages. When a net admin get a cryptic "Invalid argument" (EINVAL) from route(8), how does he know whether he has mistyped the command, misunderstood its syntax, or added a route that the kernel didn't like for one of 10 different reasons?
3. Software should come with enough configuration files that should in most cases basically work. If a sys admin have to write a 30-line config file all by himself just to get "YetAnotherHTTPd" serve static pages to localhost, and add another 20 lines to make it serve CGI, he will probably try something else before getting YetAnotherHTTPd to work. What sysadmins should do is things like setting security by Copy'n'Paste'n'Uncomment, and performance tweaks.
I'm now running 2.4.18pre9mjc2 with preempt & O(1) patches. Now I'm running a crazy prime-factoring program that forks a new process to do one division. It is now niced to 19. The system is running quite smoothly. (X is niced to -10)
`uptime`:
4:06pm up 1:44, 6 users, load average: 337.62, 241.84, 115.30
My box is a plain-old PII/233.
The only problem is that now any unniced process that does real cpu-intensive work (as opposed to interactive ones) can get only about 20% of cpu. It is just blatantly unfair to let one unniced process compete with 500+ others, even though they are niced to 19.
Of course, the programs I'm running does not take too much memory. When one run out of memory (like make -j), the system will swap like crazy, then it IS unresponsive.
When things other than strings and vectors are used, the standard C++ operators are just not enough. For example, we can have > for streams just because we have such built-in (and entirely irrelevent) operators *by sheer luck*. This is ugly. Things are even worse for mathematical stuff. There are much more math ops than C++ ops.
That's where extensible syntax like the ability of defining new operators are needed. Then overloading will no longer be a half-formed feature.
Now when I'm surfing the net, I turn off Flash (for saving CPU time mainly) and graphics from other sites than the one I'm viewing. Seems that such things will be banned since I see a lot less ads.
Then maybe someone will sue the writer of Galeon or other browsers that let me do that. Or worse, I won't have any open-source browsers any more since giving me the source means that I can modify it just by a little bit (if the program is well structured) and filter out most ads.