Category Archives: General

Google Music is a bit Awkward

This is a little addition to my post about building a Heart of Rock and Soul playlist on Google Music.

I’m surprisingly unbothered that I need to use Google Music on an Android device (or iPhone) or web browser to play my music. I mostly use my Android tablet or phone through a bluetooth speaker. However, it could use lots of improvement:

  • There’s no way to export a playlist, and your Google Music data is not part of Google Takeout.
  • I don’t think there’s a way to purchase all the tracks in my playlist. I’m afraid of what would happen if I cancelled my All Access subscription. Would it offer me the chance to buy the tracks? Would it permanently delete my playlist? Would I lose everything before I knew if I would lose everything?
  • You can’t search for tracks in a playlist. The browser’s (Firefox or Chrome) Find feature generally only searches through one page of the playlist.
  • You can’t easily move tracks around. If you want to add a track near the start of a 1000 song playlist then you’ll spend a long time dragging and dropping it from the bottom of the list to the top.
  • In the Google Music Android app, one false touch of the screen during an unexpected screen rotation can cause you to accidentally swipe a song out of your playlist. There’s no way to undo it, and no way to know exactly which version of the track you have just lost.
  • Songs you add to your library (or playlist) today might not play tomorrow. I’ve had songs just refuse to play. I guess the albums were removed from Google Music, but it would be nice to see some onscreen explanation when it happens. I’ve had this happen with Mitch Ryder and the Detroit Wheels’ “Rev Up” compilation, Ann Peebles’ “The Hi Singles A’s & B’s” compilation and a Gene Pitney song.
  • It gets confused sometimes and fails silently. Playlists sometimes won’t sync between different browser tabs, as if the changes haven’t reached the server. Recently my playlist was stuck at 991 songs. Trying to add one more seemed to work, but it didn’t show up in other browser tabs or in the Android app. Trying to move the song in the playlist resulted in a “Couldn’t change order. Please try again.” error message. By chance I found that the playlist in the Android app had some of those now-unplayable songs (see above) in strange positions that were not showing up in the browser. After removing them in the Android app, I could make changes in the browser again.

Heart of Rock and Soul: 992 out of 1001

This blog post will seem rather long, purist, and completist. That is the point. Sorry.

Wasted Youth

In around 1989, when I was 16 or 17, I got Dave Marsh’s Heart of Rock and Soul book, probably on the strength of a Q Magazine review. I spent the next few years searching for the songs it described, mostly from the 50s, 60s and 70s. Living in Swindon (UK), before the web, before Amazon, this involved many disappointing visits to awful second hand record shops.

At the time, UK radio was dominated by some awful crap and UK politics was coldly populist, as if it wasn’t hard enough being a teenager. Dave Marsh’s passionate rants gave me something better. My opinions of music and US politics have been pretty much lifted from him ever since, maturing only slightly.

His book introduced me to artists I would never have found otherwise, such as Al Green, Curtis Mayfield, Sly Stone, Roy Orbison, and Bobby Bland. It invited me to love Motown, Stax, Chess, and Atlantic soul wholeheartedly. It elevated Springsteen, Madonna and Prince above their mediocre company. I made time for George Jones and Patsy Cline. But I found only a fraction of the 1001 songs and over the years I stopped looking and graduated to other distractions. I lost my collection of CDs and cassettes in a series of moves, when I couldn’t take what I couldn’t carry. My small box of vinyl was allegedly taken to a charity shop in the 90s. I even lost the book.

Google Music All Access

A couple of months ago, I signed up for Google Music All Access, got a new copy of the book, and started hunting again. I’ve built up a Google Music playlist of most of the songs from Heart of Rock and Soul. Until now, I had still never heard a third of the songs. Almost all of them fill me with joy.

This time around I’ve realized how many doo-wop songs are in the list, and how good they are. And there are a couple of wonderfully strange old R&B songs that are new to me: such as Brenton Wood’s Oogum Boogum. I’m not enthused about most of the country songs that are new to me, but they might grow on me.

The kids seem to like it too. I had been trying to bombard them with Motown and Stax collections without much success, but the variety of this playlist sometimes grabs them. They like the doo-wop and the girl groups.

The rest of this post is a rather specific snapshot of the distribution and licensing problems that still seem to affect online music, along with a lack of curation by actual humans. I guess it’s representative.

I’ve blogged separately about some of the problems with Google Music specifically.

Multiple versions, re-recordings

I guess this has been possible for ages with Apple’s iTunes (though I use Linux and Android) but only All Access lets me listen to multiple versions of each song to decide which one is the original recording, without forcing me to pay for each attempt. That’s important because many 50s and 60s songs have been re-recorded so badly so many times. Presumably the original contracts wouldn’t have let the artists earn money with the originals, though I doubt they ever made much from the faked greatest hits compilations either.

I used 45cat.com and Google image searches to find pictures of the original 45″ singles, whose labels often mention the duration, so I knew where to start.

Just for instance, Google Music has:

(And that’s ignoring the Karaoke versions that exist of almost all songs. I wish I could just turn them off in Google Music.)

It would be great if Google could at least calculate the duration after stripping silence from the start and end of tracks. It would be even better if it analyzed the tracks and offered to group them into apparent duplicates. It would be a Googly problem to solve.

It would then be nice to blacklist some compilation albums so they don’t even appear in the search results by default. For instance, this “The Premium Collection” Drifters compilation seems to be all half-hearted re-recordings but this “Essentials” Drifters collection, though incomplete, is full of wonderful.

Google Music is Incomplete

I’ve been far more successful with Google Music than I ever was with second-hand record shops, but I had to go to Amazon for some MP3s, and some were only on iTunes. I’ve also had to buy a few CDs to get stuff that I can’t buy digitally anywhere. That got my count up to 992 out of 1001.

Some of the fairly mainstream stuff that was so hard to find the first time is still hard to find online now. For instance, Mitch Ryder and the Detroit Wheels and Bob Seger seem to have had licensing problems or objections back then that continue even now.

There are probably even more songs from the list that aren’t in Google Music – I had already uploaded my personal collection of MP3s when I started.

Not on Google Music, but on Amazon (amazon.de) as MP3s

  • The Young Rascals: Good Lovin’
    Google has the album that’s meant to have it, but the track is missing.
    amazon.de has the MP3 from that album. amazon.com has the MP3 too.
    It’s also on iTunes, which has the full version of the album.
  • John Lennon: Instant Karma (We All Shine On)
    amazon.de has it (remastered) as an MP3. amazon.com has the MP3 too.
  • Big Youth: Streets in Africa
    It’s on Google Music, but with the artist listed as The Heptones, and with a burst of distortion at the start.
    It’s on amazon.de as MP3 for instance on the “The Chanting Dread Inna Fine Style” compilation album, or amazon.com also as MP3.

Not on Google Music, not on Amazon (amazon.de), but on iTunes.

  • The Beatles: “Ticket to Ride”, “She Loves You”, “I Saw Her Standing There”, “Twist and Shout”, “Help”, “Day Tripper”, “I’m Down”, “Get Back”, “Revolution”, “We Can Work it Out”, “Strawberry Fields Forever”, “I Feel Fine”.
    Of course, it’s well known that iTunes has a Beatles exclusive. That’s just annoying.
  • Lenny O’Henry: Across the Street
    Not on Google, not on Amazon, not on Spotify. iTunes has it.
  • The Manhattans: Follow your heart
    It’s on amazon.com as MP3, but amazon.de has it only on a CD. iTunes has it.

On CD Only

These were on CDs, but not on Google, Amazon.de, or ITunes as MP3s. I bought the CDs  mostly from Amazon 3rd-party sellers and ebay.

  • Mitch Ryder and the Detroit Wheels: Devil with a Blue Dress On / Good Golly Miss Molly (Medley) and Little Latin Lupe Lu.
    amazon.de has the Rev Up compilation CD. amazon.com has a different compilation album of the same name on MP3.
    Google Music had the album at first but then silently refused to actually play its songs (see below). Google Music also has some later lame re-recordings by Mitch Ryder.
    I used to have a similar compilation on cassette in the car. I’ve missed it.
  • Van Morrison: Wavelength
    amazon.com has the Wavelength Album on CD:
    amazon.de has the Wavelength album on CD from third-parties.
    This song felt worth the twenty year wait.
  • Van Morrison: it’s all in the game
    amazon.com has it as MP3 on the Into The Music album.
    amazon.de has it only on the Into The Music album CD.
  • Bob Seger: Roll Me Away, Night Moves, 2 + 2 = ?, Ramblin’ Gamblin’ Man
    Google Play’s regular search takes me to his “Ultimate Hits” compilation listing a price even though I’m paying for All Access. Strangely, Google Music’s search doesn’t show it. Maybe that’s because it’s not part of All Access for some reason.
    Amazon and iTunes have everything but “2 + 2 = ?” on “Ultimate Hits”, only available on CD on amazon.de but available in MP3 on amazon.com.
  • Johnny Rivers: Secret Agent Man
    amazon.com only has a re-recording as MP3.
    Amazon.de and iTunes don’t have it as MP3 either, though they have an album (compilation?) of that name, without the title song.
    Amazon.de has Bear Family’s Summer Rains compilation on CD. Amazon.com has the CD too.
  • The Parliaments: (I Wanna) Testify
    Google Music only has later (longer, looser) versions, by Parliament instead of The Parliaments.
    iTunes has the single version, correctly listed under The Parliaments.
    amazon.de has it on CD from third-party sellers. amazon.com has it on CD too for crazy prices.
  • David & David: Welcome to the Boomtown
    It’s on amazon.com as an MP3 but amazon.de has it only on the album CD.
  • Planet Patrol: I Didn’t Know I Loved You (‘Til I Saw You Rock and Roll)
    It’s on iTunes, on “The Tommy Boy Story volume 1”, which is also on Google Music, but with only 1 track.
    Amzon.com has it as MP3 from that album and amazon.de has it as MP3 too.
  • Larry Williams and Johnny Watson: Mercy Mercy Mercy
    It’s on amazon.de, on the Two For the Price of One album CD.
    It’s on amazon.com, also as MP3.
    It’s not on iTunes either.
  • Jerry Lee Lewis: One Has My Name
    It’s not on Google and not on iTunes.
    It’s on amazon.com as MP3.
    It’s on amazon.de, but only as a CD.
  • Wallace Brothers: Precious words
    Not on Google, not on iTunes.
    On amazon.com on a compilation, but only as a  CD.
    On amazon.de, as a CD.
  • Donna Fargo: A Sign of the Times
    Not on Google Music, not on iTunes.
    On amazon.com as an MP3.
    On amazon.de, but only on a CD from third-parties.
    When I finally heard it, it didn’t seem worth all the effort.
  • War, Slippin’ Into Darkness
    Not on Google Music (though a live version is there.)
    amazon.com has it as an MP3.
    amazon.de has it only on a compilation CD.

Still Searching

The last few songs that I can’t find anywhere (not Google Music, not Amazon MP3s, not iTunes, not Spotify) are:

I have a second version of the playlist that removes some stuff that I’d rather not hear too often, such as Billy Ocean’s creepy (and not that good) “Get Outta My Dreams, Get Into My Car”, talky stuff like the Special AKA’s The Boiler, Donna Fargo’s Sign of the Times, Isaac Hayes’ By The Time  I Get To Phoenix, and the Christmas songs.

cluttermm 1.18

cluttermm provides gtkmm-like C++ bindings for the Clutter API. It hasn’t had much attention over the last few years, while the Clutter API has moved on considerably.

I don’t have a great interest in Clutter, though I’d like cluttermm to be ready to inspire gtkmm if any future GTK+ 4 absorbs Clutter. However, Ian Martin has recently put lots of work into updating cluttermm and I’ve been helping him to get his changes upstream and I released some cluttermm-1.17.x tarballs. It’s in the cluttermm-1-18 branch.

This has involved deprecating a huge amount of API and adding (hopefully all of) the API that replaces it. I’ve already removed all this API in the parallel-installable cluttermm git master branch but I have some linker errors that stop that from building, and I’m not going to spend time on it until there are some releases from clutter’s git master (clutter-2.0).

This also means that the cluttermm-tutorial is even more wildly out of date. I’m not likely to spend my free time updating it.

I don’t want to be cluttermm maintainer again, but I didn’t want Ian’s work to be wasted and I hope he wants to keep at it.

 

glibmm 2.40 and gtkmm 3.12

Only a little late, we released stable glibmm 2.40.0 and gtkmm 3.12.0 versions.

This was only possible thanks to lots of work from Kjell Ahlstedt and  Juan Rafael García Blanco. For instance, Juan added the Gtk:::ActionBar, Gtk::FlowBox and Gtk::Popover classes,after having added Gtk::HeaderBar, Gtk::PlacesSidebar, Gtk::Revealer and Gtk::SearchBar in gtkmm 3.10. They also added example code in gtkmm-documentation.

Openismus Over

Last week I was at a notary here in Munich to officially put Openismus GmbH into its liquidation phase, after seven years. The company is closing down, though with no debts and with a little left over. I feel good about that.

This has been the plan for a while since it became harder to get reliable customer work, though that was more a result of the company structure and my own time constraints than any particular change in the tech economy. It became possible once the last few employees had found good jobs to move on to.

I got past any sadness about this a long time ago. I guess it would be nice for things to be running along at their best again, but there was never a sense of security and always a stressful balance of risk and responsibility. It was a good problem to have.

For the last year or so I’ve mostly been busy with all the tedious work of shutting down the offices in Munich and Berlin along with the day to day paperwork involved in a company. Now I feel a sense of relief to be free of these responsibilities.

It will be a few months until I start to look seriously for what’s next. I’ll probably look for a nice stable development and management job here in Munich, and I’ll try particularly hard to find something that lets me work part time so I can pick my kids up from school.

In the meantime I’m enjoying the small sense of achievement that comes from taking care of all the little things I’ve let slip over the past few years and catching up with a bunch of tech stuff that I haven’t had time to learn in depth.

Lego Wedo with MIT’s Scratch: Simple Robotics for Kids

Lego Wedo

Last week my son, who has just turned 6, tried out the Lego Wedo kit that I’ve had sitting in the cupboard until I thought he was ready. It’s a very simple system of sensors and a motor that plug into a computer via a USB hub so the child can write simple programs to control it. For instance, the program can turn the motor on or off depending on the whether a sensor detects something.

It’s a nice simple first step into programming and robotics for kids that aren’t old enough to deal with Lego Mindstorms, which I guess needs a higher level of reading and writing skills. Controlling real objects in the real world is interesting enough to small children. As robotics is not yet pervasive in everyday life, the limited functionality is helpfully simple without seeming unimpressive.

It’s the best equivalent I’ve found for my own first programming experiences with BASIC on the Sinclair ZX81 when I was 8 years old. That didn’t allow anything but programming from the moment you turned it on, and the BASIC keywords were just a keyboard press away. Putting text on the screen and reading text input was new enough to keep my interest. Today, children expect computers to do much more impressive things on a screen. But they don’t expect so much from Lego.

I talked my son through building the programs, encouraging him to start with simple steps, checking that they worked, finding out why they didn’t work, and then building upon that step, until he had a whole program. For instance, first we would make something move, then make it move as we wanted, and only then think about how to make it move only at certain times or how to make things happen onscreen. Plenty went wrong so he had a chance to learn that errors and debugging are normal.

Lego Wedo is part of the Lego Education line, which is aimed at schools, and their procurement processes, rather than general consumers. This need to support a network of distributors, and to provide curriculum support and lesson plans, is probably why it’s so expensive. The Basic Lego Wedo set (Lego kit 9580) is 129.95 Dollars in the US, or 148.74 EUR in Germany. Until recently, it was hard to buy this stuff as an individual, at least here in Germany, but the Lego Education online shops (listed here) now allow this. And the Lego Wedo kit is available on Amazon.de from third parties. It’s probably worth looking on ebay too.

Scratch instead of the Lego Wedo Software

The kit is useless without software, so you usually need to buy the Lego Wedo software separately, making the whole thing even more expensive (89.95 USD in the US, or 101.14 EUR in Germany, though I think it used to be twice as much). It runs only on Windows and Mac.

Luckily, MIT’s Scratch 1.4 has support for Lego Wedo. It “just works” on Linux, at least on Ubuntu Linux and Fedora Linux. Scratch is available for Windows and Mac, so I guess that it will work there too.

We have an OLPC XO laptop which has Scratch installed by default, which works perfectly with the Lego Wedo. I recommend this setup wholeheartedly because then the child doesn’t need to deal with all the surrounding crap in an adult’s operating system and doesn’t need permission or help to start playing. Unfortunately, I don’t know how individuals can buy these now, though you might have luck on ebay.

I’m not a fan of Scratch’s user interface because it expects kids to drag and drop, or click, on tiny targets and read tiny text. I guess that the official software is much easier. But Scratch is way better than nothing, and my 6-year old child can handle it now.

When the Lego Wedo USB Hub is connected, the Motion and Sensing areas have extra Lego Wedo Scratch blocks for use with the motors and sensors.

Unfortunately, the latest version (2.0) of Scratch, as seen on the main Scratch site, is browser-based, using Flash, though they are apparently aiming to rewrite Scratch in Javascript. It doesn’t seem likely that the online version will support hardware such as Lego Wedo any time soon, though it’s apparently in progress. Luckily the older versions are still available and still work.

Lego Wedo Hardware

The Lego Wedo basic kit has one motor, a distance sensor and a tilt sensor, along with the lego pieces, such as blocks, cogs, and axles, needed to build the models seen below. That’s obviously fairly limiting, but it’s enough for some first steps for young children.

The official Lego software can apparently control multiple motors, and multiple USB hubs, but MIT’s Scratch can only control one motor without installing a custom thingy.

The Lego Wedo motor is the same as the Power Function motors that can be bought separately  or that come with big Lego kits such as the Lego Technic 4×4 Crawler which my son has just built. However, these motors and sensors are not compatible with the Lego Mindstorms system (neither the older NXT nor the newer EV3 systems), which is rather annoying.

Lego Wedo Models

We built a few of the basic Lego Wedo models using the online PDF instructions. The advanced models, such as the ferris wheel, need (unusual) parts from the LEGO Education WeDo Resource Set (Or “Expansion Set” – Lego kit 9585) but we might try building something similar with what we have.

We had to think up suitable Scratch programs for ourselves, but that’s a useful exercise. The Lego Wedo Teachers guide (see Activities here) has some helpful suggestions about what you might try to achieve.

We built these models:
(View this at the original page if you can’t see the (done in a rush) embedded videos.)

Hungry Alligator

The alligator snaps its jaws open and shut when your finger gets close enough. Our program kept checking the distance sensor, and when that had a small enough value, we turned the motor on in one direction for some time and then in the other direction for some time. We had to make sure that the mouth was open when it finished, or it would block its own sensor and keep snapping forever.

Here’s a picture of our program:
IMG_20140112_085612

Goal Keeper

The goal keeper moves around in front of the goal. The distance sensor behind the goal detects balls moving past it, so the program can keep score. We had two sets of blocks – one to move the goal keeper at random, and one to keep checking the sensor, incrementing a variable and showing its value on screen. We hacked in a wait to stop it from incrementing the variable too much as the ball passed the sensor but this could be cleverer.

Here’s a picture of our program:

Flying Bird

The bird’s body and wings can be moved manually. There’s no motor in this model. It’s just a fancy way to trigger the distance and tilt sensors. When the body moves, the tilt sensor triggers a flapping sound from the computer, and when the head blocks the distance sensor, the computer makes a chirping sound. Scratch has a bird chirp sound by default but we had to record ourselves saying “flap” for the other sound.

The tilt sensor is rather imprecise, and only provides one value at a time to indicate one of flat, up, down, left or right, which doesn’t make much sense. Scratch displays the value as a number between 0 and 4 which makes things hard for kids. The meaning of each tilt value is mentioned here.

Drumming Monkey

The monkey’s arms move up and down due to the motion of the rotating cams attached to the motor, letting you change the rhythm by changing the motors speed and duration, and by changing the positions of the cams and the arms. This model has no sensors. It’s rather underwhelming.

Here’s a picture of our program:

jhbuild and clang’s scan-build

I love C and C++ compiler warnings, particularly when I can fix the problems they show. I love getting new warnings for code I thought was clean. There are always a few warnings that show serious mistakes.

I recently noticed that, since 2011, jhbuild can do some extra static code analysis, using clang’s scan-build tool. This is thanks to Jeremy Huddleston and friends.

It’s pretty simple, though I don’t think it’s in the jhbuild manual yet. It should work if you just install scan-build (from your distro package, such as the clang-analyzer package on Fedora), and add this line to your .config/jhbuildrc file in your home directory:

static_analyzer = True

My scan-build here on Fedora 19 didn’t seem to find its own clang executable, so I had to add this line too:

static_analyzer_template = 'scan-build --use-analyzer=/usr/bin/clang -v -o %(outputdir)s/%(module)s'

I wonder if any systems are running this regularly. I’d like to just view it online every now and then. My local /tmp/jhbuild_static_analyzer/ directory is full of lovely scan-build reports for various GNOME modules but I’m sure others would enjoy that bounty.

 

glibmm 2.38 and gtkmm 3.10

I just released glibmm 2.38.0 and gtkmm 3.10.0 – stable releases of API that we’ve been working on for a while.

This adds several new widgets that were added in GTK+: HeaderBar, ListBox, PlacesSidebar, SearchBar, and Stack. Thanks to Juan Rafael García Blanco, Andrew Potter, and Kjell Ahlstedt for that hard work.

It deprecates StockID, Table, IconFactory, IconSet, IconSource, and Gdk::Color along with several methods.

This glibmm release also has a fairly useable API for Gio::Menu and Gio::Action so you can really create gtkmm Menus with them and Gtk::Builder (here is an example). But unlike GTK+, we decided not to deprecate Gtk::UIManager, Gtk::Action and friends yet.

Most importantly, and most difficult to notice, we have deprecated deriving from Glib::Object before deriving from interface classes (such as Gtk::TreeModel). So you need to make changes such as this. The previous use of interface classes as the last base classes, after Glib::Object (which used to be the only way to use them) will cause runtime warnings in glib for now, and will probably break your application’s functionality in future glib versions. It’s not what we want.

Openismus Mini

As I mentioned last year, Openismus managed to stabilize for a while after we first had to slim down from 16 employees at our height. Our core team took on greater responsibility and worked hard to transform the company, with incredible results.

However, we haven’t managed to sustain that, so we’ve recently had to lose more great developers and close the Berlin office, keeping just the Munich office. There are many ways to look at it but in the end we must yield to the mathematics. Luckily, we’ve managed to help some people move over to KDAB in Berlin, who we’ve been working with recently. KDAB are good people who do similar work, mostly around Qt, though they are larger and sustainably successful. I’m sure that our ex-Openismus stars will drive a trail of success wherever they choose to go, still fighting entropy. I’m not too sad now that I know everyone is OK and because I know that we’ve had time to try things.

Openismus will continue at least for now, working on Rygel and Evolution-Data-Server as we still have a little customer work there. But we can no longer employ sales people, so we’ll have to hope that little contracts turn up here and there through personal contacts. I’m not optimistic, mostly because the last few months have worn down my perseverance.

We no longer have the capacity to work on the Maliit on-screen keyboard. However, the project is still very much alive and I believe that Develer and KDAB can offer quality Maliit consulting. We just couldn’t wait around long enough for the right customer to sign a contract.

Likewise, we have lost our Wayland expertise, but Jan Arne Petersen, who did the Wayland Input Methods work, will be working at KDAB, so I’m sure that an interested customer could continue to fund similar work.

C++ in Glom: shared_ptr and slots/functions

I’m playing more with C++11 in g++ (Use –std=c++11), this time with Glom.

std::shared_ptr

Glom has a custom reference-counted shared pointer, Glom::sharedptr, which seems to work well, but I was glad to replace it with std::shared_ptr so I never have to wonder if it’s working properly. Krzesimir showed that I could make it a little more concise by using std::make_shared(). I’ll use auto some time to make it even neater. For instance, make_shared() takes the parameters to the constructor of the class:

auto some_thing = std::make_shared<SomeThing>(1, 2, 3);

It’s a lot like glibmm’s Glib::RefPtr, though that lets GObject do the reference-counting, so one day glibmm/gtkmm will have similar changes.

std::function

glibmm still uses sigc::slot with sigc::signal, but I had some application code that used its own slots as callbacks. So I changed these from sigc::slot to std::function. The new syntax doesn’t feel quite as nice. For instance:

Replacing sigc::slot declarations with std::function

std::function uses a slightly different syntax than sigc::slot for declaring its functors:

sigc::slot<void, int, int> some_slot;

would now be this, which I guess is OK:

std::function<void(int, int)> some_slot;

Using non-member functions

sigc::ptr_fun() has no equivalent, so this:

std::slot<void> some_slot = std:ptr_fun(&some_non_member_func);

becomes:

std::function<void()> some_slot = &some_non_member_func;

though that same syntax is legal with libsigc++ too. The & is optional when getting function pointers in C or C++, but I like it.

Using member functions

sigc::mem_fun() has no equivalent either. std::mem_fn() just gives you the member function without associating an instance, so you need to use std::bind() to get both. So, this:

std::slot<void> some_slot = sigc::mem_fun(*this, &SomeThing::some_method);

becomes:

std::function<void()> some_slot = std::bind(&SomeThing::some_method, this);

That becomes particularly awkward if your member method takes any parameters, because std::bind() expects you to supply all parameter values when using std::bind(), not just when calling the slot/function later. std::placeholders::_* is the awkward way to work around this (thanks again to Krzesimir). So:

std::slot<void, int, int> some_slot = sigc::mem_fun(*this, &SomeThing::some_method);

becomes

std::function<void(int, int)> some_slot = std::bind(&SomeThing::some_method, this, std::placeholders::_1, std::placeholders::_2);

Presumably this simplifies the implementation, but the result is that the common case is less readable. Still, I’d be glad to have one less library (libsigc++) to think about if we can ever replace sigc::slot with std::function in glibmm and gtkmm. However, C++11 does not yet have any equivalent for sigc::signal so we’ll still need libsigc++ for a while.