Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Trust the World's Fastest VPN with Your Internet Security & Freedom - A Lifetime Subscription of PureVPN at 88% off. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:Oh please (Score 1) 196

Dereferencing the virtual address 0x72 is guaranteed to crash an application when the OS is designed never to map the first (usually 4K) addresses. Accessing that memory causes a page fault, the OS searches the page table for the corresponding page mapping, fails to find a valid mapping, so you get a segmentation fault.

This has nothing to do with C though. C says the behavior is "undefined" if you set a pointer to a location that is not used to store a C object.

We've already agreed that it's undefined behaviour. What we're arguing are the circumstances that this particular invocation of UB would result in a crash. Just because something is UB doesn't mean that it consistently crashes at the point of UB.

Comment Re:Oh please (Score 1) 196

Oh, it can. It just won't do it reliably. Setting a string pointer to 0x72 will certainly do.

It can. It might not though. It depends, actually, on whether it is ever deferenced or not. The original *s = 'H' can crash without ever needing any more derefencing. Your correction can (not 'will', but 'can') crash only if it is dereferenced.

Setting it is not enough, you have to dereference it as well. Although now that I think about it, depending on the platform, simply dereferencing it may still not be enough.

For example, I just tried it now, verbatim, in the OS kernel I hobby-developed and it worked just fine reading from it. Of course, it returned some random address stored in the interrupt vector table, but it did not crash!

I can also write to it too - I've not yet filled in the IVT so no interrupt number is using those numbers ... yet! The OS is probably going to use int-0x80 and storing 12 bytes at 0x72 will not reliably overwrite address 0x80. At the current alignment it certainly will not. A single character more will take the total to 13 + alignment padding = 16 bytes total, which is 0x72. A bad jump here will probably reboot, which we can safely judge to be a crash.

Comment Re:Let's be clear on what we mean by election hack (Score 2) 250

I guess the Russians flooding the internet with fake news in order to delegitimize every single news organization is not hacking? I'm not convinced there was voting machine hacking, but the Russians definitely engaged in social hacking in a concerted effort to boost Trump.

Lemme guess, you hate Woodward and Bernstein too right? They influenced presidential politics the same way you think those 'commie bastards' influenced the election.

Comment Re:You pay people to do fuck-all... (Score 1) 722

I wouldn't be so sure about creativity and insight either. Check out this sketch, colored by an AI neural network based on just a few squiggled hints. You can hardly argue that coloring isn't creative, and that's an AI that exists right now -- the tech is only improving as time goes on.

That doesn't look too impressive - a better bucket-fill basically. The shading is random, after all, not based on depth and lighting.

Comment Re:Arduino uses C++, Pi uses Linux (Score 1) 374

> Just off the top of my head, a single template function instantiated with the same type arguments in two different compilation units produces two (identical) copies of the same code in the final executable.

Get a better head.

Failing that, get a better linker.

The linker can't help if the compiler in-lines the function, which it may choose to do regardless of programmer intention.

Comment Re:Arduino uses C++, Pi uses Linux (Score 1) 374

Its sometimes difficult to share template code, since a major point of templates is to reduce source code. Code that works for doubles cannot be the same code as code that works for ints. So how its not bloat. In C you would get exactly the same amount of bloat plus twice the source.

Just off the top of my head, a single template function instantiated with the same type arguments in two different compilation units produces two (identical) copies of the same code in the final executable.

Comment Re:work less (Score 1) 722

Maybe you join a club, start a band, discover an aptitude for art, start your own business.. who knows?

The problem is not all "work" is equal. The value of the work you do is how much useful economic productivity you generate - how useful what you produce is to other people. The market modulates this by overvaluing productivity which is in short supply (STEM workers), and devaluing productivity which is oversupplied (musicians, artists). This differential pricing then encourages people to "work" in the more productive jobs like STEM, rather than the less productive but more fun jobs like joining a club, starting a band, discovering an aptitude for art (these things are often so unproductive that people have to pay to be able to do them, rather than be paid).

That's the big problem with a UBI. The market prices labor to encourage people to do jobs that are needed, rather than jobs that are fun. A UBI encourages people to do what they find fun rather than what's needed. At first glance, layering a market economy on top of this seems like it would work (i.e. you can still get paid extra on top of a UBI for doing a STEM job). But if you crunch through the math, the pricing for the STEM job then leads to non-UBI income following a divergent series.

Considering how much of what you call "useful" economic productivity is generated by "fun" jobs like art and music,

What do you mean "much"? Very little anything is generated by the fun jobs when you divide the demand by the supply. The market does not reward anything, it's simply the supply/demand curve that determines the price of something, labour included. Due to the supply of artists being so large compared to the demand for art, artists are priced extremely low, and their products are priced just as low to reflect the demand.

your entire premise feels backwards, especially as it does not consider there is a very real drive to push "useful" economic productivity towards zero cost with ever increasing automation.

A small group of artists at Marvel has become an economic juggernaut as armies of artists and artisans translate the comic page into movies and then toys and other banal products for the, as you call them "useful" economic producers to manufacture.

Outliers do not an argument make. The large majority (9999 out of 10000) of "small group of artists" produce works that are worth almost nothing.

A couple of musicians messing around in a garage share their sound and it catches on with clothes, jewelry, etc. geared to the people who want to be part of that scene. Again, giving the, as you call them "useful" economic producers something to take to market.

Yes, a lot of artists are overlooked and underpaid, but that's attributable more to how they are disadvantaged by people who are inclined towards business rather than their true economic potential.

Their true economic potential is close to zero. The markets accurately reflect this. You want a jingle for a radio ad? Almost the entire population can supply you with one. You want designs for a bridge that won't fall down? Only a fraction of the population can give you one.

It's not hard to then say that one class of producer is worth more than the other class of producer. Even with UBI, if everyone can live without needing a job and the majority go on to produce works of art, their value is still considerably less than the minority who use the UBI benefits to learn bridge-design.

UBI won't make artists more valuable than they are now; on the contrary they'll make artists less valuable as the supply of artists will greatly increase (and the supply of bridge-designers will greatly decrease).

Comment Re:Say NO to GMO (Score 1) 78

It was bad enough in plants. Anyone who eats GMO salmonella gets what they deserve.

This will also kill Luddites, by selecting them out of the population. Our cancers get treated while theirs don't.

You appear to have a few misconceptions about how selection works. Killing adults after they've raised their young isn't selection.

Comment Re:Will we see the end of cancer? (Score 1) 78

So, you understand that genes don't just randomly jump, right?

Wait, what?

Just because something has been modified doesn't mean that it's gene will jump to another species and do something completely different than what it was designed to do.

It also doesn't mean that it won't have deep and long-lasting effects at all.

Comment Re: The old adage (Score 1, Insightful) 112

This is true, and Tesla is not one of them. Tesla has one of the highest recall rates of any manufacturer. If you read their earning reports, recalls are one of the biggest obstacles to sustainability of the company over all. Yes, they have so many recalls and spend so much on them that they might actually put the company out of business.

Parent needs an informative mod

Slashdot Top Deals

We are Microsoft. Unix is irrelevant. Openness is futile. Prepare to be assimilated.