Archives

Creative Commons License
This blog is licensed under a Creative Commons License.

October 2007 Archives

A regular expression IDE for Emacs

| 19 Comments | No TrackBacks

I’ve started work on a new mode for Emacs, which intends to be something like an “IDE” for regular expressions. There are similar tools out there, such as [Reggy][] for OS X and [The Regex Coach][] for Windows. But the former doesn’t show me subgroup matches, and the latter won’t run on OS X. Which made me wonder, wouldn’t this be easy to do in Emacs? Three hours later says yes.

Script of the week: sizes

| 1 Comment | No TrackBacks

For the next few months, I will have a “script of the week” each week: just some tiny little scripts I’ve developed over the years that I happen to find particularly useful.

Today’s is a shell script called sizes. It’s a fairly simplistic interface to the du commands which just shows you all files and directories in the current directory that are larger than one megabyte.

The groovy thing about Groovy

| No TrackBacks

One of my favorite languages this year is Groovy, a scripting language for the Java VM. It has a nice, clean syntax, in combination with some very powerful ideas, like it’s brand of closures. It can be close enough to Java as to be nearly indistinguishable – which is good, if you’re selling it to Java programmers; and close enough to Python that it seems like a first cousin.

Life and times of a TCP packet

| No TrackBacks

Have you ever wondered how data reaches your computer from all over the world as you browse the Internet? You may have heard of TCP/IP, but what exactly is it doing to reach that single Web server over in France, all the way from the United States? How does that information reach you?

This article examines how a single connection works, from my computer on the island of Grenada to another computer sitting in southern France – in this case, the website of my favorite soap company, [Marius Fabre][].

Get Lisp running on OS X (easy version!)

| 12 Comments | No TrackBacks

A few days ago I posted instructions for getting a freeware based Common Lisp installation running on your Mac. I have since discovered a better alternative: just install LispWorks Personal Edition, a free environment with a superb set of debugging and profiling tools. Note that it does have the restriction that it will only run for five hours at a time. Once you hit the four hour mark, it gives you a warning, after which you should shutdown and restart the environment. But really, if you’re Lisping for more than four hours every day, that’s great news.

The other option is Lisp in a Box, which offers a completely self-contained freeware Lisp environment that’s ready to download and run on your Mac.

Since the Lisp in a Box site has gotten a little stale with regard to OS X, I’ve created a new package based on Aquamacs, which I call Ready Lisp. The advantage to this package is that it downloads as a single Application bundle. You just drag-and-drop it into your /Applications directory, double-click and go! You’ll have all of the following tools immediately at your disposal:

  • Aquamacs 1.2a
  • SBCL 1.0.10
  • SLIME (CVS version 2007-09-27)

But the nicest part for those new to Emacs and Lisp is that everything is pre-configured and setup for you. Once you double-click the packaged application, you will find yourself at a REPL where you can start right away:

CL-USER> (format nil "Hello, world!")
"Hello, world!"
CL-USER>

The disk image is 44 Mb and can be downloaded from my Lisp repository over FTP. Also, please note that this package is for Intel Macs only. If you need an easy Lisp to run on the PowerPC architecture, I suggested you visit the Lisp in a Box site and download one of their packages based on OpenMCL.

Happy Lisping!

Common Lisp docs for DEVONthink

| No TrackBacks

NOTE: I have removed the pre-built tarball of these links form my Lisp repository due to possible copyright concerns. I recommend that if you want to collect these documents into one place (for searching in programs like DEVONthink), that you use the tools available in such programs to download these resources from the Web:

Common Lisp on Mac OS X

| 7 Comments | No TrackBacks

You could be having fun with Common Lisp on your Mac right now; you know that, don’t you? ;)

Lately I have been having a ball doing Common Lisp programming on my MacBook Pro. But as with all great starts, this was not without its pitfalls. After many frustrating hours, and questions asked on the #lisp IRC channel, I’ve come to realize that perhaps others may benefit from treading a path already trodden.

Serving up Mercurial using mod_python

| 5 Comments | No TrackBacks

The following information resulted from several hours of battling with SELinux and Apache, attempting to find some way of serving up my Mercurial repository (now at http://hg.newartisans.com) over HTTP. In short, I found that cgi-bin would not work at all with SELinux, for reasons I couldn’t figure out (it didn’t generate any AVC messages once I extended Apache’s permissions – it just wouldn’t serve any data).

But getting mod_python to work turned out to be no picnic either. The data is out there, on the Web, but nothing from any one place worked for me. So after much effort, here’s what I discovered, boiled down into nice easy chunks for the tired reader.

Install BootCamp with multiple partitions

| 8 Comments | No TrackBacks

Just as a note to others who were dismayed by the inability to have multiple partitions and to use BootCamp at the same time, here are instructions for how to do so. I gathered these from various sources, and it worked great for me, so hopefully you’ll have success with it too.

Using Archiveopteryx on the Mac

| No TrackBacks

The following instructions are for a Mac running OS X 10.4. Your mileage may vary. It’s not much different for running on Linux, which I’ve done too.

Applescript and UTF-8 arguments

| 2 Comments | No TrackBacks

The following tip is based on a hint by mzs found on MacOSXHints.com. And note: this article relates only to Tiger. This issue has been resolved in OS X Leopard and Applescript 2.0.

Although the Mac has been a great environment for working with UTF-8 text (8-bit Unicode), I’ve found a few corners where it’s rather difficult to preserve the encoding of my text. One of these is passing UTF-8 arguments to Applescripts on the command-line, using the osascript utility.

About this Archive

This page is an archive of entries from October 2007 listed from newest to oldest.

September 2007 is the previous archive.

November 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

  • Curt Sampson: That there’s “no state” in Haskell is quite wrong; in read more
  • rv: Hi. I wanted to drop you a quick note to read more
  • John Wiegley: It’s here: http://ftp.newartisans.com/pub/python/modpython_gateway.py read more
  • Leon: The file “modpython_gateway.py” Is no longer available in the downloads read more
  • Kathy: Well, the article is really the sweetest on this laudable read more
  • mr.design: Hi John, I just started to read your GFTBU, it’s read more
  • yoman: “Barfin”? “Slurping”? “Slime” “Hunchentoot” ??? What in the T.F. world read more
  • John Wiegley: Something like this is slated for the next release of read more
  • womens health: According to me, Apple has implemented something called blocks, which read more
  • Bjorn Tipling: Why would you add instructions for installing an editor when read more
OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.261