Recent PhotosCalendarArchivesQuicksearch |
Sunday, November 11. 2007Christmas Is Just Around the Corner
Last week ended in a rather annoying way. Apparently my car had developed a flat tire overnight one night, and I left while it was still dark the next morning, and didn't notice it. I had driven on it all the way to work with it fairly flat, which damaged the tire (but not the wheel). So that needed to be replaced, and it was still under warranty from the place I bought them, which is 45 minutes away. We had a family gathering on Saturday, but couldn't be there all that long because we had to get to this place before it closed.
After we got home, there was a bit of work to do out in the yard. Jacob was tired of being indoors, so I took him out with me. He came with me as I put air in our 5-gallon air tank, and watched as I used the tank to do the monthly tire inflation on our pickup. (When you paid $75 for the vehicle, fixing a tire that only has to be inflated once a month doesn't seem all that cost-effective) And then he got his first ride in the pickup. We were just moving around trash on the yard, and he enjoyed it. We hopped in and out several times to load or unload things. Though he was very annoyed that I didn't let him use the stick shift while I was driving. My parents said that he sounds like his dad. We have a bedtime routine for Jacob, and I read a book to him right before putting him to bed every night. This morning, Terah got out the book that I read to Jacob last night. I was in a different room, but Terah is quite sure she heard him say "dada read this!" That's his first sentence (that one of us heard, anyway) Some of you may have read that my relative Venita had a brain aneurism recently, and remarkably, seems to be recovering from it. Today in church, our pastor said, "I'm happy to report that this morning, Venita called me, asked me to thank everyone for all the prayers, and to ask the choir to sing up to heaven -- and they have." She's still very weak, and just sitting up to eat is a struggle, but she is improving. Terah and I had invited my two aunts that grew up in what is now our house over to help decorate for Christmas. They were here today, and we spent all afternoon decorating, and we had spent the last couple of days finding decorations. It was a fun time, and the house looks great and feels more like home. We're happy to have had the help thinking about where to put everything, and actually putting things there. The tree isn't up yet, but it will be soon. We're thinking that it will be nice to be decorated early this year, rather than our usual just-before-Christmas decoration event! It was neat to hear a few stories about how my grandma decorated the place; she died when I was young, and I don't remember her. Jacob, of course, was in on all the action. He watched, played, and threatened to make the nativity scene quite unpeaceful, but more interesting to a 13-month-old. The Goerzen Christmas will be here this year. The last time Goerzens celebrated Christmas in this house was 7 years ago -- a month or so before I met Terah, as it happens. It seems so long ago in some ways. The house has changed; the 1970s yellow wallpaper is gone, as is the drop-ceiling tile that grandpa had installed to save on the heating bills, as is his wood stove and the metal tractors that he had in his closet that I used to play with when I was little. But as I sit here typing this post, I'm looking at the spot where I used to play air hockey on grandpa's table during family gatherings -- and whenever else I could convince grandpa to get out his air hockey table for a game. Over in the corner is where he always had his Christmas tree, with the woven wheat ornaments my grandma had made. Terah decided that corner would be perfect for the tree, before she ever knew where it used to be. Here's a picture I took at that Christmas 7 years ago: ![]() Sitting here right now, looking at all that has changed, and all that hasn't... 7 years wasn't that long ago after all. I'm sure this year will be the first of many happy Christmases to be celebrated in this place. Tuesday, November 6. 2007American Priorities
Monday, November 5. 2007Viper
Well, now this is quite the experience.
I've been trying Viper for the past few days. Viper, for those that don't know, is usually described as a set of Vi bindings for Emacs. After reading the nearly 100 pages of documentation and trying it a bit, I have realized that this is not really an accurate description. Viper is a port of vi to Elisp. But that doesn't really do it justice. Viper seems to have pretty much everything going for it that Vim does, and then some. It is extensible with Elisp, and works with all the Emacs major modes (indentation and so forth). Yet it also is a very authentic Vi implementation, yet more customizable than Vim. And, in my opinion, more capable than Vim too. On the one hand, this is a really neat combination: the power of the vi editing commands with the power of Emacs and Elisp for indentation, customization, etc. On the other hand, it makes my head hurt. While Viper and Vim both are supersets of the vi command set, they don't always implement extensions (such as multiple windows) the same way or with the same keys. Of course, you could remap them in both, but it's a bit jarring to run Viper in expert mode, press C-w to start creating a new window, and have it run the Emacs cut command. (You can run Viper in a more limited mode where it does not recognize any regular Emacs keys if you don't want that) It's just weird. It mostly looks like Emacs. It is modal like Vim, and responds to all Vi and most Vim commands. It has an additional mode: the Emacs mode. Also if configured to run in expert configuration, Emacs commands are accepted most places. Yes, you can move with h, j, k, l and C-n, C-p, C-f, C-b all at the same time. The main drawback I can see is that Viper mode doesn't work well with Info mode, which has other bindings for keyboard shortcuts... so all of a sudden, hjkl don't work in info mode. I don't know yet if I'll use viper much, but it is a slick program. Friday, November 2. 2007The Day The Routers DiedFriday, November 2. 2007A little more on Vim and Emacs file handling
Yesterday's post about switching back to Emacs saw quite a few comments from people (most of them useful, even). I learned a few things.
My biggest gripe about Vim was that for the file types I worked with most, its indentation and syntax highlighting was inferior to that of Emacs. I'd like to illustrate that with an example. Let's consider one of those file types: XML containing DocBook markup. Vim has a DocBook mode. It doesn't autodetect DocBook files, so I have this at the top of each one: <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->Now, why should Vim need a separate DocBook mode? DocBook is just XML or SGML, and these things have a well-formed nature. Well, part of the reason is that /usr/share/vim/vim71/syntax/docbk.vim has a ton of lines like this: syn keyword docbkKeyword chapter citation citerefentry citetitle city containedYes, they are hard-coding all the DocBook element names into the editing mode. It's probably used for completion, highlighting, maybe indentation. I'm not sure, really. I remember that editing these files without the DocBook mode was much more painful anyway, but that was 8 months ago and I can't quite remember why. Now, what about Emacs? I don't know if Emacs even has a DocBook mode, mainly because I don't have to care. The Emacs psgml mode actually parses the DTD for your XML or SGML files. It knows exactly what the valid tags are from doing so. This means it has full functionality not just for DocBook, but for any XML or SGML file with a DTD. Not only that, but it knows more about the files than Vim does. For instance, both Emacs and Vim can do completion of various things. Vim </ C-x C-o (ooo, sounds like Emacs!) can complete my closing tags. But it can't autocomplete my opening tags, and it certainly isn't aware Not only can Emacs autocomplete opening and closing tags, but it knows exactly what tags are valid at a given place in the document (thanks to the DTD) and will only consider those tags for completion. Moreover, depending on how you have configured it, it could also insert spots for you to add any required attributes. So, for instance, if you're editing XHTML and autocompletion gives you an <img> tag, it would add src="" in it for you, as a reminder that src is required. There are a host of other smart things that Emacs can do with XML or SGML documents. For instance, you can get a list of all tags valid at the current point with C-c C-t or Shift-RightClick -- useful if you've forgotten the name of a tag for a moment. The difference isn't as great with everything. But it sure is noticable as I work with XML and Haskell files. Thursday, November 1. 2007So long, Vim. I'm returning to Emacs
I'd been using Emacs for quite awhile, and about 8 months ago I decided I would try using Vim. I'd only used vi for system emergency work, but knew a number of people that swore by it for regular work. So I decided I would learn Vim and use it for my regular work. I figure that with things like this, I don't get a real feel for how well they work unless I use them for all my work. So I haven't really opened Emacs at all in the past 8 months.
Yesterday I finally decided that Vim was not living up to my expectations and I'm in the process of switching back to Emacs. I thought I ought to write down why I'm doing that, for my own future reference... and since nobody has ever written about Emacs vs. Vim, I might as well post it where everyone can see it. So here we are. Original Reasons for Using VimIt would lead to more comfortable typing. Lots of Vim users mention that you don't have to hold down keys while hitting other keys as much in Vim as in Emacs, and that the movement keys are all on the home row. That's true, but I didn't find it to be that big of an improvement, since Esc is a farther reach than anything in Emacs, and let me tell you, you're hitting Esc all the time in Vim. I found that removing the armrests from my chair made my hands happier than Vim ever did, and swapping Ctrl and CapsLock in Emacs will probably help there too. It starts faster. I'm not sure if that really was true even when I switched, but it certainly isn't true on any of my machines today. Both Vim and Emacs have had major version upgrades (v7 and v22, respectively) since I started using Vim. People seem to say that Emacs 22 feels faster, though I don't know if that's true. The startup times of the two, if they're different, are imperceptible. Vim would use less RAM. Frankly, these days, both Emacs and Vim are way down on the list of things that use up RAM. Heck, kmail has 141MB resident, and each of its two IMAP processes is using more than 30MB. Emacs in X right after start has 16MB resident, 10MB of which is shared, and 25MB VSS. gvim right after start has 8MB resident, 5MB of which is shared, and a 43MB VSS. Emacs tends to use fewer processes for things that vim. So they're not all that different, and Emacs could come out smaller in certain situations. But the difference is irrelevant on today's machines, and modern Gnome and KDE apps are many times larger than both of them. It will make me more comfortable in rescue environments where I have only traditional vi available. Actually, the vi on AIX is so different from modern Vim that this didn't really help. It would make me more productive. There are some editing commands that did, but as you'll see below, it was more than balanced out by other problems. Things I Liked about VimThe commands dt, dT, df, dF. Wonderful little things those. Emacs now has M-z (Zap), which is similar to df but can actually go to other lines (a nice addition). And there are easy ways to bind keys to the others as well, though that doesn't make it a pervasive convention like it is in Vim. Antialiased fonts. It's crazy that Emacs doesn't have this yet. But not a showstopper; I still like good ole 10x20 just fine. Regexp search-and-replace. Emacs actually has this now, and maybe it had it back then too. M-C-%. Apparently in Emacs22 the replacement expression can also have lisp code in it, which sounds really slick but I can't see myself using it regularly. Annoying Things in VimSyntax highlighting. The syntax highlighting for most languages in Vim felt like it was about as smart as it was in Emacs about 10 years ago. Strings like "Hello!\"" (in languages where \" inserts a literal ") often confused it. Sometimes quotes within comments confused it. Sometimes it would be confused permanently. Other times, just until I scrolled around in the file or reloaded it. Indentation. This is much more annoying than the syntax highlighting, really. In many languages -- and especially the two modes I've used most recently, XML and Haskell -- it really, really stinks. The indentation there isn't aware of syntax, or not very much. Sometimes it is smart enough to know that if an XML line starts with </ that it moves left and if it starts with an opening tag, that the next line moves right. But it's not smart enough to do this reliably. Not only that, but indentation is not handled with consistent configuration between languages. And even though Vim ships with a ton of language modes, the central docs only cover indentation for C. I've asked Vim experts about this, and have tried all sorts of various tweaks, have read through Vim indentation mode source files, etc. There is just no way to get it anywhere near the intelligence of Emacs for most languages, short of writing my own mode, it appears. This is even worse because when using the backspace key in insert mode, for awhile it deletes individual spaces, and then all of a sudden deletes a big chunk of whitespace back to the beginning of the line. (And no, the insertion of Tab characters is disabled.) Indentation is my #1 complaint about Vim, and something that shows no progress towards being fixed any time soon. And forget about anything like Emacs M-x reindent-region. This is a syntax-aware indenter. You can write out an entire source file with no indentation whatsoever, and it will indent the entire thing according to the indentation rules you've defined and the syntax of the language you're using. The best I've seen in Vim are commands that add or remove space at the beginning of every line in a region. In short, Emacs seems to "understand" the file format on a much deeper level than Vim, and can automate things to a much better extent because of it. Too many things disrupt the paste buffer. I can use Y or y to yank some text in Vim, and it's really, really easy to overwrite that buffer with other things. Yes, I know that I can yank it into a named buffer, but that's inconvenient and I don't usually know in advance that I'll have that need. In Emacs, only C-k and other "large area" commands disrupt it. Vim doesn't like you having lots of files open at once. It's surprisingly convoluted to do this. If you use the basic documented command to edit another file, :e, it closes the file you're working on. The normal way to open multiple files at once is to use split windows. Well, I don't like split windows all that well, and often just want to make a quick change in one file -- in full screen -- and then go back to another. Even though I use set hidden in my ~/.vimrc, it still is annoying and more convoluted than it should be. Vim can't create new top-level X windows. In Emacs, I can press C-x 5 2, and poof, I have a second Emacs window in X, and it's tied to the same editing session and Emacs process. Not a new process, with a different set of files, its own buffers, etc. The same process, same set of files. Just like a split window, but with a new top-level X window instead. gvim simply has no way to do that. This is also a large annoyance. gqap stinks. This has burned me more than once. I'll be editing an XML document, and insert some text in the middle of a paragraph. Now I have a really wide line. So I type gqap to reformat the paragraph. My cursor is near the bottom of the screen, so I don't really see much past the current line. I then save the document and exit. Later I discover that vim considered the entire rest of the document part of the single paragraph, and removed all the different indentation levels at </para> and the like, so it's completely messed up. Emacs is smart enough to know what is a paragraph in XML mode, and M-q does the right thing. Oh, and Emacs reindent-region can fix the Vim gqap-induced mess. |
The ChangelogMost Popular TagsSyndicate This BlogBlog Administration |

Comments
Thu, 15.05.2008 05:01
In general, it is impossible t o prove that something is rand om, and difficult to ascertain that something is suffi [...]
Thu, 15.05.2008 00:24
There should be testing of pat ched programs before they are released, when feasible. This bug could have been caug [...]
Wed, 14.05.2008 16:58
Sure, it's only modifiable if it's a pointer... but pointers are the only practical way to pass many things: strin [...]
Wed, 14.05.2008 16:47
"Especially since you may be d ealing with functions that cal l other functions 5 deep, and one of those functions m [...]
Wed, 14.05.2008 16:22
Imagine that you are knowingly breaking the law by not apply ing for the appropriate visas. Not only that, but you [...]
Tue, 13.05.2008 18:59
I have heard that argument bef ore, and frankly, I'm unconvin ced. I am not aware of any Am erican jurisdiction wher [...]
Tue, 13.05.2008 18:55
What a wonderful point and pos t. You're quite right, and it 's high time we all revisit th e notion that legality d [...]
Tue, 13.05.2008 18:52
Quite right. Article fixed ab ove.