It's because iteration needs to maintain state (namely, where you're up to in the collection). If this was stored on the object, then you wouldn't be able to have 2 iterations active at once. Things like this wouldn't work:
// print all possible pairs
for (Person x: people) {
for (Person y: people) {// oops, now we're interfering with the iteration that's already happening over people
System.out.println("Pair (" + x + ", " + y + ")");
}
}
(Ugh, I forgot how to include code in a slashdot comment.)
The slightly concerning thing is that the notice email I got was in my Spam folder. I checked the source carefully and the password reset link appeared to be legitimate. So I've used it (entering my email address only). The next email was also marked as Spam, with GMail saying that a lot of mail received from postmaster.scribd.com is spam.
Has anyone got any thoughts on this? Has scribd done something dumb in the past? Has their mail systems been compromised too? Is there a concerted effort to fool GMail into treating these password emails as spam?
Your "basic logic" has missed the part where being unable to formulate a trend for a 10 year period != having no access to the hundreds (ranging to millions, for some measures) of years of data that we have.
The GPs point was that while we may may need more than 10 years of data, we do have more than 10 years and we can draw trends from them.
Measure what is measurable, and make measurable what is not so.
-- Galileo
We should combine that with one one of Einstein's to make the pragmatic rule: Everything should be as measureable as possible, but no more. (Basically, we should try to make things measureable, but we shouldn't measure things that obviously aren't.)
Ok, correct me if I'm wrong here, but isn't Tsar Bomba famous for being the largest nuclear weapon detonated? I don't see the relevance of it to estimating the consequences of an accident at a power station. The effects in each case are almost entirely incomparable. Sure, they're both "nuclear", and each involves a release of radioactivity. But the distribution of that in terms of isotope mix, time, intensity, location follow entirely different models. Furthermore, Tsar is renowned for its fusion detonation, which AFAICT is largely unrelated to the amount of fissile material required to trigger it -- for all I know the fission bomb component was no larger than average. Using it as the benchmark for "biggest nuclear thing ever" is bizarre and simplistic.
Interesting. I'm not going to "fisk" that page (since fisking is a retarded practice that amounts to cherry-picking easily criticised minor points).
I was kind of proud to see my own local paper the "Wellington Dominion Post" scored a 7 for "selecting a picture of a mushroom cloud like explosion because they couldn't think of nuclear in any other terms than a mushroom cloud". Well that's kind of subjective: it doesn't look especially mushroomy to me. But it does look a hell of a lot like an actual Fukushima explosion photo.
There is a lot of sensationalism coming out in the Fukushima reporting. But sites like this aren't interested in accuracy; they exist to say that any concern for the plant is overblown, and to discredit any negative reporting of it, regardless of veracity.
ISTR (from an abortive combinatorics course) that there's a commonly used encoding that provides 3 bits of ECC for each 8-bit byte. Could this string be 3 simple bytes with ECC?
First, unlike other SQL engines Postgres is language-independent. There is a plug-in system, and it already ships with a few different SQL variants.
I'm a little unclear about where exactly this works in PostgreSQL. It's true that, for stored procedures (functions), there is a plugin system for the stored procedure language. But there is only one SQL dialect that can be used outside of stored procedures. The new DO command arguably expands this, but it still looks a lot like a stored procedure body.
Second, the primary language is PL/PGSQL which is a clone of Oracle's PL/SQL.
Tiny quibble: I don't know if you could call it the "primary language" since it's just as primary as all the others. I recall a time when I had to enable it in each DB that needed it -- perhaps if it's included by default it is now slightly more primary than some others...
In practice, algorithms are generally programming language independent *within the set of imperative languages*. They are almost always written as a series of steps. And that's why they don't apply directly to functional languages.
I just checked Knuth's definition, and he lists: finiteness, definiteness, input, output and effectiveness as the requirements for an algorithm. All of these translate with more or less effort into the functional programming landscape.
As an example, I have seen the quicksort algorithm written something like:
sort(l) =
if l == [] then []
else with (lowers, equals, highers) = partition(l) in
sort(lowers) + equals + sort(highers)
(The original was in Haskell which as you can see I am no longer proficient in.)
So I think I agree that "all your algorithms will break" is exaggeration.
It's not complete yet, but it's already worth using it, IMO. Having a calendar integrated with my mail helps me to check my schedule as regularly as I check my mail.
I think the answer to this is that what you're doing isn't real procrastination --- instead, you say you do this because you know it's the optimum course of action for some tasks. Many procrastinators know full well that they should get started NOW, but they just don't.
For the last fifty years, and indeed even now, I think most computer scientists would have said "...functional (Lisp and all that)..."
Haskell's a cool language. It's hardly the foremost functional language.
You're quite right, for some reason LISP escaped my mind. It's actually the only functional language I can recognise on sight.
The reason I mentioned Haskell is that there's a lot of hype about it at my university, and all the formal CS people seem to be getting into it. (All the mathemticians are using LISP, admittedly.)
Those are some interesting ways to classify; thanks. I will save that post for future thought.
Re: line-based, etc. I think of "line-based" languages as somehow easy to interpret (and maybe compile too). And also that you can execute one part of it even if the rest is not syntactically valid.
That's probably true of all other languages too, but it seems easier for line-based ones.
To that I say, you should try writing a program in binary (I assume you mean machine code) at least once: it will do you good as a programmer.
My point wasn't that VB was a good language to use *for anything*, in fact I said it was a horrible language.
My point was that VB is actually a real programming language. It is not directly comparable to binary, because it is an abstraction of a imperative computational model, just as is C, Java, Perl, and all other high-level imperative languages.
Binary is not (at least not to nearly the same extent as all the above).
When I read about acidboy's programming experience, I did not immediately dismiss him as a "programmer" (with the emphasis on the quotes).
I'm sure we all agree that VB is a horrible language, and I'm sure we all agree that many people do things in VB that aren't real programming. I spent 18 months in a government department with VB (where most of the existing code had been simply recorded as "macros") and I yearned to be allowed to use a real language (my favourite is C, even for high-level things).
Yet VB is a real, Turing-complete language.
If acidboy has been working with it for 10+ years, then I think it's a safe bet he knows what real programming is.
PS. I am engaged in a sort of long-term conversation (it's a bit like correspondence chess) with my Formal CS lecturer about the hierarchy of languages. I think of BASIC as a member of "line-based" languages, along with DOS batch files and assembly. And VB is the same.
But my lecturer says the main distinction is that languages fall into three categories: imperative (assembly, C, BASIC, etc.), functional (Haskell and all that) and logic (prolog). How does that fit with your idea of programming languages?
One of the features of Mozilla that I have used thousands of times is "Open link in new tab" from an e-mail message.
As there is no standard interface (AFAIK) for tabbed browsing, I am a little worried that Thunderbird will not be able to do this for me, without specific integration with Firebird.
So, for now, I'm still using Mozilla (even though Thunderbird and Firebird look so new and fresh!). But for how long will Mozilla be available?
I haven't looked, but it might be interesting to do a quick study of how many UN agencies operate consistently with the UDHR... though obviously the UDHR allows a lot of room for interpretation.
The government in this country (New Zealand) is generally working towards full compliance with the Declaration; but I can't say I have as much enthusiasm for some of the new laws as I do for the original (somewhat idealistic) text of the UDHR.
All going well, eventually--perhaps in a few hundred years--individual human beings should have some control over the largest international organisations. As it is, even well-meaning organisations (I would name the WHO, UNHCR, and a few others) have barely any mandate, except what comes from the most undemocratic security council, or through election by the representatives of un-elected national governments.
As for the WTO and its ilk: I am positive that the general populace of Earth, or even of developed nations, would not support their actions. I look forward to the day when they are no longer assumed to be part of world government.
The Internet will enable robust and efficient and true elections.
(This comment was partly tongue-in-cheek; but I'm still serious about international democracy.)
Yeah, and the part that most impressed me was the notice that "we regret that Gimli and Legolas's constumes have been returned for further filming"--it gave the exhibition a wonderful authenticity.
BTW, did anyone else in NZ notice the waterwheel on the Hobbiton mill was spinning the wrong way?
It's because iteration needs to maintain state (namely, where you're up to in the collection). If this was stored on the object, then you wouldn't be able to have 2 iterations active at once. Things like this wouldn't work:
for (Person x: people) {
for (Person y: people) {
System.out.println("Pair (" + x + ", " + y + ")");
}
} (Ugh, I forgot how to include code in a slashdot comment.)
Well it sure can do a lot of floating point operations per second; how does that help for networking applications exactly?
The slightly concerning thing is that the notice email I got was in my Spam folder. I checked the source carefully and the password reset link appeared to be legitimate. So I've used it (entering my email address only). The next email was also marked as Spam, with GMail saying that a lot of mail received from postmaster.scribd.com is spam.
Has anyone got any thoughts on this? Has scribd done something dumb in the past? Has their mail systems been compromised too? Is there a concerted effort to fool GMail into treating these password emails as spam?
Isn't the N-body problem already a stronger result than this?
Or are they orthogonal? I'm interested in any explanations about how they compare.
Disclaimer: IANAP and have not RTFA.
Your "basic logic" has missed the part where being unable to formulate a trend for a 10 year period != having no access to the hundreds (ranging to millions, for some measures) of years of data that we have.
The GPs point was that while we may may need more than 10 years of data, we do have more than 10 years and we can draw trends from them.
Measure what is measurable, and make measurable what is not so.
-- Galileo
We should combine that with one one of Einstein's to make the pragmatic rule: Everything should be as measureable as possible, but no more. (Basically, we should try to make things measureable, but we shouldn't measure things that obviously aren't.)
That is not the alternative -- it's the opposite extreme.
Allowing a media free-for-all increases the risk of Jurors getting outside information on the case.
Justice needs oversight; but also also needs to be protected from interference. Optimising justice means finding a tradeoff between these ideals.
Ok, correct me if I'm wrong here, but isn't Tsar Bomba famous for being the largest nuclear weapon detonated? I don't see the relevance of it to estimating the consequences of an accident at a power station. The effects in each case are almost entirely incomparable. Sure, they're both "nuclear", and each involves a release of radioactivity. But the distribution of that in terms of isotope mix, time, intensity, location follow entirely different models. Furthermore, Tsar is renowned for its fusion detonation, which AFAICT is largely unrelated to the amount of fissile material required to trigger it -- for all I know the fission bomb component was no larger than average. Using it as the benchmark for "biggest nuclear thing ever" is bizarre and simplistic.
Interesting. I'm not going to "fisk" that page (since fisking is a retarded practice that amounts to cherry-picking easily criticised minor points).
I was kind of proud to see my own local paper the "Wellington Dominion Post" scored a 7 for "selecting a picture of a mushroom cloud like explosion because they couldn't think of nuclear in any other terms than a mushroom cloud". Well that's kind of subjective: it doesn't look especially mushroomy to me. But it does look a hell of a lot like an actual Fukushima explosion photo.
There is a lot of sensationalism coming out in the Fukushima reporting. But sites like this aren't interested in accuracy; they exist to say that any concern for the plant is overblown, and to discredit any negative reporting of it, regardless of veracity.
ISTR (from an abortive combinatorics course) that there's a commonly used encoding that provides 3 bits of ECC for each 8-bit byte. Could this string be 3 simple bytes with ECC?
First, unlike other SQL engines Postgres is language-independent. There is a plug-in system, and it already ships with a few different SQL variants.
I'm a little unclear about where exactly this works in PostgreSQL. It's true that, for stored procedures (functions), there is a plugin system for the stored procedure language. But there is only one SQL dialect that can be used outside of stored procedures. The new DO command arguably expands this, but it still looks a lot like a stored procedure body.
Second, the primary language is PL/PGSQL which is a clone of Oracle's PL/SQL.
Tiny quibble: I don't know if you could call it the "primary language" since it's just as primary as all the others. I recall a time when I had to enable it in each DB that needed it -- perhaps if it's included by default it is now slightly more primary than some others...
In practice, algorithms are generally programming language independent *within the set of imperative languages*. They are almost always written as a series of steps. And that's why they don't apply directly to functional languages.
I just checked Knuth's definition, and he lists: finiteness, definiteness, input, output and effectiveness as the requirements for an algorithm. All of these translate with more or less effort into the functional programming landscape.
As an example, I have seen the quicksort algorithm written something like:
sort(l) =
if l == [] then []
else with (lowers, equals, highers) = partition(l) in
sort(lowers) + equals + sort(highers)
(The original was in Haskell which as you can see I am no longer proficient in.)
So I think I agree that "all your algorithms will break" is exaggeration.
It's not complete yet, but it's already worth using it, IMO. Having a calendar integrated with my mail helps me to check my schedule as regularly as I check my mail.
Perhaps I should add that I don't mean to say this as a snipe at procrastinators, but from my own experience as a chronic procrastinator.
I think the answer to this is that what you're doing isn't real procrastination --- instead, you say you do this because you know it's the optimum course of action for some tasks. Many procrastinators know full well that they should get started NOW, but they just don't.
No indeed.
But it is a good definition of "programming".
You're quite right, for some reason LISP escaped my mind. It's actually the only functional language I can recognise on sight.
The reason I mentioned Haskell is that there's a lot of hype about it at my university, and all the formal CS people seem to be getting into it. (All the mathemticians are using LISP, admittedly.)
Those are some interesting ways to classify; thanks. I will save that post for future thought.
Re: line-based, etc.
I think of "line-based" languages as somehow easy to interpret (and maybe compile too). And also that you can execute one part of it even if the rest is not syntactically valid.
That's probably true of all other languages too, but it seems easier for line-based ones.
To that I say, you should try writing a program in binary (I assume you mean machine code) at least once: it will do you good as a programmer.
My point wasn't that VB was a good language to use *for anything*, in fact I said it was a horrible language.
My point was that VB is actually a real programming language. It is not directly comparable to binary, because it is an abstraction of a imperative computational model, just as is C, Java, Perl, and all other high-level imperative languages.
Binary is not (at least not to nearly the same extent as all the above).
When I read about acidboy's programming experience, I did not immediately dismiss him as a "programmer" (with the emphasis on the quotes).
I'm sure we all agree that VB is a horrible language, and I'm sure we all agree that many people do things in VB that aren't real programming. I spent 18 months in a government department with VB (where most of the existing code had been simply recorded as "macros") and I yearned to be allowed to use a real language (my favourite is C, even for high-level things).
Yet VB is a real, Turing-complete language.
If acidboy has been working with it for 10+ years, then I think it's a safe bet he knows what real programming is.
PS. I am engaged in a sort of long-term conversation (it's a bit like correspondence chess) with my Formal CS lecturer about the hierarchy of languages. I think of BASIC as a member of "line-based" languages, along with DOS batch files and assembly. And VB is the same.
But my lecturer says the main distinction is that languages fall into three categories: imperative (assembly, C, BASIC, etc.), functional (Haskell and all that) and logic (prolog). How does that fit with your idea of programming languages?
How closely integrated will they (optionally) be?
One of the features of Mozilla that I have used thousands of times is "Open link in new tab" from an e-mail message.
As there is no standard interface (AFAIK) for tabbed browsing, I am a little worried that Thunderbird will not be able to do this for me, without specific integration with Firebird.
So, for now, I'm still using Mozilla (even though Thunderbird and Firebird look so new and fresh!). But for how long will Mozilla be available?
http://images.tabletpctalk.com/pictures/comdex2003 /billgkey/01280023%20(Small).JPG
I've never before noticed billg's resemblance to the villain of the X-Files.
I haven't looked, but it might be interesting to do a quick study of how many UN agencies operate consistently with the UDHR... though obviously the UDHR allows a lot of room for interpretation.
The government in this country (New Zealand) is generally working towards full compliance with the Declaration; but I can't say I have as much enthusiasm for some of the new laws as I do for the original (somewhat idealistic) text of the UDHR.
put the UN under the control of the Internet!
All going well, eventually--perhaps in a few hundred years--individual human beings should have some control over the largest international organisations. As it is, even well-meaning organisations (I would name the WHO, UNHCR, and a few others) have barely any mandate, except what comes from the most undemocratic security council, or through election by the representatives of un-elected national governments.
As for the WTO and its ilk: I am positive that the general populace of Earth, or even of developed nations, would not support their actions. I look forward to the day when they are no longer assumed to be part of world government.
The Internet will enable robust and efficient and true elections.
(This comment was partly tongue-in-cheek; but I'm still serious about international democracy.)
Yeah, and the part that most impressed me was the notice that "we regret that Gimli and Legolas's constumes have been returned for further filming"--it gave the exhibition a wonderful authenticity.
BTW, did anyone else in NZ notice the waterwheel on the Hobbiton mill was spinning the wrong way?