Drew DeVault's Blog

on Drew DeVault's blog

Sway 0.9 & One year of Sway

Today marks one year since the initial commit of Sway. Over the year since, we’ve written 1,823 commits by 54 authors, totalling 16,601 lines of C (and 1,866 lines of header files). This was written over the course of 515 pull requests and 300 issues. Today, most i3 features are supported. In fact, as of last week, all of the features from the i3 configuration I used before I started working on Sway are now supported by Sway. Today, Sway looks like this (click to expand):

Using -Wl,--wrap for mocking in C

One of the comforts I’ve grown used to in higher level languages when testing my code is mocking. The idea is that in order to test some code in isolation, you should “mock” the behavior of things it depends on. Let’s see a (contrived) example:

Life, liberty, and the pursuit of privacy

Privacy is my hobby, and should be a hobby of every technically competent American. Within the eyes of the law I have a right to secure the privacy of my information. At least that’s the current law - many officials are trying to subvert that right. I figure that we’d better exercise that right while we have it, so that we know how to keep exercising it once it’s illegal and all the information about it dries up.

Understanding pointers

I was recently chatting with a new contributor to Sway who is using the project as a means of learning C, and he had some questions about what void** meant when he found some in the code. It became apparent that this guy only has a basic grasp on pointers at this point in his learning curve, and I figured it was time for another blog post - so today, I’ll explain pointers.

In Memoriam - Mozilla

Today we look back to the life of Mozilla, a company that was best known for creating the Firefox web browser. I remember a company that made the web better and more open by providing a browser that was faster and more customizable than anyone had ever seen, and by making that browser free and open source.

State of Sway - April 2016

Since the previous State of Sway, we have accomplished quite a bit. We are now shipping versioned releases of sway, which include support for window borders, input device configuration, more new features, and many bug fixes and stability improvements. I’m also happy to say that Sway 0.5 has landed in the Arch Linux community repository and I’m starting to hear rumors of it landing in other Linux distros as well. Here’s a quick rundown of what’s happened in the past four months:

How to write a better bloom filter in C

This is in response to How to write a bloom filter in C++, which has good intentions, but is ultimately a less than ideal bloom filter implementation. I put together a better one in C in a few minutes, and I’ll explain the advantages of it.

Please use text/plain for email

A lot of people have come to hate email, and not without good reason. I don’t hate using email, and I attribute this to better email habits. Unfortunately, most email clients these days lead users into bad habits that probably contribute to the sad state of email in 2016. The biggest problem with email is the widespread use of HTML email.

Integrating a VT220 into my life

I bought a DEC VT220 terminal a while ago, and put it next to my desk at work. I use it to read emails on mutt now, and it’s actually quite pleasant. There was some setup involved in making it as comfortable as possible, though.

State of Sway - December 2015

I wrote sway’s initial commit 4 months ago, on August 4th. At the time of writing, there are now 1,070 commits from 29 different authors, totalling 10,682 lines of C (and 1,176 lines of header files). This has been done over the course of 256 pull requests and 118 issues. Of the 73 i3 features we’re tracking, 51 are now supported, and I’ve been using sway as my daily driver for a while now. Today, sway looks like this: