Just saw some signs posted on the window at 1345 Bardstown Road. I'm told it's where Raindog's Salon used to be.
It's called Parkside Bike & Boutique. Grand opening is Friday, June 5th, from 5pm until the crack of dawn. There will be door prizes, a bike giveaway, and grand opening discounts.
According to the signs, they will sell classic, single speed, and fixed gear bicycles, as well as vintage clothing from the 1940s to the 1980s.
In other words, hipster heaven.
Thanks to V for telling me about this.
PHP 5.3, which will come out eventually, has closures.
The lack of this feature, having been present in other programming languages for years, was only my biggest problem with PHP.
My testing indicates they actually work, too. Let's hope I don't discover anything stupid.
<?php
// a read-only closure
function closure1 ($string, $x) {
$y = $x;
return function () use ($string, $y) {
print "$string: $y => ";
$y = $y + 1;
print "$y\n";
};
}
$a = closure1("closure1 a", 3);
$b = closure1("closure1 b", 5);
$a(); // outputs: closure1 a: 3 => 4
$a(); // outputs: closure1 a: 3 => 4
$b(); // outputs: closure1 b: 5 => 6
$b(); // outputs: closure1 b: 5 => 6
// a read-write closure
function closure2 ($string, $x) {
$y = $x;
return function () use (&$string, &$y) {
print "$string: $y => ";
$y = $y + 1;
print "$y\n";
};
}
$c = closure2("closure2 c", 3);
$d = closure2("closure2 d", 5);
$c(); // outputs: closure2 c: 3 => 4
$d(); // outputs: closure2 d: 5 => 6
$c(); // outputs: closure2 c: 4 => 5
$d(); // outputs: closure2 d: 6 => 7
?>
Thanks to the PHP team for finally coming through on this one.
Sat, Jul. 12th, 2008, 01:48 am Crap.
Hopefully if you post a comment to one of my entries from this point forward and it gets screened, I'll actually receive an email about it now instead of it going to an invalid email address. :)
Fri, Jul. 11th, 2008, 08:36 pm ASP Fails.
In this week's episode of "Darren learns stuff the hard way", we talk about Active Server Pages. I'm not talking about ASP.NET here, just classic ASP. One misconception some might hold is that (classic) ASP == BASIC. ASP is actually (kind of) language-neutral. All ASP is, is a mechanism to mix server-side code and HTML (kind of like PHP without the drama), and some basic objects for request data, response generation, persistent variables, sessions, and other basic stuff. In addition to using VBScript, you can also use JScript (also provided by default), PerlScript (just install ActiveState Perl and leave the checkboxes checked), Python (install ActiveState Python), and possibly other languages. The reason I even dealt with this in the first place is that I was required to use IIS for this one project. That was the only actual technical requirement. I had many options. - I could use PHP, but I'm conducting a war on PHP. - I could use ASP+BASIC, but as with PHP, I'd have to write a lot more lines of code, find a basic-mode for Emacs, and would have to sift through a lot of really bad examples of code when looking for techniques to do things. Remember, guys, the "B" stands for "Beginner's", just like it did in 1964. :) - I could use basic Perl scripts containing a bunch of here-documents, but those suck when you have loops. - I could have tried Mason+ISAPI, but the only solution I was able to find so far would involve using URLs like /application/index.plx/path/to/actual/ma son/file.mthml and I didn't want someone else to have to deal with it incase I get hit by a bus and die or something. - I could have tried Mason+CGI and been done, but I wanted to see if I could produce a less inefficient solution. - I could use some other Perl templating solution but I'd have to invest time acclimating myself to it. - I could use PerlScript+ASP. I chose the last option there. ASP is simple enough. The thing I realized midway into the project is that ASP does not natively provide support for file uploads. Or for multipart/form-data at all. This is the single biggest WTF I have ever witnessed. Were it not for this characteristic, ASP would be one of the few technologies from Microsoft that aren't fundamentally wrong, and would be a legitimate alternative to PHP. So what do I do? - I could have used a pure-ASP solution. But they're all written in VBScript and it's impossible to use it from PerlScript. - I could have used an ASP component. But they are all either buggy, or cost hundreds of dollars for a single-site license. - Why didn't I realize this sooner? I could write just the form action script on the file uploads as a .plx script and use the CGI module for form data parsing. That last option's what I'm doing. I don't get the benefit of ASP there but I think it's okay at least for now to either just die() with an error (the user will click the back button) or redirect to the next step on success. Hopefully no more stumbling blocks. Wish me luck.
They have these grocery carts at Meijer with the cup holders. But I wasn't shopping at Meijer. But I still needed a cup holder. 
1. It's a fucking standard hot dog. Nothing special. We all know. You do not need to call it an “all beef hot dog”.
2. Nobody calls their jet skis or boats "pee double-you cees". We call them "jet skis" or "boats". And in those rare moments where we actually have to refer to personal watercraft generically, we call them "watercraft" or "personal watercraft".
Thanks.
I finally found out what those neat foldable dollies are and got one. They're called Magna Carts.  They're only $30 at Sears. Yes, Sears still exists.
I found these while Googling something up.  They'd be neat if I lived in NYC or London. Instead, I live in Louisville, a relatively chickenshit town.
Has the following important features now:
- adds online help.
- handles window resizing.
- doesn't choke anymore on large amounts of data.
- CAVEAT: grouping together files by pattern moved into separate program, dugroup. This made tdu's code much smaller.
http://webonastick.com/tdu/
Residents of Louisville might recall that a few years ago, TARC was proposing a light-rail system whose initial cost estimate was $500 million just to build the thing. Even back then, we all knew how low-ball these initial cost estimates always turn out to be. And that cost estimate was for one damn line. "Why not just improve the bus system?", asked yours truly and undoubtedly many others. You may also recall that thankfully the proposal has been scrapped indefinitely.
Having watched this video, I was proven right.
You see, back in the '90s, they were talking about doing the same thing in Bogotá, Colombia. Granted, they might have been talking about more than one rail line. I don't know the details. Thankfully, people there were also asking, "why not just improve the bus system?", and that proposal was also scrapped. In its place we have TransMilenio, an archetypal example of cheap, effective bus transit. You pay your fare at the station instead of on the bus—this makes the buses travel faster because the driver doesn't have to waste his time. Feeder bus lines, which serve neighborhoods, are free and take you to the station. On the trunk lines you have over 1,000 articulated buses with wide doors to facilitate mass ingress and egress. The stations also have massive secure bicycle storage facilities. Even when it's not rush-hour it's still crowded I prefer to call it well-utilized.
This is incontrovertible evidence, folks, that you don't need an overpriced rail system to improve transit. Not even in a big-ass city like Bogotá where even reasonable people would think it's a good idea. Most certainly not in Louisville, where a fraction of the cost could have been used to simply throw more buses onto those routes and serve the entire city instead of just one corridor.
I wrote fix-horizontal-size, an Emacs Lisp function that resizes either the frame or the window to 80 columns wide.
If the window can be sized to 80 columns wide, without resizing the frame itself, it will resize the window. Otherwise, it will resize the frame.
You can use a prefix argument to specify a different column width.
(defun fix-frame-horizontal-size (width)
"Set the frame's size to 80 (or prefix arg WIDTH) columns wide."
(interactive "P")
(if window-system
(set-frame-width (selected-frame) (or width 80))
(error "Cannot resize frame horizontally: is a text terminal")))
(defun fix-window-horizontal-size (width)
"Set the window's size to 80 (or prefix arg WIDTH) columns wide."
(interactive "P")
(enlarge-window (- (or width 80) (window-width)) 'horizontal))
(defun fix-horizontal-size (width)
"Set the window's or frame's width to 80 (or prefix arg WIDTH)."
(interactive "P")
(condition-case nil
(fix-window-horizontal-size width)
(error
(condition-case nil
(fix-frame-horizontal-size width)
(error
(error "Cannot resize window or frame horizontally"))))))
(global-set-key (kbd "C-x W") 'fix-horizontal-size)
There are separate functions fix-window-horizontal-size and fix-frame-horizontal-size if you want to only resize the window or only resize the frame instead of resizing either.
I just wrote custom-faces-file.el so that I can split variable customizations and face customizations into different files. It's only guaranteed to work with GNU Emacs 22.
You know that flash-in-the-pan text editor WriteRoom? Some advocates of Emacs will say "just run emacs in a full-screen" or something along those lines, but I find sometimes that the mode-line is still a distraction. So I'm working on an implementation of distraction removal in Emacs for two reasons: (1) I think the concept has merit and (2) I don't like the idea of someone writing a whole new text editor just so they can have a certain feature. :) My rough implementation is available for download. Incase you want to know what emacs looks like without a modeline:  Basically, this implementation automatically hides the modeline when all of the following conditions apply: - hide-mode-line is turned on - there is only one frame - there is only one window in that frame - there is no minibuffer and automatically shows all buffers' modelines otherwise. This implementation does have bugs, you know: I intermittently have problems with text disappearing. Those problems might be related to the more frequent ones I have when I do (setq mode-line-format nil) (or use hide-mode-line) in conjunction with linum.
Thu, Jan. 3rd, 2008, 03:59 pm
exotic dancers get fooled by two-dollar bills they think they're twenties
cat /var/lib/dpkg/status | \
awk '/^Package: / { package = $2; } /^Priority: standard/ { print package; }' | \
sort
aptitude search '~pstandard'
I've been working on a rewrite of tdu in Perl. Primarily because I wanted to add SIGWINCH support and I'm too lazy to write any more C code. :) The nice thing is, when dealing with a large number of entries (on the order of, say, 50,000), the Perl version is actually a performance improvement. This is primarily because the C version has the disadvantage of not using any kind of hashtable, primary due to its author's laziness. I can also add things like online help without too much trouble, and have. An early version is available. It needs polishing. GPL2 licensed. Have fun.
cd ~/palm && make backup commit
It's that simple. Here's (a modified version of) my ~/palm/Makefile .
DEVICE = /dev/pilot
# or /dev/ttyUSB1 or whatever.
BACKUP_DIR = treo-backup
# I'm assuming your copy of $(BACKUP_DIR) is a working copy of
# a Subversion repository.
.PHONY: backup restore list commit setup
backup:
make setup
mkdir -p $(BACKUP_DIR) || true
pilot-xfer -p $(DEVICE) -s $(BACKUP_DIR)
restore:
# never tested.
make setup
mkdir -p $(BACKUP_DIR) || true
pilot-xfer -p $(DEVICE) -r $(BACKUP_DIR)
commit:
# Add new files; remove deleted files; commit.
# There's probably an easier way.
svn status $(BACKUP_DIR) | grep '^\?' | cut -c8- | \
while read file ; do svn add "$$file" ; done
svn status $(BACKUP_DIR) | grep '^\!' | cut -c8- | \
while read file ; do svn remove "$$file" ; done
svn commit -m "backup" $(BACKUP_DIR)
svn status $(BACKUP_DIR)
# The last command *should* not display any output.
setup:
if sudo modprobe --first-time visor >/dev/null 2>/dev/null ; then \
sleep 5 ; \
fi
|
|