What is Taco smoking? The business model generally suggested to make money of of Free Software is through services. This is a service that RedHat is offering. They're trying to make money for their service. Which part doesn't make sense?
I've wondered for a while, but it really seems like Taco is one of the tiny minority who's giving Free Software a bad name because he's too cheap to pay for anything.
Giving the source to software that you distribute is one thing - it's a good idea, and benefits prettymuch everyone at very little real expense to the author(s). Allowing these tools to be circulated and improved is also good as it benefits nearly everyone again at very little real expense to the author(s) (I'm not concerned with lost potential income. also, I'm talking about once the tool is written, not using a write-for-distribution-only model).
However, giving away processor time and bandwidth benefits everyone but at a high real cost to the person who's doing the giving. It's completely right for someone to ask for reimbursement in exchange for things that cost them. With GPL software, it's goodness on the part of the author to give it away, but it's also economically viable. Giving away free bandwidth is in general not economically viable and to acuse someone of doing something wrong because they're asking for money to use their service is the height of stupidity.
Without the source, you can get locked in to a vendor. Without automatic updates by redhat, you have to go and do the updates yourself from a mirror. Also, RedHat isn't prohibiting people from rolling their own service (many do), they're simply asking for money in return for what they do. They're not trying to restrict the flow of information or ideas.
Slash should institute a system whereby every editor does a writeup about the news story and we get to choose in our slashbox which ones we want to see (randomly selected from among our pool of acceptable editors). This way none of us would ever have to listen to the childish wrants of Malda. Grow up, Taco. The world doesn't owe you everything.
"You are a computer scientist, right... considering it costs nothing to make it go twice faster."
This depends on whether you're talking theoretically or practically. Of course as a practical matter you want to squeeze as much speed as you can out of your code, though this has to be balanced with other things. The exact efficiency of a loop which is going from 1-10 is basically completely irrelevant. Now for large n, if you're looking for speedups, while this would be a quick win, you'd do better to look for code with real inefficiencies (i.e. O(n^2), O(2^n), etc.).
As an example, why are you printing out n statements for large n? If you summarized, you'd have amazing speed improvements. As an example, given modern hardware and such, you'd be amazed at how much of a speed increase you can get from updating the status every 10 times through a loop rather than every time through.
In our fabricated example, print statements take up enormous amounts of time compared to modulus operators. You might get a much bigger win out of:
$t = ($n%2)?($n-1):($n);
for(0..$n) {
next if $_ % 2;
if(!$_ % 256 || $_ == $t) {
print join("\n", @list);
undef @list;
}
push(@list, $_);
}
Is actually slightly faster than the simply $i += 2 version, and twice as fast if $n is known to be a multiple of 256 and thus you can drop the || $_ == $t (by benchmarking). While this is not the most efficient version, this should illustrate that efficiency is a very tricky thing, often.
Anyhow, this is only for large n. For small n and with the optimization goal being beauty rather than CPU efficiency, I like some of the perl ways better.
"But oh, python has the same nifty feature... but I can tell you it *is* used often, where it makes sense."
Actually, I suspect that map isn't used that often because usually you can simply be consistent rather than needing to map between two things. When you can't be consistent, I suspect that it's probably a tossup between map {} and explicit for loops.
Now, it's kind of odd if you actually need this functionality in python often, because I rarely need it in perl.
"So maybe python is not such a straitjacket, um?"
Python isn't such a straightjacket because you need map{} a lot in python, or because there's no habit among python programmers to play the game of "how many substantially different ways can I write the same thing" (on slashdot, at least)? I honestly don't see what there being a map function has to do with python being a straitjacket, or that in real code people only use it where appropriate (just like perl people only use it where appropriate in *real* code).
"Also, you dare say that efficiency of code depends on syntax????? Are you nuts?"
Ok, it's quite simple. Tools are made for purposes. If you use some tool for a different purpose than it was meant, it will often not be as efficient as the appropriate tool. The range operator is meant to provide a contiguous range. Consequently it's less efficient at providing non-contiguous ranges. The c-like syntax is meant to be as flexible as possible (i.e. makes as few assumptions as possible), consequently, when you're using it for something that no other operator was optimized for, it won't have assumptions that get in your way.
"So you optimize 20% of the time, and make a nightmare of the 80% remaining."
This is just plain wrong. Reading verbose writing is no more efficient than writing it. haven't you ever read an author (in english or some other language) which took forever to get to their point? That's not efficient at all. Taking 5 lines to do what you can do in 1 is no faster to read than it is to write (everything here is assuming that you've got someone who writes clean code, not someone who takes pride in obfuscating what they're doing or just doesn't care).
As someone else said in a different thread, you wouldn't make
print reverse sort map {lc} keys %hash;
Is no more readable or maintainable if you write it out on multiple lines with intermediate variables.
"Magic $_ is not a powerful concept, it's just a shortcut making you win 1 second (and that might cost the maintenance programmer 1 hour)"
This is again just nonsense.
for (@array) { print; }
Isn't obscure because it uses $_.
for (@array) {
s/Foo/foo/g;
s/Fie/fie/g;
s/fred/john/g;
s/Greg/Gregory/g;
etc.
print;
}
Is just as readable and maintainable as
for my $tmp (@array) {
$tmp =~ s/Foo/foo/g;
$tmp =~ s/Fie/fie/g;
$tmp =~ s/fred/john/g;
$tmp =~ s/Greg/Gregory/g;
etc.
print $tmp;
}
Once you get used to the syntax of nothing being synonymous with $_, you read it just like you'd read it with a variable being there, except that you have to read fewer characters.
Also, once you get used to the language, using $_ has a slightly different feel than using a $tmp, so experienced programmers can actually use the difference in nuance to make the code more readable.
"'sys.stdout=my_object_with_write_method'... and you'll get all the print statements"
open(STDOUT, ">&FILEHANDLE") will do basically the same thing.
Now, admittedly, if you need to reformat all of the text going to wherever you want to redirect it to, this method won't work and you'd probably have to resort to something like redirecting to a pipe that leads back to the same program which then does the reformating (just off the top of my head).
To be honest, why this isn't as clean as the python method, what i'd probably do (having given it 60 seconds thought) is to redirect STDIN and STDOUT to pipes and fork off another process which then reads from and writes to these pipes, converting the input and output as appropriate. Since what you're talking about is a hack situation, I don't think that it's really that bad to answer it with a hack.
Of course, if you actually anticipate this need, just roll your own read and print functions and use them instead.
"The humain brain can handle ~7 things at a time ; I rather not overload mine with cretinuous syntaxes issues designed to save one character, and be efficient and productive."
~7, did you mean approximately, did you mean logical complement, bitwise negation? Hm. Context is important here. was ; an english punctuation mark, was it a termination-of-statement character? Context is important, too.
hell, how do I know if you're writing out a perl program or using english? is the , an argument separation character, or a syntactical pause in the sentence? Is "be" a command or is "be" a future-looking verb (in the subjunctive? -- it's been too long since I've done grammar.)
"what do you do if you spend 70% of your time reading other people's code, and maintaining it ?"
Learn to be flexible. You're going to have to be regardless of language. Python is not a magic bullet, and it's not going to make everyone use all of the standard tools properly instead of re-inventing the wheel. Python isn't going to stop people from writing convoluted code using unintuitive and inefficient algorithms.
With Perl, the maintainability problem is that you have to actually know the language to efficiently read other people's code. This is quite like a natural language - you can know very little and ask where the bathroom is, but if you want to read a novel in a foreign language, you're going to actually have to know it.
I don't consider this a problem - I've spent the time to learn Perl. I can write clean programs very quickly, and I can read other people's programs quickly. Believe me, as the perl guy around here, I have to debug everyone else's code from time to time when they get stuck. It's really not hard.
Now, I frankly dislike many of the code snippets of python that I've seen around and think that they're actually less clear than the equivalent perl code. Readability really is largely a matter of what you're used to. And if you really need everything to be formatted with precise whitespace rules, you can write a fairly simple perl script to reformat the code for you, so you never have to see the original whitespacing. There was a reason that people invented ident for C.
As for coding standards, these can never really be defined by a language. You're going to have to have the programmers agree on what libraries/packages to use, etc. To give one example of a maintainability headache: Some programmer decides that he doesn't like the agreed upon function, so he writes his own and uses his version.
No programming language is going to solve that problem.
Another huge problem: people not commenting their code. I find comment blocks which quickly give a description of what's going on in the next few lines to be extremely helpful for navigating source so that I don't have to actually read the code until I find the place that I want. Some people I know don't actually comment their code at all, or when they do, they use useless comments and don't provide the useful ones.
(Btw, it's funny when you look through python code and see comments like "# end while text" and "# end for text in lines". So what whitespace significance has achieved is that programmers have to say where blocks end, rather than having a } and an editor which will print out the line that the matching { is on.)
No language can force programmers to write useful comments, or to keep them updated. No language is going to force people to use efficient, or even sane, algorithms for what they're doing. No language is going to be able to enforce standard data storage methods, or formats. Basically, no language is going to be able to enforce (or even strongly encourage) what makes up the bulk of good coding and good coding style.
So if you spend your time reading other people's code, get used to being flexible. It's inevitable (unless you're in the happy situation of working exclusively with highly skilled programmers who never have bad days).
This is a good point. Sometimes putting a whole bunch of operations on one line describes a single thought, which is nice to have on one line. Anyhow, this reminds me of the end of Chapter 1 in Programming Perl:
print reverse sort map {lc} keys \%hash;
That takes the keys of %hash and returns them to the map function, which lowercases all the keys by applying the lc operator to each of them, and passes them to the sort function, which sorts them, and passes them to the reverse function, which reverse the order of the list elements, and passes them to the print function, which prints them.
As you can see, that's much easier to describe in Perl than in English.
"Yes, an algorithm that takes twice as long is still of the same order. However, saying that "it is not substantially less efficient" is incredibly stupid.
"
Ok, you have no real idea of proportions when it comes to efficiency, do you? The difference between n and 2n is insignificant compared to the difference between n and n^2, n^3, 2^n, or even n!, all of which are quite real execution speeds encountered in real algorithms. Yes, 2n is not substantially less efficient than n. And when you get to optimized compilers, branch prediction, speculative execution, and 4+ execution pipes, it's quite possible that the difference between n and 2n won't even be that big.
As an example,
for(i = 0; i n; i++) {
array[i]++;
}
Is going to execute in 3n time without bounds checking (2 additions, one dereference). With bounds checking, it would execute in 5n time (we've added two comparisons to each iteration). However, with modern processors, the cost of the bounds checking can be made to be virtually negligible (when you get to generate the optimized assembly). Modern processors are interesting things.
"The 'for($i = 0; $i = 10; $i += 2) { etc. }' is the perl example the original poster gave. The poster that was accused of writing crappy perl? Remember him?"
No, he was accused of writing ugly perl. That's a matter of taste, and I disagree, but the original author was talking about optimizing for textual beauty. I do like "for (0,2,4,6,8) { print; }" much better if all you're talking about is aesthetic qualities. However, in general it's better for code to be efficient hence the C-like syntax. The alternative "for (0..$n) { next if $n % 2; stuff; }" is reasonably pretty. If you don't like multiplication map {print $_ + $_ } (0..$n); is reasonably pretty, though personally I would prefer some sort of for construct. And of course you could always write something to emulate the python syntax, if you really feel like it. Perl is quite flexible this way.
"Is an example of the crappiness python programmers won't deign using."
Interesting. The part where I said, "As an aside, for another pointless alternative..." didn't give you the impression that I wasn't presenting it as a good idea?
"IF and only IF you are incredibly stupid."
What, do you think that you won't see silly stuff like this in python, especially if python ever becomes popular?
"What you are doing is python advocacy, regardless of what you prefer."
Is this your sig, or something meant to refer to me? I ask because it's at the very bottom of your post, as a sig would be, and sounds like something that could (theoretically) be a sig. I just want to make sure before responding, just in case this isn't the ad-hominin attack that it looks like.
"You like irregularity and context sensitivity..."
Yes, this is called efficiency. It has to do with the idea that computers are tools and meant to conserve human time.
"...and you seem to think that the unreadability of mathematics somehow validates the unreadability of Perl"
In the sense that both are hard to read by people who don't know the language and problem space, yes. Math works quite well while being obscure to novices, as does perl. Of course, just as there's baby math, there's baby Perl, and both are quite useful, too. The analogy is actually pretty good. They're both powerful tools to get a lot of work done.
"You'd have to waste all that brain space that you currently use to store the 15 different ways to print to stdout remembering things like the most efficient algorithms and data structures for a given coding problem."
Wow, you actually memorize algorithms rather than putting them into a library or having a reference implementation? This explains why you're using python. Intelligent people actually try to make use of the resources available to them, like packages and copy-and-paste functions. As well, we tend to keep reference books handy.
As for the "fifteen ways to print to stdout", you can use print, printf, write, and syswrite (I'm not counting silly stuff like system("echo $real_message"), or `printf "$real_message\n"`). First off, that's 4 rather than fifteen, but they're also just the methods of writing to a file handle which also happen to work for standard out. Does python really only have one way to write data to a filehandle? It's even stupider than I thought.
"Those of us who are 'too stupid to understand Perl' will try to get by without you. (snicker)"
Don't worry, it won't be difficult. There are all sorts of programs to help people like you. A friend of mine worked in a very nice summer camp called "Clover Patch" and they'll be happy to help you when you take your clothes off during dinner because you confused that context with the context of showering.
I'm curious, though. With your difficulties in dealing with multiple contexts, how do you manage to speak english? And wouldn't you like esperanto better since there are no irregular verbs or nouns in esperanto? Really, with your love of mindless consistency, one would think that you'd have made the switch a while ago.
With pleasure. I dislike working with completely inflexible people.
"And I'ld also like to hear how much you opinions on this topic change after you've spent a year or so maintaining someone else's code."
My opinion that people should write good, clean code, but should also be able to use their own definition of good and clean won't change, I can assure you. Sure, everyone standardizing on one coding style would be nice, just like everyone using English and everyone having the same religion would be nice. But when you get down to it, after we've each killed each other because we can't agree on the coding style, very little code will get written. Consequently, let's agree to disagree and not work on the same project as we've already agreed to.
"[various stuff about consistency]"
Of course projects should be consistent, and people should write good code. I never argued any other way. I just argue that people should be able to quit a project and find one that they like better. With python, that isn't nearly as much of an option. You don't have much choice in how you code or what your code looks like. Maybe I like code that guido van rossum would hate. Should I therefore not be allowed to have my own project?
"And it's because of people like you, who value programming freedom more than ease of maintenance. Or, in other words, freedom to create more than freedom to modify."
Good code should be relatively easy to maintain. I don't think that any sane person would argue otherwise. On the other hand, it's kind of silly to say that one's code should be an absolute bitch to write so that it can also be an absolute bitch to maintain, but at least equally bad in both cases. I'd much rather have code that's easy to write and to maintain.
"When all I did was create code, I used Perl. Now that I've grown up (only a little, or I wouldn't bother to reply to this post), I find myself using other people's code more, and thus I greatly appreciate a language that doesn't go out of its way to be hard to read."
Perl doesn't go out of its way to be hard to read. Perl goes out of its way to be easy to write. If you know perl, it's also easy to read. However, it must be noted that since Perl is much more popular than python is, Perl also has far more incompetant programmers than python does, and not just in proportion. Why are there fewer completely incompetent people using linux? It's not because of magical qualities of linux - right now there are selective factors which weed out the technically incompetent. These factors will eventually go away and the balance will be restored.
So too with python. Eventually it will get popular enough that people who don't know how to program will start learning with production python code and debugging your average python script will be as bad as debugging your average perl script. C++ is a good example of this in languages.
"One of the best arguments for using Perl I've ever heard was 'Perl forces you to program with good style, Python merely doesn't allow you to program with bad style.' Or, it would be an argument for using Perl if I thought that people didn't suck. Since they do, it's an argument for using Python."
Now we come to our fundamental difference: you think people are idiots and can't be trusted with their own code and I don't. You are, of course, free to hold your opinion. Just please be honest about it. Don't talk about Python being a cleaner language, talk about Perl letting people be the idiots that they naturally are. Btw, do you think that the rest of the python community are as misanthropic and elitist as you are? That's one of the best parts of the perl community - it tends to be made up of nice people.
>> Who wants to trust an interpreter which doesn't trust them?
(A) I didn't say that popular == good. I said that popular == popular. Now, if you want to get to goodness, it's rather difficult to decide because they're functionally equivalent. I would say, though, that python's avoidance of punctuation simply makes life more difficult in parsing python as you have to read it to know what part you're in.
(B) I never claimed that a loop evaluated with %n in front of it is as efficient as a loop executed the correct number of times, though bear in mind that they're both O(n), so even if someone went with that bizarre method, it still wouldn't be substantially less efficient.
I would simply do
for($i = 0; $i = 10; $i += 2) { etc. }
Which is functionally equivalent, takes only slightly more typing, and doesn't involve some bizarre range function.
As an aside, for another pointless alternative, you could do
for (map {$_ *= 2} 0..5) { etc. }
Why you would do it this way, I don't know, but I rarely use the map function so it's neat to see it in use.
My god, you're stupid. Religion is not the cause of all evil, money is. (If you want to get technical, there probably isn't a single unified root cause of all evil, but money (i.e. limited resources) in the face of greed is one of them.)
Go back throughout history, just think of the stagoring number of people who have been killed because of money. (Also, prettymuch all slavery can be lopped into this category, too.)
Now, take a look at a related issue: power. If there is anything that has generated more war and death, it's the desire for power. Of course, power is often very related to money.
Now just look at a few cases: The Roman Empire. The Persian Empire. Hey, in point of fact, pretty much every empire that ever existed. They all were about money and power.
And when you get down to it, much of the crusades was about money and power too. Religion was a nice excuse, though.
Let's get a bit more modern: WWI? About power and money. WWII? About power and money.
Korea? Vietnam? That was about the evils of the russians getting too much power. let's see, were the McCarthy inquisitions about religion? No, I seem to recall that they were about being communist sympathisers.
And are all of the brutal supressions of political groups in China about religion? No, they're about political power.
Stalin killed over 50 million people and he was an atheist. (Many of those people were actually killed in the name of atheism.)
If you consider abortion to be murder, _very_ few fetuses are killed in the name of religion.
People in Afrika don't die for lack of drugs becuase the pharmaceutical companies have religious problems with selling them drugs at affordable prices. Very few people starve to death because the people around them have religious problems with selling/giving them food.
So, to sum up, you might want to actually look at history when you make comments about it. Parading your own problems about as if everyone is equally hung up about them really isn't a very good public speaking strategy. Of course, being a militant atheist, you probably do see this issue as being of prime importance. Still, you might want to remember that there are people who actually study history, so if you're going to use utter fabrications as your arguments, put some statistics in them. It has been shown that people are 60% more likely to believe an argument that has false statistics in it than one that has no statistics in it at all.
Ok, so you like the python way of doing loops better than the perl way. I like the perl way better. So far, all either of us has offered is personal opinion. The thing is, you're on crack if you think that your opinion is universal, considering that it's not in C, C++, Java, or Perl, all of which are individually much more popular than python and collectively make python look like a spec of dust.
Second, did you write your "10,000" lines of perl in a complete vacume? You've never ehard of nor seen "use strict;" which will generally speaking catch misspelling errors? Btw, the html lines in here documents don't count when you're doing line counts of your perl programs.
Btw, your basic argument above is that you're a bad coder and only occasionally stumble onto good coding style, so python's bondage and discipline style is good for you because it doesn't let you write the horrible code that you naturally do. Ok, well since you've identified yourself as incompetent programmer, why exactly is what you say of any value? You stated at the beginning that you don't program well. Is your advocacy just for bad programmers, then?
Detail: modding by powers of 2 is implementable as a bitwise AND, which is damn near close to the most efficient thing that you can do on your computer.
Mathematical proofs are only sometimes clean and elegant, and they're virtually never comprehensible by someone who isn't a mathematician in the same field (unless you're talking about very basic proofs). Mathematical proofs are one of the most obscure pieces of language that you'll find on earth, not one of the clearest, as long as you're talking about people who aren't completely fluent.
Anyhow, I don't use python for two reasons:
1. Perl can do anything that python can with about as much ease (minus the facts that they each have a few minor strengths and weaknesses that the other is better or worse at)
2. The general arguments in favor of python come in the form of either
(a)I'm too stupid to understand perl so python is better
(b)I just like python better because it's so regular
Well, I like perl so much because it's irregular. As larry wall once said, "Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. "Similarly, Perl was designed to be a mess (though in the nicest of possible ways)."
I always find it kind of funny when people talk about coding in natural language, since perl is in many ways quite like a natural language. For one thing, it's gone through a sort of huffman-coding: the stuff you use a lot is short and easy to use. Also, the same character or groups of characters can mean different things in different contexts. This is another piece of efficiency as in general it means that you can use the shorter stuff more often, and have to remember fewer symbols.
The great part about perl is that it is a language in a very real sense. It is quite irregular, but quite usefully irregular. And the best part is that it has no hangups about being irregular when it would be useful to do so. That's why, I think, so many people find perl to be so fun. It was designed to make the easy stuff easy and the hard stuff possible, not to make Guido Van Rossum happy if he looks at your code.
And that, I think, is the reason that I'll do my best to never use python - I don't like people telling me how to do things. One of the fundamentals of python is that it enforces Guido's coding style as much as possible. That's just not a friendly environment. Who wants to trust an interpreter which doesn't trust them?
restricting .org is great, but to corps is extreme
on
VeriSign Usurps .com
·
· Score: 1
I think that it's great that.org will once again mean something, but restricting it to registered corporations is a bit extreme, I think. True, it's an easy test for sincerity on the part of the registrant, but I think that there should be some way for people to have domains for non-profit organizations that haven't gone through the expense (however small) of forming a US non-profit corporation.
The MS EULA is an attempt to establish a license to use the software. The GPL is only a license to redistribute the software.
From the GPL:
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
So basically, if the GPL is struck down (which doesn't seem to mean much), all that happens is normal copyright ensues and noone can redistribute the program at all.
There is no chance that a GPL'd program would ever fall into public domain except for it being placed there by the copyright holder or the copyright on it expiring.
A EULA, by contrast, is an attempt to add extra terms and agreements to the use of the software that do not "naturally" exist without the EULA.
So to sum up:
A MS EULA takes away rights that you previously had.
A GPL gives you rights that you previously didn't have.
The BSD people simply complain because they think that the GPL doesn't give you enough rights that you didn't have before.
Note: rights here is used in a legal sense, not a moral/ethical sense.
"You completely disregard any good Microsoft may have done, in your zealotry. Like it or not, Microsoft has made positive contributions to computing."
Some examples, please?
Is it there anti-standards drive or are you talking about things like their keyboard?
Well, let me take a step back, here. Yes, IE5 is actually a reasonably decent product in that it actually complies with some relevant standards. However, this isn't to say that IE is a good product in the sense that the world is better for its existence.
So what actions have microsoft have actually resulted in a world that is better off for microsoft having done them?
"Out of curiosity, do you call someone being less-than-glowing about Linux being biased"
That entirely depends on their reasons. If their reasons have little to do with the (relative?) quality of linux, then yes, they're biased. If their reasons are technical or germane to the topic, then no, they're not biased.
My point was that to come to a conclusion and then use that as a presupposition for further discussion is not to be biased when your conclusions were rationally and validly concluded.
CNN doesn't talk about the "aleged president".
Essentially, to be biased is to disregard facts in an argument for reasons of personal gain or benefit (or emotional admiration). Now, a fact is (among other definitions) any statement to which a reasonable person would agree. My claim is essentially that any reasonable person would agree to the statement that Microsoft is bad.
Now, to prove the contrary, you have to demonstrate that Microsoft has provided more benefit to the world than it has damage. I'm not planning to hold my breath until I see you accomplish that.
Actually, a good game seems to be more like hit or miss. Granted, most modern games are several orders of magnitude prettier than games used to be, but they're not really any better than they used to be.
You occasionally get a really good game that comes out, but in general modern games are no better than older games.
What's needed for a game to be good is for there to be a core game which is fun to play. having nice graphics on top of that is very, very good, but when you get down to it, a good game is still fun no matter what the graphics are.
Look at how many people enjoy card games.
The real question is will someone come up with a good game and give it away. Take spellcast, for example. It's quite fun but the graphics are utterly pathetic. And gltron is an example of open source with nice graphics.
Oh, there is a difference between being unbaised and absurd. To talk about microsoft as being something other than bad is absurd. It's a known (legal) fact that they are anti-competetive, and anyone who's worked in the computer industry can testify as to how much damage they've wreaked on the world. Out of curiosity, do you call a reporter being less-than-glowing about Charles Manson adopting a child being baised?
"Yes, this is not a real benchmark. But at least it shows some evidence."
I.e. Yes, it is not valid to draw conclusions from, but I'm going to do it anyway?
Hint: Fake Benchmarks = spurious results (spurious means doubtful or unreliable).
Trusting them is bad.
Allow me to demontrate:
I will use the following non-scientific perl code to benchmark:
my $i;
if(`uname -r` =~/bsd/i) {
for($j = 0; $j 100;
}
print "The result is $i!\n";
}
if(`uname -r` =~/linux/i) {
print "The result is some big number!\n";
}
Then I time that under linux and *bsd. Strangely, it goes much, much faster under linux. Sure, I've never claimed that it's a good benchmark, but at least it does show some evidence that linux is better than *bsd.
You'd think that people would be familiar enough with science that bad methods completely invalidate your data. (It stems from the fact that to be ignorant is better than to be wrong.)
Machines dedicated to a specific purpose can just boot up and work. What we have are *general purpose* computers. They can do more than one thing. They are complex.
Now, if what you want is ease of use, set up a linux box for your secretary to just boot a word processor and nothing else. It will all go pretty easily.
Want flexibility? Complexity is the price that you pay. This is unavoidable.
Btw, if the operating system could automatically fix problems, it would. Do you think that linux punts problems to the user because it doesn't feel like bothering? unrecoverable problems are just that - you can't recover from them. It's kind of like expecting people who have been shot to heal themselves without a doctor. The doctor is needed precisely because they can't.
Oh, and please come up with some better analogy than a car. A car allows you precisely four functions:
-Turn the front wheels left
-Turn the front wheels right
-Turn the drive shaft faster
-Switch gears (front, park, reverse are the only common ones)
Do you want a computer that allows you to do four things? It will be as simple as a car. Do you want a computer that allows you to do the 10,000 things that a modern computer allows you to do? It will be more complex.
Tools are made to be used, not to be learned. That's why we have a specific brand of tools called training tools.
Here, let's go for an analogy - what martial art is going to win in a fight? Punching wildly (easy to learn, just start flailing and you've got it), or Aikido?
Computers are tools, but they are complex tools. A lawn mower is simple because it's job is simple. There never were lawn mowers with 300 buttons and 200 levers that required years to master. A car never required weeks of training to get the hang of. That should tell you something.
What exactly is the other system? let everyone do everything and be happy about that?
What about murderers? They might well be following their own philosophical thoughts (e.g. every ethnic cleanser you want to name). At some point, one has to impose one's morality on others, if in no other way than the morality that you shouldn't be killed.
Once you've opened that door, it's a very slippery slope to imposing all of your morality on others. Where exactly does one stop? One common consensus is that people have the right to do anything that they want as long as noone else is affected, and this is reasonable as a principle of law, at least.
However, the catholic church is not primarily concerned with how to survive this world as pleasantly as possible, but with how to be perfect (in theory, assume standard disclaimer of fallible human beings here). As such, they have explored what perfection means in a variety of cases, and pornography isn't perfect, or leading to perfection.
Is it vaguely reasonable to expect them to use their resources to promote something that goes agains their *philosophical thoughts*?
Remember, these are the catholics, not the baptists, not the born-again tradition of the american south. The catholic church has a long and rich history of philosophers (as well as nearly everything else, too).
Of course, heaven/hell as reward/punnishment is pretty commonly told to children, but then again, you'll find precious few people who don't treat children on a reward/punnishment system. You might want to investigate what real catholic theology is before condmening the version of it common among children and the uneducated.
And if you want to belittle some system, just look at what happens to it in the hands of the uneducated (or the proud or the powerful). There is not, nor ever has been, a system of thought or religion which was shared by more than a few people which has not been corrupted by some (or at times most) of its followers.
If you consider that, and look at real catholic doctrine and philosophy, blocking pornography is a pretty natural, rational course of action. Well, unless you are an anarchist. of course, at that point, nothing is rational, so there's nothing special about the catholic church's actions in this case.
Ok, which murderes are you descended from? America - killed the indians for no good reason. Brittain - India. France - South America. Portugal - South America. Italy - The knwon world 1700+ years ago. Russia? - Killed 50 million people while being communist and might be going back. China - kills anyone who might think of disagreeing with the government. The list goes on and on.
If you are part of a group with a long history, it's prettymuch guaranteed to be one that involves bloodshed or at least opression and exploitation.
Btw, do you think that the US government should pack it in because of the McCarthy era? Should every person who commits a crime pack it in either through honorable suicide or the gas chamber?
Have you never made a mistake? If you have, it's time to pack it in. I'll expect your bloody entrails all over your keyboard in 10 minutes.
What, going to forgive yourself for your mistakes? What a strange thought. Perhaps it might cross your mind to apply the same principle to others. Sure it might not be convenient, but intellectual honesty can be that way at times.
Oh, if you go back 500+ years, the world in general was a much more violent place than it is in the USA today. Torture was a pretty common thing. If you don't believe me, check out what the justice system was like back then.
Besides, if you don't know that the inquisition quickly turned into (if it ever began differently) an attempt by people to get revenge on their enemeies and grab wealth. It was a mostly secular affair, with a bit of religious infuence.
So when you get down to it, landowners are the real problem. I guess that they're the ones who should pack it in. I hope you rent.
BogoMIPS (Bogus MIPS) are usually little more than an integer multiple of the clock speed of the chip. The reason is that BogoMIPS is simply a timing loop. There are certain times when it's faster to simple do nops for a while than it is to switch to other useful work and back again. In order to get the delays as efficient as possible, linux computes how long a nop (No OPeration) takes, though in an expanded form. Since virtually all computers can executes nops at their full theoretical speed (i.e. popping out 1/cycle on every pipe), you get roughly an integer multiple of the clock speed. 2 pipes, you get 2x clock speed. Three pipes, 3x clock speed. Etc.
The reason for this is that a nop has no dependencies, so finishing it off requires no dependency checking or cache flushing. Predictive branching is absolutely minimal within the bogoMIPS algorithm from what I gather.
I don't know who gave you the idea that bogoMIPS are a useful indication of system or platform performance, but it simply isn't true. Real life code tends to be very complex with a lot of dependencies, so things like branch prediction and instruction reordering and such play more of a role in real system performance than simple MHz does, though in general there is a linear relationship between MHz and performance, given the same architecture. If you want more meaningful numbers, the SPEC numbers are reasonably good, but bear in mind the old saying, "Disraeli was pretty close: actually, there are Lies, Damn lies, Statistics, Benchmarks, and Delivery dates."
These people are working in what seems to be a real pathological case. Compiling with glibc 2.0 headers then linking against glibc 2.1. This is so far from the common case as to be genuinely inconsequential. Moreover, static linking will generally work as long as you're using standard calls. CD players will not work accross driver versions, generally, but this isn't much of an issue.
Moreover, they're trying to do all sorts of black magic (calling two implementations of the same function simultaneously), providing an odd sort of thing which people can compile against, etc.
He stated himself that his program depends on the implementation of read(). This is inherently wrong behavior, as it is specific to the implementation of read(). It's not fair to start using someone's code in ways that it was never meant to be used and then complain that normal development breaks their bizzarre program (library?).
Moreover, they're releasing binary-only modules that users are supposed to link against which depend heavily on the specific implementation of libc and then expect this to work accross different versions of libc. Give me a break. It's nearly as bad as providing binary patches against someone's program and then complaining that the next version of the program breaks the binary patches.
Who cares? libc was never meant to be portable accross versions during compiles. This isn't a necessary feature for any sane case. Compile and be done with it.
Have you never heard of LD_LIBRARY_PATH? If you really need a specific version of a library, ship with it. Have the users run a wrapper script that sets all this stuff up, then executes your binary. LD_PRELOAD might also be necessary.
Unix allows a person to run a particular program in nearly its own environment. If you're that environment specific, take advantage of this. It is there for a reason.
As for libc, are you claiming that fprintf(stderr, "foo",...); won't work in binaries that are run against a different libc, or are you claiming something about the symbol _IO_stderr? Moreover, what system call stuff are you using that changes from linux version to linux version?
Besides, wtf are you doing that a change in the execution path of read() matters greatly? Whatever it is obviously violates the idea that you're supposed to not care how a library function is implementedm just care that it does what you want. What on earth is it? I can't think of any legitimate reaason to program this way, so I'm curious. What are you doing that this is an issue?
What is Taco smoking? The business model generally suggested to make money of of Free Software is through services. This is a service that RedHat is offering. They're trying to make money for their service. Which part doesn't make sense?
I've wondered for a while, but it really seems like Taco is one of the tiny minority who's giving Free Software a bad name because he's too cheap to pay for anything.
Giving the source to software that you distribute is one thing - it's a good idea, and benefits prettymuch everyone at very little real expense to the author(s). Allowing these tools to be circulated and improved is also good as it benefits nearly everyone again at very little real expense to the author(s) (I'm not concerned with lost potential income. also, I'm talking about once the tool is written, not using a write-for-distribution-only model).
However, giving away processor time and bandwidth benefits everyone but at a high real cost to the person who's doing the giving. It's completely right for someone to ask for reimbursement in exchange for things that cost them. With GPL software, it's goodness on the part of the author to give it away, but it's also economically viable. Giving away free bandwidth is in general not economically viable and to acuse someone of doing something wrong because they're asking for money to use their service is the height of stupidity.
Without the source, you can get locked in to a vendor. Without automatic updates by redhat, you have to go and do the updates yourself from a mirror. Also, RedHat isn't prohibiting people from rolling their own service (many do), they're simply asking for money in return for what they do. They're not trying to restrict the flow of information or ideas.
Slash should institute a system whereby every editor does a writeup about the news story and we get to choose in our slashbox which ones we want to see (randomly selected from among our pool of acceptable editors). This way none of us would ever have to listen to the childish wrants of Malda. Grow up, Taco. The world doesn't owe you everything.
So writing in a (true) RISC assembly is guaranteed to produce the most bug-free code?
No, better yet, the perfect code would be written in assembly on the 1-op-code CPU, right?
Complexity isn't evil. It really isn't.
And why are you speaking english rather than esperanto, since english is much more complicated and irregular than esperanto?
"You are a computer scientist, right ... considering it costs nothing to make it go twice faster."
This depends on whether you're talking theoretically or practically. Of course as a practical matter you want to squeeze as much speed as you can out of your code, though this has to be balanced with other things. The exact efficiency of a loop which is going from 1-10 is basically completely irrelevant. Now for large n, if you're looking for speedups, while this would be a quick win, you'd do better to look for code with real inefficiencies (i.e. O(n^2), O(2^n), etc.).
As an example, why are you printing out n statements for large n? If you summarized, you'd have amazing speed improvements. As an example, given modern hardware and such, you'd be amazed at how much of a speed increase you can get from updating the status every 10 times through a loop rather than every time through.
In our fabricated example, print statements take up enormous amounts of time compared to modulus operators. You might get a much bigger win out of:
$t = ($n%2)?($n-1):($n);
for(0..$n) {
next if $_ % 2;
if(!$_ % 256 || $_ == $t) {
print join("\n", @list);
undef @list;
}
push(@list, $_);
}
Is actually slightly faster than the simply $i += 2 version, and twice as fast if $n is known to be a multiple of 256 and thus you can drop the || $_ == $t (by benchmarking). While this is not the most efficient version, this should illustrate that efficiency is a very tricky thing, often.
Anyhow, this is only for large n. For small n and with the optimization goal being beauty rather than CPU efficiency, I like some of the perl ways better.
"But oh, python has the same nifty feature... but I can tell you it *is* used often, where it makes sense."
Actually, I suspect that map isn't used that often because usually you can simply be consistent rather than needing to map between two things. When you can't be consistent, I suspect that it's probably a tossup between map {} and explicit for loops.
Now, it's kind of odd if you actually need this functionality in python often, because I rarely need it in perl.
"So maybe python is not such a straitjacket, um?"
Python isn't such a straightjacket because you need map{} a lot in python, or because there's no habit among python programmers to play the game of "how many substantially different ways can I write the same thing" (on slashdot, at least)? I honestly don't see what there being a map function has to do with python being a straitjacket, or that in real code people only use it where appropriate (just like perl people only use it where appropriate in *real* code).
"Also, you dare say that efficiency of code depends on syntax????? Are you nuts?"
Ok, it's quite simple. Tools are made for purposes. If you use some tool for a different purpose than it was meant, it will often not be as efficient as the appropriate tool. The range operator is meant to provide a contiguous range. Consequently it's less efficient at providing non-contiguous ranges. The c-like syntax is meant to be as flexible as possible (i.e. makes as few assumptions as possible), consequently, when you're using it for something that no other operator was optimized for, it won't have assumptions that get in your way.
"It is not ad hominem"
"So you optimize 20% of the time, and make a nightmare of the 80% remaining."
... and you'll get all the print statements"
This is just plain wrong. Reading verbose writing is no more efficient than writing it. haven't you ever read an author (in english or some other language) which took forever to get to their point? That's not efficient at all. Taking 5 lines to do what you can do in 1 is no faster to read than it is to write (everything here is assuming that you've got someone who writes clean code, not someone who takes pride in obfuscating what they're doing or just doesn't care).
As someone else said in a different thread, you wouldn't make
print reverse sort map {lc} keys %hash;
Is no more readable or maintainable if you write it out on multiple lines with intermediate variables.
"Magic $_ is not a powerful concept, it's just a shortcut making you win 1 second (and that might cost the maintenance programmer 1 hour)"
This is again just nonsense.
for (@array) { print; }
Isn't obscure because it uses $_.
for (@array) {
s/Foo/foo/g;
s/Fie/fie/g;
s/fred/john/g;
s/Greg/Gregory/g;
etc.
print;
}
Is just as readable and maintainable as
for my $tmp (@array) {
$tmp =~ s/Foo/foo/g;
$tmp =~ s/Fie/fie/g;
$tmp =~ s/fred/john/g;
$tmp =~ s/Greg/Gregory/g;
etc.
print $tmp;
}
Once you get used to the syntax of nothing being synonymous with $_, you read it just like you'd read it with a variable being there, except that you have to read fewer characters.
Also, once you get used to the language, using $_ has a slightly different feel than using a $tmp, so experienced programmers can actually use the difference in nuance to make the code more readable.
"'sys.stdout=my_object_with_write_method'
open(STDOUT, ">&FILEHANDLE") will do basically the same thing.
Now, admittedly, if you need to reformat all of the text going to wherever you want to redirect it to, this method won't work and you'd probably have to resort to something like redirecting to a pipe that leads back to the same program which then does the reformating (just off the top of my head).
To be honest, why this isn't as clean as the python method, what i'd probably do (having given it 60 seconds thought) is to redirect STDIN and STDOUT to pipes and fork off another process which then reads from and writes to these pipes, converting the input and output as appropriate. Since what you're talking about is a hack situation, I don't think that it's really that bad to answer it with a hack.
Of course, if you actually anticipate this need, just roll your own read and print functions and use them instead.
"The humain brain can handle ~7 things at a time ; I rather not overload mine with cretinuous syntaxes issues designed to save one character, and be efficient and productive."
~7, did you mean approximately, did you mean logical complement, bitwise negation? Hm. Context is important here. was ; an english punctuation mark, was it a termination-of-statement character? Context is important, too.
hell, how do I know if you're writing out a perl program or using english? is the , an argument separation character, or a syntactical pause in the sentence? Is "be" a command or is "be" a future-looking verb (in the subjunctive? -- it's been too long since I've done grammar.)
"what do you do if you spend 70% of your time reading other people's code, and maintaining it ?"
Learn to be flexible. You're going to have to be regardless of language. Python is not a magic bullet, and it's not going to make everyone use all of the standard tools properly instead of re-inventing the wheel. Python isn't going to stop people from writing convoluted code using unintuitive and inefficient algorithms.
With Perl, the maintainability problem is that you have to actually know the language to efficiently read other people's code. This is quite like a natural language - you can know very little and ask where the bathroom is, but if you want to read a novel in a foreign language, you're going to actually have to know it.
I don't consider this a problem - I've spent the time to learn Perl. I can write clean programs very quickly, and I can read other people's programs quickly. Believe me, as the perl guy around here, I have to debug everyone else's code from time to time when they get stuck. It's really not hard.
Now, I frankly dislike many of the code snippets of python that I've seen around and think that they're actually less clear than the equivalent perl code. Readability really is largely a matter of what you're used to. And if you really need everything to be formatted with precise whitespace rules, you can write a fairly simple perl script to reformat the code for you, so you never have to see the original whitespacing. There was a reason that people invented ident for C.
As for coding standards, these can never really be defined by a language. You're going to have to have the programmers agree on what libraries/packages to use, etc. To give one example of a maintainability headache: Some programmer decides that he doesn't like the agreed upon function, so he writes his own and uses his version.
No programming language is going to solve that problem.
Another huge problem: people not commenting their code. I find comment blocks which quickly give a description of what's going on in the next few lines to be extremely helpful for navigating source so that I don't have to actually read the code until I find the place that I want. Some people I know don't actually comment their code at all, or when they do, they use useless comments and don't provide the useful ones.
(Btw, it's funny when you look through python code and see comments like "# end while text" and "# end for text in lines". So what whitespace significance has achieved is that programmers have to say where blocks end, rather than having a } and an editor which will print out the line that the matching { is on.)
No language can force programmers to write useful comments, or to keep them updated. No language is going to force people to use efficient, or even sane, algorithms for what they're doing. No language is going to be able to enforce standard data storage methods, or formats. Basically, no language is going to be able to enforce (or even strongly encourage) what makes up the bulk of good coding and good coding style.
So if you spend your time reading other people's code, get used to being flexible. It's inevitable (unless you're in the happy situation of working exclusively with highly skilled programmers who never have bad days).
This is a good point. Sometimes putting a whole bunch of operations on one line describes a single thought, which is nice to have on one line. Anyhow, this reminds me of the end of Chapter 1 in Programming Perl:
print reverse sort map {lc} keys \%hash;
That takes the keys of %hash and returns them to the map function, which lowercases all the keys by applying the lc operator to each of them, and passes them to the sort function, which sorts them, and passes them to the reverse function, which reverse the order of the list elements, and passes them to the print function, which prints them.
As you can see, that's much easier to describe in Perl than in English.
"Yes, an algorithm that takes twice as long is still of the same order. However, saying that "it is not substantially less efficient" is incredibly stupid.
"
Ok, you have no real idea of proportions when it comes to efficiency, do you? The difference between n and 2n is insignificant compared to the difference between n and n^2, n^3, 2^n, or even n!, all of which are quite real execution speeds encountered in real algorithms. Yes, 2n is not substantially less efficient than n. And when you get to optimized compilers, branch prediction, speculative execution, and 4+ execution pipes, it's quite possible that the difference between n and 2n won't even be that big.
As an example,
for(i = 0; i n; i++) {
array[i]++;
}
Is going to execute in 3n time without bounds checking (2 additions, one dereference). With bounds checking, it would execute in 5n time (we've added two comparisons to each iteration). However, with modern processors, the cost of the bounds checking can be made to be virtually negligible (when you get to generate the optimized assembly). Modern processors are interesting things.
"The 'for($i = 0; $i = 10; $i += 2) { etc. }' is the perl example the original poster gave. The poster that was accused of writing crappy perl? Remember him?"
No, he was accused of writing ugly perl. That's a matter of taste, and I disagree, but the original author was talking about optimizing for textual beauty. I do like "for (0,2,4,6,8) { print; }" much better if all you're talking about is aesthetic qualities. However, in general it's better for code to be efficient hence the C-like syntax. The alternative "for (0..$n) { next if $n % 2; stuff; }" is reasonably pretty. If you don't like multiplication map {print $_ + $_ } (0..$n); is reasonably pretty, though personally I would prefer some sort of for construct. And of course you could always write something to emulate the python syntax, if you really feel like it. Perl is quite flexible this way.
"Is an example of the crappiness python programmers won't deign using."
Interesting. The part where I said, "As an aside, for another pointless alternative..." didn't give you the impression that I wasn't presenting it as a good idea?
"IF and only IF you are incredibly stupid."
What, do you think that you won't see silly stuff like this in python, especially if python ever becomes popular?
"What you are doing is python advocacy, regardless of what you prefer."
Is this your sig, or something meant to refer to me? I ask because it's at the very bottom of your post, as a sig would be, and sounds like something that could (theoretically) be a sig. I just want to make sure before responding, just in case this isn't the ad-hominin attack that it looks like.
"You like irregularity and context sensitivity..."
Yes, this is called efficiency. It has to do with the idea that computers are tools and meant to conserve human time.
"...and you seem to think that the unreadability of mathematics somehow validates the unreadability of Perl"
In the sense that both are hard to read by people who don't know the language and problem space, yes. Math works quite well while being obscure to novices, as does perl. Of course, just as there's baby math, there's baby Perl, and both are quite useful, too. The analogy is actually pretty good. They're both powerful tools to get a lot of work done.
"You'd have to waste all that brain space that you currently use to store the 15 different ways to print to stdout remembering things like the most efficient algorithms and data structures for a given coding problem."
Wow, you actually memorize algorithms rather than putting them into a library or having a reference implementation? This explains why you're using python. Intelligent people actually try to make use of the resources available to them, like packages and copy-and-paste functions. As well, we tend to keep reference books handy.
As for the "fifteen ways to print to stdout", you can use print, printf, write, and syswrite (I'm not counting silly stuff like system("echo $real_message"), or `printf "$real_message\n"`). First off, that's 4 rather than fifteen, but they're also just the methods of writing to a file handle which also happen to work for standard out. Does python really only have one way to write data to a filehandle? It's even stupider than I thought.
"Those of us who are 'too stupid to understand Perl' will try to get by without you. (snicker)"
Don't worry, it won't be difficult. There are all sorts of programs to help people like you. A friend of mine worked in a very nice summer camp called "Clover Patch" and they'll be happy to help you when you take your clothes off during dinner because you confused that context with the context of showering.
I'm curious, though. With your difficulties in dealing with multiple contexts, how do you manage to speak english? And wouldn't you like esperanto better since there are no irregular verbs or nouns in esperanto? Really, with your love of mindless consistency, one would think that you'd have made the switch a while ago.
"Remind me never to work with you."
With pleasure. I dislike working with completely inflexible people.
"And I'ld also like to hear how much you opinions on this topic change after you've spent a year or so maintaining someone else's code."
My opinion that people should write good, clean code, but should also be able to use their own definition of good and clean won't change, I can assure you. Sure, everyone standardizing on one coding style would be nice, just like everyone using English and everyone having the same religion would be nice. But when you get down to it, after we've each killed each other because we can't agree on the coding style, very little code will get written. Consequently, let's agree to disagree and not work on the same project as we've already agreed to.
"[various stuff about consistency]"
Of course projects should be consistent, and people should write good code. I never argued any other way. I just argue that people should be able to quit a project and find one that they like better. With python, that isn't nearly as much of an option. You don't have much choice in how you code or what your code looks like. Maybe I like code that guido van rossum would hate. Should I therefore not be allowed to have my own project?
"And it's because of people like you, who value programming freedom more than ease of maintenance. Or, in other words, freedom to create more than freedom to modify."
Good code should be relatively easy to maintain. I don't think that any sane person would argue otherwise. On the other hand, it's kind of silly to say that one's code should be an absolute bitch to write so that it can also be an absolute bitch to maintain, but at least equally bad in both cases. I'd much rather have code that's easy to write and to maintain.
"When all I did was create code, I used Perl. Now that I've grown up (only a little, or I wouldn't bother to reply to this post), I find myself using other people's code more, and thus I greatly appreciate a language that doesn't go out of its way to be hard to read."
Perl doesn't go out of its way to be hard to read. Perl goes out of its way to be easy to write. If you know perl, it's also easy to read. However, it must be noted that since Perl is much more popular than python is, Perl also has far more incompetant programmers than python does, and not just in proportion. Why are there fewer completely incompetent people using linux? It's not because of magical qualities of linux - right now there are selective factors which weed out the technically incompetent. These factors will eventually go away and the balance will be restored.
So too with python. Eventually it will get popular enough that people who don't know how to program will start learning with production python code and debugging your average python script will be as bad as debugging your average perl script. C++ is a good example of this in languages.
"One of the best arguments for using Perl I've ever heard was 'Perl forces you to program with good style, Python merely doesn't allow you to program with bad style.' Or, it would be an argument for using Perl if I thought that people didn't suck. Since they do, it's an argument for using Python."
Now we come to our fundamental difference: you think people are idiots and can't be trusted with their own code and I don't. You are, of course, free to hold your opinion. Just please be honest about it. Don't talk about Python being a cleaner language, talk about Perl letting people be the idiots that they naturally are. Btw, do you think that the rest of the python community are as misanthropic and elitist as you are? That's one of the best parts of the perl community - it tends to be made up of nice people.
>> Who wants to trust an interpreter which doesn't trust them?
(A) I didn't say that popular == good. I said that popular == popular. Now, if you want to get to goodness, it's rather difficult to decide because they're functionally equivalent. I would say, though, that python's avoidance of punctuation simply makes life more difficult in parsing python as you have to read it to know what part you're in.
(B) I never claimed that a loop evaluated with %n in front of it is as efficient as a loop executed the correct number of times, though bear in mind that they're both O(n), so even if someone went with that bizarre method, it still wouldn't be substantially less efficient.
I would simply do
for($i = 0; $i = 10; $i += 2) { etc. }
Which is functionally equivalent, takes only slightly more typing, and doesn't involve some bizarre range function.
As an aside, for another pointless alternative, you could do
for (map {$_ *= 2} 0..5) { etc. }
Why you would do it this way, I don't know, but I rarely use the map function so it's neat to see it in use.
My god, you're stupid. Religion is not the cause of all evil, money is. (If you want to get technical, there probably isn't a single unified root cause of all evil, but money (i.e. limited resources) in the face of greed is one of them.)
Go back throughout history, just think of the stagoring number of people who have been killed because of money. (Also, prettymuch all slavery can be lopped into this category, too.)
Now, take a look at a related issue: power. If there is anything that has generated more war and death, it's the desire for power. Of course, power is often very related to money.
Now just look at a few cases: The Roman Empire. The Persian Empire. Hey, in point of fact, pretty much every empire that ever existed. They all were about money and power.
And when you get down to it, much of the crusades was about money and power too. Religion was a nice excuse, though.
Let's get a bit more modern: WWI? About power and money. WWII? About power and money.
Korea? Vietnam? That was about the evils of the russians getting too much power. let's see, were the McCarthy inquisitions about religion? No, I seem to recall that they were about being communist sympathisers.
And are all of the brutal supressions of political groups in China about religion? No, they're about political power.
Stalin killed over 50 million people and he was an atheist. (Many of those people were actually killed in the name of atheism.)
If you consider abortion to be murder, _very_ few fetuses are killed in the name of religion.
People in Afrika don't die for lack of drugs becuase the pharmaceutical companies have religious problems with selling them drugs at affordable prices. Very few people starve to death because the people around them have religious problems with selling/giving them food.
So, to sum up, you might want to actually look at history when you make comments about it. Parading your own problems about as if everyone is equally hung up about them really isn't a very good public speaking strategy. Of course, being a militant atheist, you probably do see this issue as being of prime importance. Still, you might want to remember that there are people who actually study history, so if you're going to use utter fabrications as your arguments, put some statistics in them. It has been shown that people are 60% more likely to believe an argument that has false statistics in it than one that has no statistics in it at all.
Ok, so you like the python way of doing loops better than the perl way. I like the perl way better. So far, all either of us has offered is personal opinion. The thing is, you're on crack if you think that your opinion is universal, considering that it's not in C, C++, Java, or Perl, all of which are individually much more popular than python and collectively make python look like a spec of dust.
Second, did you write your "10,000" lines of perl in a complete vacume? You've never ehard of nor seen "use strict;" which will generally speaking catch misspelling errors? Btw, the html lines in here documents don't count when you're doing line counts of your perl programs.
Btw, your basic argument above is that you're a bad coder and only occasionally stumble onto good coding style, so python's bondage and discipline style is good for you because it doesn't let you write the horrible code that you naturally do. Ok, well since you've identified yourself as incompetent programmer, why exactly is what you say of any value? You stated at the beginning that you don't program well. Is your advocacy just for bad programmers, then?
Detail: modding by powers of 2 is implementable as a bitwise AND, which is damn near close to the most efficient thing that you can do on your computer.
Mathematical proofs are only sometimes clean and elegant, and they're virtually never comprehensible by someone who isn't a mathematician in the same field (unless you're talking about very basic proofs). Mathematical proofs are one of the most obscure pieces of language that you'll find on earth, not one of the clearest, as long as you're talking about people who aren't completely fluent.
Anyhow, I don't use python for two reasons:
1. Perl can do anything that python can with about as much ease (minus the facts that they each have a few minor strengths and weaknesses that the other is better or worse at)
2. The general arguments in favor of python come in the form of either
(a)I'm too stupid to understand perl so python is better
(b)I just like python better because it's so regular
Well, I like perl so much because it's irregular. As larry wall once said, "Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. "Similarly, Perl was designed to be a mess (though in the nicest of possible ways)."
I always find it kind of funny when people talk about coding in natural language, since perl is in many ways quite like a natural language. For one thing, it's gone through a sort of huffman-coding: the stuff you use a lot is short and easy to use. Also, the same character or groups of characters can mean different things in different contexts. This is another piece of efficiency as in general it means that you can use the shorter stuff more often, and have to remember fewer symbols.
The great part about perl is that it is a language in a very real sense. It is quite irregular, but quite usefully irregular. And the best part is that it has no hangups about being irregular when it would be useful to do so. That's why, I think, so many people find perl to be so fun. It was designed to make the easy stuff easy and the hard stuff possible, not to make Guido Van Rossum happy if he looks at your code.
And that, I think, is the reason that I'll do my best to never use python - I don't like people telling me how to do things. One of the fundamentals of python is that it enforces Guido's coding style as much as possible. That's just not a friendly environment. Who wants to trust an interpreter which doesn't trust them?
I think that it's great that .org will once again mean something, but restricting it to registered corporations is a bit extreme, I think. True, it's an easy test for sincerity on the part of the registrant, but I think that there should be some way for people to have domains for non-profit organizations that haven't gone through the expense (however small) of forming a US non-profit corporation.
The MS EULA is an attempt to establish a license to use the software. The GPL is only a license to redistribute the software.
From the GPL:
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
So basically, if the GPL is struck down (which doesn't seem to mean much), all that happens is normal copyright ensues and noone can redistribute the program at all.
There is no chance that a GPL'd program would ever fall into public domain except for it being placed there by the copyright holder or the copyright on it expiring.
A EULA, by contrast, is an attempt to add extra terms and agreements to the use of the software that do not "naturally" exist without the EULA.
So to sum up:
A MS EULA takes away rights that you previously had.
A GPL gives you rights that you previously didn't have.
The BSD people simply complain because they think that the GPL doesn't give you enough rights that you didn't have before.
Note: rights here is used in a legal sense, not a moral/ethical sense.
"You completely disregard any good Microsoft may have done, in your zealotry. Like it or not, Microsoft has made positive contributions to computing."
Some examples, please?
Is it there anti-standards drive or are you talking about things like their keyboard?
Well, let me take a step back, here. Yes, IE5 is actually a reasonably decent product in that it actually complies with some relevant standards. However, this isn't to say that IE is a good product in the sense that the world is better for its existence.
So what actions have microsoft have actually resulted in a world that is better off for microsoft having done them?
"Out of curiosity, do you call someone being less-than-glowing about Linux being biased"
That entirely depends on their reasons. If their reasons have little to do with the (relative?) quality of linux, then yes, they're biased. If their reasons are technical or germane to the topic, then no, they're not biased.
My point was that to come to a conclusion and then use that as a presupposition for further discussion is not to be biased when your conclusions were rationally and validly concluded.
CNN doesn't talk about the "aleged president".
Essentially, to be biased is to disregard facts in an argument for reasons of personal gain or benefit (or emotional admiration). Now, a fact is (among other definitions) any statement to which a reasonable person would agree. My claim is essentially that any reasonable person would agree to the statement that Microsoft is bad.
Now, to prove the contrary, you have to demonstrate that Microsoft has provided more benefit to the world than it has damage. I'm not planning to hold my breath until I see you accomplish that.
Actually, a good game seems to be more like hit or miss. Granted, most modern games are several orders of magnitude prettier than games used to be, but they're not really any better than they used to be.
You occasionally get a really good game that comes out, but in general modern games are no better than older games.
What's needed for a game to be good is for there to be a core game which is fun to play. having nice graphics on top of that is very, very good, but when you get down to it, a good game is still fun no matter what the graphics are.
Look at how many people enjoy card games.
The real question is will someone come up with a good game and give it away. Take spellcast, for example. It's quite fun but the graphics are utterly pathetic. And gltron is an example of open source with nice graphics.
Oh, there is a difference between being unbaised and absurd. To talk about microsoft as being something other than bad is absurd. It's a known (legal) fact that they are anti-competetive, and anyone who's worked in the computer industry can testify as to how much damage they've wreaked on the world. Out of curiosity, do you call a reporter being less-than-glowing about Charles Manson adopting a child being baised?
"Yes, this is not a real benchmark. But at least it shows some evidence."
/bsd/i) {
/linux/i) {
I.e. Yes, it is not valid to draw conclusions from, but I'm going to do it anyway?
Hint: Fake Benchmarks = spurious results (spurious means doubtful or unreliable).
Trusting them is bad.
Allow me to demontrate:
I will use the following non-scientific perl code to benchmark:
my $i;
if(`uname -r` =~
for($j = 0; $j 100;
}
print "The result is $i!\n";
}
if(`uname -r` =~
print "The result is some big number!\n";
}
Then I time that under linux and *bsd. Strangely, it goes much, much faster under linux. Sure, I've never claimed that it's a good benchmark, but at least it does show some evidence that linux is better than *bsd.
You'd think that people would be familiar enough with science that bad methods completely invalidate your data. (It stems from the fact that to be ignorant is better than to be wrong.)
Machines dedicated to a specific purpose can just boot up and work. What we have are *general purpose* computers. They can do more than one thing. They are complex.
Now, if what you want is ease of use, set up a linux box for your secretary to just boot a word processor and nothing else. It will all go pretty easily.
Want flexibility? Complexity is the price that you pay. This is unavoidable.
Btw, if the operating system could automatically fix problems, it would. Do you think that linux punts problems to the user because it doesn't feel like bothering? unrecoverable problems are just that - you can't recover from them. It's kind of like expecting people who have been shot to heal themselves without a doctor. The doctor is needed precisely because they can't.
Oh, and please come up with some better analogy than a car. A car allows you precisely four functions:
-Turn the front wheels left
-Turn the front wheels right
-Turn the drive shaft faster
-Switch gears (front, park, reverse are the only common ones)
Do you want a computer that allows you to do four things? It will be as simple as a car. Do you want a computer that allows you to do the 10,000 things that a modern computer allows you to do? It will be more complex.
Tools are made to be used, not to be learned. That's why we have a specific brand of tools called training tools.
Here, let's go for an analogy - what martial art is going to win in a fight? Punching wildly (easy to learn, just start flailing and you've got it), or Aikido?
Computers are tools, but they are complex tools. A lawn mower is simple because it's job is simple. There never were lawn mowers with 300 buttons and 200 levers that required years to master. A car never required weeks of training to get the hang of. That should tell you something.
What exactly is the other system? let everyone do everything and be happy about that?
What about murderers? They might well be following their own philosophical thoughts (e.g. every ethnic cleanser you want to name). At some point, one has to impose one's morality on others, if in no other way than the morality that you shouldn't be killed.
Once you've opened that door, it's a very slippery slope to imposing all of your morality on others. Where exactly does one stop? One common consensus is that people have the right to do anything that they want as long as noone else is affected, and this is reasonable as a principle of law, at least.
However, the catholic church is not primarily concerned with how to survive this world as pleasantly as possible, but with how to be perfect (in theory, assume standard disclaimer of fallible human beings here). As such, they have explored what perfection means in a variety of cases, and pornography isn't perfect, or leading to perfection.
Is it vaguely reasonable to expect them to use their resources to promote something that goes agains their *philosophical thoughts*?
Remember, these are the catholics, not the baptists, not the born-again tradition of the american south. The catholic church has a long and rich history of philosophers (as well as nearly everything else, too).
Of course, heaven/hell as reward/punnishment is pretty commonly told to children, but then again, you'll find precious few people who don't treat children on a reward/punnishment system. You might want to investigate what real catholic theology is before condmening the version of it common among children and the uneducated.
And if you want to belittle some system, just look at what happens to it in the hands of the uneducated (or the proud or the powerful). There is not, nor ever has been, a system of thought or religion which was shared by more than a few people which has not been corrupted by some (or at times most) of its followers.
If you consider that, and look at real catholic doctrine and philosophy, blocking pornography is a pretty natural, rational course of action. Well, unless you are an anarchist. of course, at that point, nothing is rational, so there's nothing special about the catholic church's actions in this case.
Ok, which murderes are you descended from? America - killed the indians for no good reason. Brittain - India. France - South America. Portugal - South America. Italy - The knwon world 1700+ years ago. Russia? - Killed 50 million people while being communist and might be going back. China - kills anyone who might think of disagreeing with the government. The list goes on and on.
If you are part of a group with a long history, it's prettymuch guaranteed to be one that involves bloodshed or at least opression and exploitation.
Btw, do you think that the US government should pack it in because of the McCarthy era? Should every person who commits a crime pack it in either through honorable suicide or the gas chamber?
Have you never made a mistake? If you have, it's time to pack it in. I'll expect your bloody entrails all over your keyboard in 10 minutes.
What, going to forgive yourself for your mistakes? What a strange thought. Perhaps it might cross your mind to apply the same principle to others. Sure it might not be convenient, but intellectual honesty can be that way at times.
Oh, if you go back 500+ years, the world in general was a much more violent place than it is in the USA today. Torture was a pretty common thing. If you don't believe me, check out what the justice system was like back then.
Besides, if you don't know that the inquisition quickly turned into (if it ever began differently) an attempt by people to get revenge on their enemeies and grab wealth. It was a mostly secular affair, with a bit of religious infuence.
So when you get down to it, landowners are the real problem. I guess that they're the ones who should pack it in. I hope you rent.
BogoMIPS (Bogus MIPS) are usually little more than an integer multiple of the clock speed of the chip. The reason is that BogoMIPS is simply a timing loop. There are certain times when it's faster to simple do nops for a while than it is to switch to other useful work and back again. In order to get the delays as efficient as possible, linux computes how long a nop (No OPeration) takes, though in an expanded form. Since virtually all computers can executes nops at their full theoretical speed (i.e. popping out 1/cycle on every pipe), you get roughly an integer multiple of the clock speed. 2 pipes, you get 2x clock speed. Three pipes, 3x clock speed. Etc.
The reason for this is that a nop has no dependencies, so finishing it off requires no dependency checking or cache flushing. Predictive branching is absolutely minimal within the bogoMIPS algorithm from what I gather.
I don't know who gave you the idea that bogoMIPS are a useful indication of system or platform performance, but it simply isn't true. Real life code tends to be very complex with a lot of dependencies, so things like branch prediction and instruction reordering and such play more of a role in real system performance than simple MHz does, though in general there is a linear relationship between MHz and performance, given the same architecture. If you want more meaningful numbers, the SPEC numbers are reasonably good, but bear in mind the old saying, "Disraeli was pretty close: actually, there are Lies, Damn lies, Statistics, Benchmarks, and Delivery dates."
These people are working in what seems to be a real pathological case. Compiling with glibc 2.0 headers then linking against glibc 2.1. This is so far from the common case as to be genuinely inconsequential. Moreover, static linking will generally work as long as you're using standard calls. CD players will not work accross driver versions, generally, but this isn't much of an issue.
Moreover, they're trying to do all sorts of black magic (calling two implementations of the same function simultaneously), providing an odd sort of thing which people can compile against, etc.
He stated himself that his program depends on the implementation of read(). This is inherently wrong behavior, as it is specific to the implementation of read(). It's not fair to start using someone's code in ways that it was never meant to be used and then complain that normal development breaks their bizzarre program (library?).
Moreover, they're releasing binary-only modules that users are supposed to link against which depend heavily on the specific implementation of libc and then expect this to work accross different versions of libc. Give me a break. It's nearly as bad as providing binary patches against someone's program and then complaining that the next version of the program breaks the binary patches.
Who cares? libc was never meant to be portable accross versions during compiles. This isn't a necessary feature for any sane case. Compile and be done with it.
Have you never heard of LD_LIBRARY_PATH? If you really need a specific version of a library, ship with it. Have the users run a wrapper script that sets all this stuff up, then executes your binary. LD_PRELOAD might also be necessary.
...); won't work in binaries that are run against a different libc, or are you claiming something about the symbol _IO_stderr? Moreover, what system call stuff are you using that changes from linux version to linux version?
Unix allows a person to run a particular program in nearly its own environment. If you're that environment specific, take advantage of this. It is there for a reason.
As for libc, are you claiming that fprintf(stderr, "foo",
Besides, wtf are you doing that a change in the execution path of read() matters greatly? Whatever it is obviously violates the idea that you're supposed to not care how a library function is implementedm just care that it does what you want. What on earth is it? I can't think of any legitimate reaason to program this way, so I'm curious. What are you doing that this is an issue?