Monday, October 29, 2012

Beta Testing Steam On Linux

Valve is taking applications from experience Linux users to beta test their Steam Engine port to Linux!

Yes, that's right. Ported to Linux!

You can sign up for the beta here. There's no guarantee you'll be selected, but you definitely won't if you don't try!

Valve Linux Steam Client Beta Application

We're looking for Linux gamers to install and test our new Steam for Linux client. We are primarily interested in experienced Linux users. 
In order to take the survey, you need to first login with your Steam account to link your response with your Steam ID.

Monday, October 8, 2012

C, Perl, Swig And Off64_t

On my project at work (called Proton) I've been working on dynamic language bindings, specifically Perl and Ruby. I had previously done the same language bindings for Qpid and so expected the same work would produce the same results in the new code base.

(I think all stories of frustration and despair start out this way, don't they?)

I ran into a stone wall, though, while doing the Perl bindings. Ruby fell into place correctly and I expected the same result with Perl. But I was surprised when, after setting up the Swig file and putting the CMake files into place that I got the error message:

error: unknown type name ‘off64_t’

when I tried to build the Perl bindings. The error wasn't in our code, but referred to code within the Perl distribution itself. After a fruitless day of searching for an answer, and only finding where others had reported similar problems, I felt stumped.

That is, until I hopped into the #perl channel on Freenode and asked other Perl developers there for help. And one guy, named mucker, came to the rescue. So, for anybody who's experience this problem and who has been frustrated trying to find a solution, here you go!

What you need to do is provide the same C compiler flags to your build that were used to build the Perl interpreter itself. To get the flags from the command line, you just do:

perl -MConfig -e "print \$Config{ccflags}"

which will output something like this:

mcpierce@mcpierce-laptop:~ $ perl -MConfig -e "print \$Config{ccflags}"
-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Assign that out to an environment variable and pass it into your build environment and your build will work.

And if you're using CMake as we do, you can add the following snippet to your Perl bindings section:
execute_process(COMMAND perl -MConfig -e "print \$Config{ccflags}" OUTPUT_VARIABLE PERLCFLAGS)

set (CMAKE_C_FLAGS ${PERLCFLAGS})
and your build will be just fine!

Running With New Shoes

Over the past few months, really since June, I've been trying to get back into some kind of shape. I had taken nearly two and a half years off from going to the gym after having gall bladder surgery to remove a stone the size of a golf ball! At first I didn't go back to the gym because I was deathly afraid of ripping open a scar . Then I kind of got complacent and didn't work out, convincing myself "I'll start next month". Then finally I was too busy eating donuts and coffee to be bothered with working out.

20 pounds later, it was time to take it all back.

One of my biggest challenges was running. I always thought I hated running, and any time my workout came to the cardio phase, I felt a sense of dread as I climbed onto the treadmill to run. It was so bad that for a long time I would get nasty cramps in my calves that stopped me from running for a week at a time.

When I started back to working out, I decided to focus on getting my running game up to speed, so to speak. Starting slow, my goal is to get to the point where I can run 5 or 6 miles without feeling like I'm going to DIE! Which feels like an unrealistic goal when, to start, running barely a mile made me want to punch a baby and puke. But I persevered over the summer and now have work to the point where a near four mile run doesn't make me feel destroyed: on Friday I ran 40 minutes and, with warm ups, covered nearly 3.8 miles.

To reward myself for this milestone, I went out and bought a new pair of running shoes. I've been looking for a while at the various light weight shoes to get a more natural feel when running. And on Saturday I went over to the local sports shop to check out their stock. I settled on the Fila Skele-toe minimalist shoe. They have a nice, snug feel without being too tight. The fit is adjustable with a Velcro band over the top and two bands on either side of the heel on each foot. Each toe has its own sleeve except for the pinkie and fourth toe on each foot.

Running for the first time in them today (after spending the weekend wearing them around the house while my wife and oldest son made jokes about them) it was different, but not a weird experience. I had read on a few pages online that running in minimalist shoes was an adjustment and you should ease yourself into it. So I started off slowly, reducing my running speed to start off. But it felt so natural I decided to try some incline runs, which felt good! The shoes didn't feel like they were working against me, and my calves felt more relaxed as I ran. I didn't feel like my foot was on a strange fulcrum is probably the best way to describe the experience.

All in all, I'm pretty impressed with the shoes. I didn't wear socks with them, and except for a small spot on my right foot where I wasn't quite used to the new shoe's feel (which will go away) I'm quite happy with the new shoes!