Index ¦ Archives ¦ RSS > Tag: en

source-highlight with Erlang support

Estimated read time: 1 minutes

I wanted Erlang support in the syntax highlighter used by asciidoc. Currently the filter uses source-highlight as its backend, so I checked and unfortunately it had no Erlang support. A quick google found that there is a good shjs support which would ideally work out of the box with source-highlight. Of course it did not, but it wasn't hard to fix it up. Then I sent it to upstream. This was about a month ago.

Then I just noticed it was accepted a few days ago, and now source-highlight-3.1.2 is out, so it's back in Frugalware-current \o/


KDE3 apps I use

Estimated read time: 1 minutes

Given that a lot of KDE3 apps are not just ported to KDE4 but replacement projects have been created, the upgrade is not trivial. I always declare myself as somebody who is a minimal KDE user saying I mostly just use konsole, but that's not really correct. From time to time I use the following apps as well:

  • kmix (systray icon)
  • klaptop (systray icon)
  • kxkb (systray icon)
  • krdc
  • kaudiocreator
  • k3b
  • ksnapshot
  • kpdf
  • konqueror (for GUI mounting of USB sticks, when I don't use pmount)

And that really doesn't belong to here, but I still use gtk-based apps for browsing and picture viewing (firefox and gqview).

I hope this post will be able to serve as a good personal checklist when we merge kde4 to current. ;)


2.6.32 kms vs intel 8xx cards

Estimated read time: 1 minutes

This story is a couple of days old, but in case you don't use Frugalware, and have such an Intel card, it may be interesting...

Here is the bugreport, it took me about 1,5 days to bisect it, but at the end at least I have a workaround for the issue.

Given that now Gordon Jin from Intel set its priority to high, I'm curious how long will it take for them to provide a solution.

The sad part of it is that mplayer -vo xv still does not work, but the gl output is not so terrible, after all.


mplayer vs kms

Estimated read time: 1 minutes

mplayer -vo xv is broken for intel 8xx cards in Frugalware-current since we enabled KMS. They are working on it, but till 2.6.32 is stable, I needed an interim solution. The problem is that now the default is -vo x11 which does not scale the movie at all when I enable fullscreen. So -vo gl works fine, and making this default is easy: just add 'vo=gl' to ~/.mplayer/config.

Erlang sudo solver

Estimated read time: 1 minutes

First, sorry I'm not yet publishing any code. It's about there is a race at the uni where the fastest implementation wins, so I don't want to share anything before that ends. It'll end in a month, actually. ;)

Other than that, it's a generic sudoku solver, it can solve NxN sodukus, not only 9x9 and it handles extra rules. A detailed description is here (gt).

But of course the purpose of this post is to bookmark a few useful page I found while working on my implementation:

The important part of the later links is three lines:

1> fprof:apply(foo, create_file_slow, [junk, 1024]).
2> fprof:profile().
3> fprof:analyse().

That makes profiling Erlang programs really easy, once you get used to the output, which is a bit weird for the first time. :)


HTTP head support in darcs-fast-export

Estimated read time: 1 minutes

Ian merged my work today, so bzr-fastimport (which contains darcs-fast-export) from bzr now has it out of the box.

This feature is about the following use-case: if you wanted to import a darcs repo to (for example) git, then you had to 'darcs get' the darcs repo first, then import it to git. Now darcs-fast-export can do this without a 'darcs get' if the repo is available via http, reading much less files, resulting less data transfer. :)

(The trick behind it is that darcs-fast-export reads only the patches, while darcs get reads boths snapshots of the repo and the patches, so a darcs get takes much more time than a darcs-fast-export.)


Pairing with kbluetooth

Estimated read time: 1 minutes

Here is the use case I saw: I try to run 'gammu identify' from commandline, it finds my phone, the phone asks if I want to pair with my notebook, I say yes, it asks for a pin code, and whatever I answer, the pairing fails.

Looks like the way it works is the other direction: start kbluetooth, choose settings, devices, then set the mode to discoverable (for 3 mins, that should be enough). Then go to paired devices on the phone, choose delete pairing, then add the notebook again, it will ask for a pin and pairing will succeed.

A bit weird, but it works at least.


gammu2gcal

Estimated read time: 1 minutes

Here it is.

A simple script to first convert your phone's calendar entries to the ICS format, then to synchronize it with Google Calendar.

The first part is pretty trivial, the second isn't. The main problem is that there is no standard API for doing so. At the end I ended up using the web UI from curl, which is pretty hackish, but at least works. :)

Update: there is a new version here. I moved all cookie/form stuff to the curl config, so probably it'll be usable after 2 days as well... :P


Best "first patch", ever

Estimated read time: 1 minutes

If someone is a major contributor in a project, it's always funny to search back the VCS logs to see what was the first contribution. Usually a typo fix or a oneliner patch.

Partly related, cleanups are usually done by major contributors, so a cleanup is typically not e "first patch". Unless we are talking about me and gitmagic.

The funny story is that my first patch is really just about removing two parts of the book. Both were listed as "known git bugs", one was solved a long time ago, and I just fixed the other one a few days ago.


Free beer for a git patch

Estimated read time: 1 minutes

I just received today a free beer, just because I contributed a patch to git. See here.

Hacking is fun! :)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.