January 2005


Lisa Williams is at Berkman talking about blog policies. She says they're important and useful to have before they become necessary. So here's mine:

  1. I write about the Free software I write (frassle, this blogging system), various more and less nerdy things that interest me, and my life as a geek in Boston. Don't get all uppity about it, if that's even possible.
  2. Blogs (comments) that are spam will be deleted without notice.
  3. I do not speak for my employer (Kronos Incorporated).
  4. I make minor spelling, grammar, formatting, and link corrections to posts without notice. Changes that significantly affect the meaning of a post are either clearly separated from the original post as an addendum, or are their own post.
  5. I hope you'll correct me and share your insight after listening to what I say.
  6. I screw up.
  7. You're welcome to quote or otherwise make use of material I post here. It's probably best for you to link to me when you do that, but it's not required.
  8. I don't get paid; I'm a little guy. But if I were paid by anyone for writing anything here, it will be obvious.
  9. I try to do the right thing and if you're unhappy about my blog, or about other frassle content, you can always contact me and I will try honestly to resolve the situation to your and my satisfaction.

link

Want Python-style "generators" in Perl? You can always use a closure as a generator. Example:

sub something {
  …
  my $sth = $dbh->prepare('SELECT * FROM somewhere');
  $sth->execute;

  consume(sub { $sth->fetchrow_arrayref });
}

sub consume {
  my($generator) = @_;

  while(my @results = $generator->()) {
    # process @results
  }
}

Closures are the bomb. Of course, this is not a perfect solution. If you just wanted to generate the numbers from 1 to 99, you could pass a closure to generate one number, but it would have to store its state externally. I believe Perl 6 has a yield command that would allow you to do this easily (see a more thorough discussion).

link

Hi Toph! I'm excited to know you'll be using frassle. Your feedback and code contributions are quite welcome. :)

All of frassle's content generation is dynamic, including the RSS feeds. That is what noteset expressions are for: they're a compact query language. You can query frassle blogs on any boolean combination of:

  • feed URL (this identifies the blog something comes from)
  • permalink (in case you want to pull out one specific note)
  • category membership
  • relevance to a certain category (by percentage)
  • word or character count
  • text search

You can also request all notes that respond to a set of notes. For example, to track the latest comments on your blog, you'd want all things that respond to your feed, except for your own posts. All of this can be expressed with frassle's noteset expressions.

Currently, if you want a feed based on a noteset expression, you have to do the following convoluted dance:

  1. Create a publisher page.
  2. Create a block in that page, using the noteset expression you want.
  3. Copy the XML link for that block from the publisher page.

This is a lot of work, on top of the fact that you have to figure out the noteset expression language based on a pathetic grammar. As a simpler alternative, if you just want feeds for different categories, you can simply fetch

http://frassle.net/rss?cat=28397

which is the feed for your computers category. The number after cat= in the RSS URL should be the same as when you browse. These feeds are also available by browsing to any category and clicking the orange XML icon at the bottom of the page.

But it gets better

In the upcoming (this weekend?) alpha 9 release, frassle's publisher is being replaced by the frassle studio, which lets you build streams of content, format those streams into reusable displays called blocks, and build web pages from those blocks. A content stream is just a noteset expression with a name, but rather than writing a nsexpr yourself, there is an easier javascript editor. Each content stream has a feed, so you could just go into the studio, create a bunch of content streams, and use their RSS feeds.

The other enhancements in the studio include pages with customizable themes, programmatic widgets including a blogroll, calendar, and category tree, and many overall speedups and UI improvements.

Responding to a previous post

By the way, in your previous post where you discuss the efficiency of Python generators, you can actually very easily do the same thing in Perl. Instead of saving the result of $sth->fetchall_arrayref() and passing a reference to that, just pass $sth. The consumer subroutine can just call $sth->fetchrow_arrayref() over and over again, just like the generator you describe.

link

Found in the comments on a post about choosing a college by Philip Greenspun:

Ersatz intellectuals in fields other than biology read The Selfish Gene or equivalent popular biology book and imagine biological research as witty British academes exchanging verbal jabs, unlocking the mysteries of life, and receiving millions of royalty pounds from their cloned maize patents . In reality biology is a windowless lab above the food court in Longwood, with 3 chinese guys, an indian, and a russian, packed into a 6×8 space, trying to do just enough work so that they don't lose funding and get deported. One autistic asian girl does all the wet lab for the entire department and a team of shell-shocked dot com losers are responsible for absorbing all the grant money still being allocated to various dead-end "informatics" programmes. The female doctoral candidates all decide to abandon ship and go to optometry school or manage a pet shop after their thesis defense whilst the male PhDs seem more inclined to waste even more life with endless journal clubs, data sharing, journal sharing, data clubs, and so forth for the rest of $20K/yr post-doc eternity.

Medical school is a (not much) duller , but far more fiscally sensible. If you get bored making $300K a year prescribing acne cream, you could always use your income to set up a lab in your basement. Even post docs have to figure out how to pay rent, so a lot of prime equipment ends up on ebay.

comment by half empty ⋅ 12/24/04; 12:28:44 AM

If you're under 60 and have problems mustering sufficient bitterness
in a variety of social situations, a Ph.D. may be the way to go.

link

Welcome back, Francois! I look forward to reading more from you.

Frassle's been kinda steady for a couple of months now, but we're nearing completion of alpha 9. This is relevant because it will make it easy for you to put a blogroll on your blog. The blogroll will be automatically created based on the subscriptions in your frassle aggregator. Coming up Real Soon Now…

(Oh, and there are also the beginnings of user and developer manuals.)

link

Great idea from this article: use Firefox Live Bookmarks to hold your to read list.

link

Something to look at when we get around to adding various API support to frassle. Found on the excellent Tucows Developer blog, The Farm.

link

Handy tool for web app hackers.

link

Jessica,

This kind of cookie behavior is highly browser-dependent, as far as I know. If what you see now is different, could it be because you've switched browsers?

If you experience something strange, could you tell us exactly what steps you took? Something like:

  1. Open web browser.
  2. Already logged in to moose's orchard thanks to persistent cookie.
  3. Open new empty tab. (The distinction between opening a link in a new tab and and creating a new tab and then loading a link may be important.)
  4. Load frassle homepage in new empty tab.
  5. Click logout in new tab.
  6. Login as Knitalong in new tab.
  7. Go to frassle home page in each tab.
  8. Top of page shows moose logged in in original tab, knitalong logged in in second tab.

Thanks for helping make frassle better.

Today, a milestone:

frassle=> select count(*) from pkit_user;
count
——-
600
(1 row)

Thank you, 600 intrepid explorers!

« Previous PageNext Page »