mortonfox: (Morton small)
Yes, it's already the second week of the new year but I was busy the first week and 2011 was such a busy year that it was hard to distill the important things from the year. The biggest change is after 16 months being out of work, I returned to work for a small startup (literally a 6-person office when I joined) in Wilmington. My previous job wasn't at a big firm but this one is microscopic in comparison and it's a lot different. There is no bureaucracy, no office politics, no cubicles, and very little formality. I was given full access and was trusted to do the right thing from day one. I learnt a lot as I went along and within a week, I had started contributing important code to the system. Best of all, I was never left with the feeling that anything I did was futile or a waste. Any software I wrote was put to good use pretty much right away and I deployed it myself most of the time. So all in all, it's been a promising start. Then again, I thought the same thing back when my previous job began, so let's check back on this one in 14 years and see if it has withstood the test of time. :)

Of course, with the new job, I had less time for geocaching but I think I did as much of that as I wanted to on weekends and after work in the summer. I ended the year with more geocache finds than year 2009 but not 2010. The year was dominated by Lancaster with two big geocache series, the battleship caches and the rail trail caches, although Delaware was no slouch either with the DGT caches, the C&D power trail, and the First State Challenge. I tried to get out to more geocaching events as well, especially the ones in Bucks and Montgomery County that would've been a 2-hour drive from my old home in North Jersey. Now that these are only an hour from home, it hardly feels like an arduous journey getting there. I also started going to a few Where's George events locally and in Maryland. And of course, I went to local furmeets too whenever I could and attended 3 furry conventions, FA: United, Anthrocon and Furfright. The great thing about this area is there's an event or gathering going on pretty much every weekend. On the other hand, the downside is I haven't had as many mascot gigs now that I'm distant from Hi-4. I'm also losing touch with NYC-area folks but that is to be expected.

I kept up the pace on personal projects as usual. In its 4th year, TwitVim had another round of incremental improvements, although I thought the multiple login feature was big enough to bump the version number. My Foursquare webapp, 4sqNoGPS, became PlainSquare when I rewrote it for the Foursquare V2 API. I also changed the CSS so it looks more like a mobile app on small screens while keeping the desktop interface simple. I've found this setup to be good enough for most day-to-day use and really only hit the official app to upload photos and claim specials. Remember the beta Google Chromebook I received in December 2010? Well, I used it a lot more throughout 2011 and that led to my participation in the Cr-48 binaries project. I probably wouldn't use the Cr-48 for serious development work but now that we have a text editor, a few scripting languages, and some dev tools ported to it, light work is possible. And finally, I did get around to scrapping my old website and reworking it into a Drupal-based site. This doesn't mean that I'll update it any more frequently but when I do, it'll be less of a pain. :)
mortonfox: (Cane #2)
It's a sign I'm getting on in years. This morning, it actually took some time for my right leg to start working after I woke up. Except I wasn't aware of that and tried to stand up right away. This week, I've been doing two geocaches every evening after work. This evening brought me to XRAY in the Marshallton area. It's near a medical center. After that, I went to Time and Relative Dimensions in Space. Now this is a neat puzzle cache. The puzzle is one that many sci-fi fans would be able to figure out easily and the cache container looks like a TARDIS.

Posted a new release of TwitVim yesterday. Only a few changes this time but I thought the new tools for managing multiple Twitter logins were significant enough to bump the version number. Because the software apparently has more than 3 users now, I did consider backward compatibility so no one has to reauthenticate. After the upgrade, it automatically converts old token files.

I joined Google+ a few days ago when one of my Friendfeed friends sent me an invitation. So far, I'm not seeing anything truly revolutionary aside from convenient integration with other Google services that I'm already using. All the interesting social features in Google+ were already in Friendfeed years ago. Trouble is aside from a group of dedicated Friendfeeders, no one used Friendfeed. So that's why people think this is new. The biggest factor in Google+'s favor though is it is still under active development, whereas Friendfeed development pretty much stopped after Facebook acquired it. So there is hope that Google+ will continue to improve and not fall by the wayside.
mortonfox: (words)
The stock Chrome OS installation on a Google Chrome notebook doesn't make it easy to install additional software. So all this while, in order to use TwitVim, I'd been opening an ssh session to my webhost, Joyent, and running Vim and TwitVim in the shell account there. This is an adequate solution to get up and running with TwitVim quickly but it has a few problems. The worst problem is ssh will disconnect if the network connection is bad or if you leave it idle for too long. Also, the ssh session is not preserved if I close the lid of the Cr-48 (to put it in sleep mode) because the network connection goes away then too. Those problems are lessened somewhat if I run Vim and TwitVim in a screen virtual terminal, but still I thought there had to be a better way.

Recently, I came across a blog post about installing Nano on the Cr-48. The basic idea is the stock Cr-48 setup can use binary packages from Arch Linux. That completely eliminates the need to set up a Chrome OS development system and build the software yourself. I figured if he can do that with Nano, then I can install Vim the same way and after that, running TwitVim would be a snap.

Here are the steps I used:

Read more... )
mortonfox: (words)
I released TwitVim 0.5.4 yesterday, just a day ahead of Vim 7.3 final. I haven't written about TwitVim development in a few months. The last time I wrote in any detail was while I was in the middle of writing the OAuth code. From 0.5.0 to 0.5.4, there have been over 3 dozen revisions, mostly to complete the feature set with some bugfixes and documentation improvements thrown in the mix.

One issue I've struggled with in TwitVim 0.5.x is about requiring the user to use a Vim executable that has been compiled with one of the scripting interfaces. (Perl, Python, Ruby, or Tcl) The reason for this is I don't have a good implementation of the HMAC-SHA1 digest code in pure Vim script1, so TwitVim has to sign OAuth requests by calling a HMAC-SHA1 module from one of those scripting languages. This is a terrible inconvenience; if it were not for this requirement, one would be able to run TwitVim in a precompiled Vim executable. Because of this requirement, a prospective TwitVim user now needs to be reasonably familiar with compilers and be able to build Vim from scratch. Furthermore, the required module isn't present by default in most Perl distributions other than ActivePerl, so the user has to fetch it from CPAN. Fortunately, the TwitVim user base (which seems to number about 3 at the moment :) ) appears to be quite good at those things. So far, those who contacted me with questions only needed a nudge in the right direction to get it working.

Another problem that's still unresolved at this time is Vim breaks some Tcl 8.5 modules. In particular, this bug prevents TwitVim from using Twitter SSL via the Tcl interface if Vim is compiled with Tcl 8.5. (TwitVim needs the "tls" package that I mentioned in my post to vim_dev. Tcl 8.4 is fine.) It was too late to address this issue in Vim 7.3, but I hope there'll be an official patch for this before Vim 7.4. (The unofficial patch is simply to hack out the redefinition of the "catch" command in if_tcl.c.)

---
1 There are Vim script modules for HMAC and SHA1 but these are very slow. The problem is Vim script does not have bitwise operators, so all the shifts, rotates, ANDs, ORs, and XORs have to be done using regular math operators and table lookups. It's really quite clever but I'd rather wait until the necessary enhancements are in Vim script before implementing HMAC-SHA1 in pure Vim script.

Busy Day

Jun. 23rd, 2010 03:49 am
mortonfox: (eek)
Busy morning. Seems like all the good job leads came in at once and all shortly before Anthrocon. What I was really looking for is somewhere to use my Perl (or Python, or Ruby, if it came to that) scripting skills. I'd been doing the C and C++ gig for over 14 years and I would prefer not to go back to that if possible. I came across a few openings that fit the bill, including one that I was told allows telecommuting. So I spent all morning applying and filling out questionnaires.

In the afternoon, I went to Harbor Freight to return a faulty cell phone holder that ripped apart after only a few days. Harbor Freight has cheap stuff but quality is suspect in some of their wares. Fortunately, they have a good return policy.

Started to pack for Anthrocon in the late afternoon. My packing list is more or less the same from convention to convention, so I was done in a bit over an hour. The only last-minute items are things that I'm still using, like this netbook and toiletries. Also, there is the possibility of bringing more than two fursuits this time if I pack a bit better. Not going to bring the husky suit this time because the tail is about ready to fall off, but there was one that didn't make the cut last time that may be coming along this time.

Since the packing went so quickly, I worked on some TwitVim features this evening. I'd been holding off on adding user and list management features until after the OAuth work was done but there's no reason to delay any further. So I added commands for following, unfollowing, blocking, unblocking, reporting spam, and adding/removing from lists. Also improved the error messages for many commands so we won't have to diagnose problems by HTTP status codes any more. (r117 thru r124)

Newlin

Jun. 3rd, 2010 09:28 am
mortonfox: (fox bend)
Did more work on TwitVim's OAuth code (revisions 95 to 97) yesterday morning. I think it's just about ready, aside from documentation. It saves access tokens in a file for login persistence and it has two ways to compute HMAC-SHA1 digests depending on what Vim extensions the user has installed.

Yesterday afternoon, it was sunny and 90°F. Could be cooler but it wasn't raining so I went to Newlin Grist Mill Park in Glen Mills. I'd visited this park before and thought it looked nice. It was raining that day, so I only did the closest cache to the parking lot. However, I decided then that I would come back on a better day and do the other caches in the park. Well, yesterday was the day. I visited Whiskey Before Breakfast and A New-Lin Cache. The former was at a pretty nice area near a dam with large stepping stones. So it was easy to cross the stream to the cache site. The latter site was up a steep slope from the trail but it was quick.

After that, I headed for home but stopped at Bringhurst Park in Wilmington for Veet Voojagig's Ballpoint Planet: Wormhole #3. I thought this one would be a challenge because it's on the other side of a stream but the water level was low and there were lots of rocks in the stream to step on. I just had to watch out for loose rocks that might tip over.
mortonfox: (Robot)
A few days ago, I wrote a proof-of-concept Twitter OAuth login and posting script in Perl. Today, with no interruptions from anything or anyone (even the mail carrier was extra quiet), I added the code to TwitVim. (revisions 88 to 92) The only part of the OAuth handshake and signing code that I couldn't yet write in Vim script is the HMAC-SHA1 message digest code. I'm using Perl to do that but I'll look for other ways.

The impression I got while working with Twitter OAuth is the API itself is an unfinished work with some rough edges and inconsistencies. For example, the documentation for statuses/home_timeline states that this call supports only the GET request method. This is true for basic authentication but once you switch to OAuth, it requires the POST method if you add any optional parameters. statuses/user_timeline, on the other hand, disallows POST even if you're using the optional parameters. I suspect the documentation is out of date and statuses/user_timeline will eventually be modified to be consistent with the other timeline calls but with Twitter, it's anyone's guess.

Twitter's OAuth implementation itself is not fully documented. I figured out a few things about what it does and does not allow by experimenting with my demo Perl script. I tried not to make too big a change at a time because it's tough to debug. Any error simply results in a "401 Unauthorized". It doesn't matter if you misspelled the signature method, if your nonce is not unique enough, or if your timestamp is not fresh enough. You'll get the same error code. Also, Twitter can and will throw a fail whale in the middle of an OAuth handshake, which is a consideration if your app is expected to handle this problem gracefully.

So what's left to do? TwitVim needs to save the access token after doing an OAuth handshake so it won't have to re-authenticate every time it starts up. Once it does that, it also needs to offer a way for the user to switch to another login. And of course, I need to document all of this so the user will know how to set it up.
mortonfox: (face tree)
May have overdone yesterday's hike but that's okay. It's time for a day of rest anyway. So in the morning and early afternoon, I worked on some Twitter OAuth code for the next release of TwitVim. There is an actual deadline for this too because Twitter is planning to turn off basic authentication on June 30. Later on, I'll also have to see whether this code can be added to my Twitter utility scripts.

In the evening, I did yardwork. Cut the grass in both front and back yards. This time, it took about 90 minutes. I'm trying to improve efficiency. It's an electric lawnmower so cord management is key. Also, I noticed that turning the lawnmower around 180 degrees is more time-consuming than turning it 90 degrees. So far, I've come up with a scheme where I mow in concentric rectangles from edge to center. This differs from the recommendation in the lawnmower manual, which involves 180-degree turns. Going from edge to center has the advantage of piling up grass clippings in the center. The backyard is a bit tricky because of the odd layout there. I divided the area into two rectangles and that seemed to work well except for the far edges and corners. I still have to use the hand clippers in the corners.

While mowing the lawn, I noticed some small red berries in the grass. There are two kinds of weeds in this area that produce those, so I got some plant samples to study and do a proper identification. I think it is mock strawberry based on the shape of the leaves and the way the berry sticks up instead of drooping. A flower sample would be a sure way to differentiate this plant from wild strawberry but I couldn't find any flowers. This is disappointing because wild strawberries would at least be usable as food whereas mock strawberries are flavorless.
mortonfox: (Robot)
Futuro house Bram recently added a bunch of if_ruby (Ruby Interface) patches to Vim to add support for Ruby 1.9, improve overall support for Ruby, and fix a few problems. Of course, two of those patches affected TwitVim and I'll discuss them here. First, the good stuff: Patch 7.2.360 finally fixes the if_ruby Windows sockets problem. I used to recommend this unofficial patch but that won't be needed any more if the user has patch 7.2.360 or (the upcoming) Vim 7.3 or later.

Patch 7.2.374 allows VIM::evaluate() to return Ruby arrays or hashes instead of strings if the Vim expression results in a list or dictionary. This, unfortunately, did break TwitVim because TwitVim does the following:
    keys = VIM.evaluate('keys(a:parms)')
    keys = keys.split(/\n/)
If the parms dictionary has keys "user", "text", and "status", prior to patch 7.2.374, VIM.evaluate() will return "user\ntext\nstatus" and the next line will split it into the array ["user", "text", "status"]. After patch 7.2.374, VIM.evaluate() returns ["user", "text", "status"], causing the next line to hit a Ruby error because a Ruby array doesn't have a split() method.

How do we solve this problem? At first, I was thinking of checking for this Vim patch using a conditional like this:
    v:version > 702 || v:version == 702 && has("patch374")
In other words, Vim 7.3 and later are guaranteed to have patch 7.2.374 and we only check for the patch itself if the Vim version is 7.2. If I stick this expression into VIM.evaluate(), it'll return "1" if that patch is present and "0" otherwise. Then it occurred to me that there are two better ways to deal with this:

1. Make the Vim expression return a string regardless by doing an explicit join on the array:
    keys = VIM.evaluate('join(keys(a:parms), "\n")')
    keys = keys.split(/\n/)
2. Use Ruby's type introspection to see if a split is needed:
    keys = VIM.evaluate('keys(a:parms)')
    keys = keys.split(/\n/) if keys.is_a? String
I prefer the second approach because it is more efficient and a few years into the future, once everyone has upgraded their Vim installations past this patch, we can clean up the code easily by removing the second line. Thus, this fix is in TwitVim revision 82.
mortonfox: (face tree)
The recent snowstorm did some damage to one of the cedar trees in the front yard. A few branches snapped under the weight of the snow and were hanging down dangerously. So this morning, we went to work sawing off those branches. That was tough work because the branches were pretty high up. We used a long pole with a saw blade at the end for the higher branches. For the lower branches, we used a ladder and a regular saw. Then we cut up those branches into smaller pieces and put those away until such a time when we can take those to the yard waste collection center.

I posted a new release of TwitVim today. I uploaded the previous release the day before New Year's Day, so it's only fitting that I upload this one the day before Chinese New Year. Okay, that was just a coincidence. I don't think I'll be posting all future releases just before holidays. :) Anyway, when I went to the TwitVim plugin page at Vim Online, I noticed that there's a new link in the header to a page for this plugin at the Vim Tips Wiki. Cool! Ostensibly, this wiki page is meant for user comments and suggestions but I figured I could also use it to host a few screenshots.

After that, I started work on revision r80, which changes "replies" to "mentions" in the TwitVim UI. This change is almost totally cosmetic, I know, but apparently, everyone now refers to tweets containing @username as "mentions" so the client has to follow that convention.
mortonfox: (fox yawn)
Creek Road There was a snowstorm forecast for Friday evening and Saturday. The snow didn't start until after dusk here but I stayed home anyway to do a couple of things. First, I worked on photos from the last few days. Then I did a bit more of my tax return, which I started a few days ago. I won't be able to finish it until mid-March because some of the forms typically don't get to me until early March but I'll do as much as I can now. Also worked on a new TwitVim feature, which was suggested by a user.

Friday Five )

Snow

Dec. 19th, 2009 07:29 pm
mortonfox: (xmas)
After about 4" of snow


Woke up this morning to about 4" of snow on the ground and it continued snowing throughout the day, so that put a stop to this evening's plans. But that's okay. There'll be another meet next month and it's better to be safe than to try to drive out on those snowy roads. So all we did this morning was brush the snow off the car and shovel and salt the sidewalk and driveway. We'll have to do this again tomorrow morning to take care of a few more inches of snow that fell later in the day.

Worked on a Twitter login prompt for TwitVim last night. I didn't think of this before because I'd always just started it up by script. This suggestion came from a user who wanted to set up TwitVim on a system that wasn't his, so he couldn't put his login info (whether plain or base64) in the vimrc.
mortonfox: (fox stand)
Well, I didn't get the job for which I went to the on-site interview on Tuesday. The verdict was I had good skills and knowledge but just not specifically what their project was looking for. It could be a blessing. I had some concerns about the software firm that I didn't share on that day but now that it's over, I guess I'm clear to write a little more. The first was the salary discussion, which I was surprised actually happened during the interview. I thought it was supposed to be done only after they make a hiring decision. They made a few attempts to bargain me down, saying, for example, that even PhDs at that company only made $95K or so and that some people started really low (below $60K) and got raises afterwards. So I was wondering if they even had the budget for an additional software engineer. The second thing I noticed was even though the company doesn't force anyone to work long hours (i.e. significantly beyond the usual 9 to 5), it looks bad if you don't. Again, it was somewhat odd that they felt the need to impress that on me during the interview. Overall though, the place was eerily similar to my old job. Same suburban-type office building. I think they even have the same office furniture, carpet, and cubicle suppliers. I would've been right at home arguing with management there. :)

Looking back at the last 14 years of my life, I came up with an analogy. A job is like an apartment. On day one, it's a blank slate. Full of promise and ready to be filled with your presence. Then after a while, the plaster starts peeling, the faucet starts leaking, the toilet becomes unreliable, and dealing with building maintenance becomes somewhat unpleasant. Yet, you stick on year after year because staying put is less of a pain than leaving, until you wake up one day and find that you absolutely loathe the place and would do anything to get out. Yes, the apartment was getting like that too. :) Which reminds me, I still need to ask the landlord at the end of the 21-day period if he'll be returning any of the security deposit.

Rainy day today so I stayed home and worked on code. I added support to TwitVim for the new Retweet API. (r68 thru r71) It's not complete yet because of a few things I noticed in the API documentation. First: retweets_of_me does not appear to return info on who did the retweeting. There'll be a significant cost in time and API quota if the client makes a separate query for that info for each retweet. And second: Retweets are stripped out of user_timeline and unlike friends_timeline/home_timeline, there is no alternative API method that returns the full timeline with retweets included. I checked the latest version of Tweetdeck and, even though it does support new-style retweets, it's missing retweets when you bring up a user's profile, confirming that issue. No matter. I just made do with what the API provides and I hope there'll eventually be API revisions or workarounds to address those two issues.
mortonfox: (create a fursona)
If it seems I haven't been doing much lately, that's because it's mostly been packing up and cleaning out stuff from the apartment. In 14 years, I sure can accumulate a lot! I think we're nearing the end of it though. Also, either tomorrow or the day after, we'll take a load of toys, clothes, and kitchenware to the Goodwill donation center in Nanuet.

In the midst of packing, I snuck in a bit of work on TwitVim to add support for reading Twitter lists. Haven't written the documentation yet but it appears the lists API is still a little rough so there is no hurry. I think I'll have a bit more work to do soon to support the retweets API and home timeline. Apparently, I didn't stop being a computer programmer after leaving the job. Funny that.

Also, I joined the Google Wave preview a week ago (mortonfox@googlewave.com) and only just started really using it today. If you need an invite, pass me an email address to send it to. Also, if you're already on Google Wave, let me know too. I'll add you to my contacts.
mortonfox: (create a fursona)
Over the last two weeks, I've done a lot of work (r35 thru r50) on TwitVim to get it from version 0.3.5 to 0.4, so I think it would be good to stop for a while and explain some of the enhancements I've put in. This article will be the 0.4 release notes when it comes out. Of course, since I know of only about a dozen or so users of this Twitter client, almost everyone can safely skip this post. :)

Read more... )
mortonfox: (morton st)
treadon-3

Sunny. 52°F. The one errand I had to do this afternoon was to pick up the police report from River Edge PD. Went for a geocache along the way, of course. This time, it was Caching Vs Shopping - Paramus, NJ at Bergen Towne Center. Too easy. I saw a geocacher returning the cache to the cache site so I didn't have to search at all. This part of Bergen Towne Center appears to be a new extension to the decaying Bergen Mall. I must confess that I haven't been to Bergen Mall in years so I had no idea they were rebuilding the area.

After that, I went to the River Edge municipal building. I'd called earlier so they already had a copy of the report ready. It is pretty straightforward: just gives all the standard info and states that my car got struck in the rear while stopped in traffic. Of course, since the Chinese supermarket was a few blocks from the police, I got a 3-item takeout for lunch.

Added revisions r37 thru r40 to TwitVim today. These changes add a stack of saved buffers to the client so I can recall previous Twitter queries without hitting the Twitter API. I've wanted this feature for a long time since I use the TwitVim goto feature to surf @user references and #hashtags, and it was rather inconvenient not being able to go back if I hit a dead end. Anyway, I'll use it myself for a while until I'm sure there are no serious bugs and then package it as a new version 0.4 release.
mortonfox: (me tira daqui)
dlife-2

36°F this afternoon. Snowing/raining. Got a little tired of dealing with insurance and police all morning, so I went out to hit two geocaches at Garret Mountain Reservation in West Paterson. It actually stopped snowing for the duration of my trip out there, although it was still quite windy. What's in a name? was the first of the two. It was by a rocky cliff with a view of Paterson. While climbing towards the cache site, I slipped on some leaves and landed on the rock. Already, that's more injury than I got in the auto accident. :) In order to retrieve the cache, I had to walk down a rock crevice so it's a good thing I'm not too fat. (The cache owner himself almost didn't fit.) The second cache, Can you see me now? was a lot easier. It was just a quick grab off a residential road at the edge of the park.

Back to insurance matters: I called Encompass Insurance this morning. I had trouble reaching the insurance agent handling this claim but eventually she did call me. It sounds like they'll pay for the repair since their insured was at fault. My next step is to get an estimate from an auto body shop to replace the bumper and whatever else they find damaged. I also called River Edge PD but no one picked up the phone in the records department. It's possible that the records clerk had the day off. However, I don't expect the police report to be ready so soon anyway.

Did some work on TwitVim. In r36, I added a command to send a DM via the Twitter API. Previously, the only way you could do that in TwitVim was by using the "d username ..." special form. I added this enhancement mostly for identi.ca because their server did not support "d username ...". However, I found out today that they have recently added the "d username ..." functionality. Oh well. It'll still be useful for Laconica servers that haven't been upgraded.
mortonfox: (fox yawn)
Stillwell Woods

NJ Audubon asked for permission to use one of the photos I took at Wildcat Ridge in Rockaway for their website and one of their publications. I replied yes but I hope they get back to me later to show me where they used it. I remember giving permission for specific photos to a number of non-profits but never heard from them again. Since they weren't paying me, it would be nice to see where I got the photo credit at least.

Did some work on TwitVim today after not having touched the code in over 2 months. I added support for pagination and page length to the Twitter search command. I could've done that a long time ago but for some reason, I forgot. I only realized that this functionality was missing when I started using Twitter search to check my @-replies. (Twitter search catches @-replies where the @username is not at the start of the tweet. The replies API call misses those.) Anyway, it was a simple code change and that's in now. I'll use it myself for a few days before releasing it as a version upgrade.

And last but not least, I bought [livejournal.com profile] wildfox34's raccoon fursuit. This is old news to those who follow his journal because the auction was a few weeks ago. I received it two days ago, tried it on, and found the fit to be pretty good. It's actually the third full fursuit I've gotten that was made by [livejournal.com profile] iceleopard so I find it interesting to see all the little improvements in design and craftsmanship. Now to think of a character name.

Friday Five )

Indian Rock

Oct. 2nd, 2008 11:16 pm
mortonfox: (morton blvd)
tmont-2

This afternoon, I went to Indian Rock Shopping Center in Suffern for the Indian Rock geocache. The strip mall is built around Indian Rock, a large glacial erratic that got its name because local tribes used to hold tribal meetings there. There used to be a cache right at the rock but that one didn't even last a day; the cache owner archived and removed it as soon as he found out that the spot had historic significance. This new cache is somewhat different. The first part now involves using a number at the cache site to calculate the final coordinates and the actual cache container is on the other side of the parking area, which in my opinion is a much better cache location.

TwitVim update )

age++

Sep. 18th, 2008 03:40 am
mortonfox: (fox sit)
Pine Creek

I'm 35!

On a day like yesterday, well, let's just say that I'm glad my investment portfolio is very unconventional. While the S&P 500 slid 4.7%, my trading account was up 7.7%. So thanks, Wall Street, for the early birthday present. :)

This evening, I did some work on Unicode and Multibyte support in TwitVim because a user asked for it. That took some experimentation because Vim script handles Unicode in a somewhat inconsistent manner. Some common string functions like strlen(), strpart(), etc, and string[] indexing deal in bytes, not characters, so to get the actual length in characters of a Unicode string, for example, you need a weird hack like strlen(substitute(unicode_str, ".", "x", "g")). That code snippet, which I came across in Vim's help documentation, replaces each character, multibyte or not, in the string with a single ASCII character before calculating the string length the naive way.

I'm still unsure whether my code handles some of Vim's more obscure character encodings correctly, so I hope a user will let me know if it breaks somewhere.

Anyway, I have some things to do and places to go tomorrow so I'd better get some sleep. Later!

Profile

mortonfox: (Default)
Morton Fox

May 2020

S M T W T F S
     12
3 456789
10111213141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags