Author Archives: Alan

Reviving your old PC with Linux, Part VI: Building your own lightweight remix

In the previous article of this series, I covered a variety of “remix” distributions of Linux aimed at older computers, and posed the question “why not build our own”? In this article, we’ll look at doing exactly that.

Our goal will be to set up a basic desktop system, using only the necessary components, such that it will run reasonably well on a roughly ten-year-old computer.

(more…)

When you mention Emacs on the Internet

When you mention Emacs on the Internet – be it on a blog, forum, mailing list, IRC channel, reddit thread, or tweet – certain responses must inevitably follow.

You were just sharing a bit of news, or asking a question about a feature, or plugging your new webkit-buffers.el library that allows Emacs to really browse the web (somebody write this, please?); but it doesn’t matter. The same responses must always follow:

  • Someone must say “Emacs is a great OS. It just needs a good text editor.”
  • Someone must post a link to the XKCD comic about Emacs. You know, the “M-x butterflies” one. No, I’m not giving you a link to it.
  • Some obviously lost and confused person who has been raised on Visual Studio / Eclipse / XCode or some other bloated IDE wonders incredulously that people still use “those old text editors” for serious development.

And then, of course, the Vi(m) users descend. I don’t know why. I have never, as an Emacs user/fan, butted into a discussion of Vi(m) stuff with my sanctified opinions about it, but like turkey vultures to a possum carcass, Vi(m) fanboys descend on every mention of Emacs with predictable regularity. Their comments vary:

  • Some post lengthy walls of text about how they once tried Emacs and it gave them boils which were only cured by switching to Vim.
  • Some just say pointless junk like “Vim is better” or “Vim FTW!”
  • Some just type “Vim” or “Vi”. Nothing else, no explanation, just that. I don’t get this; it’s as if balance can only be achieved if every mention of Emacs is countered with a mention of Vim. Or maybe it’s some kind of insect-brained knee-jerk response: “I see word Emacs. Must type word ‘Vim'”

bb_emacs_vim.jpg

If anyone takes the bait (and someone usually does), flame wars ensue that span the gamut from Richard Stallman’s personal hygiene issues to RSI horror stories to “the year of the Linux desktop”.

Then some clever person comes along and posts a link to that rant about “ed”, at which point the thread is locked, comments are disabled, or everyone just agrees they’ve got better things to do.

LIFTS: the Large Internet File Transfer System

Some time back, I wrote a little utility at work using CherryPy called EasyLIFT. The idea was to reduce the number of large files that were being sent as email attachments without having to resort to the tedium of setting up FTP accounts or a big complex CMS system.

EasyLIFT allowed users to login through their LDAP credentials, upload a file to a public-facing web server, and dispatch an email with the download location to recipients. The interface was minimal and quick to use, and was a real success at work.

Recently, I was looking for an open source project to keep my coding skills sharp, so I decided to do a clean re-implementation of the EasyLIFT idea using Flask instead of CherryPy. I dubbed the project LIFTS for “Large Internet File Transfer System”. No, we aren’t transferring “Large Internet Files”, or transferring Files over the “Large Internet”, but ILFTS is kind of goofy and not memorable, so there you have it.

The project is fairly young and not fully functional yet, but if you’re interested in pitching in or just checking it out, head on over to github and grab it from the repo: https://github.com/alandmoore/lifts.

More news to come, hopefully!

Python Code completion in Emacs — at last!

I’ve been coding Python in Emacs for years now, and for the most part it’s been a satisfactory experience. After experimenting with various python modes and utilities, I’ve had a pretty good environment that marries Emacs editing to syntax highlighting, real-time error highlighting, the ipython shell, linting tools like pylint and pep8, and various other goodies. But the one hole, the one sore spot in the whole works, was code completion. Something even idle can do out-of-the-box was simply beyond my ability to get functional in Emacs.

I’d tried just about every solution the internet could offer: PyMacs, company-mode, anything-mode, ipython completion, standard autocomplete-mode. Everything I tried either gave unacceptable results (like autocomplete-mode, which just scans the current buffer for completion information), or just flat-out didn’t work no matter how many tutorials I followed.

Here lately I’ve been trying to work a lot more on my Pythoning, so I decided to see if the state of the art has caught up with this need. Echo base, I’ve found it. Repeat: I’ve found it.

(more…)

Tkinter: not dead yet!

If you follow my posts or projects much, you know that, when it comes to GUI toolkits for Python, I’m a confirmed PyQT guy. QT is arguably the most advanced, polished, complete, and powerful GUI toolkit do-everything programming library out there, and a treat to use. But sometimes it’s overkill, and when I have to put together something quick for certain legacy OS that lack decent package management, having to load in Python and extra libraries just to get a couple text fields and a button doesn’t make sense1.

Wouldn’t it be great if there was a really simple, easy to use, lightweight graphics toolkit built right in to the standard Python libraries, so you could pop together those little one-window GUIs without loading in extra stuff? Well, hey, what’s this dusty thing over here in the corner? It looks like… Tkinter!?!??

(more…)

Better window splitting in Emacs

Emacs’ window-splitting functionality is an ergonomic way to view multiple files at once without having to deal with shuffling around floating windows or clicking between tabs. Anyone who does much with Emacs probably knows already that they can use C-x 2 or C-x 3 to split the window vertically or horizontally.

What always bothered me about this feature was that the newly-created window defaulted to the current buffer, which in layspeak means you had the same file or content open in both your new window and the old. The was almost (but not quite) never the behavior I wanted, since usually you split the window to have multiple buffers on screen at once. Typically, I would do this right after opening a new file or buffer to compare with whatever I already had open, so that I would have the old buffer in one window and the new buffer in another.

This is where having an extensible editor rocks; because in Emacs, if you get tired enough of a behavior, you start hacking elisp and fix it…

(more…)

WCGBrowser update: http_proxy and more

For users of WCGBrowser…

In the last few days I’ve added a few features:

  • Firstly, proxy server settings. Several people requested this, though none wanted to sponsor development (I only asked $100 US). Turns out I needed it for something I was doing myself, so happy birthday everyone, you get this for free. Proxy settings can be set from the CLI, config file, or environment variables (common on many Linuxes).
  • Secondly, stylesheets. Not that there’s much to style on WCGBrowser (the navigation bar, mostly), but you can now do it with QSS style sheets. A (really tasteless) example stylesheet is included.

Latest code can of course be downloaded from the wcgbrowser github page, or just do a “git pull” if you cloned it from there in the first place.

Enjoy! 😀

Porteus

As I’ve chronicled in “Replacing Windows 98…” and previous posts, I’m always interested in new tools that promise to imbue my mountain of mouldering beige boxen with a glorious desktop experience usable by the modern user. A commenter on that post suggested trying out Porteus, so I’ve been playing with it some this evening. While I haven’t time to work up a serious review, I thought I’d share my impressions of Porteus as a distro for rescuing older computers.

(more…)

Building a Linux system for a Child, part 4: a wishlist

The previous articles in this series helped you set up a Linux-based system for a child, and explored some of the great educational and kid-friendly software available. I’ve based this on almost eight years of experience in setting up GNU/Linux on computers for my own kids, and for their friends. So, based on that experience, what things do I wish the Free software community could come up with to make Linux a better experience for kids (and their parents!)?

(more…)

Five reasons why I choose PostgreSQL

I’ve worked with most of the major SQL databases over the last several years, including Oracle, MS SQLserver, MySQL, and PostgreSQL, both as an admin and (more often) as a developer. They’ve all got their ups and downs (some more of one than the other…), but when it comes to choosing a database for my own projects, my choice these days is nearly always PostgreSQL. This amazing, powerful server is unfortunately one of the hidden gems of the relational database world, so I thought I’d share a few reasons why it’s my personal favorite.

(more…)

« Previous PageNext Page »