Josef “Jeff” Sipek

Changing timezone in irssi at runtime

About a year ago, I moved my irssi-in-a-screen into a separate zone on my server. I installed the new zone, installed screen and irssi inside it. And started it all up. After a little while, I realized that the zone was set to UTC. (By default, OmniOS zones start with their timezone set to UTC.) That’s easy enough to change by editing /etc/default/init and restarting anything that has the timezone cached in the environment. Which includes irssi. In general, I don’t like restarting irssi because it is a bit of a pain to rejoin the channels I want to be in temporarily.

Well, it turns out that there is a way to change irssi’s timezone setting at runtime!

/script exec $ENV{'TZ'}='EST'

I definitely did not expect something like this to work, but it does. (Yes, yes, I know this is on the irssi tips and tricks page.)

bool bitfield:1

This is the first of hopefully many posts related to interesting pieces of code I’ve stumbled across in the dovecot repository.

Back in 1999, C99 added the bool type. This is old news. The thing I’ve never seen before is what amounts to:

struct foo {
	bool	a:1;
	bool	b:1;
};

Sure, I’ve seen bitfields before—just never with booleans. Since this is C, the obvious thing happens here. The compiler packs the two bool bits into a single byte. In other words, sizeof(struct foo) is 1 (instead of 2 had we not used bitfields).

The compiler emits pretty compact code as well. For example, suppose we have this simple function:

void set(struct foo *x)
{
	x->b = true;
}

We compile it and disassemble:

$ gcc -c -O2 -Wall -m64 test.c
$ dis -F set test.o
disassembly for test.o

set()
    set:     80 0f 02           orb    $0x2,(%rdi)
    set+0x3: c3                 ret

Had we used non-bitfield booleans, the resulting code would be:

set()
    set:     c6 47 01 01        movb   $0x1,0x1(%rdi)
    set+0x4: c3                 ret

There’s not much of a difference in these simple examples, but in more complicated structures with many boolean flags the structure size difference may be significant.

Of course, the usual caveats about bitfields apply (e.g., the machine’s endian matters).

Sunset over Mount Monadnock

Back at the end of June, I hiked up the nearby Gibbet Hill in Wikipedia article: Groton to watch the sunset and get some nice shots of the western sky. (gallery)

Both times I went, I arrived about 20 minutes before the sunset, and got situated. Once the actual sunset started happening, it was a matter of a minute or two before the sun was gone.

Just before sunset @ 24mm:

Sunset @ 70mm:

The peak that the sun sat behind is Wikipedia article: Mount Monadnock—about 50 km from Groton.

I took a couple of panorama shots. I like this one the best (6 shots):

While hiking up the hill, I spotted this tree against the colorful sky. I had to get a silhouette:

I was surprised at how little time the entire trip took. From leaving the house to getting back, it was about 70 minutes. This is certainly a quick photo shoot compared to the day-long trips like the one to Boston in early June ([1,2,3]).

Working @ Dovecot

It’s been a hectic couple of weeks, and so this post is a bit delayed. Oh well.

A couple of months ago, I decided that it was time for me to move on work-wise. As a result, four weeks ago, I joined Dovecot Oy (a part of Open-Xchange).

As you may have guessed from the name of the company, I get to spend my time making the Dovecot email server code better, more featureful, and otherwise more excellent. It is certainly a significant but fun change—going from kernel hacking on a fairly unknown operating system to hacking on the world’s most popular IMAP server. Not a day goes by where I’m not surprised just how much functionality is in the Dovecot codebase, or when I get to consult an RFC related to some IMAP extension I didn’t even know existed.

So, with this said, you should expect to see some posts related to Dovecot, Dovecot code, and email in general.

Stellafane (2016)

Last weekend we drove to Wikipedia article: Springfield, VT to attend the Stellafane Convention. In short, it’s two and a half days of camping, astronomy and telescope making talks, and of course observing. I brought my camera (D750), two lenses (24-70mm f/2.8 and 70-200mm f/2.8), and a tripod. Over the two and a half days, I ended up taking 400 shots of just about everything of some interest. I post processed about 60 and created a gallery. I’m going to include only some in this post, so make sure to check out the gallery for more shots that just didn’t fit the narrative here.

Thursday

Thursday was mainly about arriving in the late afternoon, setting up the tent, and doing some observing once it got dark. Photography-wise, my primary goal for Thursday was to get some sky images at 24mm. I tried some long exposure (657 seconds) to get some star trails:

There was a decent number of people walking around with red lights (so as not to destroy night vision), so a number of my shots ended up with some red light trails near the ground. (That’s that wobbly red line.)

I also took a decent amount of short exposures (10-16 seconds). At 24mm on the D750, 13 seconds seems to be just about when stars start to turn into trails.

This is the only staged shot—I intentionally left one of our red flashlights on in the tent to provide something interesting in the foreground.

Here is our tent-neighbor and friend looking up at the sky. He didn’t actually know that I was taking a shot of the milky way, and I didn’t realize that he managed to sneak into the frame. The trees got lit up by some joker driving around with headlights on. I expected that to ruin the shot, but it actually worked out pretty well.

Friday

Friday is the first full day. I started it by hiking to the other side of the site, which not only sports a nice view, but also nonzero phone and data coverage:

The original club house is there as well in all its pink glory:

The last, but not least, building there is the turret solar telescope:

Right next to it is the location of the amateur telescope contest. Yes, people build their own telescopes and enter them into a competition to see whose is the best. This year, the most eye grabbing (in my opinion) was a pair of scaled down reconstructions of the 8-inch Alvan Clark refractor. Here’s one of them:

I couldn’t resist taking a couple of close-up shots:

Heading back toward the main site, I walked past the observatory set up in such a way as to be handicap accessible:

After a breakfast, it was time to go off to the mirror making tent. I think that every year, there is a series of talks and demos about how to make your own telescope mirror.

The speaker letting an attendee give mirror grinding a try:

And a close-up of the eventually-to-be-mirror on top of the grinding tool:

Fine grinding demo using a glass grinding tool instead of the plaster one:

After lunch, there was a series of talks about a lot of different topics—ranging from digital imaging, to “crowd-sourced” occultation timing.

Between talks, I noticed that one of the attendees erected Federation flags in front of his tent:

Once night rolled around, it was time for more observing. I took a number of milky way shots. They all look a bit similar, with the only real difference being what is in the foreground. Of all of them from this night, I think this is my favorite—there were a couple of people standing around a telescope talking with their flashlights on.

Saturday

The second full day of the convention began with mechanical judging of the telescopes.

Somehow, I ended up drawn to the twin-scopes; here’s another detail shot. You can see a little bit of motion blur of the governor:

The day program was similar to Friday’s—the mirror making talks and after lunch a set of talks on various topics.

The evening program consisted of the keynote, raffles, competition results, and other customary presentations. The sky was completely covered with clouds till about 1am at which point it started to be conducive to stargazing. Oh well. Two clear nights out of three is pretty good.

Sunday

Sunday is all about packing up and heading home. During breakfast time, I ended up walking around a bit and I got this image—with the food tent in the foreground, the handicap accessible observatory near the background, and the McGregor observatory with a Schupmann telescope in the very background.

So, that’s how I spent the last weekend. I’m already plotting and scheming my next astrophotography adventure.

2015 Lunar Eclipse

You may remember that there was a lunar eclipse back on September 27th, 2015. That evening, I set up our 90mm refractor telescope (1000mm focal length, f/11) in the driveway and spend a fair amount of time sitting on the ground. I used a t-mount adapter to mount my Nikon D70 instead of an eyepiece—effectively using the telescope as a big lens. (This is called prime focus photography.) Every minute, I took a shot of the moon hoping to make a collage. It took me nine months, but I finally remembered to do it.

(4 MB full size image—8750 by 1750 pixels)

To keep the overall image aspect ratio reasonable, I ended up using every sixth image. Therefore, each step is six minutes apart and the whole sequence spans about 42 minutes. Each of the photos was taken at ISO 1600, which the D70’s CCD does not handle very well, hence the noise.

I am looking forward to the next total lunar eclipse. It should be a whole lot easier to do with a modern camera like the D750. Sadly, it will be a while before there is another total lunar eclipse on the east coast of United States.

D750 Star Trails

I have tried star trails photography once before—7 years ago. Back then I was using the D70 which was a good camera but there were two problems with it for astrophotography: first, its CCD sensor wasn’t the best at higher ISOs, and second, long exposures were not possible because of some interference (thermal or electric) which resulted in ugly purple fringing. That experience made me not really bother with astrophotography—hence the seven-year hiatus.

A week ago I decided that I should try again with my D750 and the 24-70mm f/2.8 lens. Since they are both significantly newer than my old setup and are superior in just about every way, I thought why not try again and see exactly how much better the results would be.

I ended up with only three shots worth sharing. As always, I made a gallery with them. The one difference from the other photo galleries I make is that I will continue to add star photos to this gallery until the end of the year (when I plan to make a 2017 gallery).

After setting up the camera in the general direction of Polaris, I needed to figure out the exposure. So, I cranked up the ISO to 10000 and took a 5 second test shot at f/2.8. The hope was to see how the sky exposed, and then “trade” the ISO for time to get the same exposure but less noisy and with star trails. (E.g., changing the ISO from 10000 to 160 is 6 stop difference, so the shutter speed needs to change 6 stops in the other direction to compensate. That is from 5 seconds to 320 seconds.) When I viewed the image on the back of the camera, I was blown away:

While there is certainly noise in the image (which you can’t see in the resized version) and the composition is not great, it’s cool how both the foreground and the sky are equally well exposed. The trees are essentially light-painted by the neighbor’s driveway lights which were on at the time. And before you ask, no, that’s not the milky way, that’s just a wispy cloud.

Then, I proceeded to take a back-to-back series of 15 second exposures. After five minutes (21 shots), I was sufficiently bored to try something else. After heading back inside, I stacked the 21 shots using StarStaX. Here is the resulting image (slightly tweaked in Lightroom):

The orange blur on the right of the image is a small cloud that moved across the frame during the five minutes without me noticing. Unfortunately, there is plenty of light pollution to the northeast of us because of the neighboring city of Wikipedia article: Nashua. I am definitely going to experiment with stacking.

The final couple of shots I took were all various long exposures—ranging from 8 to 20 minutes. This is one of the 20 minute exposures:

Again, the light pollution from Nashua is unfortunate.

The 74 degree horizontal field of view at 24mm is pretty good. Of course, a wider lens would provide for an even more interesting shot. For example, a 15mm focal length would produce a 100 degree horizontal field of view. With that said, I am certainly going to experiment more with star trail photography—even if I have “only” a 24mm focal length.

Boston

Two weeks ago I ended up going to Wikipedia article: Boston for a day. I spent my day in three places—the Wikipedia article: Boston Public Library, the Wikipedia article: Massachusetts State House, and the Wikipedia article: Boston Common.

In this post, I will share my photos of anything that did not fit into the other two posts—the post with the Boston Public Library photos and the post with the Massachusetts State House. (All three posts share the same gallery.)

This is a view of the eastern end of Boston Common. There was a window at the State House that offered a good view, so I snapped it.

The weather was quite nice—low 20°C, sunny, light breeze—and so the Common was full of people enjoying the day. Both passively:

and actively:

Industry by Wikipedia article: Adio diBiccari:

Heading back toward Copley Square and the Boston Public Library, we encounter the John Hancock tower:

At this point, it was time to start heading back to Harvard where I left my car. I noticed an interesting ad at the bus stop right by the library. It had three panels filled with water and bubbles. I realize it isn’t the sharpest photo.

When I got off the red line at Harvard, I tried some long exposures of the trains. It turns out that unless the trains are packed, they keep their doors open for only about 10 seconds. In this 13 second exposure, you can see that the door was closed for a part of it.

An 8 second exposure worked quite well. (Unfortunately, I like the first composition better.)

So, this concludes the three post series about my one day excursion to Boston. I certainly learned a couple of things about photography in the 401 shots I took. First of all, tripods are amazingly useful indoors. Second, anyone can take a shot of a subject—it takes the “know what you’re doing” to consistently get an image that is not just good but better than average. Third, I need to read up on architecture photography before my next excursion so I know what I am doing. :)

Massachusetts State House

Two weeks ago I ended up going to Wikipedia article: Boston for a day. I spent my day in three places—the Wikipedia article: Boston Public Library, the Wikipedia article: Massachusetts State House, and the Wikipedia article: Boston Common.

In this post, I will share my photos of the Massachusetts State House. I have a separate post with the Boston Public Library photos and another post with the Boston Common and other places around Boston. (All three posts share the same gallery.)

The State House with its (real) gold covered dome:

Nurses Hall (24 MB panorama):

One of the entrances into the Senate room:

And its interior (32 MB panorama):

The Great Hall of Flags. It used to be a courtyard until 1990 when they put a glass roof over it and turned it into an event space. The flags supposedly act as echo dampeners. These are the flags of the various towns in Massachusetts.

The building is filled with doors—some fancy and some rather plain:

Finally, in the very back, there is a pretty nifty staircase:

Unsurprisingly, much like at the library, I had to bump the ISO pretty high to get an acceptable shutter speed with a large enough depth of field. A tripod (or even a monopod) would have helped quite a bit. I guess I know what’s getting a higher priority on my photo gear shopping list. Additionally, I should read up on architecture photography before the next major trip.

Boston Public Library

Two weeks ago I ended up going to Wikipedia article: Boston for a day. I spent my day in three places—the Wikipedia article: Boston Public Library, the Wikipedia article: Massachusetts State House, and the Wikipedia article: Boston Common.

In this post, I will share my photos of and around the Boston Public Library. I have a separate post with the State House photos and another post with the Boston Common and other places around Boston. (All three posts share the same gallery.)

The front entrance to the library:

A 180° view of the front of the building (32 MB panorama):

A peek into the reading room—Bates Hall:

Bates Hall in all its glory:

The library has a courtyard with a water fountain. The tower in the background is the tower of the neighboring Wikipedia article: Old South Church.

A close-up of a card catalog.

There are actually two churches right next to the library. Right across the street from the main entrance is the Wikipedia article: Trinity Church.

The other is the aforementioned Old South Church on the north side of the library. Toward the end of the day, it ended up backlit creating a neat silhouette.

This was really the first time I actively tried architecture photography. Shooting indoors around f/8 without a tripod was not the best thing for image quality. To keep the shutter speed in a reasonable range, I had to bump up the ISO resulting in a bit of noise. I will know what to expect next time I try this.

Powered by blahgd