Archive for the 'Programming' Category

Xapian Python Bindings (Win32) 1.0.3 Released

Wednesday, October 3rd, 2007

I have compiled version 1.0.3 of Xapian for Windows, and I have built and packaged the Python Bindings for your convenience.

You can find the new version here.

This time they are available for both Python 2.4 and 2.5. Enjoy.

Xapian Python Bindings (Win32)

Tuesday, August 21st, 2007

I have built the Xapian Python Bindings on Windows. They comes packaged with an easy, standard (distutils) installer. This may help with some of the headaches associated with running Xapian on Python and Windows.

Getting the whole thing to compile was not exactly a walk in the park, so I assumed people would be glad to have an easy Binary installer handy. I plan to use this library for a few internal projects, and I want the said project to be as multi platform as possible.

So far, they are only packaged for Python 2.5 but I will try to package them for 2.4 later on today or during this week.

See the details here.

They were built on Windows Server 2003 with MSVC from Visual C++ 2005 Express.

I hope this helps.

Crappy parser is craaaappy

Friday, December 1st, 2006

Just when I was starting to actually enjoy (read: thinking “hey, it’s not so bad!”) Windows scripting after discovering documentation for the 32 bits command interpreter in Windows NT, I realize I have been spoiled by Unix shells and expect some things to work, and then frown in disgust when they don’t.


for /F "usebackq tokens=2,*" %i in (`net use | find "..."`)... 
| was unexpected

I really wanted to like writing cmd scripts. But the parser is way too obnoxious when parsing brackets. For instance, you can’t set an environement variable in one branch of a conditional statement.


if "text" EQU "othertext" ( 
    set VAR=value 
) else ( 
    echo Not Working. 
)

This will fail silently or with unexpected results. Can’t wait until PowerShell becomes mainstream enough for me to use.

PowerShell is out

Thursday, November 16th, 2006

Microsoft PowerShell was just released.

PowerShell is actually the only new technology coming from Microsoft that has gotten me excited. I have played around with the Betas and Release Candidates at work, now I can finally USE it. It will take some time before it reaches the production environnement, but this will make my life substantially more pleasant when working with windows.

Great Scott, Apple

Thursday, September 14th, 2006

By Sithis, where is my gcc 3 for x86?


/usr/libexec/gcc/darwin/ppc/3.3/cc1plus
/usr/libexec/gcc/darwin/ppc/3.3-fast/cc1plus
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/cc1plus
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1plus

That explains why there’s a crapload of things I can’t build on my intel Mac.

C compiler cannot create executables, yeah well, that makes sense. I guess I could possibly cross compile, but that’s too much hassle. I’ll just have to wait for someone to update the ports.

So if you’re wondering why that occurs to you, it’s because there’s no gcc 3.3 for x86 on OS X 10.4. You have to use gcc 4.

public static void GiveUpCSharp()

Tuesday, December 6th, 2005

Well, i’m doing some basic C# junk for a Subversion Hook at my workplace lately.

You know, Visual Studio (Express, in my case) has a nice feature, you enter three slashes, and it springs up some kind kind of “meta comment” in the code, which you can use to describe your method or constructor, and what arguments it requires. What is awesome is that IntelliSense (the thing that autocompletes and show you choices and snipplets as you type away) picks it up and offers you context sensitive help based on what you wrote.

Now, I didn’t have much sleep last night, and I stand here, utterly tired. So I was using a function I wrote earlier, WriteLineLog(), that writes to both Console and a Log file, depending on a setting in the configuration file.

And this gem sprung up in IntelliSense.

I made this. Clap away.

What is sad is that I don’t remeber writing the part referring to Phalluses engaging into a ritual tribal rythm fest.

So, I’m taking notes. Attempting to write proper code when tired = bad.

Subversion: On fixing “can’t recode string”…

Wednesday, November 16th, 2005

Well, I recently set up a subversion system where I work, on Windows. Clients are using Tortoise SVN, and everything works beautifully. However this morning, I checked out the trunk on my Mac OS X powered Powerbook, and the lawnmower hit a brick the split second svn tried to checkout a folder with accented characters (In french, for instance. Could have been german umlauts).

svn: Can’t recode string

Well, this was a matter of changing the encoding used by my system locale to match the one of the repository, which was done by editing the file .profile in my home directory (I use bash as a default shell, which is the default on OS X 10.3 and above, as opposed to csh) and added the following:


export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"

This basically had the effect of setting up the locale to UTF8, which swallowed the file without problems. I just though I’d post it there because it was useful — I didn’t really google around to check out if that solution was already out there, but I will mirror it on underwares.org anyways.

Hope this helps someone, somehow. :)