| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Browse archives
|
February, 2003UntitledSubmitted by reeses on Thu, 2003-02-27 04:19.I picture carrying one of these in DC, and using it in the event of a terrorist action. I don't see where on the site they sell the handgun, truncheon, and machete I'll need to keep people from killing me to take it. Coding on stiltsSubmitted by reeses on Thu, 2003-02-27 03:13. | programmingOne of my imaginary friends and I were talking this evening, and he showed me a particularly amusing bit of perl. It was something along the lines of
Pursuant to this lovely example, I will say that, early in my career, I thought I was the only bad programmer. Everyone around me was competent and knew what they were doing, and I was inept. At least half of that was true. After I learned enough to have the ability to recognise bad code, I realised that whilst I was still inept, other people were inept, too. Even those people who were competent and knew what they were doing, their code was dogslop also. UntitledSubmitted by reeses on Thu, 2003-02-27 02:53.I didn't want to lose this link for vo(x,y). As you were. UntitledSubmitted by reeses on Mon, 2003-02-17 08:29.I played with jwz's Cheesegrater + Portalizer kit this evening, and produced this monstrosity. Eesh. Oh, and did I mention we have almost TWO FRICKIN' FEET OF SNOW? I have this natural skepticism regarding weather reports, having heard once (while living in Seattle) that the local forecasters were less reliable than if they had flipped a coin with "rain" and "not rain" inscribed on the sides, and used the result. Having been caught and suitably moistened in enough "not rain" days, I believed them. So, when I heard "eight to twelve inches of snow," I thought,'Heh, they're probably an order of magnitude off. It'll probably be 0.8"-1.2".' What I want to know is, how did the terrorists develop a huge snow-generation ray? I bet people are happy they made those absurd runs on food last week. Duct tape and plastic sheeting can be used to turn a piece of rattan furniture into a wicked toboggan! UntitledSubmitted by reeses on Fri, 2003-02-14 02:43.This is one of the funnier postings I've seen in a while. This is my favorite part: The AspectJ notion of AOP lacks discipline: it resembles the COMEFROM I like aspects, and I like the opportunities afforded by the freewheeling aspects (ahem) of AspectJ, but I freely admit that I am terrified of dealing with someone else's code that relies heavily upon it. Can you imagine the side effects of hidden code that you don't call, don't know is being called, and have never seen? Yeech. Calling strange libraries and multithreaded quasinondeterminism are bad? You ain't seen nothing yet! UntitledSubmitted by reeses on Thu, 2003-02-13 06:19.UntitledSubmitted by reeses on Thu, 2003-02-13 06:16.I got tired of editing out duplicate lines in a logfile this evening. I couldn't find the equivalent of "uniq" in elisp, so I wrote my own. Yes, I know I could pipe the region to an external command, but I was doing it on Windows, and didn't want to rely on cygwin everywhere. While I was at it, I added a function to remove duplicates from an unsorted file, which was more convenient for me than anything else. UntitledSubmitted by reeses on Tue, 2003-02-11 09:40.I have this, well, huge emacs configuration I've carried around for years. It's about 22 megs uncompressed, runs on both Unix and Windows, and most recent versions of GNU Emacs. I first starting contributing to it around 1990, when I decided that I wasn't a vi person, (see Naggum's 'typical behavior of the "vi" editor' emulation) and it's grown a bit since. I have configs for every bloody Lisp variant I've used, apart from some such as Corman or DrScheme, that I didn't like enough to bother. I have all of the account information for every email system I've used in the last seven or eight years, from POP3 to S/IMAP, from VM to GNUS, all integrated with bbdb. I have every variety of aid in composing text, rivaling Word for over-the-shoulder advice and automatic correction, even querying Internet dictionary servers if available. I can, and do, use it to write code in Ruby, Python, C, C++, Objective-C, Java, Lisp, and XSLT, but not Smalltalk. But I find myself...unhappy. I _like_ reading email in Outlook, and it's just...easier, given my Rube Goldberg backend, which obviates emacs's manly splitting capabilities. I like IDEA instead of JDE, because it finally brings Java development into the 1990s. Sure, emacs is fine for scripting languages, and stellar for Lisp, but I don't do either of those enough now for it to be that big a deal. Oh, and I've started using vi again. vim has killer syntax highlighting for JavaCC files, something that IDEA and emacs both lack. The syntax is confusing enough, and my desire low enough, to rule out writing my own javacc-mode. The more I move away from emacs, the more I think it's time to throw away the 20+ megs of .el files and start over with something that takes less than ten seconds to load on a 2.4GHz P4. This may sound remarkable only for its banality, but it's causing me to reflect on the number of hours spent on various aspects of this configuration. A very small portion of it, perhaps ten thousand lines, were actually written by me. Another thousand, perhaps, that I wrote to configure and glue the various other modules together. But some of those chunks of code were written out of desperation, late at night, and not having any idea what I was doing. That's the nice thing about Lisp, by the way. Even idiots can get something written, provided they're persistent enough. So, tomorrow, I archive the emacs-config.[zip|tar.gz], and start debugging the empty .emacs. UntitledSubmitted by reeses on Mon, 2003-02-10 10:54.I have to say that this sort of pop-up window is more dangerous than even pr0n pop-ups (which I don't see anymore): ![]() It's all I need to have to explain why I was "searching for chickies on a matchmaker website" to ensure domestic tranquility. Especially when one of the "hits" is local. Yet another reason to use Phoenix. UntitledSubmitted by reeses on Mon, 2003-02-10 04:42.Another day of quixotic tasks. Last night, I was trying to google for a page I had seen a few years ago, and was having very poor luck. I couldn't get the query string just right, and didn't find the page for some time, despite having looked for it about this time last year. While I may have made a bookmark, I did not transfer it between machines, and it was lost to me. I decided that it would be a good idea to have the ability to search my entire browser history. Refer to the numerous articles on hackery and bodgosity that are prevalent in my solutions to personal technical problems for a full background, and you will be ready for what comes next. I use both IE and Phoenix on Windows, and Phoenix less so on Linux. Therefore, a cross-platform, network-wide solution was called for. I could not write an NPAPI plugin alongside a COM object, because any combination would neglect at least one browser. Ideally, I would have a plugin that detected when I had viewed a page for more than n minutes, where n is some threshold value separating casual or involuntary pageviews (such as the infernal popups) from pages that I had found interesting enough to read in their entirety. I wanted to avoid a huge proliferation and consumption of disk space on my machine. That said, I ended up settling on the heavyweight solution, which filled and occupied most of my Sunday afternoon, with brief breaks to run to the store, watch Alias, and phone my parents. And eat, etc. It didn't really take that long, but it was a road fraught with frustration. See, I had the brilliant notion to slap a caching proxy in between all of the browsers and the outside world. I elected squid, because I've used it on many machines in the past several years, and it works well enough. Ask anyone about a caching proxy, and "squid" will be one of the first ten words out of their mouths. If not, they're salespeople, or the sort of person with whom you should change the subject and expect no insight. Squid would enable me to avoid the browser issues, because all of the browsers support proxies. Yay. This would solve one part of my problem, and in my brilliance, I thought I had a solution to the other part. ht://dig is a wonderful free tool that indexes a document corpus, and provides a search engine to search that index. I planned to feed it the stems of the pages requested through squid, since squid keeps a very easily consumed log of all pages requested. I'd do some simple preprocessing of this log, and feed it to htdig. This sounds really good, right? You're wondering,"Why did this suck up so much time?" Well, in spite of my obvious brilliance, like all superheroes, I had an achillean weakness. I wanted this to run on Windows. Oh! Squid was easy enough to install, requiring only minor modifications, and I expected a similar LOE with htdig. Sucker. Let's just say that building it under cygwin sounds nice, but is a bad idea. Kind of like trying to build xscreensaver under the same environment. It just doesn't work so well. At one point, I had to edit a compiled binary, because I was afraid to attempt a recompile after changing a hardcoded path. But I did it. And it is good. I have a suggestion for those considering the same course of action:
Do any of these, and you are smarter than I. DC is the evilSubmitted by reeses on Sun, 2003-02-09 22:39. | DCIf I ever become like many of the other immigrants into this city, I authorise anyone reading this to shoot me, twice in the head, so you're sure I'm dead. I have never been around so many, if not hostile, rude people. In the last fourteen months, I have lived in Seattle (which was the previous pinnacle of insular diffidence), California, Manhattan, and Washington, DC. Even when I lived in Paris, almost thirteen years ago, people were ten times more open and friendly than they are here. I have never had so many smiles and greetings met with so many frowns, shrugs, and implications of intrusion. UntitledSubmitted by reeses on Sun, 2003-02-09 00:16.Sometimes, when I'm solving a problem, I can see a workable solution. However, this workable solution may appear to exist outside the model for the rest of the solution framework. Such as, if you're building a cabinet, you decide to use superglue to hold the door on, because superglue is what is sitting near to hand. Now, you can look at that superglue, and sure, it holds the door on very well. But, you have this feeling in the back of your head that no other cabinet maker would ever use superglue at this particular juncture, unless, perhaps, if that cabinet maker worked at IKEA. My most recent examples of this have two separate results: confusion and mild embarrassment, and frustration. The first involved the Java Compiler Compiler, JavaCC, which I was using to parse a set of files with semi-structured data of the form "{head/tail {head/tail} Bleaugh, I agree. Common opinion does, however, fail to inveigh my solution. The other, more frustrating exception occurred this afternoon, when I was playing (ha!) with importing and manipulating temperature samples in Mathematica. I keep mma around because occasionally, it is very, very useful. In the past, I have written scads of code in it, but at this point, it always takes me a few minutes to come up to speed. However, I discovered that it doesn't really like importing dates from files, at least out of the box. I have a db dump that looks like "yyyy-mm-dd hh:mm:ss temp", and I can't even parse it as "date time temp" without real agony. So, I bashed around, treated the whole thing like an array, and kluged together a one-liner (which mma encourages due to its craptacular IDE -- oh, wait, there isn't one) that pulls out the temps and plots it: ![]() ![]() Anyway, I kept looking for a simple way of specifying a temporal type for an input field, and came up short. It turns out that there is no way, other than writing an input transform, which seemed like too much for a five-minute wank. All this, because I was trying to avoid gnuplot grabbing implicit focus when my script launched it. UntitledSubmitted by reeses on Thu, 2003-02-06 05:51.There we go! :-) I stopped off at the nearest Radio Shack on the way home for a piece of cabling that cannot have any other acceptable use -- it's a 20'-ish length of 4-conductor phone cable, one RJ-11 plug on one end, and two RJ-11 sockets on the other. If you used this for its purported use, you'd have an ugly cabling mess. However, this is perfect for running a 1-wire network behind the couch, and sprouting off two sensors. Now, if you look here, you'll see a pretty simple display of the current temperature and a historical graph over the past 24 hours, for both the indoor and outdoor sensors. If "bodge" didn't apply before, it definitely does now. Let me explain the moving parts necessary to generate these pages, and keep in mind that it's this convoluted because I wanted to get it up as soon as possible. 1) A Ruby script sleeps for ten minutes, then fires off a C program that polls all of the sensors on the network, and prints out their ID and reading. Now, what's interesting is that I'm using a bunch of tools (gnuplot, mysql, Ruby, scp, ssh, cjpeg) that are much more comfortable on various Unix systems than they are on Windows. However, they're my hammers, and this is my nail. In addition, some of the pieces that I would have otherwise written in pure Ruby depend on Windows modules that are not available, or available only by contorting my installation unacceptably. So, there you have it. If you have 1-wire gear and want to do something similar and want a starting off point, email me. Otherwise, these are never going to see the light of day, and are going to do their ugly job unacknowledged and unlauded. UntitledSubmitted by reeses on Tue, 2003-02-04 04:49.So, I received my previously-mentioned iButton gear, and have bodged it onto my Windows machine. (not yet the Linux laptop that shall be hiding under the couch) I have a tiny C app and some Ruby glue in place to send the current temp via SSH to a Ruby script on the webserver. This script drops the current time and temperature in place in the little box you should see in the upper left. If you do not in fact see this box, well, there you go. It's obviously the fault of some wacky scripting language. You'll notice that I live in what appears to be a super-temperate region of Washington, DC. After my prior kvetching about freezing my buttocks off, you'll think my people come from the surface of the sun. Well, we do, but it's been a few generations, and we've acclimated. No, this temperature is of the iButton dangling right behind my exhaust fan on the PC. It's pretty toasty, being jammed back there, and there it will remain until I either rewire a longer cable, or move the iButton to the stinkpad. I'm sure you're not looking at this page to plan your attire for the day, and if you do, I'm sure you'll not hold me responsible for the hypothermatic lump of ice you shall soon become. UntitledSubmitted by reeses on Sun, 2003-02-02 23:14.I love this feeling -- when you've been dog sick for a few days, and you finally start feeling human again -- when you've peaked the sicky curve, and head back down to normal. (And use a lot of dashes in your writing.) I feel as if I could bench-press a car, liberate Poland with a used cotton ball, or actually eat food. Of course, when this urge strikes me, I eat too much, and lay there thinking,"Oh my god, I shouldn't have eaten the entire bin of biscotti." But I'd rather feel sick from baked-goods overdose than some little bug having an orgy in my stomach. |
SearchUser login |