Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×

Comment: Sadly, gas is cheaper than electricity in CA (Score 3, Interesting) 627 627

I just bought a Ford C-Max Energi; but I bought it strictly for the green carpool-lane sticker.

In California, if you live in a big house, your marginal cost of electricity is shockingly high. For me, it's $0.33/kilowatt-hour.

My Energi goes 20 miles with a 8 kWh charge. That's $2.64 On gas, it gets about 35 mpg. If gas is $3.50 (current price) that's $2.20.

Now, during mid-day on a sunny day, I can charge it much cheaper on our solar panels (currently we are selling power back to PG&E, but at $0.11/kWh) and I do that. I also charge it at work, where it's 'free'; but I live 50 miles from work so I can't keep the car charged just at work. The 'free' power at work won't last forever, either.

You may ask "why not get a Tesla?" Good question. It turns out that there are (at my company) 3x the number of electric-ish cars as there are charging stations, so we have to swap them out after just a few hours. The Tesla would take all day to charge. Also, the Tesla is such a lumbering overpowered beast that it gets substantially less miles-per-kilowatt-hour.

Thad

Comment: Reading her mind... (Score 1) 124 124

Somebody I know started taking antidepressants some time ago, and they helped the depression quite a bit. One curious thing, though, is that once she is taking them, she assumes that I can read her mind; that I obviously know what she is thinking. She stopped taking them for a while, and it was immediately apparent that she no longer felt that way, then when she started taking them again, it was back.

Comment: Re:Altough I agree (Score 1) 61 61

My favorite feature is Birds Eye view, which uses aerial photos rather than satellite photos. Sometimes that can get you better info from that, since they usually have 4 different perspectives you can rotate through, and they are much closer and more detailed.

That was true, but Google was pretty quick to copy it. They now seem to have incorporated it into their 3D view as well, which makes panning somewhat better (and more importantly hides the worst defects in the 3D view by limiting the projection to a POV very similar to where the texture map image was taken from).

Comment: Re:Reference count synchronization across threads (Score 1) 296 296

Actually the reason for the Global Interpreter Lock is because cPython decided that had less overhead than making the reference counters atomic variables (plus you would still need some kind of locking when modifying any object with a reference count greater than one, though this is such a tiny amount of what a typical Python program does that it is probably irrelevant).

I personally have doubts this is true, but the argument is not impossible. I am wondering if their measurements were on older systems, modern ones are better at atomic operations.

Comment: Re:Infinity (Score 3, Informative) 1067 1067

Actually IEEE floating point has a signed zero (+0 and -0 are different values) to solve exactly that. If x is positive, x/+0 is +infinity, x/-0 is -infinity. 0/0 (with any type of 0) returns NaN.

However I believe the article was talking about *integer* division by zero, not floating point.

Comment: Re:Lol (Score 1) 248 248

Holy fucking shit, who cares? If this was done by LETTER WIDTH, we wouldn't see the problem-

EXACTLY! That is why you do not want "N characters". I don't understand what your problem is here.

It is true that for this example most programmers would scan from the start, finding the longest string that fits with an ellipsis at the end.

What I was trying to point out is that if you want to be clever, you can guess as to an insertion point. But 11 bytes is just as good of a guess as 11 "characters" and since 11 characters requires scanning you are not saving any time.

You are perfectly correct that after you stick the ellipsis in there you need to test to see if the rendering fits and perhaps try another guess. The idea is that you will do fewer measurements, but that such insertion can be done using byte offsets, and "N characters" is a useless concept that never enters into it.

Comment: Re:Lol (Score 1) 248 248

Do you really think 12 happy faces fit in the same space as 12 letter 'i'?

This is why it is pointless to do such counting.

And what you propose would split betwen a letter and a combining accent, so it really isn't any better for trashing strings.

Basically as soon as the words "N characters" come out of your mouth you are wrong. All your description just does that for many paragraphs. Don't feel too bad however as there are many many other people, including ones working for Apple, who are wrong as well.

PS: the surrogate order does not depend on they byte order in UTF-16. You might want to check what you are doing if you thought that.

Comment: Re:I am amazed (Score 1) 248 248

A lot of misinformed programmers use the term "Unicode" to mean encodings other than UTF-8, typically UTF-16 or UCS-2. For instance a function called "toUnicode" often is a translator from UTF-8 to UTF-16. Therefore when people say "Unicode strings" they almost always mean non-byte strings. I propose the best solution is to eliminate all such strings. It is true that byte strings would encode UTF-8 and thus be "Unicode" but the hope is that this would be so standard that there would be no need to ever specify this and they would be called "strings".

One person's error is another person's data.

Working...