You are viewing ssam

Police And Thieves
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in ssam's LiveJournal:

    [ << Previous 20 ]
    Friday, June 10th, 2011
    4:49 pm
    Little tidbits of wisdom #9117
    When you are writing code with GCC on Windows, and you pass a callback to a Windows API function, your callback must have the __stdcall calling convention. Otherwise, something in a random part of your application quite distant from the callback will fail in a weird way and you will spend two days learning lots of things you never wanted to know about the internals of Windows when in fact you just needed to add one word to your callback definition.

    Here's a netlabel who put out mostly free releases of ambient and electroacoustic albums and EP's, so you can relax after a hard day of banging your head against a wall and nerdrage.
    Thursday, March 31st, 2011
    8:44 pm
    Gnome shell future plans
    Gnome 3 is just around the corner, and I'm writing this from it now thanks to Debian unstable. Things are working pretty well, which is a vast improvement on just a couple of months ago when bugs in the r300g driver prevented me from running it at all. I'm very impressed by how everything has come together and how many bugs have been fixed in all levels of the stack to make it all work.

    Other than the system monitor there's not a whole lot of stuff I miss from Gnome 2. However, there's lots of room for improvements now that the basic system is working.

    * Tracker and Zeitgeist integration is in the works. This is major stuff that will really make the shell rock.

    * A system monitor. It would be nice to have a little CPU & memory usage profile in the top bar that would open the system monitor. I'd be very surprised if it didn't appear as an extension before too long.

    * I like Ubuntu's idea (I think it's theirs :) of putting 'now playing' stuff in with the volume control. This would make it a lot easier to do things like pausing music to watch a video, and keyboard shortcuts could even be included in the shell to change tracks etc. (Songbird on Windows does this, Meta+left/right changes songs and up/down the volume and I used to find this great when working with music playing on shuffle).

    * Another great addition would be an indicator to monitor the state of all tasks going on in the system. This would include filesystem operations, downloads, slow things going on in applications and also background tasks like tracker indexing. Some work exists on this front, but there's a lot still to do to make this happen in the Shell.

    * Less obstructions when I want to turn my computer offwould be nice :)

    I'm sure there's be plenty of these lists appearing in the next few months. I guess I just wanted to get mine out first. But I do know that I'm excited for the next few years, and with the new centralised and extensible nature of the shell it will be easier than ever to turn some of these ideas into reality.
    Saturday, May 8th, 2010
    10:30 pm
    Asus motherboards and USB boot
    I'm writing this mainly for google's benefit. If you're trying to get an ASUS motherboard, such as the M3N78-VM I have, to boot from a memory stick, it turns out you have to do it in a weird way: turn on the PC with the memory stick plugged in, go into BIOS Setup and the Boot section and then go onto Hard Disk Drives. Delete all the entries except USB (maybe you can just put it to the top, I didn't try). Now you can go to the normal Boot Device Priority list, and "USB" will be an entry which you can put where you like.

    This is all pretty counterintuitive, because the boot device list has "Removable media" as an entry, which is apparently useless - in fact, worse than useless, or I might have worked this out faster. Hopefully writing about it will save others from wasting time ..




    In other news, since here am I writing.. I finished my degree in music & music technology recently (which is why i finally have time to fix my computer), it's been a fun ride and I achieved a bunch of things I always have wanted to do, like mixing for bad metal bands, writing and recording crazy dub tunes and playing sounds too quiet for anyone to hear in a gallery with some free wine. After a summer getting some programaction done (more on that later), mi novia y yo are going to South America for a while. We fly in to Buenos Aires in September and out of Lima in January (hopefully later) and so far that is the plan, I've never been out the UK for more than a few weeks before, i am really looking forward finally to some proper travelling in a very beautiful part of the world.
    Friday, January 8th, 2010
    12:53 am
    On Cheapness
    Both of my IBM Thinkpad power adapters are now working only because of ample solder and insulating tape. I have a third, but that's disintegrated altogether.

    How, after over 100 years of development can we not manufacture power cables properly? You'd think especially the Thinkpad might come with adapters and cables which could last more than a few years.
    Saturday, October 31st, 2009
    7:33 pm
    Nix
    The other day I found out about the Nix package manager. It's interesting because each version of package (called a derivation for some reason) is in an isolated directory, and the environment is built from symlinks and long PATH variables and the like. This gives some niceties like atomic upgrades, and the ability to reason about broken dependencies much more easily; the developers term it a purely functional package manager. You can also have multiple versions of a package installed and switch between versions using a "profiles" feature.

    This got my brain working a little. In Nix, the packages are specified as a set of attributes and a shell script that together describe how to build the package from source. When installing, it first checks various places for a suitable binary version and if there isn't one, it will download the source and build it. So Nix could give us beautiful support for testing and hacking on bits of GNOME. Imagine I decide to rewrite GtkTreeView, for whatever reason. I set up a new profile which uses Gtk+ from git, and keeps the source in my home directory somewhere. Nix can download binary versions of the latest GLib unstable, and any other deps not satisfied by the distro, so I don't have to waste time building those. I'm not sure what Nix would do about the apps that depend on Gtk+; ideally you could tell it the ABI wasn't changing so it would just run the same versions of apps but linked against the unstable Gtk+. This isn't possible at the moment and would be hard to implement, I imagine. Right now Nix could install new versions of various apps, hopefully just the ones you specify to save duplicating your entire system. The point anyway is that now I can do some hacking and test my changes in my real environment straight away, all with no danger of breaking my actual system.

    I know there are major obstacles to achieving this. Nix isn't perfect - it uses wastes quite a bit of time and disk space, although there is a distro using it in the real-world. I wrote to their mailing list, and it seems like a lot of what I mention above is possible but isn't really documented or used much at the moment. And of course it's not like jhbuild doesn't work well. Still, I kind of think this is a vision of the future. It would be awesome being able to pick and choose bits of your system to hack on and have it integrate perfectly.

    Interestingly, nix would also be really useful for packaging MSYS. I mean the dependency problems there are so complex that the msysGIT people choose to ship an entirely separate environment.
    Monday, August 17th, 2009
    8:05 pm
    August 17th ~19:00 UTC
    Hi everyone! I thought I would write my final SOC report to my blog, so that it gets everyone excited about a really cool new API that you can't easily use for anything at the moment, but it is going to be awesome when you can!

    My original idea was basically to take the gconf-peditor widgets and make them GtkBuildable, saving a lot of wasted effort. I was going to do some other stuff to make GConf more bearable as well. By the time I started coding, this had become ignoring GConf entirely (which is on its way out sooner than I realised) and essentially closing bug 494329, and related work.

    So here are the various things I have written over the last few months:
    • GLib
      I added a pretty printer for GVariant objects, which is now in the main gvariant branch of glib.

    • GTK+
      My Gtk+ branch can read the following:
      <object class="GtkCheckButton" id="foo">
        <property name="active" setting="foo">true</property>
        ...
      and later on, you can call gtk_builder_bind_settings_full (...) and it will call a function for each of these bound properties. To avoid a GSettings dependency, nothing happens automatically yet: you have to pass g_settings_bind as the callback.

    • gsettings
      I have a branch with some small changes to GSettings, such as loading schemas from outside the system schemas database. My main contribution is that I just wrote a windows registry backend, with .. wait for it ... full change notification support. So hopefully (I haven't actually tried this in the real world, but it works in my tests) you can update your app's UI as the user edits the settings in regedit and crazy nonsense like that.

      (This is all done just with Windows API functions - which is smart enough to tell you a registry has changed, but not smart enough to tell you what value it was, or do so asynchronously. So the code currently caches the settings in memory and works out what has changed the hard way. A month ago I wouldn't have predicted even that to be possible :)

    • gsettings-gtk
      Some of my stuff is still in its own repo at the moment. Here we have g_settings_bind() and an (incomplete) GtkBuildable version of GSettingsList. There is also a script which will read a GtkBuilder file and output a GSettings schema, based on which object properties are bound. Given that you will always need a settings schema, code to control the settings and code that is controlled by the settings, this seems like the best way to minimise duplication of effort; the default values are taken from the default values in the ui. Another option would be to generate the schema from the properties of the object it controls, but this is left as an exercise for now ...

    • GLADE
      Finally, so people can actually use this stuff easily, I did some GLADE hacking. This branch has a simple GladeSettingsEditor dialog which can edit property bindings .. and even has some incomplete GtkSettingsList editing. Although the dialog works fine, it needs some more stupidity checks; at the moment for example you can bind checkbutton.active and set a related action at the same time.
    I think this is a reasonable amount of work for 3 or so months .. especially counting the time I wasted on autotools issues and git confusion :) Compared to my original proposal, some big things on the gsettings-ui side are still unfinished .. but I have done some other things not in the proposal at all, so it balances out I guess. The inspiration for this project was the fact that working with GConf sucks, and you end up wasting a lot of time, so I'll be continuing working on this until I can use it in my apps in place of the GConf API. My future plans include (ignoring the obvious things such as testing and merging into the main repos) supporting flag and enum values in various useful ways, converting some apps which currently have a lot of code dedicated to preferences and replacing it with a much smaller amount of gsettings code (mainly for the satisfaction), and writing a tutorial entitled "How to use GSettings and GTK+ to make your life much easier"

    Thanks to ryan for sorting me out all the time, and also to tristan for help on the GLADE side, and to everyone who spends time making GNOME rock
    Sunday, August 16th, 2009
    9:08 pm
    what a gwan?
    • I heard some talk a while back about ways to get automake to shut up. It turns out it now can, using a new silent mode.

      It involves adding the following to configure.ac:
      m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
      (using m4_ifdef so that the script continues to work with automake 1.10 and older)

      And passing the --enable-silent-rules flag to configure. Of course, it also involves updating your infrastructure to support automake 1.11, and prepending something like $(AM_V_GEN) on any custom Makefile actions you have .. but these are technicalities

      In fact, this autotools mythbuster document has a couple of other gems, such as how to implement non-recursive automake correctly.

    • Been using my new Thinkpad X40 for a while. It's nice having a computer new enough to run compiz. It's also nice having a notebook with a 2 hour battery life, so I can take it up a hill and sit coding for longer than it took me to get there. I installed the Karmic beta, which keeps warning me that the disk is about to die, presumably because it reports a load cycle count of 92 billion. I take this value with a pinch of salt.

    • Less than 24 hours before the summer of code 'pencils down' time. Tomorrow I will post a nice report on all the stuff I have done, it will very be exciting!
    Sunday, August 2nd, 2009
    6:22 pm
    Some more jhbuild on windows
    • Discovered something that was up with my jhbuild branch: zlib installed its import library with the wrong name, so libtool didn't build DLL's of its deps. This is now fixed in my git.

    • Finally bought a new laptop. I've had the same Thinkpad T20 for 3 years, and I imagine it's been around for 3 or 4 years before I got hold of it. For a while, the trackpoint controller has been a bit crazy, the screen is unreliable and the case is cracked so I found an X40 on ebay this morning for £160. I was hoping to get something better suited to working outside (black isn't the ideal colour for use in the sun, never mind the transmissive screen) but this doesn't seem to be a priority of laptop makers, so my odds of getting something cheap in this line are low :) I also worry about the 12" screen for coding on, but I guess spare monitors aren't too hard to find if I am stuck without a desktop for a while. I looked at some other makes, but it's hard to justify buying anything other than a thinkpad - there's so many niceties I would miss, and I worry that no other make has comparable build quality. Long live the thinkpad!
    Wednesday, July 29th, 2009
    12:48 pm
    Pretty view from my windows
    Springtime is here in the win32 world. First GCC 4.4.0 and now MSYS 1.0.11. There's magic in the air. And a few nights ago I built gtk+ completely from source on Windows using jhbuild, mingw and MSYS.

    I tried to repeat this yesterday using gcc 4.4.0 instead of gcc 3.4.5, and this caused many new problems :) I've just about run out of time to fix them up for now, so I thought I would present my findings as they are. I wrote up a nice set of instructions which live at http://afuera.me.uk/jhbuild-windows/. They have worked for me with gcc 3.4.5 and are very close to working with gcc 4.4.0. There are various pitfalls, but all the ones I have come across are documented and hacked around. So take it for a spin!! .. I will happily accept more/improved -windows modulesets, fixes for the various things I've had to hack around, or any sort of drugs that might help me recover from the mental trauma.

    I have also started work on an MS Windows registry backend for GSettings .. my SOC stuff has been neglected recently while I've been away, but I think with a few days of solid effort it's all going to start really coming together. It's going to be exciting to start converting some apps and tearing out big chunks of newly-redundant code :)
    Friday, July 3rd, 2009
    9:56 pm
    Autohell, part 995
    • I'm putting in a little time today on my windows branch of jhbuild. Running git now works (using a .bat file to call MSYSgit in its own shell, it's all messy but works fine once it's set up).

    • I spent the past hour or so wondering why ACLOCAL_FLAGS was being ignored. I finally realised that it's not actually honoured by aclocal at all and never has been. autogen.sh scripts tend to execute aclocal $ACLOCAL_FLAGS which make it work often enough that I assumed it was meant to.

      Now I wonder whether autoreconf would accept a patch to make it honour $ACLOCAL_FLAGS, or if I should patch Pixman's autogen.sh to call autoreconf $ACLOCAL_FLAGS .. and any others that don't ..

    • Highlights of Glastonbury were definitely Blur, and a more obscure band called Edward II who I last saw aged about 12.

      Best wishes for everyone in Gran Canaria!
    Monday, June 22nd, 2009
    2:40 pm
    GLADEs
    This week I started exploring the wild world of GLADE!! After losing a day to the fact that I hadn't done a 'make install' after changing the API in some way (the plugins were still being loaded from PREFIX/lib/glade3, so all hell was subtly breaking loose), I managed to implement the following provisional UI for binding settings to properties:

    GLADE with GSettings integration #1

    Most properties can be bound, including many that you would never want to - but the 'Bind to' widget is normally hidden for these. It defaults to shown on the 'data' properties you'd normally bind to, such as GtkEntry.text and GtkCheckButton.active.

    A bonus of this is you get 'guards' (where one toggle affects the sensitivity of an area of the dialog) basically for free. Just bind the 'sensitive' property of the container widget to the same key as the toggle, and all of its children will be disabled/enabled appropriately.

    Last week I stayed a few days with my parents in Wales. Generously the sun came out and I got out a bit.

    Aqueduct 3

    This week I am headed to Glastonbury! I like to get to lots of festivals every year and Glastonbury is far and away the best in the country. I often work at them but I'd hate to do that at Glastonbury, there's already not nearly enough time to see the whole of the festival. It just so happens there are several recently reformed big-name bands playing this summer, I think it is going to be one to remember!
    Monday, June 1st, 2009
    2:00 pm
    L'été du code, première semaine
    Hello! I haven't posted here so far (although I think a couple of really old blog posts of mine appeared a while ago for some reason) .. so I thought I would write a note about my plans for this summer.

    GSettings & GTK
    I took on the task this summer of closing bug 494329, and in the process helping Ryan to make gsettings rock extra hard. You can track my progress if this sort of thing interests you in gitorious: http://gitorious.org/gsettings-gtk/. This includes hopefully adding GLADE support for gsettings bindings and converting some existing applications, so that the API is actually useful in real-world situations. I'm really excited that I will be saving people hours of future time adding new preferences and setting keys, which for simple situations should be as simple as adding the control widget to the dialog, and writing a changed hander for the settings key it's bound to. This I think makes up for the fact that I can't show what I'm doing to my girlfriend and make her say "wow that is cool"

    jhbuild on windows
    I've been using jhbuild for a while to manage building dependencies on Win32. Recently I decided to not leave all of my alterations bitrotting in Launchpad but to merge what I can with the master repo, and maintain the rest in a Gitorious branch or some such. When I say "my alterations" I am talking about mostly things I didn't do of course, I just added some cruft on top of all the stuff John Stowers did. Anyway, it's at the point where with git HEAD and this ugly patch the infrastructure basically works. Only two unit tests fail (or only one in the right build environment). In the next few days I'll push (seperately) some other niceties like a seperate bootstrap moduleset for msys, the infamous binary moduletype, and a hack to make it possible to use MSYS-git. These will go into a seperate branch.

    So if you're interested in building GTK+ really, really slowly on a substandard OS this work should be of interest to you. I haven't had many comments about this stuff so far, perhaps because it's a very painful thing to try to do and you have to be a little bit crazy .. I don't know where all this work will end up, I really just want an easy way to build new gstreamer releases for mingw and compile my gtk+ branch, but on win32 there's a lot more for jhbuild to do because the rest of the infrastructure is so bad.

    Sorting my life out
    Recent days have not seen much productivity because here in England, the clouds seem have gone on holiday for a couple of weeks! Back to work though and I have various things to sort out such as the university revoking my libary card even though I have another year of study left, tax forms for the GSoC money and other time sinks ..
    Friday, April 24th, 2009
    1:21 am
    Hello vegetables
    I just noticed I still have a livejournal. I think it's going to be syndicated on planet.gnome.org (regards my programming habit) for a while so I thought I would add this note about all of the previous posts, which don't make a lot of sense and were written a number of years ago.
    Wednesday, August 2nd, 2006
    5:48 pm
    Revittelise your day.
    Last night I watched the movie "Pirates Of The Carribean 2" which I thought was a really good film ! I expected it to not be good and certainly not be as good as the first one but it actually turned out good. My favourite part is where the guy with a squid for a face is playing the organ. I really think if I was making a film with a guy who a had a squid for a face I'd have him do the exact same thing. My only complaint is the plot is too complicated for someone who chooses which movies to go see basically by how many pirates there are in them.

    Other things I have done recently: work, drink

    Current Mood: blank
    Friday, April 14th, 2006
    1:59 am
    here is a last.fm charct


    I really like last.fm!!

    Current Mood: cranky
    Wednesday, January 25th, 2006
    2:47 pm
    Finally found a new job. Very relieved.
    At BT there is one enourmous telephone in the centre of a building. That's where all your customer service queries go. It's now my job to watch that phone and make sure it doesn't ring.

    Current Mood: cynical
    Wednesday, December 28th, 2005
    10:36 am
    Hello
    Domain ID:D105496168-LROR
    Domain Name:CLEANSTICK.ORG
    Created On:29-Dec-2004 18:54:00 UTC
    Last Updated On:08-Sep-2005 22:15:43 UTC
    Expiration Date:29-Dec-2005 18:54:00 UTC
    Sponsoring Registrar:Go Daddy Software, Inc. (R91-LROR)

    Here is a domain that expires tomorrow !!
    Friday, December 16th, 2005
    1:41 am
    Hey guess what!
    GNOME 2.12 is a sexy beast.
    Tuesday, November 22nd, 2005
    2:19 pm
    I read an ace book last night
    It is called INTO THE WILD it is about a guy who dies in Alaska. I thought it was very interesting. Here is a link to amazon.com: http://www.amazon.co.uk/exec/obidos/ASIN/0385486804/qid=1132669110/sr=8-3/ref=sr_8_xs_ap_i3_xgl/026-9199690-9960439

    I lost a key on my keyboard (it's between e and g) so I can't type any words with that letter in at the moment.
    Wednesday, November 16th, 2005
    12:44 pm
    Here is a conversation I had with the linux console. Try it for yourself!
    sam@laura:~$ echo !
    !
    sam@laura:~$ echo !
    !
    sam@laura:~$ echo !!
    echo echo !
    echo !
    sam@laura:~$ echo echo !!
    echo echo echo echo !
    echo echo echo !
    sam@laura:~$ echo echo echo ! echo !
    echo echo ! echo !
    sam@laura:~$ echo echo echo ! echo !!
    echo echo echo ! echo echo echo echo ! echo !
    echo echo ! echo echo echo echo ! echo !
    sam@laura:~$ echo echo echo ! echo echo echo echo ! echo !
    echo echo ! echo echo echo echo ! echo !
    sam@laura:~$


    Current Mood: anxious
[ << Previous 20 ]
My Website   About LiveJournal.com