Genes Best Removed from the Pool

Yikes! Who would do this? No Irreal readers, I’m certain. Worse, all these instructions appear to be aimed at developers who should surely know better. I especially like the ones with sudo. Really, if you enter one of those commands into your terminal, don’t be surprised to find your genes excised from the pool.

And what’s up with companies recommending this nonsense? I can promise you that the first time I got that from a company I deal with, it would be the last time I dealt with them. It’s a sure indication that the company knows nothing about security and doesn’t care to learn. It’s also an indication that they don’t really care about their customers because if they did, they wouldn’t be training them to compromise their systems.

Posted in General | Tagged | Leave a comment

Dowsing

Wilfred Hughes makes an acute observation:

Sometimes, it does seem like that.

Posted in General | Tagged | Leave a comment

Comments

I’ve moved my comments to Disqus in the hope that that will be an effective way of keeping the spammers from using up resources and annoying my hosting provider. I’ve turned comments back on and we’ll see how things go. I hope this will settle the issue but if it doesn’t, I may have to turn them off again.

In the mean time, let me hear from you.

Posted in Administrivia | Tagged | Leave a comment

Welcome to the Dark Side. We Have Macros

Jason Lewis over at Practical Elegance has an entertaining duo of posts on moving to Emacs. Like me, he was a long-time Vim user and when he moved to Emacs, he went all the way and didn’t use evil-mode. As he puts it, “Emacs is a deep, deep rabbit hole. The only way in is head first.”

Also like me, his motivation for taking up Emacs was Lisp. His particular Lisp is Clojure. After he discovered that other editors weren’t up to the task of dealing with Lisps effectively, he moved to Emacs and cider. That’s like slime but for Clojure.

In the second post he recounts discovering, as many of us have, that Emacs can seem much like an operating system. He began moving more and more of his workflow into Emacs. It’s a interesting set of posts and worth reading if you like to see how others came to and use Emacs.

Posted in General | Tagged | Comments Off on Welcome to the Dark Side. We Have Macros

Why Lambda?

Thankful Monster explains something I didn’t know. Very interesting.

Posted in Programming | Tagged , , , | Comments Off on Why Lambda?

New Stuff in Emacs 24.4

Xah Lee has a nice post on some of the smaller additions to Emacs 24.4. Unless you like reading through NEWS files, this is a quick and easy way to find some nifty new features.

I found a couple of things that significantly reduced my workload in working with the Irreal .htaccess file. I have a script that pulls down the connection log from the hosting provider and calculates how many times each IP has tried to post a comment. Any IP that tried more than 20 times a day gets added to the deny list in the .htaccess file.

Two operations in this process are made considerably easier with the new features in Emacs 24.4. Part of the pipeline that generates the report that gets mailed to me each day, calls uniq -c which generates lines like

132 192.168.1.1

where the 132 is the number of times the IP tried to post a comment. The first thing I need to do is cut the counts from the file so that only the IPs remain. With Emacs 24.4, we have rectangle-mark-mode, which is bound to 【Ctrl+x Space】 for easy use. With it, it’s easy to mark the counts and delete them.

The next thing I do is append the new IPs to the end of the .htaccess file and then use a keyboard macro to add a “Deny from” to the beginning of each IP. For technical reasons the calculations are based on the log from two days ago so the new IPs can already be in the list and I needed to remove duplicates. I handled this by sorting the list and then piping it to uniq with 【Ctrl+u Meta+|】. That worked well but with Emacs 24.4 I can simply call delete-duplicate-lines without bothering with the sorting or using an external process.

Take a look at Lee’s post. Like me, you’re apt to find something to makes your life a little bit easier.

Posted in General | Tagged | Comments Off on New Stuff in Emacs 24.4

EWW

Gabriel Chavez notes that EWW has, in a sense, completed Emacs:

Not everyone, though, is impressed:

Posted in General | Tagged | Comments Off on EWW

A Wish List for Emacs 25

Artur Malabarba has a nuanced list of things he’d like to see in Emacs 25. While most of us are still getting used to Emacs 24.4, Malabarba has thought carefully about what Emacs needs to move forward.

I’m sure most of us will be on board with his suggestions. He wants name spaces, concurrency, dynamic library loading, a better customization interface, and an enhanced package menu. He explains why each of these things is critical for Emacs and why they will help Emacs move ahead.

As his fans know, Malabarba mostly writes short posts that illustrate some point of Emacs arcana or provides a bit of Elisp to performs a useful function. This post is longer than normal and has a slightly different focus but it’s well worth taking a look at. As I said, I’m sure you’ll be in agreement with most if not all of his points.

Posted in General | Tagged | Comments Off on A Wish List for Emacs 25

The Two Programmer States

I know the feeling.

Posted in Programming | Tagged | Comments Off on The Two Programmer States

Keyboard Macros Video

I’ve written before about the excellent videos that Emacs NYC produces from their monthly meetings where one of the members gives a talk on some aspect of Emacs. This month, Jacob O’Donnell gives a nice talk on keyboard macros. It’s easiest to view it on YouTube.

As O’Donnell says, there’s not a lot to know about keyboard macros but there are some lessor known corners that can be very useful, such as editing, saving, or naming them. This talk is an excellent introduction that will tell you everything you will probably ever need to know.

Here at Irreal, we sometimes run EmacsGolf challenges and very often the best solutions make use of a keyboard macro. Tim Visher also used them in several of his EmacsGolf videos and I often use them for some repetitive one-off editing job that it’s not worth writing Elisp for. Keyboard macros should be in every Emacser’s toolkit. Usually all you need to remember are the【F3】 and【F4】 keys. For more complex tasks, help is just a【Ctrl+h i】away. I have the keyboard macro Info documentation bookmarked for easy access.

Posted in General | Tagged | Comments Off on Keyboard Macros Video