Travelers Beware

The family flew out to New York on 27 December. When Ms Bray began coughing later that day, she initially put it down to her asthma and the air conditioning on the flight.

The following night, she became more unwell with laboured breathing and was admitted to the Queen’s Medical Centre in Harlem.

But Ms Bray was told her daughters could not stay with her at the hospital as they were minors.

“A doctor told me they would make the arrangements, then a few hours later a social worker arrived and said they’d try to find a foster family for the girls,” she said.

“Instead of that they were taken to a orphanage and subjected to the kind of treatment you wouldn’t even expect criminals to go through.”

There’s just too much horrifying information in this article. I can’t except a ‘most shocking’ section because it’s all shocking. Read on for yourself.

Source: Anger over girls’ strip searches, BBC News

Student Arrested After Cutting Food With Knife

Local6 is running a story worthy of The Onion:

According to authorities, school employees spotted the girl cutting her food while she was eating lunch and took the steak knife from her.

The girl told sheriff’s deputies that she had brought the knife to school on more than one occasion in the past.

Students told officials that the girl did not threaten anyone with the knife.

The girl was arrested and transported to the Juvenile Assessment Center.

Have we really come to this? Charging 10 year old girls with felonies for cutting their food with a knife?

H. Res. 847

This week, the House passed some landmark legislation: H. Res. 847. The resolution illustrates an obnoxious tendency of the Congress to waste time discussing and voting on completely meaningless drivel.

H. Res. 847 is, of course, the critical ‘Recognizing the importance of Christmas and the Christian faith‘ resolution. It finds the following:

Resolved, That the House of Representatives–
(1) recognizes the Christian faith as one of the great religions of the world;
(2) expresses continued support for Christians in the United States and worldwide;
(3) acknowledges the international religious and historical importance of Christmas and the Christian faith;
(4) acknowledges and supports the role played by Christians and Christianity in the founding of the United States and in the formation of the western civilization;
(5) rejects bigotry and persecution directed against Christians, both in the United States and worldwide; and
(6) expresses its deepest respect to American Christians and Christians throughout the world.

As you can see, all this resolution is doing is making statements. Why are they making statements about how important Christmas is on my tax dollar? The standard reply from every Congresscritter I’ve written to in regards to considering impeachment as a means to investigate all of the games our President has been playing (Plame, signing statements, email destruction, Iran, the ‘accidental’ trip of six nuclear warheads across the country, and a myrid of other topics that Congress has failed to investigate/been stonewalled when they tried to investigate) is met with a “it would take too much time, and we have more valuable legislation to be discussing” answer.

If you are so hard-pressed for time, why in the hell are you passing useless resolutions? They pass resolutions ‘honouring’ things constantly. They’re useless bills and they’re a waste of time.

Not only is this bill a poignant reminder of what is more important than, you know, providing oversight to the rest of the federal government (checks and balances, anyone?), it’s an unconstitutional bill. Did Congress forget about the first amendment?

Congress shall make no law respecting an establishment of religion. . .

Thanks, guys. I’m glad we’re paying you all $165,200/y.

More iTorrenting

Continuing on yesterday’s work, I’ve gotten iTorrent to be functionally complete. The one thing that remains to be done is putting together the iPhone UI that it draws it’s name against. That just involves putting some templates in the iphone/ directory and (probably) writing a ton of Javascript to make the experience pleasant. Since I hate designing things, I left that till the end…

I did find a number of things worthy of being shared, though. First and foremost is how awesome rTorrent’s XMLRPC interface truly is. The system.multicall method is incredibly, incredibly, incredibly powerful:


$results = $this->rpc->multicall(array(
array('methodName' => 'get_max_uploads_global', 'params' => array(''),
. . .
));

With that, I am able to get/set all of my rTorrent client settings in one HTTP request. Tiny amounts of overhead FTW.

However, PEAR::XML_RPC2 or Curl or something don’t do the multicall so well with Lighttpd. It sends some kind of Expect header to Lighty and it freaks out and replies with an HTTP 417 code. I only noticed this when doing system.multicall.

According to InfinityB, this is going to be fixed in Lighttd 1.5.x, but in the mean time, here’s a patch you can apply to force it to send the expect header as blank:


/usr/share/php/XML/RPC2/Util/HTTPRequest.php
197c197
< curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml; charset='.$this->_encoding, ‘User-Agent: PEAR_XML_RCP2/0.0.x’)) &&

> curl_setopt($ch, CURLOPT_HTTPHEADER, array(’Content-type: text/xml; charset=’.$this->_encoding, ‘User-Agent: PEAR_XML_RCP2/0.0.x’, ‘Expect: ‘)) &&

The functionality I added to iTorrent today was:

  • Adding torrents by URL
  • Setting client-wide settings (max up/down rate, download/upload/seed slots, etc)
  • Viewing RSS feeds and adding these torrents with one click (and having the damn nyaatorrent URLs rewritten to be direct links to the torrent instead of their fucking info page)
  • RSS highlights

I also learned that PHP can’t handle strings worth shit. The TT RSS feed has very unicode-y things (funny characters in things that could be ASCII, mooninite glyphs, etc), and comparing these to titles that rTorrent reports does not work well at all. What I finally did was strip the zero-width space characters out of titles in the RSS feed, which makes it fairly reliable for any torrent/RSS item titles that do not have moon glyphs in them.

Manage Torrents RSS Reader rTorrent Settings

My model classes for hiding all of the nasty details of XMLRPC are all kinda like some sort of ActiveRPC implementation. They’re pretty slick. Even if somebody doesn’t want to use my UI, the classes would go a long way towards helping them write some PHP scripts to automate torrenting for them.

I’ll have a source release when I finish my iPhone UI. I’ll probably have some thoughts on web design for the iPhone in a few days.

iTorrent

For the past six months or so, I’ve been using Azureus’ command-line interface for my torrenting needs. Using it can be likened to running a cheese grinder over your thighs for hours on end; it’s a horrible, horrible afterthought that some developed put in. It didn’t handle backspace properly, the help menu was dismal, setting file priorities would make you cry, and configuring Azureus itself through that UI was next to impossible. Even the wiki says just fire up X and the GUI to do the initial configuration because the CLI interface is so bad. All that said, Azureus supported DHT, and that was useful enough to justify using it.

rTorrent finally added DHT support. It’s not in the stable release yet, but today I build the libtorrent/rtorrent trunk and the XMLRPC-C trunk. The amount of power and flexibility this combination brings to the table is breathtaking.

First and foremost, rTorrent is the frontend for libtorrent. It’s an *incredibly* fast ncurses client with a ton of features packed in. The UI is much, much, much easier to use. It has screens and progress bars and all manner of useful pieces of data and controls I can navigate to.

But, the real kicker is the XMLRPC interface. Everything you can do in the rTorrent UI, you can do over XMLRPC. When I got this working, I nearly had an integrationgasm by thinking about all of the possibilities. I can write a web app to pull in RSS feeds of torrents (say, from Tokyo Toshokan) and put a ‘Download’ link right there. It can add the episode to a queue of things to watch and file it in the right folder when the download completes. Then I can mark it as watched afterwards and report out on how much of my life has been wasted.

Of course, I can’t just make any old web UI. My UI will be a multi-user rTorrent manager with ACLs and all that sort of fun. It will have a rule engine that rTorrent uses when a file completes to sort files out. And, it’ll detect if you’re using it from my iPhone and give you a special, iPhone-y interface with big happy buttons that say ‘Download’.

One tap to download, baby!

I’ve got the authentication and ACL stuff done (I just gutted Kitto) and a nice Torrent class for getting data over XMLRPC.

iTorrent Preview

I did run in to some problems with XMLRPC-C and PEAR::XML_RPC2, though. Since rTorrent insists on expressive everything in bytes over the API, unsigned int32s are too small to hold the size of most files. The XMLRPC spec doesn’t account for anything larger than an int32, but the Apache guys have an ‘extension’. They added for unsigned int64. XML_RPC2 didn’t support this, but I hacked support in.

It’s a very kludgy solution. On a 32-bit OS, PHP’s int datatype is only an int32. Float, however, is as large as you want it to be. It’s probably Bad For Performance, but I just casted s to floats to make it work.

« Previous PageNext Page »