It's been three weeks since my last entry, I know. But it's been a pretty stressful - and here I use the term loosely - three weeks. I say that because there's been a lot of excitement in my life, both positive and negative. As such until now I haven't been motivated to update this LiveJournal until now. As this entry would otherwise get quite long I'll try to keep the descriptions of what's happened brief.
My dad and I did end up going on our fishing trip. We ended up going to Green Valley in the southwest part of the state once again, only this time we didn't take my dad's boat, but rather fished the shoreline, and we didn't really leave the state park. We set up camp after arriving on that Monday afternoon, and not until after I (somewhat reluctantly) bought a new tent at the Wal-Mart in Creston, a town about two miles to the south after we broke one of the poles on my dad's tent. Had I not done this we would have went home then and there since my dad didn't have the money for a new tent or a hotel room. After we set up camp we went fishing, which started the somewhat set schedule for the next few days. We'd go fishing before or at sunrise (something which I never really got used to since I'm usually a night owl, partly because my job demands it and partly because I tend to get so lost in what I'm doing that I end up staying up until 3 or 4 in the morning), then go to the fish cleaning station to clean fish, then eat, relax at the camp site, maybe eat again later in the afternoon or go into town to get bait and any other supplies we needed, then go fishing until just before dark, clean those fish. We ended up keeping 121 fish and definitely caught at least 140. The ones we kept were mainly yellow bass and bluegills, though there were some crappies and largemouth bass in the mix. Unfortunately due to the yellow bass the Iowa DNR will be killing the lake near the end of summer, so it will be at least three years before we'll be able to fish there again. We ended up leaving that Thursday, one day earlier than we planned, due to rain. It was a good thing we left since the next day that area of the state got at least three inches of rain, which would have been tough to ride out, let alone tear down camp in, and the fish had stopped biting anyway once the rain started.
A week after my dad and I came back from the fishing trip, Jeff, Nate, and I went to the Twin Cities to see "SPAMALOT" and do some shopping at the Mall of America and, at least for me, to meet Chris, better known as Deepfreeze online. First of all, let me say this: when someone plans a trip for me that involves me having four hours of sleep or less and justifies it by saying these six words: "You can sleep in the car," things aren't going to turn out well for me, at least on that day. In other words, no, I'm not going to sleep in the car. Car sleep after sleeping in a comfortable bed doesn't work out for me, and car sleep is never as good as bed sleep no matter how desperately tired I am, especially when even if I have ear plugs in my ears I can still hear the car stereo and someone else sniffling at least once every five seconds because he'd rather spend his money on an Xbox 360 and a new dog than on getting his allergies checked and some medication. Needless to say I was a bit irritable that day. After trying to sleep in the car I gave up and ended up playing Descent on my laptop until we stopped for food about two hours from the Twin Cities area. Once in the area we checked in at the hotel then went downtown to see "SPAMALOT" at the Orpheum Theatre. It was somewhat ironic that I was seeing it on little sleep since every time I've attempted to watch anything Monty Python-related it's been when I've been tired, so I've fallen asleep during at least some of it. Unfortunately this was no exception. The parts that I were awake for were very good, though. It was basically a retelling of "Monty Python and the Holy Grail" on stage. After the musical we went to the hotel, then to TGIFriday's, then to Shooters, the pool hall we went to two years ago. I have to admit it wasn't as fun this time around, especially when Jeff got annoyed with me for playing the Family Guy pinball machine while we still had a table (they charge by the minute) and Nate had to go to the bathroom. Even so it did feel good to drink beer and shoot pool late at night. We stayed there until around 2 before heading back to the hotel. The next day we woke up late and so we had to hurry to get out of the hotel before the check-out time of noon. We went to the Mall of America after getting some gas and after about an hour of walking around and looking at T-shirts with funny sayings, met Chris by the aquarium after figuring out which person he was. We went into a nearby Starbucks for drinks, then went into a Barnes & Noble where we looked at books, mainly in the graphic novel/manga and fantasy sections. It was here that Chris and Nate really hit it off, and at one point everyone in that section was talking. I'd never seen anything like that before.
The four of us spent about six hours in the mall. Most of it was at Brickstone, where they had expensive massage chairs that people could try, so we took advantage of them. I did so the longest and with the most expensive chair. It was almost as good as having someone massage me and I didn't want to leave. We also went to Hot Topic where I ended up buying a double-record set of an album by the band Mindless Self Indulgence after hearing some of their music for the first time on Chris's iPod. When it was time to eat I was so stuffed that I didn't get anything at the food court (we'd eaten a large amount the night before), a rare event for me. After that we took Chris back to his apartment where he gave us the cheesecake that Nate and I ordered from his mother. We paid him by check, then he gave us a small tour of his place, we talked for about twenty minutes, then left to go to Nate's sister's place so he could give her a birthday gift, then went to Nate's mother's place since he hadn't seen her in awhile. His stepfather offered us brats but we were saving our appetites for our next destination so Jeff and I refused and Nate had one. Nate's mom was a little tipsy on wine, so according to Nate she was more social than usual. After that we went to a nearby Red Robin since I'd never been to one, which amazed Jeff and Nate, and we ate there for about an hour. Against my own judgment I took advantage of the endless steak fries and ended up eating over three baskets of them. After that we headed for home with Nate and me sleeping most of the way. It wasn't as good as when we did it two years ago, but I'm glad I got to meet Chris and it was still pretty fun.
But the most significant event that has affected me lately by far has been the weather, especially at work. I was working when we had some major storms the last Sunday in May, including the tornado that leveled half of the town of Parkersburg about twenty miles northwest of here. And now Cedar Falls and Waterloo are getting the worst flooding in either city's history as I write this. The rain has been almost relentless and as a result the rivers are quite high. Working at a TV station means we have to go on the air for it all and since this alters what we normally air, I have to log everything, contact the people who need to be contacted, make sure the video servers that we play our commercials from are in the right place, make sure we stay on the air and do what I can to get the transmitters running if they fail (there's a separate transmitter for the analog transmission and the digital transmission), call an engineer if I can't, record the coverage so that our promotions department can use it in their promos, and deal with the newsroom and give them what they need, all at the same time. As such it's taken a lot out of me and it was turning me into an angry person until yesterday when I decided on my day off that I needed some time to do absolutely nothing, which was what I did at my parents' house (they're on vacation in Branson, Missouri). It was the best thing I could have done for myself, even though it seems wrong in this age where it seems everyone's busy and relaxing is just considered being lazy by many. I can't deny that I was in a much better mood after doing nothing, though. I probably would have benefited from more of the same today, but I didn't get it in, and it looks like I'm not going to, especially since I pretty much have to drive around most of Waterloo to get to work tonight. Still, at least now I know what I need to do if I get that stressed again. And by doing nothing, I mean I just sit or lie somewhere and breathe deeply to calm myself down. That's it. No books, no TV, no computers, no video games, nothing else.
The cut title gives it away, so I'll just dive into it: while looking at various virtual filesystems available on Unix systems last Wednesday morning, I stumbled upon named pipes, also known as FIFOs, and their uses. A named pipe is a special file which you can send data to its input and get data from its output on-the-fly without actually storing it on disk. It's called a named pipe since it actually has a name like any other file on the system.. At first glance named pipes don't seem all that special since they pretty much do what standard pipes (better known as anonymous pipes) do. The big advantage with named pipes, though, is that you can use them to send data to and from unrelated processes (i.e. programs for the non-Unix user), and this includes GUI programs. The best program I've found to use named pipes with is also probably the most widely-used: Firefox. But before I get into how you can use named pipes with Firefox, I'll give the more standard example of what named pipes can do: send data from one terminal to another. Named pipes are made with the mkfifo command on most modern Unix systems like this: mkfifo [pipe name]. Once created, on one terminal you can send the output of stdout to a terminal from a command, say ls, like this: ls > /path/to/named_pipe. The terminal will stop since the ls command is "blocked" until something is "connected" to the output of the named pipe. If you do so using this: cat < /path/to/named_pipe, the named pipe will now be connected and the result of the ls command on the first terminal will show up on the second terminal as soon as the cat command is executed.
So why did I mention Firefox? Because it has the ability to save to and open from named pipes as if they were regular files. For saving you'll get the warning about overwriting a file, but you can safely ignore it; Firefox knows what to really do with a named pipe. As long as you keep the file type on "All Files," it will handle named pipes gracefully. Two uses I've found for this are converting its Postscript printouts to PDF and compressing Web pages that I want to save to disk. To do the former make sure you check "Print to File" in the print dialog box (and preferably select "Postscript/default" for the printer), then when it asks what file to save it as, navigate to your named pipe, say yes when it asks if you want to overwrite the file, and then execute ps2pdf (part of Ghostscript) in either a terminal emulator or "Run Program..." box like this: ps2pdf - your_printout.pdf < /path/to/named_pipe. You'll have the printout in PDF format without having to save it as a Postscript file on disk first. Compressing Web pages you save to disk is similar. Again, navigate to the pipe, make sure that "All Files" is selected as the file type (otherwise Firefox may complain and you won't get the results you want), and pick the named pipe as the file to save it to, saying yes when it asks if you want to overwrite the file. Then go to a terminal emulator and execute this: gzip -c < /path/to/named_pipe > compressed_page.html.gz. That should give you a compressed Web page, again without having to save the uncompressed page to disk first. There are other GUI programs that can take advantage of named pipes also through their open and save dialog boxes. If that doesn't work most will open from stdin if you tell them to do so at the command line, such as epdfview: epdfview - < /path/to/named_pipe. Saving is a bit tougher, as a lot of programs really do insist on saving a file with the proper extension (even though such things are not enforced by Unix itself, unlike on Windows).
Of course, there are other uses for named pipes. Experiment and see for yourself what they are. On disk they only cost one inode and they don't take up any file space so you can go wild if you want and see what you can do with them.
This week's Software of the Week is
Packet Filter, the packet filter firewall originally found in OpenBSD and ported to FreeBSD, NetBSD, and DragonFlyBSD. Packet Filter, commonly referred to as pf (which is how I'll refer to it from here on out), is an advanced packet filtering firewall that was created when the OpenBSD developers became unsatisfied with the license of IP Filter, similar to how they created OpenSSH since no open source SSH software existed. But pf isn't just an ipfilter clone; it also has features that aren't found in ipfilter or other open source firewalls, such as the ability to reassemble packet fragments at the packet filter (known in pf parlance as "scrubbing"), use macros, lists, and tables to create multiple rules from one line in the configuration file, and the ability to create rules dynamically using a file that contains a list of IP addresses, which is useful in conjunction with an intrusion detection system to, among other things, block the script kiddies who try various names and passwords to break into a system via SSH. These features make pf both easier to use and more secure than other packet filtering firewalls.
So far I've implemented pf on my laptop since I can never trust someone else's network or their firewall. I plan to replace ipfilter on Rei with pf and even use it with an IDS to stop the aforementioned SSH break-in tries.
That's all for this long, overdue entry. Because of the flooding I have to go what amounts to about seven miles out-of-the-way in order to get to work tonight, so I'll be leaving early. At work these past few weeks have been a nightmare and it looks like tonight and tomorrow night are going to be no exception.