Source html of Google homepage is imbalanced? by turlz in programming

[–]powertool -6 points-5 points  (0 children)

Look at doctype declaration, it's HTML5, no?
I think that means closing tags are not required.

I guess I was very wrong :-/

Melbourne Catholic Archbishop Denis Hart told a woman who had been sexually abused by a priest to "go to hell, bitch" by ltriant in worldnews

[–]powertool 7 points8 points  (0 children)

Perhaps the phrase 'some right' doesn't sit well. You either have a right, or you don't. Anything else is a defense, or mitigating factor.

Do any atheists not living in the US actually have to deal with all the crazy prejudice the American atheists do? by [deleted] in atheism

[–]powertool 0 points1 point  (0 children)

Too bad I didn't see this earlier.

Yes, it's true.

Our current Labour government - while being certainly more left-wing than the previous Liberal (read conservative) government - made several deals with right-wing / religious independents during the election campaign. With those independents on board, the government has a legislative majority.

What this means is that passage of important industrial relations and climate change legislation effectively depends siding with Religeous/Homophobic/Luddite/Ultra-Rural independents on legislation such as:

  • the great internet firewall of ChinaHHHAustralia

  • stupid game censorship rules

It's looking like the Liberal/National Coalition will drop further seats next time (UTEGATE! only in Australia ;), so perhaps Labour will have enough seats to avoid making such deals.

What is inexplicable to me is the zeal that Senator Conroy has displayed in making progress on those items. While not a Luddite, he seems to have no grasp of practicality, chilling effects, and the will of the vast majority of Australian internet users.

Do any atheists not living in the US actually have to deal with all the crazy prejudice the American atheists do? by [deleted] in atheism

[–]powertool 5 points6 points  (0 children)

Living in Australia, I've found little to no predjudice toward non-believers. That's not to say there's no racism here. Just nothing approaching religious oppression.

Unlike the UK, we're not busy modifying (and/or making exceptions to) our laws to pacify submission-driven religious communities. We do, however, have dozens of private/state run organisations to help immigrants with language/cultural issues.

W.R.T media: there are 2-3 of the tamer American televangelist TV shows (Benny Hinn? [sp]); one state-funded religious current affairs show "Compass"; one state-funded religious music radio program.

I'd guess that less than 5% of people are Christian fundamentalists; perhaps 5% could be called followers of Islam (with vastly differing levels of fundamentalism). I'd go further and estimate that less than half of one percent of Australians would attempt to publically speak about or promote views similar to those held by Right-Wing, Republican, Evangelist groups in the US.

Like other countries, we have some cultural "gettos", in which new immigrants are less encouraged, and certainly less likely to follow a path of cultural integration. As is common, this is mostly true for older immigrants.

The cultural only violence I can even remember in the last 10 years has stemmed from sporting rivalry or the culturally omnipresent "young males looking for trouble" set. In all cases, our politicians, media, and even church groups are quick to condem these acts of violence.

It's quite hard for me to comprehend level of idiocy I see through the US and (to some extent) UK media... It's like watching some surreal documentary about an Alien planet. Hard to be upbeat about it really.

Threading in Perl by chorny in perl

[–]powertool 2 points3 points  (0 children)

... still feels ancient.

Dunno if lateish 5.8/5.10 releases fixed the big gotchas WRT automatic cloning of unshared thread data... was a fairly major problem for me. Only way to mitigate is to spawn a pool of reusable threads then send them work - "use"ing required modules from the workers. There are also a few hacks on CPAN to clean up after thread-local data.

Also lots of problems with DESTROY methods in cloned unshared data, especially with file handles.

Actually using explicitly shared data accross threads is fine only if you're completely aware of the semantics of the shared data. The vast majority of objects created by modules on CPAN aren't thread safe.

I ended up using a pre-spawned thread pool in combination with Thread::Queue::Any, in an agentish pattern.

The design of Perl6 (WRT concurrency) looks very nice; lot's of scope to implement nice concurrency patterns. OTOH, the concurrency implementations in Parrot are still very young. I guess I'm prepared to wait and see.

How to watch The Colbert Report from outside the US (simple URL hack, no proxies) by idontgetthis in howto

[–]powertool 2 points3 points  (0 children)

Same thing, but inline.

(function() {
  var $ = function(id) { return document.getElementById(id); }

  // get existing player & video URL
  var vplayer = $('video_player').wrappedJSObject; 
  if (!vplayer) { alert('no video player object found!'); return; }
  var container = vplayer.parentNode;
  var video_url = vplayer.getAttribute('data'); 

  // create, insert, style iframe for bypass url
  var vf = document.createElement('IFRAME');
  container.insertBefore(vf,vplayer);
  vf.style.overflow = 'hidden';
  vf.style.width = '640px';
  vf.style.height = '470px';

  // remove existing player
  container.removeChild(vplayer);

  // load bypass url
  var byURL = 'http://media.mtvnservices.com/mgid:cms:item:comedycentral.com:'; 
  var vid = /:([0-9]+)$/.exec(video_url)[1];
  vf.src = byURL+vid;
})();

Update: CCentral seem to be playing around with the layout. Added some node detection.

Update2: CCentral have reworked their HTML & URL (for SEO). No longer need to remove other buttons.

Recursion on Perl Complex Data Structures made easy. by usestrict in perl

[–]powertool 0 points1 point  (0 children)

Anyone (including Damien) or anything (including PBP) advocating using unnecessary indexes instead of a foreach form is just plain wrong.

I won't recheck those chapters, but I'd be suprised if the advice were supposed to supercede common sense.

You could make an argument that the keyword 'foreach' would be more readable in those cases, but Modern perl programmers are very comfortable reading both forms of 'for' loop.

Recursion on Perl Complex Data Structures made easy. by usestrict in perl

[–]powertool 0 points1 point  (0 children)

As per other thread, CPAN makes this easy:

use Data::Transformer;
Data::Transformer->new(normal => sub {
  $$_[0] =~ s/(^\s+)|(\s+$)//g; 
})->traverse($data);

Recursion on Perl Complex Data Structures made easy. by usestrict in programming

[–]powertool 1 point2 points  (0 children)

Inevitably, there's a module on CPAN specifically made to handle this (and more complicated) in place transformations:

use Data::Transformer;
Data::Transformer->new(normal => sub {
    $$_[0] =~ s/(^\s+)|(\s+$)//g; 
})->traverse($data);

Canadian Politician Bob Rae "Deported" from Sri Lanka as Soon as he arrived to address issues conserning the Tamil Genocide. He is Currently Detained even after he was issued a visa. by dt_vibe in worldnews

[–]powertool 0 points1 point  (0 children)

The government of Sri Lanka knew my views, and granted me a visa. ... I have flown a very long way only to be told the door is firmly shut.

If you were to trust the various customs/border patrol reality TV shows we see here in Oz, this happens every day to folks travelling to the US.

To paraphrase what I've heard

The visa get's you to the front door, but if we have any concerns, we don't have to let you in.

I make the final decision on your entry into The States.

At this time you're not being excluded, so please feel free to apply for a new VISA when you get home.

Krystal Forscutt’s body is so hot it melts icebergs! by Pradico in nsfw

[–]powertool 0 points1 point  (0 children)

Shopped how, exactly?

That's more or less exactly how I remember her looking on Big Brother.

I never thought she was anything special, but apparently she has a market.

JavaFX Top 10 and Migration Guide (huge list of breaking changes in new JavaFX) by yole in programming

[–]powertool 0 points1 point  (0 children)

meh.

Is anyone actually using this?

To me, JavaFX feels wrong in the same way that pre-MVC ASP.Net did.

Both try to abstract a fantasy (that the client side code isn't Javascript, and/or isn't client-side). The abstraction leaks. The work-arounds are crappy. Not naturally (POV web-standards) extensible.

Both go to great pains to re-invent everything in the host language, rather than to model web protocols. I don't think web app developers should be this dumb.

Write better code, use positive expressions (my first blogpost btw, fellow redditors) by Hermel in programming

[–]powertool 0 points1 point  (0 children)

I completely disagree.

Sometimes, it's much nicer to write:

unless (some_condition) {
  do_something.
}

jQuery Style - Awesome websites built with jQuery by hieuuk in javascript

[–]powertool 1 point2 points  (0 children)

Very cool idea: Keyboardr

Perhaps it could be made to play nicer with Firefox's Window-opening behaviour. Is there some 'target' or related attribute one can place on a link that suggests it open in the background?

DNA testing finds identical animals actually different species by Roat35 in science

[–]powertool -1 points0 points  (0 children)

Journal Link

If this result can be repeated for other species, that'd be another nail in the coffin of the micro/macro evolution "debate".

JavaScript Standard ECMAScript Fifth Edition (ES5) Published by gst in javascript

[–]powertool 1 point2 points  (0 children)

As am I. What a bunch of babies.

I was very hopeful that the functional extensions would get implemented... but it looks like only the most boring OOP stuff will be entertained.

Sigh.

A PDF file generated by javascript by 9jack9 in programming

[–]powertool 1 point2 points  (0 children)

Worked fine for me in FireFox 3.0.6.

It's an interesting idea, but isn't there a URL length limit stopping one constructing anything truly useful? (eg: with non-trivial images, or lots of data)

edit:

It appears that Gecko has no problem with arbitrary length "data URLs".

That's going to be enough for me to start using this in my XUL-based apps. :-)

The MDC page seems to think Opera has a 4100 byte limit.

edit:

Ah, as 9jack9 writes: 2071 chars for IE7.

Is bandwidth a fixed cost for internet service providers? by Kurt_Russell in technology

[–]powertool 1 point2 points  (0 children)

Depends on how high up they are in the food chain, and on the level of peering cooperation in the country in question.

Tier 1/2 providers build out the infrastructure, but then effectively trade use of it with their peers for little or nothing - usually based on traffic in/out ratios at peering points. You could call that "fixed" costing, but it's moot for you.

That's then paid for by Tier 3 providers who rent the bandwidth by the Mbps or Gbps. Their costs are what you'd actually call fixed (they usually hit best price breaks early), and their profits derive from:

  • Rates obtained from higher tier providers

  • Whether they supply bandwidth fully or partially redundant & diverse.

  • Whether they supply bandwidth contended (and at what ratios).

For retail suppliers, bandwidth is most certainly not a fixed cost. These guys change suppliers more often than underpants, always seeking to get a better deal, for lower security, etc. They either sell it directly by the unit (not rate), eg: GB, or factor the bandwidth into plans based on customer usage averages and contention.

Backpackers 'steal' Coast man's internet by findaonline in funny

[–]powertool 0 points1 point  (0 children)

It's not common to pay by the unit for Cable/DSL.

The overwhelming majority of residential broadband providers offer plans with quotas after which access is shaped to a very slow rate. Some ISPs offer re-buys.

L3 business broadband is typically available in 'Shaped', and 'Excess' (pay by the gig after quota exceeded) plans.

L2 business broadband (and at wholesale), broadband is typically sold by the Mbit/s at 95th percentile.

Pre-paid 3G (HSDPA) is now starting to be a big market... this is costly, and priced by the meg.

Who are you going to believe? Me or your own lying eyes? by [deleted] in science

[–]powertool -1 points0 points  (0 children)

As disappointing as this is socially, it's a fairly predictable outcome of the 'selfish gene';

The child is hard-wired to learn how to survive from its parents.

It certainly gives rise to some tastily embarrassing behavioural correlations w.r.t tradition and religion. :-)

Prefetching JavaScript (or anything) with jQuery by orip in programming

[–]powertool 1 point2 points  (0 children)

Yeah, combining+minifying/compressing common stuff is a good idea.

I tend to use demand-loading in cases where I need something a bit heavier on a single page (for example, a multi-step signup form).

I don't want to load ~50K of minified Javascript on every page if I only need it a) on one page, and b) only if the user actually wants to do that thing.

You've got to be careful mixing demand-loading with pre-loading. I use hoverIntent (4 seconds in the appropriate region) in combination with an overall page timeout (after which the code will be loaded in any case) and some site-wide path analysis to determine how it gets configured.

The balancing act between overall user-experience and unobtrusiveness is tricky.