Editor Sizes

A few months ago I was starting to get irked at the relatively poor performance of Emacs on my primary development system. Emacs isn’t terrible, but it is noticeably slow compared to Vim. So, for the sake of curiosity I decided to look at some executable sizes. I started by just doing a simple:

ls -alh `which <editor>`

But that only captures the size of the executable on disk without regard for any shared libraries or dynamic memory allocations.

I can’t recall where, but I found a comment on some forum that suggests the following:

ps -Ao rsz,vsz,cmd | grep <editor>

This works well. rsz and vsz are Resident Size and Virtual Size, respectively. cmd gives the name of the executable. Output looks like this:

$ ps -Ao rsz,vsz,cmd | grep [s]t
8896  65592 /usr/local/bin/st

The resident size is how much memory is actually in use by the application and the virtual size is how much memory the application has requested. There’s usually a rather large delta there, and it’s kind of interesting to see. In both cases the size is given in bytes, so divide by 1024 to get Kibibytes and by 1048576 to get Mebibytes. (Kilobytes and Megabytes in common terminology.) I did an audit of various text editors running in terminal or gui mode and captured their resident memory sizes which I’m sharing below. Pay attention to the suffix because there are many orders of magnitude differences between the smallest and largest programs!

In no particular order:

Editor Name Resident Memory Size GUI or TUI Additional Information
emacs 57.99 MB GUI No local settings files
emacs 22.43 MB TUI With local settings files
emacs 12.77 MB TUI No local settings files
nano 1.77 MB TUI
uemacs/pk 916 KB TUI
jed 1.6 MB TUI
gvim 25.8 MB GUI
vim 25.8 MB TUI
atom 266 MB GUI
nice 1 MB TUI
micro 10.95 MB TUI
vis 3.88 MB TUI
TextAdept 25.58 MB GUI
TextAdept 6.58 MB TUI
jupp 3.37 MB TUI
mg 1.03 KB TUI Micro GNU/emacs, this is a portable version of the mg maintained by the OpenBSD team.

NOTE: TUI means Textual UI and you’ll often see “curses”, “cli”, “console” or “terminal” used to mean the same thing.

Don’t take these records as gospel; I’ve noticed differences on subsequent captures of various programs. Without a doubt each editor will perform differently depending on the specific file and how the editor represents said file in memory. Also, I generally don’t have a good understanding of Linux memory, so there are lots of ways these numbers could be non-representative. As a ballpark estimate, however, I suspect these numbers should suffice.

If you liked this, you might enjoy A Memory Comparison of Light Linux Desktops

Android Applications

I’ve been getting frustrated with my computing experiences lately. I won’t go into many details here, but my frustration has extended to my smartphone and has spurred me to investigate alternatives to many programs and services I’ve been using.

Provided for your benefit here is a list of several Android programs I’ve recently discovered. I’m not vouching for these yet, and may not even have much experience with them yet, but they are here and may serve you well.

Name Description On F-Droid?
Syncthing P2P File Syncing Yes
Ted Text Editor Yes
DAVdroid Caldav and Carddav client Yes
VLC Media Player Yes
Firefox Web Browser Yes
Anuto TD Game (Tower Defense) Yes
Document Viewer Views PDFs and other files Yes
Google Authenticator Two Factor Auth Yes
FreeOTP Two Factor Auth Yes
Hacker’s Keyboard Keyboard Yes
Wallabag Read-It Later/Pocket Alternative Yes
Antennapod Podcast Client Yes
Swiftnotes Notes Yes
Forecastie Weather Forecasting Yes
SkyTube Youtube Yes
Clip Stack Clipboard Manager Yes
OsmAnd Maps Yes
Torch Flashlight Yes
Focal Camera Yes
Vanilla Music Player Yes
Barcode Scanner Barcode Scanner Yes
Mathdroid Calculator Yes
Ghost Commander File Manager Yes
Gallery Photo Viewer Yes
Timer Clock, Stopwatch, Countdown Yes
Night Screen Screen Brightness/Coloration Yes
Bubble Comic Book Reader Yes
Android IMSI-Catcher Detector Yes
Yaairc IRC Yes
KeePassDroid Password Manager Yes
Termux Terminal Emulator Yes
aSQLiteManager SQLite DB Manager Yes
BubbleUPnP DLNA Client No
OWLR Foscam IP Camera Client No
Zarchiver Archive Expander No
Private Internet Access VPN No
Protonmail Email No
Signal Messaging No

HandmadeCon 2016 and Self Hosting

HandmadeCon 2016 is just around the corner!
I’m really excited to go!
The speaker lineup looks absolutely stellar this year.

Besides that, I’ve obviously been keeping myself busy for a few months here with nary an update. The most visible change to anyone who might read this blog is that I’ve completely revamped my hosting situation; both making great progress on my goal of being entirely self-hosted, and for serving up content via HTTPS to you.
The specific implementation by which I’ve accomplished this is pretty interesting and has been a great opportunity to learn. I have documented a large portion of what I’ve done and I hope to share that here.

Short and simple. Talk soon.


Have you ever heard of suckless1? I think I stumbled onto suckless sometime while reading K. Mandla2, though there’s a reasonable chance it might have happened before then. suckless immediately resonated with me because of their philosophy3. Their software also looks good, very accurately reflecting the idea of minimalism4; often requiring you to rethink how you typically interact with software to do what you want to do. Sometimes this process of re-evaluation is fruitful, sometimes maybe less so, but it’s always interesting to experience. They have their own Linux distribution, called stali5 which I really recommend reading about. I’ve found a couple of other distributions that are similar in various ways: CRUX6, Tiny Core Linux7 and Morpheus8. Morpheus in particular looks to be faithful to the suckless way. I think CRUX and Tiny Core Linux are both full GNU stacks, so they’re less interesting to me personally, but if I struggle to be productive with the more experimental stali and Morpheus, then I wouldn’t hesitate to give them a try.

There are multiple facets to minimalism. Morpheus and stali both adopt non-GNU tools like musl9, sbase10 and ubase11. (Though stali doesn’t officially adopt all of these yet.) I like the idea of this, because GNU tools are often huge, complicated pieces of software with all kinds of support, sometimes for legacy systems that are practically ancient. The idea is also novel to me. I had simply never considered using a runtime libc other than glibc before. Clang isn’t new, so the idea of using a non-GNU compiler isn’t quite as novel, but in practice it’s still not common. Have you ever thought about the organization of a Linux distribution? Prior to reading about stali, I hadn’t. Linux distributions ship with dynamic libraries in common locations and programs are built to dynamically load these libraries at runtime. This can cause some problems:

Armed with this new knowledge, I’m really curious to try building statically linked programs with a non-GCC compiler using something other than glibc. Tiny C Compiler (TCC)12 caught my eye, but I had issues doing what I wanted. I can’t recall exactly what I encountered. I also gave Clang a whirl13 but that similarly didn’t want to work for me. I did get something going with musl and GCC14, but that’s clearly just a piece of what I want.

Okay, sorry, minimalism. Another aspect here is system initialization. I guess there’s a conflict in the larger Linux community over systemd. I’ve never really been curious about init systems before and my only prior exposure was invoking systemctl or /etc/init.d/... or service [start|stop|restart] .... When I started exploring Manjaro Linux, I also saw two variants (regardless of the specific desktop environment being included): with systemd or with openrc. I had no idea what that meant at the time, so I didn’t learn anything from it. suckless link to information about systemd on their stali page and I learned a lot from that. I can’t say I actively dislike systemd because it’s in my Arch installation and it appears to be working well enough. However, I’m now curious about alternative init systems and especially in trying to pare things down to their simplest minimal subset. suckless have sinit and all the distributions I linked above use something other than systemd.

So all of these things are very interesting to me and I’ve been downloading images and trying to use alternative Linux systems for just the tiniest amount of time now. It’s a learning experience for sure. Both Morpheus and stali lack less, more and various other tools I’ve come to rely on. We’ll see how things continue.

2Motho ke motho ka botho
3Suckless Philosophy
4Lessism Over Minimalism
7Tiny Core Linux
12Tiny C Compiler
13How to compile C apps with musl and Clang
14GCC + musl

Bluetooth on Arch

Well, today I had a “fun” little diversion.
I started out by wanting to connect a game controller to my crappy little Dell Mini so I can start prototyping some games. Of course a controller isn’t required, but I like controllers and it seemed like a small little learning exercise.
If you know me and my experience with computers, then you’ll know that this didn’t go as planned. Also, why would I be writing about it if it did? :-)

I’m running a console-only installation of Arch Linux with systemd. That should give you context for the following, and if your environment is different then you’ll have to modify the appropriate commands accordingly. I’m also talking specifically about using a USB bluetooth adapter, though I just checked and apparently this little netbook has built-in bluetooth.

Before starting, let’s assess our current USB situation:


Take note of what’s showing. Now plug in the usb bluetooth adapter and check again:


Make sure the device shows up properly.

Now, I don’t have any bluetooth utilities installed by default, so I have to set that up:

sudo pacman -S bluez bluez-utils
modprobe btusb
grep btusb /proc/modules # Make sure the kernel module is loaded
systemctl start bluetooth
systemctl status bluetooth # Verify the bluetooth service is working

At this point I had a problem.
The primary issue is that trying to execute scan on from bluetoothctl would tell me that the bluetooth device wasn’t ready. I had a difficult time resolving it, and started resolving a secondary issue that may or may not have been related. I noticed in the systemctl status bluetooth call an error message regarding sap-server which lead me to some resources.1 By following a comment on that bug, I was able to resolve the problem.

sudo mkdir /etc/systemd/system/bluetooth.service.d
sudo $EDITOR /etc/systemd/system/bluetooth.service.d/customexec.conf
# Now in customexec.conf:
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
# Out of the file now:
systemctl stop bluetooth
systemctl start bluetooth
systemctl status bluetooth

Now that problem has been resolved. But I still can’t scan…
Thankfully the solution is extremely simple:

> power on # This is the problem!
> scan on


Well, the whole goal was to get a controller talking with my laptop which I opted to do via bluetooth and I got bluetooth working… however, I brought a PS3 controller to try with. Unfortunately, PS3 controllers use a proprietary protocol on top of bluetooth and can’t be paired with normally. See more info.2 I should have known this already, because you have to connect a PS3 controller via USB cable to a host PS3 system to get it to pair with that system. Well, luckily enough there is a utility you can download called sixpair that’s available in the AUR. Unfortunately, simply using sixpair on its own isn’t enough.

And thus, the end of my journey with connecting the PS3 controller to my laptop. At least for now.


1Arch Bluetooth Issue
2PS3 Controller Bluetooth Guide

Brief Update for 2016-05-11

I haven’t been too active here or on my daily coding project1. So what’s been going on?
Honestly, not too much. A lot of Dark Souls. I mean watching VaatiVidya2 and EpicNameBro3 while also playing through Dark Souls: Prepare to Die Edition4 and Dark Souls II: Scholar of the First Sin5. I love that series so much. I’m not very good at it and I don’t like everything that the games do or that the community is interested in; but overwhelmingly I am completely entranced by it.

Besides videogaming and family business, I’ve been doing a little bit of software tinkering. However, this tinkering is a lot less on the programming side of things and much moreso on the configuration and setup side of things. I’ll document these things more in the near future. Here’s a quick summary of what I’ve been playing with:

- Mumble Raspberry Pi Server
- SSD Nodes VPS for my domain name and to forward network traffic to my home servers
- X-less Arch installation on my Dell Mini 10 (ie., console-only)

And some things I’ll be playing with soon:

- Much more console-land exploration on Arch
- Sabotage and/or Tiny Core Linux exploration
- Linux From Scratch study
- More electronics (when I get my AliExpress shipments)
- More home servers
- Linux Kernel programming study
- Linix Framebuffer programming study
- Rust language study

And more family time, more workout time and more Dark Souls. :-) I plan to write on all of this stuff and I think having my new setup on the Dell Mini will help achieve this goal.


1BitBucket Daily Coding Practice
2VaatiVidya on Youtube
3EpicNameBro on Youtube
4Dark Souls: Prepare to Die Edition on Steam
5Dark Souls II: Scholar of the First Sin on Steam

I like KDE

So, it turns out I like KDE.

I use Ubuntu a lot. It’s installed on all of my computers and it’s the server OS I’ve used at work for the past five or so years. Typically I stick with Unity on the desktop. There are a few reasons why I opted to change: I like to try new things, I get bored, I haven’t used KDE in a while. It’s hard to say exactly. A few strong contenders: I was rather impressed with Kdbg recently and started using that in all my C projects. I’ve been using Manjaro, and on my more powerful machines I opted for the default distro which includes KDE. Rich Geldreich told me to use it.1

I had been using it for a few weeks and ran into similar issues with regards to multiple monitors and screen locking, so I opted back to Unity. Well, here I am switching right back to KDE and it is definitely a much more comfortable, possibly more intuitive UI.

So there you have it. I apparently like KDE.


1Rich Geldreich: A Shout-Out to QtCreator 2.8.x on Linux

Game Reviews, OSes and the 3DS

Today is a grab-bag of miscellaneous thoughts and updates that aren’t necessarily related to each other.

First off, I haven’t been keeping up with my daily programming practice, but it’s not for lack of will. As my last post may have illustrated 1; I’ve been dealing with computer problems. I’ve only recently managed to get a working installation of Windows on my machine, but I’ve run into problems with my GNU/Linux distro, so actual productivity work is put on hold until that’s resolved.

Game Reviews

I mentioned previously my desire to do “intentful game reviews.” 2 Clearly that has not gone anywhere. Part of the reason is a lack of desire to play the sorts of games I explicitly expressed interest in playing. Partially it’s a stronger focus on programming and non-gaming related activities as I also described. 3

The Witness is out now, and as far as I can tell, it is the epitome of the kind of game that I expressed a desire to spend time thinking about and reviewing. Part of all this hoopla with dual-booting Windows and Linux is so that I can actually play The Witness. (As well as Titanfall and The Witcher 3 among others.) So we’ll see. I’m hopefull I can get my machine into a nice state where these kinds of things can happen. :-)

Going forward, I don’t see myself expending a lot of effort on thinking about games. Chris Franklin does a better job than I can see myself doing 4 and I don’t want to put much effort into paying particular attention to experiences I’m not actually enjoying. So if I like a game, I’ll play it and enjoy it, and if it sticks with me, then I may deem it worth of comment on here. But don’t expect anything resembling a schedule or consistent practice.

Windows 7 vs. Any Modern GNU/Linux Distro

Just a quick thought on this that I don’t think deserves a full post of its own.
During my recent adventures in installing various OSes in various ways, the discrepancy between a freshly installed Linux system versus a freshly installed Windows 7 system hit me with full force.

This isn’t all that surprising, as Windows 7 was released in 2009 and here we are 7 years later. Nevertheless, I have a Windows 7 install disk and I have various GNU/Linux distros kicking around, so my actual experience here is directly affected.

Windows 7 by default gives you so very little. My desktop LAN interface doesn’t even work without installing several drivers for my motherboard. Once I have network access I have to go grab a video driver to get out of 800x600 resolution. In contrast, any modern Linux distro will install all necessary drivers by default so you’re at least in a basically functioning environment. There are caveats, sure, like a reasonable chance that your wifi card isn’t supported in an obvious way, or maybe you’re stuck with open source video drivers that don’t perform as well as the closed-source binary blobs. Even with these caveats, the base installation you’re left with is leaps and bounds above what a fresh Windows 7 installation will get you.

Windows 10 does seem to address this gap.


I’ve been dabbling in various Zelda games recently. I finished Wind Waker several weeks ago, and I’m well into Twilight Princess now. I was having fun with Twilight Princess, but the Wii controls finally got to me. The imprecision is absolutely killer. There’s no point playing a videogame if the input you’re providing is consistently getting misinterpreted. As much as I like aspects of Twilight Princess (and by extension; Skyward Sword), the Wii’s control system just destroys the overall experience. This distaste has led me to seek out other isntallments in the series that use “standard” controls. The most obvious method of doing this currently seems to be the 3DS.

So I borrowed a 3DS from Lucas. 5

So far I am really enjoying it. I’ve been playing Ocarina of Time. I play with the 3D setting on, but set to about 2/3rds of maximum depth. I don’t think Ocarina of Time is a perfect game by any means, but this is one of the better ways I’ve experienced Link to date. I really like the 3D effect, too; it makes it seem like there’s a little 3D physical toy acting according to my whim. That may get old, but I do think the 3D effect adds to the overall experience, however slightly.


1GrooveStomp: UEFI and Windows 10
2GrooveStomp: Inspired to Share Gaming Experiences
3GrooveStomp: Daily Coding
4Errant Signal
5Lucas Amorim

UEFI and Windows 10

My primary desktop environment is some variant of GNU/Linux. The only case where this hasn’t been true is when I was really into PC gaming and was operating off of Windows 7 for that purpose.

Recently I’ve been more interested in privacy. One nice thing you can do several modern GNU/Linux distributions is full disk encryption (FDE). I’ve been using this where possible for over two years now. Unfortunately, FDE requires the GNU/Linux distro to completely take over your HDD. For my purposes, I wanted to dual boot Windows and GNU/Linux and have each of them use FDE. There are many blog posts and articles that a quick internet search will reveal which give insight on how to accomplish this; however I saw no success whatsoever. The problem seems to be exacerbated by the switch to UEFI from BIOS. I’ve been able to install Windows 7 and Manjaro KDE side-by-side without encryption on UEFI, but literally every other combination I’ve tried has had some major failure where I’ve been unable to access one OS or the other. Right now it looks like the only solution I have is to have both OSes unencrypted and to modify Grub to chainload Windows. For now I’m choosing which OS to boot from the UEFI boot menu.

Choosing which OS to boot
UEFI is terrible.
It sounds like UEFI introduces a lot of nice technical upgrades over legacy BIOS mode, but every single time I’ve ever had to know that I’m dealing with UEFI it’s been because there’s a problem preventing me from doing what I want to do. The best thing I can say about legacy BIOS is that I didn’t know anything about BIOS and I didn’t care. I could do what I needed to do to dual-boot or replace my OS or whatever. UEFI completely breaks this capabability of the computer to simply work. Now I need to know what UEFI is and how UEFI works in order to try and configure my computer how I want. Even then it doesn’t usually work; and a cursory search seems to indicate that I’m not the only one who’s encountered these problems. To top it off, I’ve technically found a workable solution for what I want (though both my logical volumes are now unencrypted…) but I have to select which OS to boot from the UEFI boot menu. To do this I can’t use my regular keyboard (A Kinesis Advantage) so I need to have a secondary keyboard plugged in. This situation is full of so much fail and is so obviously worse than where things were before. Alas, such seems to be the way of things.

It’s pretty cool to shit on Windows these days. The web is cool, everybody does web development, and all web developers use a unixy environment. (Likely some variant of Mac, though there are a few of us GNU/Linux stalwarts kicking around.) Windows is pretty awesome, though. I’m not a die-hard Windows guy, so I’m not intimately familiar with how awesome Windows is (or, conversely, the extent to which it is awful), but there are a few obvious things:

Again, very high level as I’m not a Windows user so I don’t have an in-depth understanding of these things. These are just the obvious bits that I am aware of.

Installing Windows 10 is awful.
It is literally the most awful OS installation procedure I’ve ever gone through.
First of all, how do you get Windows 10? Buy a CD? Get a downloadable image? Nope! You need to buy a new computer with it already installed, or upgrade from an older OS. You literally cannot get an installable image of Windows 10 for an old computer.
Okay, sure. That’s terrible, but let’s go along with it.

I’ll just install Windows 7 here and then get the Windows 10 installer and update. No problem.. This doesn’t work! I’m serious, you can’t do that. First you have to install every single update that you can. In my case this was over 117 required updates taking up over 1GB of bandwidth. This is required before you can install Windows 10.
Okay, that is seriously bad, but let’s go along with it.

Okay, two updates simply fail over and over. I also can’t install all the updates at once for some reason, so I select a subset and install those in one go. I do about 30 at a time, and every single group requires a full restart.
This is really, really awful, but fine, whatever, we’re pretty used to that by now.

Now I can install Windows 10, right? Sure, let’s run the installer. Going… fine, screen, click through; okay, now I have to insert a product key. I don’t have a Windows 10 product key, so I use my Windows 7 product key, right? I literally have no idea and there’s no documentation on this that is anywhere obvious. Let’s try it.
Nope. Doesn’t work.
Okay, let’s search and see what we can find. Hmm. Looks like the Windows 7 product key should work fine. You actually need to update your entire OS first before you try to install Windows 10, and then you won’t be prompted for a product key because Windows knows your already activated Windows OS that you’re running and will register that with your motherboard so you’re automatically good to go.
Except that is clearly not happening. I am very clearly being asked for a product key despite being as up to date as I can be. Okay, whatever, let’s find some help. Oh, look, a Youtube video that says to just use this random product key to proceed. Okay, that works. Great. Now Windows 10 is installing. Awesome. It’s finished. Okay, now let’s just change the background because the default one is garish. Oh. Windows 10 isn’t activated. Hmm. Okay, activate it. Oh, I have to input a product key. Okay… Oh, Windows 10 doesn’t accept my Windows 7 product key.

So, I opened a support chat with Microsoft. A customer support agent used remote desktop to troubleshoot things. It looks like they mostly just enabled a bunch of services that I disabled when installing Windows 10 and that essentially allowed Windows 10 to update fully and activate my key. I’m sure I missed something there, but that’s certainly what it looked like.
Yes, it looked like during my Windows 10 install, configuring Windows 10 to not automatically share all my data with Microsoft broke the installation completely.
This entire process is so broken. How did any of this get okayed?

Well, it seems like I might be in a position now to finish configuring my desktop. It’s only taken three days so far. The first step will be trying to get a bootable image out of Windows 10 in case things get screwed up along the way to final configuration. Wish me luck.

An Update On Self-Hosting Progress

Well, it seems I’m making very slow progress towards my goal of self-hosting. The first issue I’ve run into is with officially support OSes. I like running Arch Linux, but Arch Linux is not officially supported by either OwnCloud or GitLab. GitLab is the more demanding of the two applications, requiring a minimum of 2GB of RAM and strongly recommending 2 cores. Unfortunately, I have Manjaro (an Arch distribution) running on my Dell Mini 10 where I installed GitLab via Yaourt; but that machine only has 1GB of RAM and a single core. Luckily, my Acer Aspire One D270 has 2 cores and 2GB of RAM, and I just finished installing CentOS 7 on there the other day. I’ll see if I can get GitLab running on it. The GitLab installation instructions are not at all breezy, though; so we’ll see how far I make it this week. In the meantime, I’ll continue searching for a Debian 7 or CentOS 6.5 image for the 32bit Dell Mini 10 so I can start installing OwnCloud on that.