waffle

Totally Fucking Batshit Insane

I promised I’d report more on the Swedish implementation of the optional to implement IPRED EU directive. I stopped last time because I was getting seriously depressed. I just read a good summary of what’s going to happen to you if you’re targeted, and the list (and only the list) that’s about to follow translates many of those points. The author of the summary is the leader of the Swedish Pirate Party, and every fact replicated here is verifiably correct. There’s not a thing in there that I haven’t heard before about this law, but it paints a very shocking picture when put together.

The phrase “Industry” below will refer to the music, video and general media industry and media rights owners. These new powers of accusation and enforcement are bestowed upon large trade industry organizations, and I haven’t been able yet to find a formulation in the 452 page source document that spells out the criteria for such trade organizations.

  • The Industry will start by running a private criminal investigation — something otherwise forbidden. They are exempted from the Data Protection Directive, which is the law regulating the existence and contents of databases containing personal information.

  • The Industry will force an ISP to release personal information regarding the owner of the account which was allocated access to the suspected IP address at the time of the alleged crime. No branch of the Swedish police can force this information to be released. Note the previous discussion on the guarantees that the IP address, never mind the owner of the account, was even involved — none. Nothing that’d hold up in criminal court. For the purposes of the following items, the owner, it turns out, is you.

  • The Industry will freeze your bank account and temporarily seize the place of dwelling to such an extent that while they can’t make anyone move or evict you, they can search the premises with access to the entire contents on any computer in the household.

  • The Industry will send you an extortion letter to the sum of up to several hundred thousand SEK, which translates to tens of thousand US dollars or Euros. (This has been documented and seems to be a standardized form letter with quantifiable lump sums in other countries.) In a radical departure from other civil cases, the money demanded does not need to be proportional to provable and actual damages, but instead enough to be a powerful deterrent — to ensure that the alleged crime won’t be repeated. The letter will contain an offer to abandon the court case provided you pay half the sum within ten days. If you’re not so easily persuaded, the Industry will remind you that you’ll have to pay their court costs in case you lose, and that their lawyers would be happy to inform you what their hourly rates are as soon as they finish parking their Bentley.

  • The Industry will then actually take you to court, where you’ll have to prove your innocence without a lawyer by your side since you can’t afford one, because they froze your bank account.

  • The Industry will finally collect the enormous damages and, to top everything off, in some cases force you to take out a magazine ad proclaiming your guilt.

This is totally fucking batshit insane. This makes Kafka look like a goddamned optimist. I wouldn’t expect this kind of shit from North Korea.

This is not proportional. This bestows a private industry with legal capabilities far beyond the reach of any actual government agency in the precise area they’ve been having wet dreams about getting them. This breaks several human rights, including the rights to privacy and due process.

There’s absolutely no reason that this should have passed. There’s absolutely no one that can claim that it’s in the best interests of the country, the open market, society at large or the people.

And most of our mindless politicians not only actually claim to support it but voted for it.

So if I keep going on about the trial against The Pirate Bay, about DRM schemes, about the Pirate Party, I hope it’s obvious why I feel I have to do so.

Node

Here’s an idea.

Suppose every language compiler or interpreter worth your while starts providing you with a public library of ASTAbstract Syntax Tree — nodes for that language. Instead of just compiling or just interpreting, you could point the executable (or a library method) at a file of code in that language and say “please parse”, and you’re handed a tree of AST nodes in a standard interchange format, like JSON, XML or YAML.

Suppose this interchange format has some very thin but solid common ground — a way to represent the offset and length of each node in the file (including whitespace and comments), if the expression is indeed visible (accessing instance variables via implicit self/this or using an implicit type conversion are examples of constructs that aren’t directly visible but certainly exist; they often have subnodes), and good rules for nesting and cross-referencing to other nodes. A method invocation could refer to the ID of the method explicitly if known, or use of a variable could carry a reference ID to the variable’s definition.

Suppose that libraries were written for common languages to deal with the plain metal interchange format and handle any nodes in a generic way, but that specific libraries could stack on top and offer better semantics for a certain language/AST node combination, such that you could, say, write a Ruby script to parse and manipulate Objective-C, if only you had an Objective-C model or the knowledge to manually work out what to do with the Objective-C nodes.

Clarification: Since this wasn’t obvious, I’d like to point out that this is not a proposal to make everything have the same standardized AST model. That’ll fall apart quickly. I’m proposing rather the opposite – that the tree itself, and its facilities, and a standard serialization is invented, and that these trees can carry any AST node you dare think up from any AST model, but that common operations are done right once. (Clarification ends.)

Suppose that a general algorithm was built that was easy to any implementing library to adopt, that allowed creation of differential trees; where a copy of the original tree could be made, manipulated and the new representation molded in the shape of the original source code with the modifications in place, or a diff file generated.

If we did all that, and we should, we would finally be able to write intelligent code to manipulate code — cross-language. Consistently, using open and established formats. We know exactly why regular expressions fail in cases like refactoring; it’s because of ambiguity. Surgical precision is the domain of the parser part of the compiler or interpreter; advice that it alone can determine. (In most cases, if you can determine edge cases on par with the compiler/interpreter, you’ve just effectively built something that knows as much as a parser and probably spends most of its time doing parsing or resolving.) Why shouldn’t you be able to partake in this?

It’s 2009. Apple and the LLVM project are building a C/C++/Objective-C frontend, clang, that can outsource its knowledge of the parsed code. A future version of C# is planned to be able to host its own compiler and code generation through a set of code model objects, and the .NET DLR — Dynamic Language Runtime — runs entirely by compiling code down to expression trees and running them with polymorphic inline caching.

We’re getting there. This is a big effort, but it is also a big leap for programming kind. And if someone would start doing things like this, no one would be happier than I.

Moreover, I advise that the iPhone software platform must be opened.

Mood Indigo

Visual Studio 2010 won’t look like crap. It may still in large parts work like crap, but the workspace area coloring here is pure art. I’ve been waiting for expounding ever since I saw the first sneak peek. I also dig the neat, rounded-corner bevels and the yellow frame highlighting the top and bottom of the active document.

This and the WPF-based code editor, which on account of using WPF and being composable can include custom widgets to enhance the editor without ripping every other competing plugin addition out, is a good start on the road to a good next-generation IDE.

Moreover, I advise that the iPhone software platform must be opened.

Beyonder

Futurama might return to straight-up TV after strong sales of the DVD movies. Phenomenal. Movies work great as long as the scripts are also great.

And since my contract says I’ll have to relate this to everything else that happens right now, I can’t help but think that this is a show that’s more likely than most shows to be downloaded by its core audience. Hm. Didn’t they, like, eliminate each other, so that if you downloaded you were evil and if you bought the DVD you were good, and you couldn’t do both, and also you couldn’t tell other people about it and thus potentially help the production commercially unless you had bought the DVD because you need a magic license to do that, because if you didn’t then downloading wouldn’t be unequivocally evil? No, wait, that’s just the Olde Fortran talking. No one sober could seriously believe that.

Moreover, I advise that the iPhone software platform must be opened.

Older posts »