Wednesday, June 5, 2013

Google Summer of Code 2013

I'm going to be spending the summer writing a new sound recorder for GNOME. I finished up my graduate assistantship duties last Friday. The motherboard on my laptop died early last week (after blackscreening on and off while I was writing my C/C++ final, yay). I bought a new laptop on ebay so I could swap the hard drive into a similar machine, and when I tried to pull out the drive on the new laptop I discovered that it was hot glued in place. Anyway, hopefully the rest of the laptop is fine, since it's what I'm using now, but I'm kind of scared to open it up and look.

Reda Lazri has been working on some pretty cool mockups for the sound recorder, and I've been bikeshedding them :) We are keeping them in the gnome-sound-recorder mockups folder on github. I keep meaning to ask Allan, Jon, and Jakub for feedback but so far I haven't. Partly that is due to trepidation, and partly it's because I'm still figuring out what is and isn't possible in GStreamer.

I've been battling a little with GJS, mainly because there are a lot of functions in GNOME libraries that simply don't work in GJS, and there is no documentation. In the past I thought things were failing because I didn't understand what I was coding, but in fact it was often the case that I was trying to use functions which didn't have GObject bindings. Sometimes GJS will helpfully announce that something is "not a function", which is not exactly useful, since it's listed as a function in the documentation. This always lead me to believe that I was writing code with syntax errors. When I started working on the sound recorder, I asked Jasper St Pierre how to generate GJS docs with g-ir doc tool, and it's been really nice to be able to look up the syntax of functions when I get stuck.

While I'm fairly comfortable with GJS because of working on some stuff for Documents, I still don't know it nearly as well as Java. I did an independent study last semester so I could learn C (the instructor threw in C++ as well, which honestly was a lot like Java with .h files). So far it's been really useful. Some of the GNOME codebase is still a bit difficult for me to understand in places, but being able to steal code snippets and translate them into GJS makes coding with an unfamiliar API a lot more reasonable. GStreamer seems pretty user friendly but it's pretty huge and complex. I have already gotten a lot of help from my mentor, Sebastian Dröge. Indeed, I almost think I'll finish by the end of the summer, if I can sneak it past the Design Team :)

6 comments:

  1. Oh, didn't know about that g-ir-doc-tool thing. Cool!

    ReplyDelete
  2. Hey Mattias,
    One thing to be aware of is that you may need to install python-mako to get your build of the doc-tool to work.

    ReplyDelete
  3. Exactly what I am needing. Thanks.
    Did you notice any problems? The page on l.g.o says only C and python are supported.
    Does it integrate with devhelp somehow or do you browse the docs manually?

    ReplyDelete
    Replies
    1. Jasper just added GJS support recently and he didn't get around to editing the page, so it doesn't list GJS. I put the info up there. The docs it generates are pretty good, but a little rough. The tool itself seems to work fine. The only hitch I ran into was that it didn't work until I installed Mako. I put my GStreamer docs here: https://github.com/MegFord/GStreamerGJSDocs

      Delete
  4. Will it be written using GJS? C/Python/Vala aren't accepted?

    ReplyDelete
  5. No, I could have written in in another language. GJS is just the "official" language, so we are trying to improve the experience around it specifically. There are new apps in other languages as well, like Calendar.

    ReplyDelete