Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Comments

top

PHP Finally Getting a Formal Specification

ShadowRangerRIT Re:its why devs cringe. (180 comments)

Most high level scripting languages (can't speak for PHP, but it's true for Perl, Ruby and Python) implement simple user defined objects as dictionaries. That said, the lookup cost, while obviously much higher than pre-compiled v-tables, are not as expensive as you might imagine; attribute access uses interned strings, and strings cache their hash code on first hash. If you don't actually have to recompute the hash, and equality checks are (for attribute lookup) a simple reference identity test, the CPU costs are basically nil, you just have the issue of page faulting due to "random" access into the hash table (and Python at least optimizes for that case; the collision chaining algorithm in recent versions of Python tries to chain into the same cache line if it can, alternating with chains by "long steps" to avoid issues with consecutive hash codes).

Stuff that kills Python performance includes: Minimal optimization of code by the byte code compiler, and none by the byte code interpreter (while each hash table lookup is cheap, a loop will perform it over and over again, even if you're accessing the same attribute on the same object, because the compiler and interpreter aren't sophisticated enough to recognize what's happening); inability to parallelize CPU bound tasks using threads thanks to the GIL; lack of "primitive" types, so even basic math involves substantial memory allocator overhead and memory fragmentation, etc.

TL;DR: Python's performance problems aren't primarily a result of hash tables.

about three weeks ago
top

People Who Claim To Worry About Climate Change Don't Cut Energy Use

ShadowRangerRIT Re:Catching the big choices (710 comments)

Gets worse if you own an electric vehicle. My power company has a neighbor comparison tool, where it compares my electric usage to similar neighbors (the nearest 100 houses of roughly the same size, same heat/AC systems, same number of occupants). I reliably came in between #2 and #5 lowest electric usage. Until I bought a Leaf. I'm still in the top 20% "most efficient", but only barely, thanks to the $20-30 of electricity it takes to fuel each month. Because I got rid of a 20 MPG rusting to pieces junker for a 115 MPGe vehicle, my performance on the one metric of "home electric use" went down.

about a month ago
top

Python Bumps Off Java As Top Learning Language

ShadowRangerRIT Re:Java or Python (415 comments)

The ability to seamlessly use + with mixed text and numeric types in a language without explicitly declared types is usually considered a design flaw, not a positive feature. Perl uses separate operators for strings vs. numbers to avoid ambiguity, while Python and Ruby require explicit type conversions. Java defaults to string concatenation, but Java requires explicit types, so you get a compile time warning if you make a mistake like adding a String and an int and expecting an int. Even PHP, the go to standard for poor language design, which explicitly rejects separating operators for strings and numbers, made a concession for addition vs. concatenation and borrowed Perl's approach of using + for addition and . for concatenation so the operator itself selects the operation.

The sole exception to this rule that I can think of is JavaScript, where + is type dependent, and it lacks explicitly typed variables. The fact that you're allowed to use addition with silent coercion to String if either operand is a string is explicitly called out as one of the Awful Parts in JavaScript: The Good Parts, which should tell you something. Basically, implicitly typed scripting languages should prohibit implicit type conversions when they use + for both addition and concatenation. The alternative is to behave incorrectly silently.

As for the ternary operator, really? That's your big gripe? The fact that it reads like an English sentence? Guido hates excessively concise/cryptic punctuation as language elements, so they chose something that reads a bit more like English; if you read it aloud, e.g. "a if a is not None else b", it makes sense. You could also view it as a stealthy attack on the ternary operator, which many people despise as encouraging cryptic code. Either way, we're not talking about something truly ridiculous here; it's a reasonable design decision. This isn't PHP's left associative ternary operator or anything.

about a month and a half ago
top

The World's Best Living Programmers

ShadowRangerRIT Re:damned multi-page (285 comments)

Odd that Anders Hejlsberg's more recent (and at this point, probably more widely used) lead role in developing C# isn't mentioned. Turbo Pascal is ancient, and doesn't hold up so well.

about a month and a half ago
top

Python Bumps Off Java As Top Learning Language

ShadowRangerRIT Re:Which raises the critical question: (415 comments)

I really hope 3.x, if only for the fact that your code tends to work with non-English text by default, because str supports the whole Unicode range, so it works with non-English input by default. Compare to 2.x where you have to make a conscious effort to work with Unicode. Particularly important for third party libraries, where they aren't producing a final application, and often don't think about Unicode at all even for text based APIs. Heck, the Python built-in csv module in 2.7 doesn't work properly with Unicode; you have to load or convert as UTF-8 bytes, parse, then decode to the 2.7 unicode type. It's a mess.

For teaching purposes 3.x is even better, since you have a proper distinction between binary data and text, rather than the mushy 2.x situation where str is sometimes binary data and sometimes handicapped text, while unicode is always text, and sometimes interoperates with str, while at other times it explodes. Teaching languages should be consistent, and 3.x is simply more consistent than 2.x (largely because of cleanup decisions like this).

about a month and a half ago
top

California Whooping Cough Cases "an Epidemic"

ShadowRangerRIT Re:Adults are the carriers (387 comments)

I wouldn't have normally bothered, but the distinction is relevant given TFA. The switch to an acellular version of the pertussis inoculation is what reduced the duration and efficacy of protection. It's not that the old pertussis vaccine was ineffective, it's that we've been using a different vaccine for the last 20 years, give or take, and the new vaccine ended up losing a lot more efficacy than they expected.

about 2 months ago
top

BMW, Mazda Keen To Meet With Tesla About Charging Technology

ShadowRangerRIT Re:nissan or mazda? (137 comments)

I agree that a good shared standard might allow for efficient production of batteries by removing the market fragmentation that dissuades people from starting up "gigafactories".

That said, Tesla hasn't demonstrated a superior battery technology. The 2013 Leaf's range was rated lower than it really should have been. It offered a "Long life" charging setting, where it would stop charging at 80% instead of 100% to extend battery life. The EPA decided to base the estimated range on a 90% charge to split the difference between the two options, because the 80% charge was "recommended". Tesla allows you to stop charging at any 10% increment between 50% and 100%, but because lower charges aren't "recommended" the EPA assigned a range based on a 100% charge.

Factoring that in, at 100% charge, the 2013 Leaf should have a range of ~84-85 miles. Assuming 84, on a 24 kWh battery pack, that's 3.5 mi/kWh. The Tesla gets ~3.1 mi/kWh. The Tesla is heavier thanks to all those extra batteries, which is a big part of the difference; I suspect that if you made a Tesla with a 24 kWh pack, it would have similar efficiency to the Leaf. Battery tech is hard to improve; Tesla and Nissan are using the same basic tech.

TL;DR: Stacking more batteries is hardly a demonstration of superior technology.

about 2 months ago
top

BMW, Mazda Keen To Meet With Tesla About Charging Technology

ShadowRangerRIT Re:nissan or mazda? (137 comments)

Not according to Nissan's website. The base S model has a 3.6 kW charger. You can add a charge package for $1250 that upgrades it to a 6.6 kW charger and adds a Quick Charge port, but the base model doesn't support 6.6 kW charging or a Quick Charge port by default (similarly, the mid-level SV model comes with a 6.6 kW charger, but requires an add-on package to get Quick Charge). Might be hard to find a completely base S model without the charge package, but Nissan claims it's an option.

about 2 months ago
top

BMW, Mazda Keen To Meet With Tesla About Charging Technology

ShadowRangerRIT Re:nissan or mazda? (137 comments)

Nissan doesn't have problems with charge times (at least, no more than Tesla). The base model takes 8 hours to charge from empty, but they offer a 4 hour charge option (that runs off the same Level 2 charging stations) and a Quick Charge option that gets an 80% charge in 30 minutes. Pretty similar to Tesla.

about 2 months ago
top

California Whooping Cough Cases "an Epidemic"

ShadowRangerRIT Re:Adults are the carriers (387 comments)

The "ap" part of "Tdap" stands for "acellular pertussis", not just "and pertussis". The acellular variant of the vaccine has fewer side-effects, but also provides less protection, and less long lasting protection.

about 2 months ago
top

Fiat Chrysler CEO: Please Don't Buy Our Electric Car

ShadowRangerRIT Re:Diesel? (462 comments)

It's not about gas vs. diesel (or electric). It's about variant designs sold in the U.S. vs. Europe. They don't sell exactly the same car. Even with the same fuel type (though they might beef up the U.S. engine to handle the extra weight), U.S. cars tend to do a little more poorly on mileage due to the weight of the extra safety features.

about 3 months ago
top

Fiat Chrysler CEO: Please Don't Buy Our Electric Car

ShadowRangerRIT Re:Diesel? (462 comments)

I suspect most of the remaining difference is in the weight of the various crash safety features. Cars in the U.S. are expected to provide protection in a crash with the tanks they now market under the name "SUV"; in Europe, this isn't as much of a consideration.

about 3 months ago
top

Discrete Logarithm Problem Partly Solved -- Time To Drop Some Crypto Methods?

ShadowRangerRIT Re:It's still NP. (114 comments)

A short key right now is 512 bits (0.5 KB). A longish key right now is 4096 bits (4 KB); many sites use shorter keys because high traffic sites can't afford the bandwidth and CPU required to transmit and process even a 4096 bit key for thousands of connections per second. Squaring even the short end of that range would produce a 262144 bit key (256KB). That's a ridiculous amount of data overhead just to initiate a connection, and performing math in a space that large would tax the CPU of individual computers; if a web server is performing that much math for every connection, you'd dramatically increase the overhead to serve web pages.

TL;DR: Squaring key length make math hard, hurt computer.

about 3 months ago
top

Discrete Logarithm Problem Partly Solved -- Time To Drop Some Crypto Methods?

ShadowRangerRIT Re:It's still NP. (114 comments)

That's not how big-O notation works. O() is not a function, you can't just rearrange the components. There isn't even a constant factor involved in either version of what you wrote. Who modded this informative?

about 3 months ago
top

Survey Finds Nearly 50% In US Believe In Medical Conspiracy Theories

ShadowRangerRIT Re:Took me a bit to find this (395 comments)

Three decades, not four, but your point is valid. I'm not really trying to defend them. I do think the location and era (largely Jim Crow) influenced this more than a general lack of medical ethics; it's a lot easier to justify atrocities when you don't see your subjects as truly human. Think less "conspiracy of unscrupulous doctors" and more "complete inability to see members of another race as people".

about 5 months ago
top

Survey Finds Nearly 50% In US Believe In Medical Conspiracy Theories

ShadowRangerRIT Re:Took me a bit to find this (395 comments)

They weren't deliberately infected, they weren't soldiers,

Everyone knows the Tuskegee Blacks were in the military. They were airmen.

You're confusing the Tuskegee airmen with the Tuskegee syphilis experiments. They have nothing in common besides being trained (the airmen) and conducted (the experiments) in proximity to Tuskegee, AL. Tuskegee is an almost exclusively Black/African American city, so most things that are associated with Tuskegee are also associated with black people.

(they were sharecroppers, and they were provided with free medical cares,

What good is "medical care" when there's a deliberate lie about the care?

If you read another sentence or two, you'd note that there was no verified treatment for syphilis for the first decade of the experiments. Providing palliative care to those with incurable diseases is a net good; there are legitimate philosophical arguments over how much information a doctor should provide when the information cannot be understood or acted upon in a meaningful way.

Clearly this was unethical, but recall, this was Jim Crow era. A lot of people considered black people sub-human. Sure, the doctors didn't tell them they had syphilis. But the South made it nigh impossible for them to vote, hold elected office, get a meaningful education, buy property, use public services, receive a fair trial, etc. We were kind of awful in general; the Tuskegee experiments weren't that much more awful when compared to everything else we did.

about 5 months ago
top

Survey Finds Nearly 50% In US Believe In Medical Conspiracy Theories

ShadowRangerRIT Re:Took me a bit to find this (395 comments)

They weren't deliberately infected, they weren't soldiers, (they were sharecroppers, and they were provided with free medical cares, meals and burial insurance as compensation), and for the first decade of the study, there was no verified cure for syphilis (the efficacy of penicillin wasn't verified until the 1940s; the study began in 1932). It's hard to blame the architects of the study for studying an incurable disease to chart its progress, though obviously their successors lacked any moral compass.

The facts of the Tuskegee syphilis experiment were bad enough, but you're making it seem even worse. This is the part of the problem. Actual malfeasance gets exaggerated even further; it changes from failure to take action (treat patients like they should have) to deliberate malevolence (intentionally infecting patients). If you reinterpret the world as one in which everything is explained by deliberate malice, of course you'll believe in conspiracy theories.

Sadly, in this particular case, despite being completely off base about Tuskegee, there were in fact acts of active evil perpetrated in Guatemala. Unlike Tuskegee, the experiments weren't on U.S. citizens, only lasted three years, not forty, and the subjects were treated for the conditions they were infected with (though some still died). Doesn't excuse it, but again, it's not a good basis for proving the existence of long term, actively malevolent policies.

about 5 months ago
top

Steve Jobs To Appear On US Postage Stamp

ShadowRangerRIT Apple and Email (184 comments)

The profitable first class mail business has been decimated by email over the past decade, thanks in no small part to the contributions of Steve Jobs and Apple

Huh? What the hell did Apple do for e-mail (beyond what every OS/application developer has done)? "OMG, they make computers, therefore, all things done on computers are their responsibility!"

about 5 months ago
top

Controversial Execution In Ohio Uses New Lethal Drug Combination

ShadowRangerRIT Re:Hmm (1038 comments)

Yes, because when it comes to the state taking someone's life, we shouldn't make absolutely sure it's warranted...

about 7 months ago

Submissions

top

"Convergence" to provide wi-fi, wolfpigeon

ShadowRangerRIT ShadowRangerRIT writes  |  more than 5 years ago

ShadowRangerRIT (1301549) writes "To provide ubiquitous networking, Qualcomm has created Convergence a program to spread wi-fi enabled wolfpigeons to every corner of the globe. Worried about the effects of a wolfpigeon insurrection? Well they've got a sharkfalcon army available to deal with that possibility. And don't worry, there are contingencies for the inevitable predation of the sharkfalcons, visit their page to find out more."
Link to Original Source
top

Elderly Chinese Women Sentenced to "Re-Educati

ShadowRangerRIT ShadowRangerRIT writes  |  about 6 years ago

ShadowRangerRIT (1301549) writes "Wu Dianyuan, 79, and Wang Xiuying, 77, went to Chinese police five times between Aug. 5 and Aug. 18 to seek approval to protest [outside the Olympics]. The Chinese government decided the resolve the situation by sentencing them to "labor re-education camp". China's side of the story? "I'm glad to hear that over 70 protest issues have been solved through consultation, dialogue. This is a part of Chinese culture," said Wang Wei, China's top Olympics official.

On the heels of previous stories about protesters disappearing I think we can safely say that any claims that China would improve human rights conditions as a result of hosting the Olympics were painfully misguided."

Link to Original Source
top

Protesters "mysteriously" absent from Olym

ShadowRangerRIT ShadowRangerRIT writes  |  about 6 years ago

ShadowRangerRIT (1301549) writes "The Chinese set up "protest pens" in three Beijing parks. They are going unused. Do the Chinese have nothing to protest? Apparently not: Some of those applying to protest are being harassed and sent home without a permit. Others are detained or simply "going missing".

I can't believe anyone would question the assertion that the Olympics might cause China to improve human rights..."

Link to Original Source
top

No charges in Justice Dept. Hiring Scandal

ShadowRangerRIT ShadowRangerRIT writes  |  about 6 years ago

ShadowRangerRIT (1301549) writes "Quis custodiet ipsos custodes? Apparently no one. Mukasey has announced that he won't pursue charges relating to the partisan hiring practices in the Justice department. With no repercussions and a civil service pool polluted with ideologues, we can look forward to yet another Bush legacy that extends well beyond his time in office."

Journals

ShadowRangerRIT has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>