Day: January 28, 2009

  • Clone Wars Watchlist

    Introduction

    This post is a guide for building your own version of Apache’s mod_python as a Universal Binary in order to support a custom Django install containing the Twitter libraries. As you can probably gather, this information is likely only useful to advanced Mac users who are comfortable in Terminal with compiling and installing software from source. If you’re still interested, gird your loins, crack your knuckles, grab some Mountain Dew, and read on.

    Mac OS X 10.5 “Leopard” is yet another step forward into the world of 64-bit. At the same time, Apple has to support both PowerPC and Intel architectures. This is no mean feat, and this is where “fat” or Universal binaries come in.  Apple also has an explanation of Universal binaries, although it’s heavy on PR. This is all well and good, but there is one problem: once you make this leap, all of your library dependencies must contain the architecture you’re running as. Much software is still built as 32-bit only; while it may be a “fat” binary, containing both Intel and PowerPC machine code, it only has the 32-bit versions thereof. For reference, the names of the various architecture flags:

      32-bit 64-bit
    Intel i386 x86_64
    PowerPC ppc7400 ppc64

    Huzzah naming conventions! There’s a lot of history in those names. I’ve linked to the relevant Wikipedia articles if you’re curious; these flags will be coming up again later when configuring various builds. The main thing to note is that most build configurations default to i386 on Intel Macs (even though Core 2 and Xeon processors are natively 64-bit), probably because most software is developed for 32-bit versions of Windows and Linux. As you’ll see, we’ll be overriding that default in several places to get this whole mess working.

    Unfortunately, Universality is a cancer, which in my case starts with the Apple-shipped version of the Apache web server in 10.5, a universal binary. Everything it touches needs to be Universal as well, so that Apache can run as a 64-bit process by default. I wanted to add Django support on my web server via mod_python, specifically to play with the Twitter API, which meant I also needed to build python-twitter and its dependencies, as well as a MySQL python module to allow Django to talk to my database. None of these are included in the default Leopard version of Python 2.5.1.

    After getting all of this set up, and trying to start my test Django app, mod_python was giving me errors about architecture. As it turns out, the included version of Python is only a “fat” 32-bit binary, not a Universal binary… which means all of the new Python modules I just compiled to support Twitter and Django were only 32-bit, which in turn means that the included Universal version of Apache and mod_python couldn’t use them. Yay.

    Below the cut you’ll find my complete instructions for compiling all of the relevant components and their dependencies. I also took the opportunity to update to the latest release version of Python 2.6 and MySQL 5.1, and as a side effect my database server is now running as a 64-bit process. Progress has been made here. Feel free to comment or contact me if you have questions.

    (more…)

  • Sunspot

    A small Yorkshire Terrier lies in a pet bed on a green upholstered chair in a sunny living room.

    I wish I could nap like Pike naps.

  • The Muppets Meet Murderbot

    For the last year and a half or so Andrle and I have been having a ton of fun as part of an online book club put together by my friend Tanya. Unlike most book clubs where you all read the same thing, we all just share things we love that we’ve been reading.

    One recommendation that kept coming up was The Murderbot Diaries by Martha Wells, and I’m glad we finally ran with it and started reading them. We’ve been bingeing the last few weeks and they’re really, really great. Highly recommend (even though I’m only on Book 4.)

    Unsurprisingly another thing I’ve been reading about and thinking about a lot is the advent of Large Language Models, particularly as manifested by ChatGPT. My past work life as an NLP practitioner has me a mix of curious, envious, and highly suspicious of what these are and how they’re being used. In the short term I don’t mind using them as a toy that I can play with for the purpose of a joke, which is what this post is about.

    A recurring topic in this book club is how we might have the Muppets interpret a particular book, or how we might recast a movie with Muppets (but keep one human actor). This provides a lot of fun discussions, especially since I grew up regularly watching the classic Muppet movies on VHS recorded off of TV, and I really like musicals.

    That all brings me to some prompt iterating that I did to get ChatGPT to write the painfully cliché finale to a Muppet musical featuring Murderbot. (Apologies to both Henson and Wells.)

    Verse 1 (Murderbot):
    I used to be a killing machine,
    A rogue cyborg, feared and mean,
    But then I met the Muppets and Kermit,
    And learned what friendship truly meant.

    Verse 2 (Kermit):
    I'm just a simple frog, it's true,
    But I believe in friendship too,
    And when I met Murderbot, I knew,
    Together we could do something new.

    Chorus (All):
    We don't need to kill no more,
    Our friends are all we're fighting for,
    With Murderbot and Kermit side by side,
    We'll show the world what we stand for.

    Verse 3 (Murderbot):
    I never wanted to be a tool,
    But that's all humans see in me, it's cruel,
    I used to dream of breaking free,
    From their endless schemes and greed.

    Verse 4 (Kermit):
    It's true, I'm always happy-go-lucky,
    But I've been through some tough times that were quite yucky,
    But now with Murderbot and the gang,
    I know our friendship will never hang.

    Chorus (All):
    We don't need to kill no more,
    Our friends are all we're fighting for,
    With Murderbot and Kermit side by side,
    We'll show the world what we stand for.

    Bridge:
    The past is gone, the future bright,
    With friends like these, we'll win the fight,
    Our love and trust will guide us through,
    Together we'll see this journey through.

    Chorus (All):
    We don't need to kill no more,
    Our friends are all we're fighting for,
    With Murderbot and Kermit side by side,
    We'll show the world what we stand for.

    Outro:
    So let's raise our voices high,
    And let the world hear our battle cry,
    With Muppets and Murderbot side by side,
    We'll change the world and turn the tide.
    OpenAI. (2023, Mar. 16) [Iterative prompt conversation starting with “This Muppet movie is about a rogue cyborg traveling to different space stations and learning the power of friendship from the Muppets” and “I need some lyrics for the big finals. The music is big broadway style number about how the rogue cyborg doesn’t need to kill bad guys anymore because it has friends.” and then encouraging more dialogue between Kermit and Murderbot] https://chat.openai.com/

    Yes, I looked up recommendations on how to properly cite ChatGPT output.

    Overall the result was mildly amusing. I couldn’t get it to capture Murderbot’s signature style, presumably because while information about the novellas are in its model training, not enough text from the novellas are in there.

    I’m still not sure what useful things I could do with this kind of tool, but in the meantime, I can make it make silly songs.

  • Fox Ferocity

    Pike playing with a toy almost as big as he is.

  • Groomed Pike

    Tiny freshly groomed Yorkie sits on a teal couch wearing a monstera bow tie

    I love this little gentleman.

  • The Kale Wanter

    A small black and brown Yorkie stands on a cream rug in front of a brown cupboard begging for the bunch of lacinato kale in hand in the foreground.