ChaniBlog











At Eljakim (my new employer), work repositories are all svn (lowest common denominator), but several of us access them via git-svn. I’ve created a couple of new ones recently, but thanks to timezones, I never get an svn repo until I’ve already done a day’s work (in git). Getting those commits into svn without losing history is a simple thing when you know how – but when I googled, all I saw were strange and crazy hacks involving arcane commands I didn’t understand. So, here’s the easy way:

  • Check out the svn repo
  • git svn clone https://url.to/svn-repo

  • Make a folder for your work (assuming it’s not already there)
  • cd svn-repo
    mkdir chani
    touch chani/temp
    git add chani/temp
    git ci
    git svn dcommit

  • Check out just that folder
  • cd ..
    git svn clone https://url.to/svn-repo/chani merge-repo

  • Connect it to the git repo
  • cd merge-repo
    git remote add mygit /path/to/git-repo
    git fetch mygit
    git checkout -b mymerge mygit/master

  • Rebase your work on top of svn
  • git rebase master
    git checkout master
    git merge --ff-only mymerge

  • Clean up the temp file (is thre a way to just commit an empty dir in git?)
  • git rm temp
    git ci

  • And send it to the server!
  • git svn dcommit

  • Switch back to the primary repo (optional)
  • cd ..
    rm -rf merge-repo
    cd svn-repo
    git svn rebase

Of course, you don’t have to delete the merge repo, you could keep using it as your primary repo – but the way things are set up here I always end up wanting my checkout to be a level above that. :)

Edit: Also, make sure you move or delete the original git repo once the commits are safely in svn. I spent half the day continuing to work in the pure git repo after blogging this… >.< oh well, at least I just had to copy&paste off my blog to fix it. :P



{January 15, 2012}   parallel text – now with audio!

I’m back to language learning again – Dutch now, of course, so that I can understand my co-workers next time I visit. :) This means lots of reading and listening to dutch, not taking boring grammar courses. :) At this stage, I need the english readily available, and the best way to get that is parallel texts (dutch on the left, english on the right, nicely lined up). There aren’t many parallel texts available to buy, and they’re usually sorta boring books, so one of pete’s polyglot friends created a script that will take any two digital books (wherever you happened to get them) and turn them into a big html file, nicely aligned by sentence.

It’s a great tool – however, it’s missing a third aspect: audio. Normally I’d get my listening practice from dubbed tv (I’ve watched all 7 seasons of voyager, and most of DS9, in german) but the dutch don’t care much for dubbing, so it’s hard to get materials. :( What we do have is dutch audiobooks to match some of the parallel texts I’m reading – good quality unabridged audio, too. The problem was, you needed to play the audio in another window, making it a PITA to pause or skip around, or go on to the next file, or find your position again after shutting it all down.

So, I integrated the audio into the parallel text itself. Thanks to the html5 audio tag, I have a little control widget floating at the top of the window; you can scroll the text or pause the audio without moving the mouse anywhere. It’s in the early stages right now, so there’s no synchronization between the text and audio, and it doesn’t remember your position (although session-restore does restore the text position). I have some ideas for that, though.. :) The most annoying issue, really, is that firefox doesn’t support mp3 and half the other browsers don’t support ogg; it seems the only one supporting both is konqueror. So, I’m running it in konq :)

If you’d like to try out the script, it’s fairly simple. I have it hardcoded to expect mp3 files at the moment, but I’ll add an option for that as soon as anyone wants it. All you need is my audio.js file, jquery, and these three lines in your html head:

<script src='jquery.js'></script>
<script src='audio.js'></script>
<script>initAudio("path/to/mp3s/", N);</script>

where files are named 01.mp3, 02.mp3, etc (or 1.mp3, 2.mp3…) and N is the minimum number of digits in a file (yeah, all my files had leading zeros and I didn’t get around to removing them).

Patches and code review are very welcome – this is only the third (or second, depending on how you count) thing I’ve written with jquery. :)



{January 6, 2012}   Weddings and Work

I’m blogging from Utrecht today – for my first week of work. :) So far it’s pretty awesome; I wish I was here for more than just one week. [Edit: in case it's not clear, I'm going back home at the end of the week, NOT immigrating to the netherlands. ] The guyspeople at the office are great, and I get to work on a cool project: making them an IDE (in qt, of course) for their web framework. :)

In an indirect way, I have KDE to thank for this job, actually. I met my boss at blauzahl and mek’s wedding. :) And the wedding was great, too. Lots of chaos, naturally, but somehow everything fell into place in the end. I still want the recipe for that pumpkin curry. ;) There are photos online, but I’m too lazy to link to them right now.

And now it seems like everyone’s getting married – friends, co-workers, even me. :) I’m engaged to pete now :) :) although we’ve not made any plans yet.

Lots has happened in the last few months. I’ve graduated too, of course. Over christmas I did a bit of work on ContextJournal, too; hopefully I’ll add some timetracking features to it soon (oh look, uncommitted code.. it seems I started already), but at the moment I’ve barely got time for anything but work. :) I have a language-related web project I ought to upload somewhere, too. maybe I’ll blog about that later – but not on planetkde, I suppose. If you want to hear more about what I’m up to, you’ll have to subscribe to my blog separately.



{September 28, 2011}   Will Hack For Food

Update: I’ve accepted a job now. :) I suppose I ought to blog about it…

So I’m graduating in December. Are you hiring for January?

I assume if you’re reading my blog, you know that I’ve got plenty of experience hacking on KDE things. I care about my code, I get things done, and I <3 standards. :) Most of my experience is with C++ and Qt of course, but I learn fast; having an interesting project is more important to me than which tools to use. I’ve been dabbling in node.js and jquery this year, actually. That said, it would still be awesome to find a job where I can contribute to KDE.

I’d strongly prefer to stay in Vancouver, but Europe could be an option too (I’ve already got an EU passport). So if you’ve got an opportunity for me, check out my resume and send me an email!



{September 3, 2011}   oh yeah… linuxcon…

Riight, so I was at LinuxCon, uhm, two weeks ago. :) Two conferences in a row was a bit much, so I’ve been trying to enjoy my vacation since then (mostly).

It was a great conference, though. :) At first I was feeling a bit out of place – the conference shirts didn’t come in ladies’ sizes (boooo!!) and it seemed to be lots of server stuff and kernel hackers, not desktop or UI stuff. But I met some friends, saw contour/plasma-active/whatever being demoed at the LFNW booth, made some new friends, and pretty soon it felt like a regular conference. :) I don’t feel like talking much about the talks (I’d have to look at my notes for that, and besides, Dafydd’s notes are far more detailed) but the intro to kernel hacking was great – I learned a lot from it, and felt a wave of nostalgia when the guy talked about compiling your own kernel. ;)

The party on wednesday was particularly awesome – lots of people dressed up for the 20′s theme, and there was much dancing. Thursday I managed to get to four different parties – three of which were officially part of the conference. :) I remember having some interesting conversations… but I never heard what happened to that little multicolour lamp in the end. :P

I didn’t get a WebOS touchpad, unfortunately – I was hearing about them selling out during the conference (and my sympathies to the HP guy who heard the announcement right *after* his big talk) – but I was in the right place at the right time friday afternoon, when they gave away some nicely framed linux posters. :) So now I need to actually get tools to mount stuff on walls, because “got linux?” is still hiding in a corner.

At first it seemed like all the job offers would be for kernel hackers too, but after checking the job-wall and talking to people I found several hiring – even some local companies. yay! :) So, I’ve been polishing up my resume the last two weeks too.

Now somehow my vacation time has slipped away – I’m not even sure where it went. Doh. We’ve only had the one month of proper summer here (which I missed a third of for the desktop summit), and already the leaves are starting to fall, and a little chill is in the air… and, school starts in a few days. My last semester. Wow.
Time flies…



{August 18, 2011}   Desktop Summit 2011

A big thanks to Basyskom for the last-minute sponsorship – I’m really glad I made it to the desktop summit. It was awesome. :)

The talks, the bofs, the parties – pretty much everything went well. Even the weather did give us a day or two of sun before going back to the scheduled rain and wind. ;) I was happy to visit Berlin again too – I only had time to get to one of my favourite restaurants, but I came back with lots of delicious things in my suitcase.

There were lots of good talks – which was not entirely a good thing, because I had to make some hard choices at times. I ended up in more community than tech talks – good stuff about how to do outreach to get more contributors and more diversity of contributors (which means not just more women, but more cultural diversity too). I learnt more about wayland and accessibility too (yay qt-at-spi!), and discovered that “session” is an ambiguous word – there are all sorts of lowlevel sessiony things that have nothing to do with documents or windows or tabs, and systemd is trying to clean them up. Some of the keynotes were fascinating – my favourites were the design talk and the toaster talk. :) Oh, and did you know you can use nepomuk to search within movies? OMGWTFBBQ.

Oh yeah, and I did a lightning talk too, explaining why we need to replace XSMP and advertising the bof session. When I asked how many people hated XSMP, there were far more hands than I’d expected. I didn’t know so many people knew what it was!

At sunday’s party I was surprised to discover how many geeks love karaoke. There was a great crowd, and about a one-hour wait for songs! Despite that, there was also dancing in the other room. :) I hear there was dancing tuesday night too – sadly I had a stomach ache that night. Later in the week I dragged a few people out for a smaller karaoke session with some local friends. I love having a private karaoke room; there’s no strangers taking up mic time, you get to sing lots, and it’s much easier to be completely silly about it. :)

The bof sessions started on wednesday – and I started it off with wonderful, wonderful sleep. After getting caught up on that, my stomach was a lot less mad at me, and I spent the afternoon in the intel appup session. Yay, tablet! :) My new exopc is sitting on my desk waiting for me to start hacking on it.

Thursday afternoon was my sessions bof. Unfortunately some people got lost on the way back from the daytrip and didn’t make it, but it turned out pretty well anyways. I knew there was far too much material to cover in one bof session, even a two-hour session, so I tried to keep the conversation on core matters… after a while, we discovered that there really is a lot of overlap between zeitgeist and session management – the apps that are starting to use it are sending it a lot of the info we need – and zeitgeist is gaining traction, so we may team up and just make some zeitgeist extensions to collect the session info. This would make it easier on app devs – instead of giving similar information to two systems, they’d just report it once and be done. :) When I get some free time I’ll go over the meeting notes properly and start looking into this more.

There were lots of other fun things going on – football, Jos’ cooking, amusing attempts to get rid of the excess summit stickers – but I don’t have much time to write, because I’m at LinuxCon right now. :) It’s nice when a conference is only 20 minutes from my apartment. Maybe I’ll blog about it next week – it’s been pretty good so far. :)



{August 15, 2011}   bouncing email

Update: The sysadmins have fixed the bug, and are keeping an eye on it now, so it’s safe to use that address again. :)

I’ve discovered that my kde.org email account has been randomly bouncing some email, for at least the last year. Meep. I’m going to go file a bugreport now, but in the meantime, if emailing me has failed, try again. Or use my gmail address (chanika).

Oh, and the desktop summit was awesome, I’ll write about it sooner or later :)



Update: I’ve scheduled the BoF session for thursday, 14:00 in room 1.404/1. I’ll pop into the systemd bof on wednesday, too.

Update 2: It turns out systemd is solving an entirely different problem. :) there’s no overlap between it and sessions-as-in-restoring-windows.

I’ve been trying to write this blog post for months, and always hitting writers’ block or other distractions. So, screw it – I’m just going to start writing and see what comes out. :)

What this is about, is sessions, and XSMP, and wayland. Activities use XSMP, the X Session Management Protocol, to save and restore groups of windows. Before that, it was only used for the login session. It’s actually a better protocol than people give it credit for, and it served well for a few decades – but times have changed. If we want to move forward and do awesome things like sharing sessions between devices, we need something new. Even Activities as they are now push the limits of XSMP – there are a few ugly little hacks hiding in there that I’d prefer not to have. :)

Now, the key here is, if we’re going to replace an ancient-but-reliable technology with something new, we want the new one to be not just better but a lot better. Something worth switching to. Small issues like XSMP’s lack of autosave will be easy to correct; the big one is that it’s process-based. Session keys are handed out per-process, and when things get restored, they’re done by calling that particular binary with the session key as an argument. This is the source of two major pains; the first is that when a process has multiple windows (like konsole), you can’t properly put those windows in different sessions – so Activities have to do ugly things to hide this. The second, and larger problem, is that it’s ridiculously non-portable and opaque. What if the program’s binary gets moved elsewhere? what if the user switches to a competing app? And of course, their phone is not going to have the same programs installed as their laptop! Even if they have a meego phone and use Calligra on all their devices, the binary for the phone will be named differently. :P

So, what do we do? We make it resource-based! :) Store data in a standard place and standard format, so that the session manager, instead of seeing “this session had /usr/bin/firefox, /usr/bin/konsole and /usr/bin/okular” sees “this session has web pages X Y and Z, which this device last used firefox to open, with X and Y in the same window; two terminals, which this device last used konsole for; and foo.pdf on page 3, which this device last used okular for”. Then if okular isn’t available it can ask the system for a program that handles pdf, and when the user sends the session to their phone, it doesn’t matter that there’s a different pdf reader, or even that the phone browser doesn’t support tabs. Not only that, but if there were 20 urls open instead of three, the phone could go “whoa, that’s a bit much; I’ll just open the first three and display links to the rest somewhere.” And I could go “hmm, when the heck did I create an activity called ‘shambles’? wtf is in it?” and get an answer without actually having to load it. ;)

Another side of this is, well, the small stuff does add up. I just heard that OSX gained some decent session support; they’ve taken lessons from the iPhone and applied them to the desktop, making a system where it doesn’t matter if an app crashes – the OS may even kill it whenever it pleases – the session support is so good it’ll come back just as it was. I’d love to see that sort of solid session support in linux; KDE apps with XSMP are pretty good right now, but they could be better (and an autosaving protocol would go a long way towards fixing that).

Now, replacing XSMP isn’t an entirely new idea. Gnome people have been sick of XSMP for quite a while, although I don’t think anyone stepped forward with an alternative (and for their purposes, it does work, anyways). When I talked to the Nepomuk guys many months ago, about cross-device sessions, they had already thought of it – but decided the political side of it was too hard. They might still be right – we’ll see. But it’s worth a try. :)

So, what is the hard part, you ask? It’s the reason I stuck with XSMP for activities: a new protocol means persuading apps to support said protocol. XSMP’s support, while patchy in places, is at least decently widespread and un-controversial. A new protocol… well, I’m fairly sure KDE would embrace it, but I want it to be a part of gtk apps too, and pure qt apps, and meego apps, and even the weird proprietary fringe ones (like maple) someday. That is a challenge. :)

So how do we meet this challenge? First, we explain the benefits it brings – I hope I’ve done that well enough above. Second, we offer app developers a well-designed, easy-to-use API that’s had some feedback from actual app developers; just the other day I saw someone on IRC complaining about XSMP being confusing. :) Third, once we’ve got enough support to know this is worth trying, we show them a solid implementation that works (without any fatal bugs). Seeing is believing, right? Nobody wants to spend precious time writing code for a system before it exists, so we get the minimal feature set done, port a couple of apps, and show it off. Fourth – the secret weapon. ;) Wayland is gaining popularity, and when apps start porting to it, they may as well port to this too, right? Wayland doesn’t have any session protocol of its own, so this could be it. :)

So, who’s with me? :) The desktop summit is only a few days away, and surprisingly I will make it (yay!) so I’d love to have a conversation about this there. It’s the perfect place, after all, for something that aims to be cross-device, cross-desktop and all.

TL;DR: a resource-based session protocol would let us do really awesome things, so it’s worth the effort to replace XSMP

Now, I’m going to go into technical details below the cut (I have enough material to write a paper on this but for that damn writer’s block…)
Read the rest of this entry »



Well, I haven’t blogged in quite a while, have I? I almost blogged about fosdem, but I was too busy having fun there. ;)

I, well, I’m actually on hiatus at the moment. That was (and is) an incredibly hard decision, but… well, it wasn’t fun any more, it felt more like a job. And when someone’s asshat regressions cause you physical pain, it’s time to take a step back. I’m sure Ivan and Marco will fix up whatever bugs are found, and add new awesome activities stuff too. :) I miss lots of KDE people (hugs!!!) but there’s some stuff I need to do for myself right now.

Anyways, that’s not what I’m here to talk about. There’s a little project I did in january that I never got around to blogging about. It’s part personal tool, part experimental sandbox. I suck at names, so I called it ContextJournal. :)

What is this? it’s a neat little app that automates away the tedium of my personal journal system. Running KDE trunk, and having a strange knack for hitting freaky PIM bugs, I end up with my most important things stored in plain text. It’s grown into quite a system, one file per day with ascii todolists and stuff – add to that the need to do timetracking on one project, and, well, a bit of automation does wonders. :)

Contextjournal allows me to keep the plaintext system – if I trash my kde or X I can still go back to using vim – but it adds improved organization, and context awareness (this is where the cool experimental bit comes in). It timestamps every line, and keeps a separate journal for each activity – naturally it switches when I switch activities. :) Once the journal part was stable I added the todolist on the right, which is controlled by irc-like commands. The commands are logged too, so finding out when I finished something is just a matter of grepping. :) Oh, and it starts on all activities by default, since it’s designed to be a systemwide thing.

Obviously the program isn’t much use as a journal to anybody but me. A normal person would probably want it to link into akonadi and/or nepomuk, and share the data with other apps, so that the todolist shows up in korganizer’s calendar n’stuff. :) However, it is useful as example code: it shows how to make an app activity-aware. It’s actually a pure-qt app at the moment too; I wanted to show that you don’t need any kde dependencies to write activity-aware code (*cough*firefox*cough*). I also wanted to have a testbed for some strange XSMP problems that only qt – not kde – has. I’m still not sure whether the bugs lie in Qt or in kde’s xsmp handling or in kwin, but my bet is on QApplication. :/

I have plans to add other shiny things, like an overview screen (or just “what now?” suggestions from the todolists) and grouped todos, but something distracted me and I haven’t gotten around to it yet. Maybe when I don’t have any essays to write. :P

Anyways, the ContextJournal source is here; if you’re thinking about adding activity support to something, check it out. And keep in mind that by now, the API for working with activities is probably in kdelibs; it’s a lot more convenient than having to make all those dbus calls yourself. :)



{January 9, 2011}   Activities in Action

It’s screencast time again! :)

For this one, I focused on how I, personally, use activities. I got the impression that showing real-world usage might make it a bit clearer what I’m trying to do here. :)

You can probably hear me getting a bit tired at the end… I had to reboot twice and fix my damn volume control before finally getting that one, so yes, I *am* tired. :P

oh, and here’s the activity manager plasmoid I mentioned. :)



et cetera
Follow

Get every new post delivered to your Inbox.