Older blog entries for amars (starting at number 286)

27 Dec 2002 (updated 27 Dec 2002 at 01:30 UTC) »

Finally making progress. I've been given the task of writing a search engine for one of our clients' site, which uses a (to remain nameless for now) project i've always hated. Initially, i wrote a curl script to log in and fetch the cookie info to be passed on to wget with th -r function to recursively index the site. That didn't work... the curl script did, but the wget didn't. For some reason, i could not get wget to post the cookie information. I tried like hell too, using the --header functions to manually set the cookie and by using the --load-cookies option and neither produced any results.

After failed attempts doing it the sexy, seemingly proper way, i decided to go with the current tradition of modifying an existing search engine to support indexing cookie information. Sounds easy enough, i just need to find the HTTP code and add an extra header. Unfortunately, i couldn't get phpDig installed and working properly, and I don't understand ht://dig. I even looked at phpMySearch, but as is the case with most other phpMy* projects out there it's a flaming piece of shit. phpMyAdmin is gratis, but it is by no means libre, they require that all changes to the code, even private, be mailed to them, and they reserve the right to forbid you/anyone from using their code.

So, now i'm writing it from scratch. I'm ending up writing everything in PHP, which may not be best for the spider/index, but oh well. I've gotten it to fetch a file at my discretion, strip all of the links and do so as a logged in user, so it indexes information for a logged-in user.

I was sick all day yesterday. Very sick, and i can't figure out why. At best, it's something I ate, but i'm still unsure. It's the first time i've been sick in Mexico, which is odd considering how much street food i eat here.

In Mexico, doing the whole 'vacationing while working from internet cafes' bit. I'm enjoying my time here, but it's pretty damn frustrating while working. I truly have descended into the depths of the dopey linux/mac user frustrated by the, well, frustrations of windows world. I've gone from a working environment tuned by me for me, to using a shared internet connection in a room somewhere in Mexico, using an unfamilar computer running some version of windows on a keyboard that has just enough of a mapping difference to drive someone like me who uses vim crazy. I found a mac, but they are using OS X 10.0, which is tolerable, but their keyboard doesn't work for me, i wonder if i had brought my keyboard, i could daisy-chain the two and use my own, but i doubt that would matter because i couldn't get the machine to SSH into the ocmputers at work, os it was a moot point. The cafe that used Linux the last time i was here closed down, good riddance, they kicked me out every time i opened up a terminal.

Also frustrating, is having to move from one place to another because the person in charge reboots the computer that is sharing the connection, while in the middle of a putty/ssh session and can't get back on.

Oh well, merry christmas everyone.

12 Dec 2002 (updated 12 Dec 2002 at 00:24 UTC) »

I never thought i'd be so happy with a D, but i'm glad to finally be done with my calculus requirements. My GPA sucks, but the way i look at it, it can only get better. I've finally finished all of the bullshit classes one has to take in college and can now focus on whats really important, and for the most part what itnerests me the most.

Today, after a month of inactivity, i was able to make some more progress on my Objective-C time log. re-arranged the program layout and added support for command line arguments. So far `./clock foo create` will create a new project called foo with a .plist xml file in ~/Library/Application Support/timelog/foo.plist. That was the hardest part, to be honest. Adding the rest of the commands will be easy but so far, it's planned ot work like this...

clock <project> <action>

if there is no action present, and <project> exists, it will read in info about that project, change my status (in/out) and record it back to the .plist, so i have a record of time worked on a specific project. <action> can be one of create,delete,status and probably more soon enough. `create` creates a new project `delete` deletes a project and `status` displays the current status, plust a brief summary of information relating to that project.

A cool feature i'd like to implement in the future is some kind of integration with iCal, where I can produce a history of time worked represented in iCal in all it's glory.

So far it is command-line based, in the future i'll probably end up writing a cocoa gui to it, or at least use the TLSession ObjC class for a gui version. But i'm still working on mastering Foundation.h, which will be awhile. At least for now, one can interact with the resultant .plist with Apple's plist browser/editor.

I really enjoy using vim (no, really i do) but dammit, why can't it be consistent? At work, we have been moving everything over to some new servers and now, and apparently the version of vim on the new servers aren't so friendly to my mac keyboard.

It's almost understandable, because i have the shorter keyboard that came with the B&W G3s. The delete key is where most backspaces are, and works like a backspace. The new vim treats the delete key (functionaly a backspace key) as a delete key, it even maps it as <del>, so it's backwards and drivign me crazye. Yes, i've tried fixdel with no success. Also, when in command mode, the up and down arrow keys aren't recognized, so i can't scroll through history, which is doubly annoying.

As far as I can tell, it's not a setting in vim because it works when i log in from my linux pc with a normal keyboard, and I can't find any settings on either server, even though it works on one but not the other. Also, on the old setup, it would remember the cursor position when i close and re-open a file, i can't figure out how to restore that functionality.

So far, my vi pocket ref hasn't been helpful... not for the said problems at least.

It's official, I bought the plane tickets today for another trip to Mexico. Again, flying in and out of Mexico City and bouncing around various places, definitely Guanajuato. My stated ultimate goal will be Morelia, though undoubtedly, I will spend the majority of the time visiting Adriana when not working. I originally planned to take a bus the entire way, but scrapped those plans when I found some cheap tickets on travel.yahoo.com. In all, will be gone just over three weeks, travelling by plane will allow me to do more of what I want, instead of the long multi-day bus trip. This time, I will get the chance to see Mexico in the winter and partake in the festivities associated with Christmas and New Years.

Consider it an experiment. I plan to continue working (part-time of course) in my current jobs as a contract programmer. The theory is that with all the internet cafes around, i can work a few hours a day, SSHed in remotely and still come out ahead. I have some money owed to me, already have a steady stream of work from one employer to keep me busy and have some more potential work coming from another... hopefully it will all work out. If not, I suppose I can work on some other stuff, which I hope will bring some income in the future.

Now, I just need to get these final exams out of the way. Wish me luck.

I go back to my apartment tomorrow after spending Thanksgiving with the family. I must have gained a few pounds in the last couple of days as i've been able to stuff myself on someone elses bill, which is nice every once in awhile.

I originally posted this to /. as a response to one of the articles, but it looks just personal enough and contemplative enough to put here as well.

I avoid talking on the phone because of the unpersonal communication in a human-familiar form. I can't help but feel like I am talking to an appliance and feel stupid. Partly because of the awkwardness of the fact that speaking with my voice is a personal form of communication over an unpersonal medium, there is some loss of emotional interaction.

On the other hand, I have no trouble communicating over mediums like IRC, Instant Messaging, email, etc... or in person.

Eye contact may help someone like me, but doubtfully... to me it would just be a device with a face. Based on what I see when i'm out or driving is that the majority of the people who are talking on a cell phone are perfectly content with "talking to themselves" as I always put it because it is essentially what they are doing. I especially get a kick out of seeing people walk around with those headsets, clearly advertising themselves as too self-involved to be bothered with distracting themselves with cell phones but willing to make themselves look like fools talking to themselves, they remind me of those guys in Snow Crash that covered themselves in ridiculous suits of computer equipment so they could be mobile while connected to the meta-verse... my response is usually similar to Hiro's when I see them.

Remind me not to ever take in more work than I can handle for less money than it's worth when I have no time to do it.

I hate stress... especially at a time when it would already be stressful regardless of work.

I need a vacation.

I'm entertaining the idea of doing some travelling during my winter break (when it comes). Ideally i'd like to go back into Mexico, but this time i'd have to take a bus the entire time including from my parents house to the border instead of flying... If i did do this it'd probably be fore no less than two weeks with a good portion of that spent physically travelling, because i'd like to make it as far as Mexico City again. While not travelling i'd still have to work, presumably from internet cafes along the way.

The idea of forgetting about life in the real world for a few weeks, carrying everything on your back and checking in with work to maintain a paycheck sounds like fun... expecially after this nightmare of a semester, which isn't over yet. It also has the added bonus of visiting a good friend.

There are a few caveats though. I'm worried about the temperature. weather.com says it is usually between 40 and 75 during the winter months... i assume 40 at night, 75 during the day. While i can handle cold weather, i won't be able to carry around alot of winter clothes... a sweater, hat, some pants and some wool socks at most. Winter is also busy season for Mexico, both for mexicans living in the US visiting their family and for rich white americans and canadians who can afford to shack up in mexico for a few months because it's too cold wherever they live (usually in the northern states). Hopefully there won't be too much competition... in Guanajuato i have a few options if i were to run into problems finding a warm bed, but elsewhere might be another issue. I also have to worry about not running out of money. Right now my funds are limited.

Anyways, it's something ot think about, even if a bit radical. But I could use a good adventure.

Did i ever mention how much ass Objective-C and Apple's implementation of NextSteps Foundation.h kicks? (yes i'm aware that OS X *is* what Next became)

I implemented the sessionFromDictionary and DictionaryFromSession methods to better facilitate serializing my data to Apple's default XML property list format. Now instead of an array of descriptions (NSString *) that need to be parsed, i have an array of dictionaries (NSDictionary *), that when put into the .plist xml format, is friendlier to anyone who needs to manually view or edit the file with either a text editor or Apple's xml Property List Editor.

I can see why Steve Jobs was so adament about moving Mac OS from classic to a Next based OS. People say that OS X is a user-friendly OS made for dummies... the truth is that it's only that way because it's so freaking developer friendly... if you enjoy programming, OS X/Cocoa is for you... and you don't have to shell out hundreds (thousands even) for the developer's tools that you would for Windows... and it's a heck of lot more pleasant than anything i've dealt with on Linux.

Maybe soon i'll install GNUStep to see how it fairs in that arena... the stuff i've been working on lately doesn't use AppKit and is CLI based, so it should technically compile and run... i hear GNUSteps Foundation.h is pretty good.

10 Nov 2002 (updated 10 Nov 2002 at 06:36 UTC) »

Pounded out some more Objective-C, i've practically turned my univ-provided web-space into a sort of Objective-C diary to sort of log progess in learning Objective-C through Cocoa. Which is weird because I have plenty of web-space elsewhere that i could use PHP with to make it more manageable instead of static, but as it goes with the majority of the apps out there for OS X, Transmit has made it relatively easy to 'manage content'.

Anyways, i made more progress tonight. I put together an actual 'framework' to support clocking in and out and have a class that keeps track of status and timestamp and functions to convert to and from quazi-serialized format to support writing to and reading from Apple's default plist xml format so it's semi-human readable. Next step i guess would be to keep track of time worked on individual projects... i'm thinking the best way is for eahc project to have it's own plist, instead of trying to mix it all in one file. I'm also going to need some stuff that i can use to make calculations on, and that may require another class to act as a container for sessions.

To add insult to injury, i treaded over to the Apple store to check out the new iBooks. Very nice considering the price.

I'm also convinced i genuinely own some bad ram. I took it out of my mac which was highly unstable and put it in my linux box which then became unstable... after not using it at all, neither of the computers have had an application crash.

277 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!