Boyish female Gnomes

Posted 2007-09-19

Today is a great day. Today marks the release of the new version of Gnome, version 2.20. Woho!

New Gnome also means new Tomboy, and this new version also means a brand new plugin system. Therefore, I need to publish a new version of my blog posting plugin. After Sam Ruby himself - creator of the protocol I'm using and one of the persons responsible for Wordpress QA - gave me a few minutes of fame about a month ago, I felt I had to fix a bunch of issues. I've been fixing a few bugs, cleaning up the source slightly, and re-added the post-as-draft option. You can go get it! :) Note though: This version does not work with Tomboy versions older than 0.7.2.

Speaking of Sam Ruby and Wordpress. There's a new Wordpress release in a few days - 2.3. I tested the plugin aganist the last beta, and it seems to work great. So no more ugly patching!

A late night IRC discussion also ended up with me updating the Tomboy Reminder plugin to the new plugin system, and since the original developer doesn't want to maintain it anymore, I guess I've got one more plugin to look after :)

There are 2 comments

Beauty of crowds

Posted 2007-07-14

By now, most people should have heard about the wisdom of crowds, and probably also know what it means - that when a big enough number of people collaborate, the aggregated knowledge of this group of people is bigger than any expert on any given topic. Everybody who haven't been living under a rock have heard about Wikipedia, which is perhaps the best example on this effect - many, many thousands of individuals spend a bit of time each, and the result is an encyclopedia that can take on even Encyclopædia Britannica - and win - something made even more impressive, considering that Encyclopædia Britannica was given a 200 years head start.

Deep down in this collaboration phenomena lies something I find very beautiful, even though it's not very obvious on Wikipedia. Let's instead focus on horizontal culture authoring in a read-write society. Like the blogosphere. Or sampling music. Or youtube videos. Or any other kind of mashup culture, really.

I believe that every person is "born with" a little bit of unique cultural expression. That can be used in private, to create mediocre culture, or it can be used in collaboration with others to create great works - either in a two way collaboration, or by sampling, remixing and reworking old works. And just as with the wisdom of crowds create a work bigger than all it's pieces, the end results are better than all the little pieces used along the way. However, unlike on Wikipedia, the personal touch and the subjective view is valued, instead of frown upon. And here lies the beauty of crowds: in fragile, ephemeral, individual expressions, based on a collective foundation of works, the expression itself becoming part of that foundation, that others in turn base their expressions on. And all along the way, these expressions are a way of reflecting the humans that created them, that themselves are no less and no more unique than their works, and who's thoughts, ideas and DNA being part of the same life cycle.

Sampling music is one of the most obvious examples, if for no other reason than that it is a common ingredient in mainstream music, which means many have heard examples of it. It's also common that peoples musical preferences diverge quite a lot, which makes it quite possible to base a song that I love and you hate on something you love and I hate. It's not the only example, though. I personally find blogs filled with even more crowd-based beauty. Generally not the diary-style blogs, since it lacks the remixing component, but rather political and/or philosophical ones, that bases their content on thinking, usually starting out with the thinking of others, adding their own thinking and thus transforming of the content before posting it themselves. Interesting concepts thus bounce around the blogosphere for a while, constantly being transformed, bit by bit. Pirates have been talking about this peer-to-peer production of cultural works for year, but I guess I'm a bit slow to understand.

I like to think of the Internet as one gigantic art exhibition, a collage of life stories, displaying millions of people in a mentally naked form. Everyone is given an empty sheet of paper and a few questions to answer, like "who are you?", "what's the meaning of life?", "what do you believe in?", everyone answering their own way. However, this exhibition is bigger than anything any artist could ever pull off, it is constantly replacing it's pieces and constantly expanding. The human portraits are in some instances extremely cartoonish, while in other cases, they are as vibrant and alive as any novelist or director could ever make them.

And finally, what I really like about this beauty of crowds, is that with this unrestricted, status-free access to each other, with this bazaar known as the internet, technology is allowing us to be more human, gives us even more power to express ourselves, to work together and cooperate, and making us less bland and generic. Exactly what almost all technology is supposed to do, but what it just as often fails to deliver.

There is 1 comment

TomboyBlogposter 0.3.1 - "never trust software, that has a version number that ends with a 0"

Posted 2007-06-21

Please excuse my english. I should sleep now

I know what you've all been thinking the last weeks. "What is going on with that blog plugin for Tomboy?" You haven't? Can't you at least pretend? Thank you, that's better.

For about a week, I've been working more or less non-stop on a complete rewrite, and now, I'm finally "done".

What has changed? A lot!

First of all: the name! I now call it Tomboy Blogposter, since it really isn't just for Wordpress, even though that continues to be my primary testing platform.

Also, it is no longer using the MetaWeblog API. Instead, it is using the Atom Publishing Protocol (APP), which is avalible in the latest version of Wordpress, and also in Blogspot.Why? A couple of reasons:

  • To begin with, Blogspot only supports APP. Wordpress supports both. Everyone I know (except for hetzz, who use LiveJournal, which doesn't support neither APP nor MetaWeblog) use one of those two, and most of the people in my feed reader also use one of those two. I think it's better to support many users, than many blog engines.
  • Secondly, this time I can do all the code myself. I used to use a big XML-RPC library, and while it mostly worked, it had a few bugs, and it included both a server and a client implementation, which I think is overkill for this plugin. I tried to reimplement it myself, and extract the pieces that were interesting, but it was driving me nuts (see next point), and had to skip that idea. Now, 950 lines of ozamosi-code might be a far, far worse alternative than that library, but now I know on who to blame all the bugs :D
  • Finally, APP is simply a better protocol than MetaWeblog API. Mark Pillgrim commented MetaWeblog with "So we've reinvented XML, over RPC, over XML. Badly." I agree. APP is just a normal Atom entry that is being pushed to the server, instead of lot's of creepy RPC. REST is actually quite elegant. APP is on it's way to become a RFC, which of course isn't proof that is it better, but it still is a good sign.

The biggest downside is that APP in Wordpress 2.2 comes with a bug which makes it fuck upp all your syntax ("Hey! Pretty, valid XHTML! Let's tear that into pieces!"). I think this would fix it (one of the changes is "Better support for XHTML"), but I haven't tried it. I really hope that patch ends up in 2.3, since it looks like stuff I'd like to use (categories!).

Edit: After testing the patch, it seems to work fine, after you've fixed the syntax error that it creates sigh

But I've done more than that.

Since it was a pain to test two blog engines when you only can post to one at a time, I made it possible to add multiple blogs - in my case, my regular Wordpress blog, and a Blogger blog used for testing. This has it's real use cases as well: it's not terribly uncommon for people to have different blogs for different topics - say one private blog, and one more official, and maybe one shared one too.

To facilitate this, I moved from GConf configuration storage to a custom XML file. This is more flexible, since I can add many "groups" of keys (as in: many accounts, with many pieces of information per account) easily.

Since Atom doesn't have one specific form of authentication, I've implemented the ones that Wordpress and Blogger use. Wordpress use HTTP Basic, while Blogger use it's custom GoogleClient thingy. This actually mean that my plugin works with more APP servers than Drivel, the client I've been using as a reference, since it only supports Google (yes, I am very proud of this). Now, Blogger logs in using HTTPS, and everyone who relies on HTTP Basic should too. Being lazy, I haven't implemented a frontend to Mono's certificate handling thingy - instead, it just trusts all certificates. My rationale for doing that is that I believe people using encryption generally only want to protect themself from Wireshark when they're using their unencrypted wifi, and aren't too concerned about really evil attacks. If I'm wrong, tell me, yell att derfian and/or fix the problem ;) The end result is, either way, that HTTPS "just works", even though it isn't as secure as it could be.

I do no longer store your passwords in plain text. Instead, they are encrypted in the supersecure cipher base64. Yeah, ok, base64 isn't really encryption at all, but simply an odd charset, but at least you won't give everyone standing behind you your password when you open the wrong file. Also, you can choose not to enter a password at all, and you will be asked for your password every time you want to post your data.

It no longer posts the notes as drafts. I'll reimplement that as an option some day...

Download it here

A difficulty with APP is finding the right URL, so here's a short explaination to how you find it.

There are two concepts we need to understand here: the Service Document, and the Collection Document. A Collection looks like a feed, and - more importantly for us - it can be posted to, in order to create new posts. A Service Document is a list with URL:s and names to all Collections. The current APP draft explains that it is not decided how one is supposed to find the Service Document, though.

On Wordpress, the URL to your Service document is <blog_url>/wp-app.php/service - in my case, that means http://flukkost.nu/blog/wp-app.php/service. However, that returns two Collections - "Posts" and "Media". I can promise you that you don't want media, since that only accepts media types this plugin won't upload, so you could instead just add the Posts collection, that has the url <blog_url>/wp-app.php/posts

Blogger uses an older draft of the APP protocol, which means it's Service Document is simply... Broken, with respect to a modern draft. That means you cannot add it. Instead, use the Collection. You can find it if you view the source to your Blogger blog - it's the address in the <link> tag that has rel service.post. It follows the template http://www.blogger.com/feeds/<blog_id>/posts/default. My blog has id 4164605321218185513, which means my Collection document is http://www.blogger.com/feeds/4164605321218185513/posts/default.

Now, I'm becoming quite satisfied with this plugin, functionality-wize. I now need more bug fixing, code cleanups/beautification, UI beautification/HIG-fication, and then I'm hoping to get it into the official tomboy code tree, which would mean I'd get my first code into Tomboy, and thus my first code into Gnome. Now that would be something...

(and yes, there was a 0.3.0 - I discovered it was broken when using either Wordpress or Blogger. This version hopefully at least posts)

There are 9 comments

Dialup2.0

Posted 2007-05-31

There is simply too much graphics on the web.

Bandwidth is cheap today, and everyone have loads of it. When web designers got more bandwidth, they forgot to keep it simple, and to avoid huge amounts of gigantic images, flash crap, and similar stuff.

Everyone knows that the best way to make many people do something, is to make it fashionable. Web2.0 is fashionable.

To fix the crap problem, utilizing the fashionable effect, I've created a Great New Way to display images! It's utilizing AJAX, combined with WHAT-WG's HTML5 and a brand new XML-based image format. It works in Firefox and other Gecko-based web browsers, it sometimes works in Opera (could anyone tell me why this seems random..?), and it doesn't work in IE at all (that's no bug, that's a feature). It does also not work in Konqueror, but it might work in Safari.

The image format is simple: the main element is the <image> element, that contains a bunch of <row> elements. Those, in turn, contains <pixel> elements, that contains three elements: <red>, <green> and <blue>. An image that is a white pixel would thus be described as

<image>    <row>        <pixel>            <red>255</red>            <green>255</green>            <blue>255</blue>        </pixel>    <row></image>

Feeling sick yet? It'll get worse ;)

I have written a javascript library that will utilize AJAX to load these XML files, and then draw them, pixel by pixel, into a <canvas> element.

All you, as a webmaster, will need to do to start using this modern, new image delivering method instead of legacy image formats, is to get this file and include it in your html files, add onLoad="loadXMLImages()" to your <body> tag, and replace all your <img> tags with <canvas> tags. The canvas tag does not have a href attribute, so you need to type the URL to your image as the text content of the tag, as in <canvas>http://URL.here</canvas>. That's it!

Since most images that currently exists are in one of these legacy formats, I have also developed a PHP file that can convert any image you give it (and it likes) into my XML Image format. You can get that here.

What is the end result? Before I give you any link, I must warn you: you Will need a bit of RAM. Your computer Will get slow. And your browser Will go on and on about how there's an unresponsive script (it's just doing it's job!). Of course, this is only true if you use a browser that this works in - if you see a printed URL, it doesn't work. I used quite small images in order to not kill your computer too much. (even 640x480 images are big enough to crash peoples browsers from out-of-memory conditions) Still up for it? Click!

There are 4 comments

Tomboy2Wordpress 0.2.0 - “the working one”

Posted 2007-05-21

When Tomboy2Wordpress started working, I was really, really excited, and just wanted to publish my work ASAP. Of course, that ment I managed to forget to test that everything worked, which it of course didn't. The XSL file I embedded into the DLL wasn't being used, and thus you couldn't use the plugin. Well, you could look at it, at least...

This time, I am very hopeful it will work. Of course, since I gave this release the codename I did, it probably won't...

But making sure it actually work at all isn't all I've been doing. Here are the changes since the last time:

  • As I said: it should work at all.
  • Make it follow the metaWeblog standard for real, instead of just the crappiest thing that Wordpress happens to accept. Thus, it should work with not just Wordpress, but with most of these: http://en.wikipedia.org/wiki/MetaWeblog I have verified that it works with Wordpress (of course) and Drupal (and added a non-standard fallback to make it work in Drupal). If it doesn't work on you prefered MetaWeblog platform, please tell me (feel free to tell me if it works as well ;) ). Now, perhaps I should come up with a more fitting name...
  • Make it work if you have multiple blogs on the same account on the same URL. This is (unfortunately) not used in Wordpress yet. In Drupal, that means you can choose if you want to add blog posts, pages or stories.
  • Make it not crash Tomboy as soon as something unexpected happens. Basicly, anything but success is considered unexpected, so this makes the plugin far less dangerous for your precious data.
  • Minor update to the XSL file, to make headlines show up in a semantically more correct way.

Get it now! (yes, I cheated when I created that link. I still need to figure out how to implement "advanced" links in a sane way)

There are 6 comments

Tomboy to Wordpress

Posted 2007-05-18
Tagged

This is an old post. You should get the newest version from http://flukkost.nu/blog/tomboyblogposter

I don't like web interfaces. I don't care how slick, neat or sexy they are - they are not local applications, and I like local applications. Web interfaces destroys my virtual desktop layout (If I'll be doing something for a long time, like writing a blog post, I want it to be on the same desktop as my IRC client. If it isn't, I'll be constantly switching desktops to check IRC, which destroys my flow, but a web browser is to clunky to have on the same desktop), and I don't like having to log in time and time again. Some people love their terminals, some people love their Google Apps. Me, I'm a Gnome hugger.

I love tomboy. I can not live without it. Whenever I think something, I type it into tomboy. If I think about something too much, it'll magically become a blog post. Now, I have to copy my tomboy note, and then paste it into Wordpress, then redo the formating, and finally post it. Booooring.

Doing stuff I don't understand is among the best things I know of. I don't know C#, xml-rpc or XSLT. So I set out to do something I would never finish: create a tomboy plugin to post my tomboy notes to Wordpress.

I am proud to announce that a primitive first version is now completed. This post is, as far as I know, the first blog post ever to be posted from Tomboy directly to a blog. Woho!

Of course, there are loads of things to improve. For now, it'll just export the note to more or less sane HTML, using a modified version of the XSLT stylesheet in the Export to HTML plugin (which needs more modifications), and then use the XmlRpcCS library to post it to Wordpress. It supports paragraphs, bold, italics, lists, urls and possibly something else. It doesn't do categories, edit posts or links that doesn't use the URL as the linked text (I bet there's a fancy name for that). It probably doesn't handle errors properly, and the code is awful. You can't upload attachments, nor include images. For now, it'll only post your posts as drafts, and let you do the final touches through the web interface, so you can add fancy stuff yourself.

A new feature in the unstable tomboy branch is tagging - that could probably be integrated with Wordpress category system. It might also be interesting to add support for more blog platforms than Wordpress, but I'll wait untill I get users before I do that. ;)

I am sometimes imagening advanced syncronisation features between Tomboy and Wordpress, but I quickly realize that the reason I use Tomboy for this, instead of something like Drivel that already does that, is that Tomboy is much more versatile - I can (and do) put everything in there, not just blog posts.

Sounds interesting? You can get a precompiled DLL here: http://flukkost.nu/Tomboy2Wordpress.dll and put that in $HOME/.tomboy/Plugins or you can get the source code here: http://flukkost.nu/Tomboy2Wordpress.tar.bz2 Note, though, that this is extremely experimental and probably mostly broken.

Again, this is an old post, which is why I removed the hyperlink. You should get the newest version from http://flukkost.nu/blog/tomboyblogposter

There are 16 comments

Fuck Lisp!

Posted 2007-02-22
Tagged

Don't you just Hate Lisp? You know, there's parantheses enough to drive a sane man nuts (not to talk about people like me, who aren't even sane to begin with).

Well, to all of you masochists out there, I have created a shorter path to insanity. Meet Fuck Lisp!. Fuck Lisp! is the turing-complete language that contains more parentheses than the almighty Lisp itself!

That's amazing! How is this possible!?

Fuck Lisp! is based on brainfuck, but instead of using a single ascii character for each instruction, it uses triplets of parentheses. Since everything that isn't a parenthesis is considered a comment, there are interesting possibilities to turn your Lisp Fuck! applications into nifty Lisp applications - or the other way around.

How do I use it?

If you know brainfuck, you should be able to pick up Fuck Lisp! just fine. If you know Lisp... Well, it's not exactly the same :) I'll throw in a small conversion table for you here.

Fuck Lisp! Brainfuck C
(()>++ptr
))(<--ptr
()(+++*ptr
)()---*ptr
()).putch(*ptr)
)((,*ptr=getchar()
((([while (*ptr) {
)))]}

Isn't this wonderful? The fastest way to complete instanity Ever!

Where do I get it?Get it now: http://flukkost.nu/blog/wp-content/uploads/2007/02/lispfuck.pyThis little python script was mostly written by James Tauber as a Brainfuck interprenter. I edited it slightly to turn it into Fuck Lisp!. The script is licensed under CC BY-SA - read more in the begining of the script.

I would like to dedicate this script to Linköping University for making me study boring languages such as Lisp and Ada, and thus making me do other stuff, which resulted in this.

There are 7 comments

Foresight + Macbook

Posted 2006-11-22

The latest episode of LUGRadio contains a segment about rPath and their packaging system Conary. It sounded really neat: kind of what Canonical is trying to accomplish with Launchpad/Bazaar, but it's completely integrated into the packaging system and not some kind of extra layer. Also, if all you need to do to install an application from source, why do you need to go through like 2000 steps in order to create a package? Conary source packages are often 5-10 row python scripts that basicly say ./configure; make; make install.

Foresight is a distro that's using Conary (and the rest of the rPath goodness), and it also always the first distribution to release a version with the latest Gnome. It suited my needs great.

I realized that Macbook isn't supported - apparently, no developer has got one. The Disc Druid partitioner threw the GPT partition table away, and that's what the Macbook uses. Crap... After that, the installer installed GRUB, which isn't supported on a Macbook. Double crap!

Apparently, there's something in the EFI that thinks "Fuck - this crap is so incompatible, it Must be Windows. I'd better emulate BIOS/MBR right away!", and thus boots my hard drive. Also, I managed to install lilo from the rescue mode, and after that, Foresight booted!

So, I got into this sytem, but I wasn't done yet. Since the touchpad (normaly) only have one button, I need to use keyboard buttons to click, and to do that I need xkbset - I'm sure there are other options, but none that I know of. In any other system than Conary, I'd have downloaded xkbset and installed it, but this time, I tried to create a xkbset conary package. The result? When I hade read some documentation and worked on the package for a while (an hour or two), it worked great!

Next step: correct resolution. My LCD is 1280x800, but something about the intel graphics which I don't understand makes that impossible, unless you use the wonderful 915resolution application. That wasn't packaged either, and when packaging it, I found out that it needed a newer version of vbetool than what is avalible in the standard repositories. The solution? Package 915resolution, and create a "shadow" package from the upstream pm-utils (which contains vbetool) with the newer version of vbetool in it. All of it worked out Great, and my computer now works much better :D

I really like how packaging Just Works - that's the way it should be!

[b]Update:[/b] For those of you who actually wants to do this yourselves, check out http://issues.foresightlinux.org/confluence/display/docs/Install+Foresight+on+a+Macbook where I documented the process

There are 10 comments

Blog features

Posted 2006-09-22
Tagged

After removing all the visual bells and whistles, I now have a mostly black-and-white blog - with tag clouds and related posts, I might add!

I've also added a tag cloud and a related-posts feature, just to give you that mix of 1980:s and 2000:s that you've been missing! I wonder if I'll actually use this blog to post something not related to this blog some time in the future. It's unlikely, but not impossible!

Remember: feeds to planet ubuntu sweden should be updated.

There is 1 comment

Languages

Posted 2006-09-22
Tagged

There are too many languages in this world.

No, wait. That came out wrong. I don't care about the people in this world and their communicative abilities - not right now anyway. I speak one language too much fluently. Yes, that's better.

When setting up this blog, I need to figure out if I want to post in english, swedish, or both. The answer? I'm gonna post what I feel like posting, and use different categories for each. So, this is the first english post, and the last one was in swedish. Lovely, huh?

There are no comments