annoyances

You are browsing the archives of annoyances.

Sublime Text + Samba + GHC problem

If you’re using Sublime Text on Windows to edit files on a network drive powered by Samba, and then run a Haskell program on the system running Samba (not the machine running Sublime Text), you might see:

openBinaryFile: resource exhausted (Resource temporarily unavailable)

or

openFile: resource exhausted (Resource temporarily unavailable)

This problem is caused by Samba grabbing oplocks (opportunistic locks) on the files being edited. Sublime Text makes system calls that result in the oplocks being grabbed, while most other editors (including Wordpad) do not. You can work around the problem by adding oplocks = no in the configuration for your share in smb.conf. Using Samba has some reading on oplocks.

A language quirk

Let’s say you’re writing some documentation, and need to point people to a comment on a web page. Keep in mind that more comments may be added at any time. If you need to point people to the second (or third, or fourth, etc) comment, you have an easy time; you just say:

“See the second comment on <X>”

But if you need to point to the first comment, and at this time there is only one comment, you need to sound like a pedant:

“See the first (and possibly only) comment on <X>”

In English, “the second object” does not imply that more objects exist, but “the first object” does imply that more than one exists. Why would you have written “first” if there’s only one? If you wrote just “see the first comment”, and the reader saw only one comment on the page, they might wonder if a comment has been deleted, or if they’re even in the right place. If you wrote “see the only comment”, and soon another comment appeared, you would cause similar confusion.

I don’t expect this to catch on, but with a new word we can express doubts about the existence of more than one object:

“See the firsteth comment on <X>”.

If anyone out there is designing a human language, please make it easier to express things about changing environments.