Category Archives: Coding

Place shifting action 2

tivo.jpgI’ve been working on a command-line oriented TiVo2Go downloader so I can automate getting items off my tivo, or at least do it when I’m on the road via ssh (and then kick off that other script…)  I’ve written a quick and dirty TiVo library, and a sample script called TiVo2Disk which uses the library.

On its own, the TiVo library stuff I whipped up will just download the content from the TiVo still locked up in TiVo’s DRM.  If you pair it with tivodecode (like the sample script does) you can get the video as an MPEG-2 stream.  Beware, HD content is HUGE.

I’ve only tested with my Series 3, and I’ve run it under both OS X and Linux, but it should work on any .  The UI on the sample script is pretty bad, but its an early version.  I’m interested in an feedback, patches, etc anyone might have.  I still need to do some rdoc as well.

This works for me, but I’d like it to be more useful for more people.   In any case, feel free to checkout tivo-ruby-0.1.tar.gz.

CMake so far

I’ve been investigating cmake at work as a better build system for our cross platform C based projects. I’m thinking about starting up a third one, so now is the prefect time to really go after this as for one project we have a build system per platform and on the other we have two build systems. When you mix in wanting to make universal binaries on OS X its yet another wrinkle. cmake was recently chosen by KDE to be the build system for KDE4 since KDE4 will be fully supporting Windows and OS X, as well as the other unicies via X. I used a small convenience library as the test piece as it was only two files big, but it had the requirement of at least two external libraries.

Some pros for cmake that I’ve found so far (compared to what we’ve been doing):

  • support a big number of build environments on the different platforms. On windows it sports 11 different build environments, OS X 3, and Linux 2. For OS X and Linux, you only really need those two or three, but on windows it supports 4 different versions of visual studio as well as Borland, Watcom, and gcc.
  • Takes care of the flags needed to build executables and libraries on those supported platforms.
  • Does out of source builds on windows.
  • Tracks dependences on all platforms without an external application
  • Does search and replacing on things like .in files without having to call out to external applications

Some cons I’ve found so far:

  • The documentation on the web page is pretty horrid. The book is pretty bad too, especially when compared to other technical books I’ve read recently, but its much better than the website. When combined with the book and experimentation, the FAQ is helpful.
  • Doesn’t really have the concept of convenience libraries. This will result in common files being built multiple times. I don’t like this, but its not fatal.
  • The CMakeCache is getting in my way more than being a help, but that might be the side effect of my learning process right now.
  • I haven’t yet figured out how to make it query the person compiling the app if it can’t find something. This may not be possible. At the very least I want to make it bitch and bomb out if a required dependency isn’t there. I just haven’t found it yet, I’m thinking.

This isn’t an exhaustive review yet, but I wanted to get down what was in my mind before I forgot. I had just found the convenience library thing and that’s what inspired the post. My next step is to move a full existing project over to being built with cmake. This is a library that depends on expat, boost, curl, antlr, and (optionally) swig. Should be a good challenge.

[Update 11:58: I found an answer to my “bomb out if the dependencies are missing” question. Thanks, devchannel!]

[Update 2:51: No this isn’t here just for g0ff. Turns out the latest cmake has modules to Find Java, Doxygen, Boost, Curl, Expat, and Swig already. It looks like just custom items for antlr and cppunit will be needed. Also, it only ever wants to link against dynamic libraries, not static ones. That’s a PITA.]

[Update 5:52: Okay, the convenience library thing is upsetting.  The output of what I was working on is a static library and there are same example command line tools that link against it.  From my reading of the cmake stuff, I should just include the library source files to the target for the executables being created.  The problem with this is for n example programs, I’m compiling librets n times.  This doesn’t seem very optimal.]

I see your Nerd ABC and raise you a DORK ABC

Parent Hacks had a post that alerted me to the Nerd ABC flashcards, which I totally want to get for my daugther.  I shared this with the folks on IRC and it turned into a discussion, thanks to Steve thinking that Fruit Fly wasn’t nerdy enough, of what a set of Programming Language ABC flash cards should look like.

Steve was kind enough to write up what was created by commitee.

XEmacs tricks

Sean and Joe were talking on IRC about Steve Yegge’s post on Steve Yegge’s 10 Specific Ways to Improve Your Productivity With Emacs. He had me at #1. Seriously, the most important thing to me on his post was how to swap caps and control on XP.

Even though I currently prefer Xemacs, most of the items still apply. Actually, many of the suggestions I was already doing. (I have to thank Dave Dribin, my xemacs mentor, for that.) The few I wasn’t that I thought were sane I added, like removing the menubar I never use and the scrollbar I so rarely use as to be never.

Here’s a few of my Xemacs suggestions:

;;; Remove "XEmacs:" from the modeline as it annoys me
(setq-default modeline-buffer-identification
	      (list (cons modeline-buffer-id-left-extent "")
		    (cons modeline-buffer-id-right-extent "%17b")))

I got this one from an emacs HOWTO somewhere. I find it very useful, especially in e-mail.

;;; Make highlighted regions act like a word processor.
;;; i.e. select a region, the region is then overwritten
(cond
 ((fboundp 'turn-on-pending-delete)
  (turn-on-pending-delete))
 ((fboundp 'pending-delete-on)
  (pending-delete-on t)))

Here’s a quick translation of Steve’s Item #7 to xemacs:

(set-specifier menubar-visible-p nil)
(custom-set-variables
 '(toolbar-visible-p nil)
 '(scrollbars-visible-p nil))

A question I have to ask myself, is now that I’ve removed all that, why am I still using xemacs over regular emacs. I need to think about this. Something in the back of my brain is saying that mouse wheel support and a few other things were better when I started out. Fedora Core 4 doesn’t ship with xemacs anymore (but its in extras) so I might have to give emacs a try again.

ezRETS

I normally try to avoid posting about work, as that way often leads to being fired or other unpleasentness. However, I think its okay in this case.

I’m really excited about our beta release of ezRETS an ODBC driver for RETS data sources. This has been one of the coolest projects I’ve worked on for a long time.

We just put out the windows binary today, but the source is available via subversion and if you can build it, it’ll run under Linux or Windows. OS X to follow. We will probably get out a source release next week, we just didn’t have time this week.

Today’s computer hatred brought to you by INTERNAL COMPILER ERROR

Generally, I really love working with computers. I can’t imagine what else I’d do as a profession if I wasn’t doing what I do. However, there are some bugs on some days that just piss me off so much I need a place to vent. Good thing I have a blog.

Anyway, it looks like if you’re trying to compile things on Windows XP SP2 using Visual C++ with pre-compiled headers turned on and your code is hosted on a network drive hosted by samba, you’ll cause:

fatal error C1001: INTERNAL COMPILER ERROR
(compiler file ‘f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c’, line 1609)

http://lists.samba.org/archive/samba/2005-January/099421.html

This is probably one of those bugs that is half samba’s fault and half VC++’s fault. That being said, I also found a report that looked similar, but with win2k and offline files.