Spam: There’s A Lot Of That Going Around

Last week I wrote about a spike in forum spam that Irreal is seeing (1, 2). Of course, Irreal is a small site and even on our worst days we see at most 10–15 spam comments.

Charlie Stross, a noted SF author and proprietor of Charlie’s Diary, knows what a real spam problem looks like. After getting over 55,000 spams in the last two weeks, he’s restricted comments to the newest 5 posts and turned off commenting altogether for a period of time hoping that the spam bots will forget about him.

I don’t know why we’re seeing this sudden increase or even if it’s affecting more than a handful of sites. If you have a blog and have noticed an increase too, leave a comment.

Posted in General | Tagged | Leave a comment

Linking To Receipts

I’ve written before about how I use Emacs and Org mode to track expenses for tax purposes. At the heart of the system are Org tables for various categories of expenses. Last month, I wrote about how a small piece of Elisp code made it easier to enter data in the Org tables.

Now that I’ve completed this year’s tax chores I spent some time thinking about how I could streamline things for next year and get rid of saving the reams of paper receipts that are an inevitable part of filing tax returns in the United States. My main resolution for this year is scan those receipts and then shred them.

Here’s an example of a typical table. This one tracks deductible professional expenses. My old procedure was to write a number on each receipt and then record that number in the Receipt # column as you see here.

| Item                     | Type         | Amount | Receipt # |
|--------------------------+--------------+--------+-----------|
| Widget                   | Hardware     | 315.50 | 1         |
| Use and Abuse of Widgets | Book         |  29.99 | 2         |
| Widget Library           | Software     | 100.00 | 3         |
| ACM Membership           | Professional | 198.00 | 4         |
|--------------------------+--------------+--------+-----------|
| Total                    |              | 643.49 |           |
#+TBLFM: @6$3=vsum(@I..@II);%.2f

My new procedure is to scan those receipts, save them in the receipts subdirectory under this year’s tax directory, and place a link to each receipt in the Receipt column like this

| Item                     | Type         | Amount | Receipt |
|--------------------------+--------------+--------+---------|
| Widget                   | Hardware     | 315.50 | receipt |
| Use and Abuse of Widgets | Book         |  29.99 | receipt |
| Widget Library           | Software     | 100.00 | receipt |
| ACM Membership           | Professional | 198.00 | receipt |
|--------------------------+--------------+--------+---------|
| Total                    |              | 643.49 |         |
#+TBLFM: @6$3=vsum(@I..@II);%.2f

The receipt link for the Widget in the first row looks like

[[file:~/tax/tax12/receipts/widget.pdf][receipt]]

Org mode makes it easy to enter such links but it quickly gets tiresome to enter the long path to the current receipts subdirectory. My first thought was to add a comment line like

# file:~/tax/tax12/receipts/

to the file so that I could quickly snarf and barf it into the link but then I realized that that was silly and that it was Elisp that was really called for.

So I wrote this little bit of Elisp and added it to my init.el file

(defconst current-tax-file "tax12")

(defun save-receipt-link (doc)
  "Make a link to a receipt in the current tax file."
  (interactive "sDocument Name: ")
  (insert (concat "[[file:~/tax/" current-tax-file "/receipts/" doc
                  "][receipt]]")))

Now when I tab into the Receipts column I just type 【Meta+xsave-receipt-link and then enter widget.pdf or whatever to create and save the link. I chose to label each link as receipt, rather than use the document name, to reduce clutter. If I need to know the name I can just hover over the link and Emacs/Org will tell me.

This is a really small change involving a tiny amount of Elisp, but it’s already making my life better. I hate doing bookkeeping chores and anything that makes it easier is a win for me.

Posted in Programming | Tagged , | 2 Comments

Virtual Dired

Today, I stumbled upon Kirubakaran Athmanathan’s post Efficiently Browsing Text or Code and learned a new Emacs trick. Athmanathan’s post is about leveraging the power of Emacs to efficiently find some text in a large group of files, choose the important files from the search, and then operate on those files in some manner.

One trick he used that is new to me is virtual-dired. Suppose you have a complicated script that generates a listing (ls -lR style) of files. If the script is named file-filter you can use 【Ctrl+u Meta+!file-filter to dump the listing into an Emacs buffer and then turn it into a dired buffer with 【Meta+xvirtual-dired. Now you have a custom dired buffer with all the power of dired at your disposal. Very nice.

Be sure to follow the link and read Athmanathan’s post for other ways of using Emacs to browse files.

Posted in General | Tagged | 1 Comment

Smells And Properties

Paul Graham has posted a provocative essay on the copyright wars. He starts by recalling a childhood tale in which the owner of a food shop grows annoyed when a poor student enjoys the delicious smell of his cooking food. He brings the student to court asking the judge to make him pay for the smells. He accuses the student of stealing his smells.

I recall a version of this story from my own childhood and I distinctly remember thinking that it was silly to believe you could charge for incidental smells like those coming from a kitchen. Everyone thinks it’s silly. But then Graham asks what if you lived on a moon base and had to buy the air you breathed. Would you still think it silly if the air provider offered to add a pleasing scent to the air for an extra charge?

All this is an introduction to a way of thinking about Intellectual Property in a way I hadn’t considered before. Graham says that something can be treated as property only if it works to so treat it. We don’t treat the cooking aromas as property because it wouldn’t work here even though it might on a moon base. His argument, of course, is that we are now entering a time when it no longer works to treat content (or at least all content) as property because we can’t do so without warping our society. Graham notes as evidence of this the mass random lawsuits against file downloaders as a sort of “exemplary punishment” and attempting to pass laws that would break the Internet.

Today, I read that the UK has caved to US pressure and agreed to extradite a 23 year old student for copyright infringement. His crime? He ran a link site with no infringing content of its own from the UK. If this doesn’t speak of a broken definition of property, I can’t think what would.

Graham has lots more to say than this quick summary so be sure to follow the link and read his essay. All his essays are good but this one is particularly interesting.

Posted in General | Leave a comment

Common Lisp, Scheme, Clojure, And Elisp Compared

A month ago we had a lively discussion here at Irreal on the question of whether or not Elisp sucks. As with most questions of this sort, there were champions of both positions: some felt that Elisp is a distinctly inferior Lisp and others felt that Elisp along with Emacs is better than the other Lisps and able to solve problems that the others could not easily deal with.

Doubtless these battles will continue to rage for as long as there are programmers but now Hyperpolyglot offers a very nice comparison of Common Lisp, Scheme, Clojure, and Elisp. By comparison I mean a table of operations and how each implements that operation, if at all.

One interesting take away for me was the extent to which Elisp mirrors Common Lisp’s operations. The table includes the functionality that we get from (require 'cl) so this isn’t too surprising but it does speak to another lively discussion that took place in the comments to Reversing An Emacs Lisp List In-Place: should Elisp automatically include the Common Lisp functionality?

If you’re not familiar with one or more of the Lisps compared in the chart, it’s a good place to get a feel for how they measure up to the ones you are familiar with. It can even serve as a cheat sheet if you use more than one of the Lisps and sometimes have trouble remembering which way to do some operation in the Lisp you’re using at the moment. It’s an interesting chart and fun to look if only for its entertainment value.

Posted in Programming | Tagged , , | 1 Comment

Spam Update

I’m seeing yet another spike in spam so I’ve reluctantly turned on moderation again. If NuCaptcha can plug the hole that appears to be allowing this spam I will, of course, turn it off again.

Interestingly, one mystery is solved. The second group of spammers that I wrote about yesterday—the ones who try to match appropriate comments to the post and then refer to Facebook pages—appear to have been a proof of concept. The Facebook links have been replaced by the usual links to commercial enterprises.

Posted in Administrivia | Tagged | Leave a comment

Spam Raises Its Head Again

After a period of virtually no forum spam I’m seeing a spike in the amount of spam. This may be because of the recent NuCaptcha break or it may be due to the spammers using a Mechanical Turk-like strategy of paying a small amount to have people to enter the codes by hand.

The spam falls into two groups. The first is just the normal junk consisting of little more than a link for Google to notice. They typically try to hide by getting added to older posts.

The second is more interesting. They try very hard to hide in plain sight by looking like legitimate comments. Comments are selected either by a keyword search or perhaps by the tags. The fit isn’t always perfect, of course. A post concerning Emacs, say, might get a comment that’s also about Emacs but about some other aspect completely. In some cases the comments are taken from Irreal (in at least one case, from the same post it appeared in) and others apparently from other blogs. The comments appear to be retyped—there are usually a lot of typos—rather than harvested programmatically.

Oddly, the spam in the second group, although clearly bogus, does not contain any links other than the poster’s Web URL, which always points to a nearly empty Facebook page for the commenter. These Facebook pages appear to be from Germany, the Netherlands, and other European countries. I can’t quite think what the point of it is. Has anyone else seen this? If so, do you have any idea what’s going on?

I’m going to ping NuCaptcha to see if they have a fix for the NuCaptcha break in the works. If not, I may have to turn on moderating again. I hate that and I’m sure you do too. If anyone has a good WordPress solution please leave a comment.

Posted in Administrivia | Tagged | Leave a comment

Quicklisp

After being inspired to finally start using ELPA to handle my Emacs packages, I decided to try out Zach Beane’s Quicklisp library manager for Common Lisp. Up until now, I’ve been using the manual method to get things into ASDF, a process that can be painful.

I haven’t had a lot of time to play around with it yet so this isn’t really a review but so far I’m pretty impressed. The first indication of quality was how easy the installation is. You just download the quicklisp.lisp file from the Quicklisp site and load it into whatever CL system you’re using. Quicklisp asks you to run (quicklisp-quicklisp:install) and it takes care of fetching the code and associated files, and building the necessary directories to hold everything. The process is reminiscent of the ELPA install: you just run a small piece of code and it does the rest.

If you think you might be interested in Quicklisp, Beane has a nice screencast that shows how it works and what it does. In the screencast he shows it working with SBCL, LispWorks, Clisp, and ECL. The installation and use are the same regardless of platform.

The nice thing about Quicklisp is that it makes it easy to load load libraries and keep them up to date. In the past, I sometimes hesitated to get a library because I knew it was going to be a lot of work. With Quicklisp, all I have to do is run (ql:quickload "some-library") and Quicklisp fetches the library and compiles it for me. It’s hard to see how it could be much easier.

Posted in Programming | Tagged | Leave a comment

ELPA

I’ve been meaning to install ELPA for a long time but never got around to it. Then Emacs 24 was on the horizon and I thought, “Why bother going through the pain of installing it when it will be included in Emacs 24 anyway?” Now, Xah Lee has shamed me into it by posting his Guide on the Emacs Package System.

It is astounding how easy the installation is. Simply cut a bit of Elisp from Lee’s page, paste it into an Emacs buffer, evaluate the buffer and you’re done. The Elisp that you paste retrieves the ELPA installer and executes it. The installer makes an elpa directory in ~/.emacs.d/, populates it with the necessary files including package.el, and adds some Elisp to your .emacs or init.el file to load the packages you install when Emacs starts.

Lee includes a section on what to do when you upgrade to Emacs 24. It mostly involves removing the ELPA code from your .emacs, deleting the ~/.emacs.d/elpa subdirectory, and reinstalling the packages you had loaded.

I did run into one problem. By default, ELPA uses the tromey.com/elpa package server but I wanted to use the more extensive Marmalade server. Lee has instructions on how to do that. You just add

(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))

to your .emacs or init.el file and execute it. Unfortunately, the package-archives variable doesn’t exist in the package.el that got downloaded. The Marmalade site (Lee has a link to it) points to a slightly never version that does have it so I just installed that instead. No problems so far and I saved the old version in case there are any.

One of the nice things about ELPA is that it stores everything in your ~/.emacs.d/elpa subdirectory so it’s easy to keep my machines in sync since ~/.emacs.d is under Git. All in all, a big win for me.

Posted in General | Tagged | 12 Comments

TSA: Worse Than You Thought

Jon Corbett over at TSA Out of Our Pants is making his displeasure with the TSA felt and in the process has become a real thorn in their side. After being denied access to his flight when he refused to either enter the scanner or submit to having his genitals groped, he filed suit in November 2010. That suit is now headed for the supreme court: Corbett will shortly file a petition for a writ of certiorari.

Most Irreal readers are aware of the issues involved here and know that what the TSA provides is not security but security theater. I’m sure, therefore, that most of those readers will, like me, consider Corbett a hero.

Now Corbett has outdone himself. On March 6 he posted a video of himself taking a metal object through the scanners (at two different airports) without being detected. The video explains how he did it and why anyone could do the same. That, he claims, renders the billion dollars spent on the scanners wasted. The TSA was to quick to respond in a blog post at tsa.gov. The response was, to say the least, underwhelming. While they did everything they could to disparage Corbett (including refusing to refer to him by name) they didn’t actually dispute his claims. The comments to the post are hilarious in their evisceration of the response.

Now Corbett is reporting that the TSA is threatening the mainstream media not to cover the story. A South Florida reporter told Corbett that the TSA “strongly cautioned” him not to cover the story. As I wrote in my last post on the TSA they have a unique ability to combine heavy-handedness with incompetence. This latest event serves as yet another example.

Corbett is taking donations to help fund his appeal to the Supreme Court. If you can afford a few dollars stop by his site and contribute. The rest of the country will be grateful.

Update: Ken over at Popehat follows up on the cautioning of the reporter(s). BoingBoing also covers the story and has some entertaining comments.

Posted in General | Tagged | Leave a comment