Posts in category 'hacking'
A Pointless Update
I bet you’re wondering what I’m doing, right? Of course you are! Waiting with bated breath for my every word and phrase… how can I blame you, really? Well, just so you’re aware, no, I haven’t yet become fabulously wealthy, enabling me to abandon my roots and live a life of hedonistic pleasure seeking. Nor have I discovered a cure for some life-threatening ailment, thus securing my name in the annals of history.
However, I have found myself playing around with Squeak after a rather long hiatus, and I’m reminded again of how freakin’ awesome Smalltalk is as a language, and Squeak as a programming environment.
Of course, you might ask yourself… huh? Well, perhaps I can alleviate your confusion by explaining a little bit about Squeak and why it’s so, to repeat, freakin’ awesome. Imagine an operating system kind of like Windows. It has your usual complement of windows, dialogs, buttons, and so forth, and comes packaged with a couple interesting little toy applications. However, when you right-click on a window, you can pop up a debug menu with an option that says “browse class”. Selecting this option opens up a window which allows you to actually explore or modify the source code to the Window class itself. And this is true for any and all objects in the system.
So, can you see why this is neat? In essence, every single aspect of the system is exposed to the user, available should they want to explore or modify it. To top it off, the entire system is written in Smalltalk, which is easily my favorite object-oriented language. Frankly, I wish I could have had access to Squeak back in my formative years… given the way it encourages exploration, it’s really the ultimate child’s programming environment.
The Gallery Cometh
I decided to take a tour through my collection of digital camera photos and was, frankly, surprised at how much stuff I had. Worse, none of it was terribly accessible nor shareable. And so I finally cracked and decided it was time to get some kind of photo gallery going on.
Now, I could have one with Gallery, which Brad has used to power his photo gallery, but I really wanted something that would integrate directly into my wiki, so that I could easily incorporate gallery photos into wiki pages, comment on them in the normal fashion, etc, etc. Unfortunately, nothing of the sort really exists for Oddmuse, meaning it was time to roll my own.
The result is my Gallery. It’s pretty bare bones, at this point… really, it’s just functional enough to be useful. It can:
- Add galleries and images through a standard web interface.
- Support infinite nesting of galleries.
- Handle zips and tarballs, as well as standard image formats.
- Does the usual pagination stuff, so you don’t get all gallery images at once.
- Does on-demand scaling of images, so people can choose different resolutions.
And all of this is done in the context of the standard wiki subsystems, so you can comment, search, etc (though search is b0rked for image captions and descriptions right now… that’s on my todo list).
Anyway, there you have it. Take a look. Give me feedback if you like. And if I can make the code, you know, not horrible, I’ll release the source to it.
Update on the Vim Switch
Well, it’s been almost two weeks now, and the vimming continues unabated. So far, I have to say, I’m pretty happy with the change. The simple fact that I can run it in a screen session without feeling crippled has been wonderful, particularly since I’ve been frequently moving my editing sessions between work and home lately (all I need to do is ssh in, and do a ‘screen -DR’, and voila, my work environment is migrated over).
As for the RSI, other than the usual stiffness from long periods of typing, the other symptoms (things like shooting pains in the hands) have been reduced or eliminated, proving once more that emacs finger is real and dangerous! And yes, I realize that I could’ve just swapped my capslock and control keys, but I use my capslock as a third modifier, so that doesn’t work as nicely for me. :)
Meanwhile, my vocabulary of vi commands continues to expand. My biggest problem is simply remembering to use vi/vim shortcut keys and commands instead of doing things manually. This is especially a problem for me since I’m a fast enough typist that I’ll often resort to brute forcing things, rather than trying to be speedy and clever. Thing likes Ctrl+n for completion while coding is incredibly convenient, and a significant timesaver, assuming I’m smart enough to remember to use it. And being able to type things like ‘ct;
' is really darn handy, when I don't accidentally find myself typing 'xxxxxxxxxxi ' by mistake. But, given time, I suspect I'll internalize more of the commands and my editing speed will continue to increase. So, the moral of the story is that it looks like Vim has a new convert! I have officially switched sides in the infamous Editor_war.
Well Worn Ruts
So, the text editor adventure continues. It’s funny, for a long time now coding has lost some of it’s fascination. This is probably at least in part because I’ve been doing it for… 12 years now. Jebus. Thus, I’ve found myself in a bit of a rut. But now I actually find myself looking for reasons to code, if anything to give me an excuse to further explore the power of Vim. Go figure.
‘course, the real question is, what do I work on with my shiny new editor? I could work on, like, work, but that seems wrong somehow. Work on my off-time? How is that a good idea? I could try to come up with a project of my own, but I’m largely tapped out for ideas right now. Or I could continue to try and hack away with POV-Ray… though I’m hardly artistically talented. It’s a bit of a quandry.
What I should really do is see if there’s a script for Vim to publish to a wiki. And should I be unable to find one, maybe I should try to hack one up myself! Hmm… I see a project brewing…