You need to be able to associate the pointer with a particular array returned from malloc. In this particular case, this is trivial because the compiler knows about it. What is much harder is something like
void foo(int* p) { p[5] = 0; }
I can think of three solutions (there are probably other solutions too):
1. provide a way to find out which array a pointer points to. For example, malloc() needs to store the array size somwhere, so the compiler can (in principle) find this out - similarly for stack allocated arrays. If course, depending on how malloc etc work, this could be expensive, but it isn't necessarily slow.
2. Standard C allows the posibility that pointers are 'fat', so a pointer could actually contain two addresses, the actual address of the pointee, as well as the base address of whatever array it points to (from which there would be a way to find out the array size). Unfortunately, this probably violates POSIX semantics, but you can't have everything.
3. An associative array that keeps track of which array each pointer points to. This is really a version of (1) that doesn't require integrating with malloc().
Such code would cause undefined behaviour, and it is purely up to the implementation what happens in that case. It would be quite possible to have a C compiler that includes rigorous bounds checking and called abort() in such a case.
For example,
int main() { char myarray[5]; char *p = myarray;// ptr to start of array
char *q = p+5;// one-beyond-the-end is allowed, not dereferencable *q = 'x';// UNDEFINED - could be a memory exception or reformat your harddrive, or abort()
char *r = q+1;// UNDEFINED - even *forming* this pointer is illegal }
Now, The ISO C standard says that such programs are ill-formed. In most cases, such behaviour is detectable at runtime by having the compiler insert bounds checking. Unfortunately, most compiler vendors (including Sun and Microsoft) allow this code as non-portable extensions, and specify that the behaviour overwrites memory. But make no mistake, it is a deliberate choice by the compiler to allow this, rigirous bounds checking most definitely allowed for standard C.
What do you mean? From the point of view of copyright law, distributing a copy of the code (in any form) is the important thing. It doesn't matter if there is no easy way to get at the code.
Imagine if it was a book instead of software. If you leased a black box from someone and it had a book inside it (ok, this is stupid but just go with the flow;-), is it magically not bound by copyright law just because you have to break the black box to read it?
What do you think the fights over linksys routers etc have been based upon?
No, the ratio of baryon matter to total matter has been established independently. Baryons are not a 'dark matter' candidate and have not been for a long time now.
The headline is completely wrong. They have NOT discovered dark matter, and that is not what they are claiming.
The expected proportions of 'normal matter' and 'dark matter' have been known for a while now, and there has been an ongoing problem because the amount of observable NORMAL MATTER was smaller than the expected quantity. This finding provides a possible explanation for the missing NORMAL MATTER.
Now, they ARE claiming that the gravitational force required to produce these balls of NORMAL MATTER is strong enough that they must also be associated with a source of dark matter, but they certainly are NOT claiming to have 'discovered' any dark matter, nor have any theory on its origin.
If we are right, each single one of these filaments is connected to a cloud of dark matter," said Nicastro. "If there wasn't dark matter there, or something with strong gravity that pulled on the matter in these filaments, we wouldn't have galaxies or filaments."
The operative phrase is "connected to", not to be mistaken for "is" !
That simply isn't true. The wordage used in the GPL and copyright law is "distribute". If you give someone some software you are distributing it to them, irrespective of whatever additional restrictions you try to impose.
For GPL'd code, 'leasing' would have no meaning, since as soon as you distribute the code to someone they have the usual rights under the GPL to modify/redistribute/etc.
Heh. That is like saying that rearranging the deck chairs on the Titanic had an effect on the weight distribution, and therfore affected how fast it sank.
Such thoughts are dangerous, number 821479. If the party says that Big Brother was never there, then he was never there.
Slashdot headline is a troll
on
No Pictures, Thanks
·
· Score: 4, Insightful
As the article says,
An HP representative said the company had no current plans to commercialize the technology, which would require widespread adoption by camera makers and possibly government mandates to be financially practical.
The AC is on crack when he says it can be quite easily adapted to turn cameras off altogether, with deeply troubling implications. It isn't some magic EMP device, the camera is under no obligation to obey. And there is no way it would be retrofitted to the millions of existing cameras anyway.
Big Brother left the building. In fact, he was never here.
I'm glad that senior politicians and business leaders are spearheading this "scientific" effort. We constituates needs someone to put a spin on the issues for us in order to understand them.
I notice that you carefully missed out 'academics' from your list. But why shouldn't politicians and business leaders also be included? They are the ones that could actually make a difference!
As always, it's great to see the former transport secretary weigh in on a topic so close to his area of expertise. BTW, Olympia Snowe sounds suspiciously like the name of a hippie child of greenpeace parents.
Ad-hominem, not worth responding to.
Wow! The earth has been around for 4+ billion years, and it only takes us 250 years to set it on an "irreversible" course of destruction. That kinda power indicates how far we've come since the Ice Age!
No you fool! 1750 is merely the baseline measurement from before any measurable human industrial output started. Think, for a moment, what the climate on the earth was like for the vast majority of the 5 billion years it has existed. What proportion of that time has it been habitable by humans? What changes brought that about? Over what timescales?
Interesting, thanks I didn't know that. I am a pilot myself, but I only learned after I left Australia. I assumed that specialist weather info would be free in Oz simply because I can't think of a good reason why it should not be.
Interestingly, in the hang-gliding paragliding community (I am a hangie), we mostly have our oun ad-hoc weather services, such as wendy-windblows in the UK, and similar services elsewhere.
Can you provide any evidence that lack of access to weather information has caused even a single avaiation or boating accident that would not have happened otherwise?
That is flawed. Software has basically zero marginal cost to reproduce so the consumer price is fixed mostly by the need to recoup development costs. Hence the cost of software should be roughly inversely correlated with the size of the market.
Now, the market is much bigger than it was in 1986, hence the 'equivalent' cost should be much smaller. Of course, this assumes that the development costs today are comparable with development costs in 1986, but for something like a word processor I don't see why that shouldn't be true.
The tragedy of war is not that citizens are sent to out to die, the tragedy is that they are sent out to kill. This does nothing to prevent that, indeed it probably encourages it.
Ok, now ask any nix/linux user how they check their email remotely. Usually its something like, "well, I ssh into my machine and run mutt/pine/elm/whatever". When you ask a Windoze user how they check their email remotely, you get either a blank stare, or something inane like "well, when I'm travelling, I use my hotmail account."; they simply have no way of checking their regular email.
MS are simply trying to make up for having a crappy, non-networked platform and trying to rip off their users at the same time.
Where did you get the idea that URL's are not case sensitive? The domain name is not, but the rest most certainly is.
You need to be able to associate the pointer with a particular array returned from malloc. In this particular case, this is trivial because the compiler knows about it. What is much harder is something like
I can think of three solutions (there are probably other solutions too):
1. provide a way to find out which array a pointer points to. For example, malloc() needs to store the array size somwhere, so the compiler can (in principle) find this out - similarly for stack allocated arrays. If course, depending on how malloc etc work, this could be expensive, but it isn't necessarily slow.
2. Standard C allows the posibility that pointers are 'fat', so a pointer could actually contain two addresses, the actual address of the pointee, as well as the base address of whatever array it points to (from which there would be a way to find out the array size). Unfortunately, this probably violates POSIX semantics, but you can't have everything.
3. An associative array that keeps track of which array each pointer points to. This is really a version of (1) that doesn't require integrating with malloc().
Such code would cause undefined behaviour, and it is purely up to the implementation what happens in that case. It would be quite possible to have a C compiler that includes rigorous bounds checking and called abort() in such a case.
For example,
Now, The ISO C standard says that such programs are ill-formed. In most cases, such behaviour is detectable at runtime by having the compiler insert bounds checking. Unfortunately, most compiler vendors (including Sun and Microsoft) allow this code as non-portable extensions, and specify that the behaviour overwrites memory. But make no mistake, it is a deliberate choice by the compiler to allow this, rigirous bounds checking most definitely allowed for standard C.
Imagine if it was a book instead of software. If you leased a black box from someone and it had a book inside it (ok, this is stupid but just go with the flow ;-), is it magically not bound by copyright law just because you have to break the black box to read it?
What do you think the fights over linksys routers etc have been based upon?
Isn't that because he got frustrated with the state of typography in his books, so did the proper hacker thing and spent a decade or so writing TeX?
No, the ratio of baryon matter to total matter has been established independently. Baryons are not a 'dark matter' candidate and have not been for a long time now.
The expected proportions of 'normal matter' and 'dark matter' have been known for a while now, and there has been an ongoing problem because the amount of observable NORMAL MATTER was smaller than the expected quantity. This finding provides a possible explanation for the missing NORMAL MATTER.
Now, they ARE claiming that the gravitational force required to produce these balls of NORMAL MATTER is strong enough that they must also be associated with a source of dark matter, but they certainly are NOT claiming to have 'discovered' any dark matter, nor have any theory on its origin.
If we are right, each single one of these filaments is connected to a cloud of dark matter," said Nicastro. "If there wasn't dark matter there, or something with strong gravity that pulled on the matter in these filaments, we wouldn't have galaxies or filaments."
The operative phrase is "connected to", not to be mistaken for "is" !
For GPL'd code, 'leasing' would have no meaning, since as soon as you distribute the code to someone they have the usual rights under the GPL to modify/redistribute/etc.
... and the USA's isn't???
Heh. That is like saying that rearranging the deck chairs on the Titanic had an effect on the weight distribution, and therfore affected how fast it sank.
Well, (1) those people would, at least, be members of the inner party. (2) Someone else would be watching them too.
I dunno. To me, LXIV looks like Roman Numerals for 64, and VIIV just looks stupid.
No, its just that nothing happens in Australia nowdays without GW's permission. Or at least, permission from the local CIA goons ;)
Doesn't a nuclear winter require a nuclear war first?
Such thoughts are dangerous, number 821479. If the party says that Big Brother was never there, then he was never there.
An HP representative said the company had no current plans to commercialize the technology, which would require widespread adoption by camera makers and possibly government mandates to be financially practical.
The AC is on crack when he says it can be quite easily adapted to turn cameras off altogether, with deeply troubling implications. It isn't some magic EMP device, the camera is under no obligation to obey. And there is no way it would be retrofitted to the millions of existing cameras anyway.
Big Brother left the building. In fact, he was never here.
I'm glad that senior politicians and business leaders are spearheading this "scientific" effort. We constituates needs someone to put a spin on the issues for us in order to understand them.
I notice that you carefully missed out 'academics' from your list. But why shouldn't politicians and business leaders also be included? They are the ones that could actually make a difference!
As always, it's great to see the former transport secretary weigh in on a topic so close to his area of expertise. BTW, Olympia Snowe sounds suspiciously like the name of a hippie child of greenpeace parents.
Ad-hominem, not worth responding to.
Wow! The earth has been around for 4+ billion years, and it only takes us 250 years to set it on an "irreversible" course of destruction. That kinda power indicates how far we've come since the Ice Age!
No you fool! 1750 is merely the baseline measurement from before any measurable human industrial output started. Think, for a moment, what the climate on the earth was like for the vast majority of the 5 billion years it has existed. What proportion of that time has it been habitable by humans? What changes brought that about? Over what timescales?
Fine. Not having bought any Microsoft software for many years now, I didn't realize support was included in the cost.
Interestingly, in the hang-gliding paragliding community (I am a hangie), we mostly have our oun ad-hoc weather services, such as wendy-windblows in the UK, and similar services elsewhere.
Can you provide any evidence that lack of access to weather information has caused even a single avaiation or boating accident that would not have happened otherwise?
I don't think so, because in Australia most weather information is in fact free.
Now, the market is much bigger than it was in 1986, hence the 'equivalent' cost should be much smaller. Of course, this assumes that the development costs today are comparable with development costs in 1986, but for something like a word processor I don't see why that shouldn't be true.
The tragedy of war is not that citizens are sent to out to die, the tragedy is that they are sent out to kill. This does nothing to prevent that, indeed it probably encourages it.
MS are simply trying to make up for having a crappy, non-networked platform and trying to rip off their users at the same time.
Ok, but how do you explain wavefunction collapse? What dynamical law accounts for it?