Kevin Reid's blog

Latest Posts

Info

stone wall, glasses, neutral
Name
Kevin Reid
Website
My Website

View

Advertisement

December 20th, 2009

A machine I used to use to host some web services, bots, and repositories became no longer accessible from the Internet, as a result of which I've had to move what I was serving from it; some to switchb.org, some to personal machines.

I took the opportunity to clean things up a bit, as a result of which I now have better backups, more polished services, and know a little bit more about configuring Apache — though not as much as I perhaps should.

  • My Subversion repositories are now served over HTTP, and therefore browsable; and they are now backed up daily (using svnsync triggered by a cron job) to my laptop, and thence to all its backups.

    (I wasted several minutes on remembering that cron will ignore the last line of a crontab file if it doesn't end with a newline; after listening to me grumbling about this, someone made a suggestion to end the file with a comment, so that the last line is harmless whether ignored or not, and also reminds one of the issue.)

    If you have a working copy of one of my repositories (E-on-CL, E-on-JavaScript, MudWalker, Den, etc.), here's a guide to the changed URLs.

  • My other Tahoe-LAFS volunteer grid storage node is now residing on a machine on my home LAN.

  • Finally, some simple data-querying web services I wrote for Waterpoint's word games have now been moved to switchb.org; I also took the time to prettify their URLs (no cgi-bin or .cgi) and write documentation.

I haven't yet gotten to working on the bots, darcs repositories, or miscellaneous other stuff I had there.

(Pondering moving my blog over to switchb.org as well so as to not have ads, especially now that I found I can still have LJ-friends by way of OpenID. (Hm, but reading friends-locked posts over RSS might not work since there's no username+password for LJ to accept. Anyone have experience with that situation?))

Apache configuration questions:

  1. If I have multiple variants of a document (e.g. foo.html foo.pdf foo.txt) handled by MultiViews, so the canonical URL of the document is extensionless (“foo”), how do I properly control the default variant to serve in the event that the client does not express a preference via the Accept header? (Without doing so, I found that it would serve the .txt version, whereas I would prefer the HTML.) All that I found that worked was to create a type map file named “foo” with quality values, and force it to be interpreted as a type map using <FilesMatch>. This seems kludgy to me.
  2. What is the right way to serve CGIs, not in a designated cgi-bin directory, and without any .cgi extension in the URL? I initially tried to apply mod_rewrite, but I couldn't get it to work such that /foo internally contacted foo.cgi whereas /foo.cgi redirected to /foo. I resorted to another <FilesMatch> explicitly listing the name of each CGI and doing SetHandler cgi-script.
  3. What is the right way to handle “testing” vs. “deployment” configurations, where the relevant Directory, Location, etc may be different depending on which server or subdirectory the site is set up on? I see that one may use environment variables — should I just set up variables containing the path prefixes for the particular host before including the generic configuration file?

September 1st, 2009

I've been having a lot of thoughts lately I'd like to publish, but seem a little bit too short for A Blog Post. Some options

  1. Considered signing up for Twitter. Pro: short stuff is expected there; participating in the hot new thing; people interested in short-form will be on twitter and using the follow feature. Con: Reliability problems; YA thing to manage credentials and backup for; no hyperlinks; my favorite username is taken.
  2. I could post stuff here. Particularly, LJ supports titleless posts.
  3. I could use some other site, or build my own publishing system. [er, why?]

On reflection, I'm thinking to just post the stuff here and not have yet-another-distinct-place/site.

Readers, what would you prefer?


(This post is tagged “lisp” solely so that Planet Lisp will pick it up.)

June 14th, 2009

I have moved my web site to a new location: http://switchb.org/kpreid/.

I have done this because Apple has announced they are shutting down homepage.mac.com. While they offer a replacement, I do not want to have to change my URLs ever again, so I bought a domain name.

As well as moving the files I have updated my picture, changed some of the URL layout, updated some miscellaneous information, added an “About me” section for the front page, and fixed broken external links. Please let me know if I missed anything...

or even just critique it without respect to what's new.

Tags: ,

March 25th, 2009

Ads

Add to Memories Tell a Friend
stone wall, glasses, neutral
I just recently found out that LJ is displaying ads on my journal-or-blog-whichever — I hadn't previously noticed as it doesn't when I'm logged in (which seems a bit deceptive). I had previously understood that with a basic account there would be no ads.

Your opinion on the matter? Have the ads bothered you? Is there actually a way to turn them off that I haven't noticed? Should I find other hosting for my blog?

(I expect most of my readers are actually via feeds and don't see them...)

March 10th, 2009

Up until now, I've pretty much had an Online Life and an Offline Life (not much of one), and not made any connections between them. It's time to change that.

I'm 25, and my current phase of the Standard Life Plan, in which I am running a bit late, is “college”. I am currently attending Mohawk Valley Community College in New York, and planning to transfer to a four-year school, with the goal of a bachelor's degree in computer science.

It's taken me far too long to get around to posting this. A short todo list of further items:

  1. Update my web site.
  2. Post about transfer.
  3. Post about employment.

(One of the reasons for this post is to provide context for if I later post something related to schoolwork; another is getting around to the third item on this list.)

August 28th, 2007

GraphLife

Add to Memories Tell a Friend
stone wall, glasses, neutral

This is a somewhat odd cellular automaton implementation in Haskell. It encodes the shape of the world, and the stepping rule, in the data structure. Briefly:

data Cell v n = Cell {
  value     :: v,
  neighbors :: n (Cell v n),
  future    :: Cell v n }

-- Build a cell and its chain of futures, given its rule, similar neighbors,
-- and initial value.
mkCell :: Functor n => (v -> n v -> v) -> v -> n (Cell v n) -> Cell v n
mkCell rule val nei = initial
  where initial = Cell val nei (calcFuture initial)
        calcFuture c = c'
          where c' = Cell (rule (value c) (fmap value (neighbors c)))
                          (fmap future (neighbors c))
                          (calcFuture c')

data Moore c = Moore c c c c c c c c

-- Conway's Life
evalLife :: Bool -> Moore Bool -> Bool
evalLife v n = f v (sumN fromEnum n)
  where f _    3 = True
        f True 2 = True
        f _    _ = False

The remainder of the code is routines for setting up worlds and displaying them.

November 27th, 2006

Site update: quines

Add to Memories Tell a Friend
stone wall, glasses, neutral

I've updated my quines page with a new Haskell quine and tags indicating whether the quine is for a REPL or writes output itself.

Powered by LiveJournal.com