Wednesday, 12 June 2013

NSA PRISM and the attempts to justify it.

Recently I've been watching this unravelling NSA debacle with muted interest, I can't say that anything exposed thus far is entirely surprising, but suspicion and knowledge are two different things, so it's been interesting to watch it move from one category to the other. Personally I'm going to be divesting myself of most cloud data as much as possible as a result of these revelations, but that's another story. What's been most interesting to me is the propensity for people to actually attempt to defend this activity.

There are three posters on hacker news which spring to my mind first and foremost as the most strident defenders of the state whenever some random event arises which displays the government in full hideous glory and reminds people of what they otherwise mostly choose to blithely ignore.These posters are tptacek, rayiner, and mpyne.

Whenever the US government goes into meltdown mode, often instead of just reading all the stories on HN and getting the uninteresting echo chamber of shock and outrage, I will skip straight to just reading the comments of these posters. I do this because although we are diametrically opposed in terms of viewpoint, I do believe them all to be intelligent people and watching how people like this rationalise this kind of behaviour is a very enlightening thing.

The rationalisations almost always come in this flavour; rayiner will state it doesn't matter because it's legal, tptacek will state it doesn't matter because it's of the practical implications of the alternatives, and mpyne will state it doesn't matter because at least things are getting better, or the alternative would certainly be much worse.

In this instance, mpyne has the most interesting response I chanced upon from a day ago where he breaks into listing the spectacular failures and malevolent actions of the US government throughout history, finishing with the classic "At least we're not that bad anymore" finisher.

This is beautiful because it displays just how aware he is of the laundry list of malevolent activity the state has partaken in throughout history, but right at the end when I thought he might recognise this is actually a continuous and repeating pattern he jumps to the conclusion that at least things have gotten better.

I didn't want to reply directly to the comment, as it's now almost two days old and he probably doesn't go fishing through his old comments to respond to them, but just out of curiosity I thought I'd run an experiment on a few entries in that catalog of malice.

Just to take the first three fairly recent examples;

> My Lai

Occurrence; March 16, 1967.
Public knowledge; November 12, 1969.
Government sweeps it under the carpet; December 17, 1971.
Point at which widely accepted as "objectively evil"; 1977 (based on the fact that even the president was pardoning those dastardly draft dodgers at this stage)
Time shift; 10 years.
Continuance; Drone strikes, Targeted killings.

> COINTELPRO

Occurrence; 1956
Public knowledge; 1971
"objectively evil"; 1976 (select committee report castigating the program)
Time shift; 14 years.
Continuance; Aaron Swartz, Weev, Recent IRS Scandal, Wikileaks, Snowden, Manning, the associated avalanche of persecuted whistleblowers.

> Syphilis testing on unsuspecting blacks

Occurrence; 1932
Exposure; 1972
Objectively evil; Immediately
Time shift; 40 years.
Continuance; Overseas clinical trials of experimental pharmaceuticals, Dan Markingson, Raytheon testing torture weapons on prisoners in Castaic, California.

Summary;
Average time shift; 21.3 years between occurrence and widespread public outrage.

Let's see how history looks back in 22 years or so and sees the events of today as more or less objectively evil than our immediate forebears, these things have a habit of working themselves out slowly in time. The pieces of this particular puzzle are just starting to drop into place, it will take time until all the dirty laundry is aired.

Of course, the one thing I'll bet a large sum of money on is that in 22 years time, if there is still violent, parasitic and coercive government around, it will still be following this time honored pattern of behaviour and people will still be claiming they've evolved from their previous uncivilised state n years ago which they now have abundant historical evidence for.

You think back then they weren't looking back 20-30 years and patting themselves on the back for their improvements? And so on, and so forth, right back until the first warlord congratulated himself on cleaning up the local bandit problem before setting up a protection racket, imagining himself to be an enormous improvement upon the parasite class before him?

It is the nature of the beast, it doesn't get better, it just gets a new suit, a haircut and feeds you a new pack of lies.

Hope.

Saturday, 30 June 2012

Compiz grid ubuntu grief finally got too much for me

Anyone that has been using ubuntu for a while who originally grew attached to the compiz grid plugin and yet wanted to avoid using unity and switched to another environment as a result has probably experienced some rather annoying regressions in the distro since that point in time.

I have mostly successfully but always with niggling drawbacks attempted to work around this issue either by recompiling compiz from source and not using the official ubuntu packages for compiz combined with xfce4, however it could be pretty hit and miss as to whether any random package update was going to break everything in an unpredictable way day to day. I'm not hating on unity here I'd like to add, I'm well aware that for mass acceptance in the market canonical is making the right decision, I'm just trying to avoid ending up collateral damage for this move.

As of this evening I finally got fed up enough with the constant regressions and a few days actually trying to do real work in unity that I threw the entire thing away and went full XFCE4 only. I figured I could write something to copy the functionality of compiz grid and all would be OK with the world. After a little investigation however, I see that Chris from google over at http://code.google.com/p/snappy-util/ has already written the basic code for a WinSplit revolution clone called Snappy.

I tried to compile this without success, the default makefile is supposed to just work. Needless to say it does not on Ubuntu 12.04 64 bit, so I fiddled around with the build until I got it giving me a binary properly (g++ main.o -lX11 rather than the default) and ran into two other problems;

1) XGrabKey fails to work with the default key bindings, this wasn't such an issue really as I didn't want those anyway, I prefer to use shift+super qweasdzxc rather than the traditional ctrl-alt kp123456789 so I just modded the source for these keys instead.

2) A sanity check in one of the methods seems to fail based on the return data size not being what was expected. I think this might be something to do with the fact that my system is 64 bit, it looks like just disabling that sanity check doesn't cause any problems.

After those two things were handled I had myself a fully working ubuntu 12.04 snappy binary that happily functioned perfectly identically to winsplit revolution / compiz grid. Thanks very much to Chris for taking the time to write this and if anyone else is after the same thing and doesn't want to go through the trouble of the manual compile on Ubuntu 12.04 64 bit like I did, I have uploaded just the raw binary here.

No more wrestling with compiz grid regressions while canonical takes it in a direction consistent with their unity strategy, a weight has been lifted from my shoulders.


Thursday, 9 February 2012

Non standard tab stops in yaml file triggers psych parsing error

Really unhelpful error message encountered today, I spent a couple of fruitless hours debugging it until I stumbled across the answer.


/home/eric/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:154:in `parse': (<unknown>): couldn't parse YAML at line 11 column 0 (Psych::SyntaxError)
        from /home/eric/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:154:in `parse_stream'
        from /home/eric/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:125:in `parse'
        from /home/eric/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:112:in `load'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/application/configuration.rb:115:in `database_configuration'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activerecord-3.2.1/lib/active_record/railtie.rb:75:in `block (2 levels) in <class:Railtie>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activerecord-3.2.1/lib/active_record/railtie.rb:74:in `block in <class:Railtie>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /home/eric/AppName/config/environment.rb:5:in `<top (required)>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
        from /home/eric/AppName/config.ru:4:in `block in <main>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
        from /home/eric/AppName/config.ru:1:in `new'
        from /home/eric/AppName/config.ru:1:in `<main>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
        from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

Googling this will show psych is choking on some yaml somewhere, but the error message is extremely unhelpful in actually pointing out the location of the problem.

       from /home/eric/.rvm/gems/ruby-1.9.3-p0@rails3/gems/railties-3.2.1/lib/rails/application/configuration.rb:115:in `database_configuration'

is the line that actually gives it away rather than the top line referring to psych.rb itself. Someone had added a new database config in database.yml for a new environment yesterday and must have been using an editor that was not configured to tabstop properly, my gvim didn't show me the problem because it just translated the literal tab to two spaces and the file looked perfectly ok, I didn't twig to what was really wrong until I actually went to the shell and catted the file out and saw that the tab for the new environment was a \t rather than two spaces as used everywhere else.

So, hopefully if you run into this this will help you out also without running you after wild goose chases trying to debug psych itself or revert to an earlier yaml parsing engine as the current top google hits advise you.

Wednesday, 11 January 2012

Anti poor manners legislation.

Poor manners are a serious problem. 


Our precious psychic sanctity is barraged by endless trauma from ill mannered buffoons bent on subjecting us to their ridiculous charades. From the banal to the obscene the battle is never ending, a vast amount of time and energy is spent on the distraction that is the poor manners of other people in the world. Clearly something needs to be done at a legislative level, we could mandate something along the lines of mandatory neckbands for the population to regulate acceptable behaviour by punishing breaches in etiquette with an electric shock proportional to the severity of the offense; say a few volts for a blonde joke up to several thousand for using ownership of Apple products as evidence of personal creativity.


Only registered and officially authorised arbiters of good taste would have the ability to administer these punishments so clearly this power would never be abused, there is no need to bring messy due process into the picture and slow the whole thing down with the endless barratry that is the modern legal system. Nothing could go wrong with this plan! Anyone who says different is clearly misinformed or seeking to defend the most egregious examples of bad mannered citizens.


We could call it the Stop Ominous Philistines Act.


I have a better idea; next time someone says there ought to be a law, they get the electric neck brace, and I get the shock button.


Or perhaps we could stop trying to build legislation forcing people to behave in precisely the ways in which we want them to and hope that given freedom, they will realise that there is appropriate and inappropriate behaviour to partake in by themselves. Failing this, we can choose not to associate ourselves with people that choose to roam the streets at night yelling loudly about their bodily functions or their desire to copulate with the nearest member of the opposite sex, breaking things, getting in fights, telling everyone how awesome last night's episode of Jersey Shore was, and other offenses against human decency. 


This way, when it turns out we're wrong about that whole electric shock neck brace idea being so fantastic, we're not handing a bunch of self selected arbiters of good taste a power they've proven many times over unfit to wield.


If instead we could continue on with the pure concentrated refined stupid of the original chain of reasoning, we'd be where we are right now when it comes to legislative behaviour with regards to the internet.

Piracy is not a technical problem, it is a social problem. Exploiting the hard work of sectors of the modern economy (not stealing, mind you, because lying to people to get them to agree with you is also bad manners) is bad manners. If you like something enough to consume it, pay for it. If you don't, just don't consume it. There shouldn't need to be the digital equivalent of an electrified neck brace to force you to behave like this, you should do it out of your own desire to be able to live in a world in which people can spend their lives making the things you want to consume. It's simple self interest.