Forgot your password?
typodupeerror

Comment: Re:What's wrong with html and javascript? (Score 1) 466

by psmears (#47254889) Attached to: Ask Slashdot: Best Rapid Development Language To Learn Today?

Have you ever used perl?

As it happens I've been using perl for longer than your 17 years of JavaScript, so I'm well aware of how its references work... but nothing about that changes the fact that your assertion about JavaScript's "==" comparing values is wrong; in fact, it would be truer to say that "===" compares values.

b = {}; doesn't modify b, it re-assigns b. Please learn how variables work.

I know how variables work, thanks ;-). Assignment is how you change a variable's value in imperative languages. You can't just arbitrarily assert that words like "change" and "modify" have different meanings from their standard ones..

And if you think that "1" and true are different values, then you don't understand what a "value" is.

I've got a very good idea what a "value" is. One property of values (in the context of computing) is that, if two things have different effects when passed to the same function, then they're different values. Perhaps you have a different definition of "value" that contradicts this? If so, do enlighten us, and can you provide a link to a credible source to back up your definition? Again - you can't just arbitrarily assert that words have different meanings from their standard ones.

You're either really old, used to bit-registers not complex objects, or you're really young reading text books, or you've navigated the industry by avoiding business-level programming.

Haha... actually none of the above are true. And even if they were - your assertion about "==" would still be wrong, so your comment to angel'o'sphere to "try harder" would still be uncalled for.

Wow, you are incredibly confused.

I agree that one of us is, indeed, quite confused :-)

Comment: Re:What's wrong with html and javascript? (Score 1) 466

by psmears (#47246257) Attached to: Ask Slashdot: Best Rapid Development Language To Learn Today?

You might also try a='1', a=1, a=01, a='01', a=0, a='0', a=false, a='', and a=null.

Using a simple scalar integer isn't an example of anything.

Yes it is - it's an example of your explanation being wrong. Here are some more. You claimed:

Double tests to see if two variables have the same value.

However,

a = "1";
b = true;
result = (a == b);

... gives a result of true - when clearly "1" and true are different values - for instance, you'll get different results if you pass them to alert(). You also said:

Triple tests to see if two variables point to the same place in memory -- are actually the same variables.

"Pointing to the same place in memory" and "actually being the same variable" are two entirely different concepts. For example, after:

a = {foo: 1, bar: [1,2,3]};
b = a;

then 'a' and 'b' refer to the same object ("point to the same place in memory", if you like), and a===b will return true. But they're still different variables, because after modifying one of the variables

b = {};

the other variable will not be affected in any way.

The reason for wanting to use triple-equals is not because "double-equals compares values", it's because double-equals sometimes behaves in a way that's confusing and not very useful. For instance, I'd expect, for any sensible equality operator, that if a==b and b==c, then a==c... but for JavaScript's double-equals, that's not true (put a="", b=[], c="0" - then ""==[], and []=="0", but "" != "0"...)

Comment: Re:Cops Won't Carry 'Em, Neither Will I (Score 1) 765

by psmears (#46983785) Attached to: A Look at Smart Gun Technology

Hyperbole never fixes anything.

"Punishment" implies that someone did something wrong, which is not necessarily true of all gunshot victims. Like the unarmed homeless guy my local PD shot in the back last week.

Unless, of course, we consider being homeless as a punishable offense.

Haha, I'm using hyperbole?

Yes, for obvious reasons which I already pointed out - not every gunshot victim was shot out of punishment. Yes, it's a pedantic difference, but so was your completely unnecessary addition about gunshot victims, so fair's fair.

Wasn't it equally hyperbole when you talked about the "population as a whole" being punished

No, because that's exactly what laws that would remove everyone's civil liberties based on what a few people might do are for - punishing everyone for the (potential) actions of a few. It's not hyperbolic if it's not an exaggeration. For the record, your statement wouldn't have been hyperbolic if you'd have qualified it with something like, "... and some of those who get shot by them." Again, it's a pedantic difference, but pedantry is what got us to this point in the conversation.

Tthat logic makes no sense. As you say, most people haven't done anything wrong. You say that bad treatment can't be punishment if the person undergoing it didn't do anything wrong. Therefore intrusive gun control is, by your own reasoning, not punishment for those people, and your statement is hyperbole if mine is. You can't have it both ways.

The point is that, to make a balanced comparison, you have to consider the positive and negative effects experienced by everyone in society. If (and, of course, it is very much an "if") the negative effects on the population as a whole of (insert proposed freedom-reducing gun control measure here) are less than the positive effects that come from people not getting shot as a result, that's a strong argument that that measure should be implemented; if that's not the case (because the measure is so draconian that its negative effects are large, and/or the measure is not effective, or actually counterproductive, in reducing gun crime injuries), then the measure should clearly not be implemented.

Maybe I'm missing something,

Yes... you are. I'm explaining why it's important to consider the negative impact of gun crime as well as the negative impact of gun control measures, in order to be come to a balanced conclusion on whether any given gun control regime, or absence thereof, should be implemented. Do you disagree with that?

Balancing these factors is hard to do in any scientific way - not least because the value of "freedom" versus the value of not being shot is very hard to pin down quantitavely - but neglecting the harm done by gun crime is bound to unbalance the equation.

Again, how does this apply to the conversation at hand?

Because what you appear to be saying is that one should ignore the victims of gun crime when considering what the law should be. (That may not, in fact, be your position, but it's what your words are suggesting.)

Comment: Re:Cops Won't Carry 'Em, Neither Will I (Score 1) 765

by psmears (#46983299) Attached to: A Look at Smart Gun Technology

Hyperbole never fixes anything.

"Punishment" implies that someone did something wrong, which is not necessarily true of all gunshot victims. Like the unarmed homeless guy my local PD shot in the back last week.

Unless, of course, we consider being homeless as a punishable offense.

Haha, I'm using hyperbole? Wasn't it equally hyperbole when you talked about the "population as a whole" being punished - or do you consider being part of the population a punishable offence? ;-)

The point is that, to make a balanced comparison, you have to consider the positive and negative effects experienced by everyone in society. If (and, of course, it is very much an "if") the negative effects on the population as a whole of (insert proposed freedom-reducing gun control measure here) are less than the positive effects that come from people not getting shot as a result, that's a strong argument that that measure should be implemented; if that's not the case (because the measure is so draconian that its negative effects are large, and/or the measure is not effective, or actually counterproductive, in reducing gun crime injuries), then the measure should clearly not be implemented.

Balancing these factors is hard to do in any scientific way - not least because the value of "freedom" versus the value of not being shot is very hard to pin down quantitavely - but neglecting the harm done by gun crime is bound to unbalance the equation.

Comment: Re:I must live in a different country... (Score 1) 1374

by psmears (#46897675) Attached to: "Smart" Gun Seller Gets the Wrong Kind of Online Attention

Home invasions are rare because of the 2nd Amendment. Look up the "hot burglary" (burglaries when people are in the structure) numbers for the United Kingdom sometime.

I haven't been able to find good stats on that, but what I can find suggests that the burglary rate overall is broadly similar - at most 20% higher in the UK. But even assuming the UK rate is five times the US one, it's worth noting that the gun murder rate is over thirty times higher in the US than in England&Wales. To me at least, that doesn't sound like a great tradeoff :-/

Comment: Re:There aren't many 404s (Score 1) 72

by psmears (#46813705) Attached to: 404-No-More Project Seeks To Rid the Web of '404 Not Found' Pages

There aren't many 404s left anyway. Domain dealers are quick to put their hands on every dead link. Which is a shame, because a 404 would be more informative.

You don't get a 404 for a non-existent domain. You only get a 404 if you try to go to a non-existent page within a domain that's registered and has a web server running. If the domain's not registered, there's no web server to even return a 404.

Comment: Re:Missing the only useful comparison. (Score 1) 134

by psmears (#46572301) Attached to: GNU C Library Alternative Musl Libc Hits 1.0 Milestone

The compare page is missing the only other entry I wanted to see.... and that is, BSD libc. This is widely used by QNX

No, QNX has its own libc - the microkernel architecture means the system call interactions work substantially differently from traditional Unix/Linux/etc.

Comment: Re:Follow the money (Score 2) 194

by psmears (#46314865) Attached to: Internet Shutdown Adds To Venezuela's Woes

The Venezuelan regime treats every problem as a nail to be hammered, so it THINKS the Internet shutdown will help them.

I was in Egypt when the government shut down the internet for several days to prevent protests, prior to the ousting of Mubarak. It was a very short-sighted move: to a great extent, the only thing keeping a lot of people off the streets was Facebook - take that away, and people's only option (for information and/or entertainment) is to go outside...

Comment: Re:prove that the program works (Score 1) 189

by psmears (#46299507) Attached to: A Mathematical Proof Too Long To Check

Forgot to mention those guys showed that such an algorithm that "works" for all valid proofs is not just difficult but mathematically impossible.

No, that's not actually what they proved; it is perfectly possible to prove a given algorithm works for all possible inputs, and even that a proof checker works for all valid proofs. There are certainly things that they proved impossible (e.g. a writing a program that can provide a proof for any true mathematical statement, or that can determine if two arbitrary programs are equivalent), but those don't apply here.

Comment: Re:prove that the program works (Score 1) 189

by psmears (#46299447) Attached to: A Mathematical Proof Too Long To Check

Prove that the algorithm works. That's your proof.

Gödel and Turing make strong cases that proving the algorithm works for some inputs that are correct proofs doesn't count as proof it will work for all correct proof inputs. So no, even if you "prove the algorithm works" it is not the same as a rigorous mathematical proof.

Not true - proving the algorithm works is the same as a rigorous mathematical proof, if you prove mathematically and rigorously that the algorithm works. (The comment about running the algorithm a number of times was simply to guard against the proven-correct algorithm producing a wrong result due to a machine malfunction.)

Comment: Re:Guarantee (Score 1) 716

by psmears (#46227551) Attached to: Ask Slashdot: Should Developers Fix Bugs They Cause On Their Own Time?

True bug free programs have been proven to be mathematically impossible - it's an NP-complete program.

Nonsense. For one thing, "NP-complete" doesn't mean "mathematically impossible" - it just means that large problems may take a very long (but nonetheless finite) time to solve. And there's nothing mathematically impossible about bug-free programs - they're hard to come by in practice for non-trivial problems, but the limitation is human rather than mathematical.

And to address your earlier comments: it's true that there may be bugs in the OS, the compiler or even the CPU - but in the context of the analogy, that's like having a fault in the wall's foundations - the bricklayer wouldn't be expected to be accountable for those (assuming another contractor was responsible for laying them...)

Message from Our Sponsor on ttyTV at 13:58 ...

Working...