Eddy Luten

Programmer at Large in the Bay Area

Read this first

PortAudio Panic and No Devices Found

Leaving this here for the poor souls on Linux systems that run into errors accessing the default input or output devices using PortAudio and get nothing back.

Maybe you’re using rust-portaudio and your application panics after accessing default_output_device or default_intput_device even though you clearly have default audio devices set:

thread ‘main’ panicked at ‘called `Option::unwrap()` on a `None` value’

This pretty much means that you don’t have libasound installed on your system. While the PortAudio project mentions this in its build documentation, the Rust version of this library doesn’t explicitly mention this dependency.

On Debian-based systems (Ubuntu and whathaveye), run the following command to cure this:

sudo apt-get install libasound2 libasound2-dev

Continue reading →

Getting Rusty Code and Racer to Work Together

While installing the Rusty Code extension in Visual Studio Code is pretty straightforward, Racer wouldn’t work out of the box after clicking the “install dependencies” (or whatever it was called) button. In fact, I never received a confirmation message that the dependencies finished installing.

After a while of no progress in the output window, I checked in the terminal and saw that Racer installed fine, but VS Code showed the following error:

RUST_SRC_PATH environment variable must be set to point to the src directory of a rust checkout.

So, it turns out that a default Rust install doesn’t come with the source code and simply running the following command makes the whole thing work:

rustup component add rust-src

If running rustup doesn’t work, make sure that your cargo/bin directory is added to your PATH, by adding the following line to your .bashrc script:


Continue reading →

Bye MacBook, Hello Intel NUC

For a while now, my 2011 13" i5 MacBook Air which I use for development purposes has been showing signs of pending death: flickering screen when moving the lid, excessive heat, inability to be charged, killing 2 replacement batteries and 3 chargers, slowing down with new OS X/macOS installs, etc. etc.

So, I figured that it was time for a new machine. The MacBook Air, whose form factor I love, served me well (not counting the recent death rattles) for 5 years, so I eagerly awaited the October 27 Mac event, eyeing either a replacement MacBook Air or a new iMac. In short, this is what happened:

  • No new iMacs, Mac Mini, NOR MacBook Air models.
  • Removal of ports that I use all the time on my MacBook.
  • An uninspired hardware refresh.
  • Entry level MBP is $1,499?! And no Touch Bar. I mean, I didn’t want one, but I think that it should have one for 1.5k.

There are many more threads on Reddit and

Continue reading →

Elementary OS First Impressions


It’s been about a week of using elementary OS and I’ve compiled a few of my first impressions. First off, I want to start off with that I understand that elementary is still somewhat immature, so don’t take any of the criticism as me putting the project on blast. Far from it, in fact, but more on that later.

Installing elementary OS was a breeze. It’s about as simple as installing macOS from a USB dongle. All my Intel NUC’s onboard hardware was properly detected, HDD partitioning was not an issue and all happened automatically, and there was an option to enable encryption wherever it was applicable. Great process overall.

Boot times out of the box are snappy, it takes only a few seconds to go from POST to the OS itself. When you’re presented with the desktop, it all looks really nice and sleek, but a bit derivative. It does look like it’s emulating macOS, but that’s not necessarily a

Continue reading →

RSpec be_truthy, exist, or be true?

The documentation for RSpec is amazingly detailed, but sometimes falls a bit short on when to apply certain matchers. In many of the specs that I’ve reviewed, incorrect matchers were used to test for pure Boolean values.

 be_truthy and be_falsey

expect(some_evaluation).to be_truthy
expect(some_evaluation).to be_falsey

The matcher be_truthy should only be used when expecting an evaluation to be not nil and not false.

The matcher be_falsey should only be used when expecting an evaluation to be nil or false.

Notice that be_truthy does not actually check for the Boolean value true.

If you have a method that should only be evaluated into a Boolean, do not use these matchers for your spec.

 be true and be false

expect(some_evaluation).to be true
expect(some_evaluation).to be false

The matchers be true and be false expect only true and false returned, respectively. This is a straight

Continue reading →

Switched to Svbtle

I’m trying a new blogging service named Svbtle, which is minimalist and supports Markdown syntax. Yay! I love using text editors such as OmmWriter to quickly get ideas out without distractions.

While I like the ability to host my content via GitHub Pages (openglbook is still served through it), I just want a platform where I can quickly bang out a blog post in case I don’t have access to my GitHub repo.

So while there’s not much new content yet, this should give me the ability to write more often. The old content is still available via a public repo here (if for some reason you’re interested in it).


Continue reading →

Subscribe to Eddy Luten

Don’t worry; we hate spam with a passion.
You can unsubscribe with one click.