Duplicating a Line in Emacs

I don’t need to duplicate a line often enough to make this worthwhile for me but it’s a nice solution and worth considering if you find yourself duplicating lines a lot.

Posted in General | Tagged | Comments Off on Duplicating a Line in Emacs

Compiling Emacs with eww on OS X

I’m old school and like to compile applications myself rather than use something like Homebrew. I have nothing against Homebrew and its brethren, it’s just that compiling things myself helps me stay connected to the development process. Besides, it’s what real geeks do. One consequence of this is that I compile Emacs from source rather than downloading the prebuilt binaries.

I compiled Emacs 24.4 recently and didn’t experience any problems until I tried to use eww. Emacs told me that it had to be compiled with libxml2 to use eww. After a bit of investigation, I discovered that libxml2 was not installed with OS X so I downloaded and compiled it and rebuilt Emacs. Sadly, it still didn’t compile with libxml2. I could see from config.log that configure wasn’t finding the include files for the library. That’s because they installed in /usr/local/include rather than in /usr/include.

After a bit more fumbling around, I discovered the proper spell. If you’re trying to compile Emacs on a Mac and want it to build with libxml2, here it is.

configure --with-ns CFLAGS="-I /usr/local/include/libxml2"
make
make install
Posted in General | Tagged | Comments Off on Compiling Emacs with eww on OS X

Comments

The spammers are hammering on the Irreal site again trying to post spam in the comments. They aren’t getting through but they are consuming resources to the point that my hosting provider is complaining.

Therefore, rather than risk having the site suspended or closed down entirely, I’m going to try turning off comments for a while to see if that helps. I’m really sorry about doing this because I enjoy interacting with and learning from Irreal readers but this is better than not having an Irreal site at all.

If you need to get in touch with me, just mail me at my posting name at the domain name of this site. Again, sorry for the inconvenience.

Posted in Administrivia | Tagged | Comments Off on Comments

Installing Yosemite

Just in case any Apple users out there haven’t already installed the new OS X, Yosemite, beware of an anomaly in the installation process. Apparently, the installation moves /usr/local out of the way during installation and when everything is installed, it moves the contents back file by file.

This happens right at the end. Everyone I’ve talked to says it happens when the installation says it has 2 minutes remaining. If you’re installing on a new machine the whole thing goes pretty quickly. On a machine that’s already seen some use it can take longer. I imagine that would be particularly true for development machines.

In my case, I started the installation of my iMac, aineko, in the early morning and it hadn’t completed when I went to bed. I almost restarted everything but DuckDuckGo advised me to wait. Happily, I did that and in the morning it was ready to go. I don’t know how long it took but it was easily over 12 hours.

So the takeaway is that you should just wait if the Yosemite installation appears to hang.

Posted in General | Tagged | Comments Off on Installing Yosemite

Dying Languages

What do you think of this article by Jeff Cogswell? The article posits that 5 popular languages are dying and will shortly cease to be used in any significant way. The languages are

  • Perl
  • Ruby
  • Visual Basic.Net
  • Adobe Flash/Air/Action Script
  • Delphi Object Pascal

Some of those are pretty non-controversial. Most everyone agrees that Flash, and Object Pascal are dying or dead. One could make an arguable case that Visual Basic has also run its course.

But what about Perl and Ruby? I haven’t written in Perl for ages but lots of people I know consider it their go to language and claim it’s much preferable to, say, Python. I’d be hard put to say it’s dying but Gogswell makes a pretty persuasive case that its time has come and gone.

That leaves Ruby. I’ve never used Ruby so I can’t comment intelligently about it but lots of people I respect are devotees. To me, this is the most dubious candidate to be dying.

What do you think? If you use or have used any of these languages, leave a comment with your wisdom.

Posted in Programming | Tagged | 3 Comments

Here’s a Nickel Kid…

I recently found a reference to one of my all time favorite Dilbert cartoons. It’s almost 20 years old and still makes me laugh. I’m linking to rather than embedding the cartoon to avoid copyright problems.

Posted in General | Tagged | Leave a comment

let with Lexical and Dynamic Scope

Artur Malabarba points to this excellent Stack Exchange entry on the speed of let with lexical versus dynamic scope. Malabarba asks why let is faster with lexical scope than it is with dynamic scope. lunaryorn provides an excellent and detailed answer that shows the generated byte code for both cases.

The TL;DR is that using dynamic scope means that the let variables have to be looked up in the global scope, set, and then reset after use, while using lexical scope just makes the variables local and avoids all lookup and setting/resetting. That may sound a little opaque but lunaryord’s answer explains things in a very understandable way.

Generally, I don’t worry too much about speed in the Elisp I write because it’s mostly just simple functions that run quickly no matter how ham handed my coding is. If you write functions that have “long” running times, it’s worthwhile to take the lessons in lunaryord’s answer into account. It is, in any event interesting and worth knowing for the day you need it.

Posted in Programming | Tagged , | Leave a comment

A Movement I Can Get Behind

A great idea from Christopher Moore. I hate it when Web sites do this. Even more if there’s sound.

Posted in General | Tagged | Leave a comment

Lots of New

Here at the International Irreal Headquarters there are lots of new things to explore and play with. First, there is OS X Yosemite, the new Apple OS. I’ve been playing with it for a few days and like it so far. It did take a little grief for its overly-flat UI but that doesn’t bother me. I haven’t really explored the new things yet so perhaps I’ll comment on those later.

Second, Emacs 24.4! At long last. Again, I’ve mostly just got things compiled and set up so any comments on its features will have to wait. In the meantime, you’ve got Artur Malabarba, Mickey Petersen, and the many posts of Bozhidar Batsov to help you explore Emacs 24.4 if you haven’t already read them.

Along with the new Emacs, Bastien Guerry has pushed out a point release, 8.2.10, of Org mode. Org mode just keeps getting better and better and Bastien has done a great job in driving its development.

Finally, the best new thing of all

FullSizeRender 2.jpg

My old MacBook Pro is still in great shape and is a real work horse but it’s over 7 years old now. The main problems are that the 120G disk is pretty much full making it hard to deal with updates and difficult to store much more data on it. Since it has only 2G of RAM, it tends to get very slow when I have more than, say, Emacs and Safari open. My new machine (Manfred II for now) is a 13 inch MacBook Pro with 16G of memory and a 512 GB SST. I can’t tell you how fast this thing feels. It’s also a bit lighter than my 15 inch MacBook Pro. I considered getting the 15 inch model—mainly to get four cores—but it was heavier and, really, I don’t do enough CPU bound computing to make that an issue.

So all in all, Christmas has come early to Irreal.

Posted in General | Tagged , | 8 Comments

Happy Anniversary to Mickey

It’s Mastering Emacs’ fourth anniversary and Mickey has refreshed the site. Drop in and take a look if you haven’t been there lately.

Posted in General | Tagged | Leave a comment