Go has some interesting quirks.

Recently I learned you can iterate over nil slices.

Here’s an example:

var foo []string // nil slice
var bar = []string{} // empty slice

fmt.Println(foo == nil) // true
fmt.Println(bar == nil) // false

for _, v := range foo { // no errors
	fmt.Println("%v", v)
}

for _, v := range bar { // no errors
	fmt.Println("%v", v)
}

Normally, I avoid returning nils in functions, to reduce the need for a nil check before iterating, but looks like Go has it built in.

Neat!

I went hiking with some friends this weekend and our trail took us through a herd of grazing cows.

Number 645 wasn’t too pleased with us mucking about her field.

cow standoff

It was a tense standoff!

My heart was beating pretty fast when we tiptoed around her.

 

 

I was doing some next generation sequencing (NGS) analysis over the weekend, for the the first time. As such, I had to get some of the common software tools like PEAR and bowtie. Their official sites were hosted by SourceForge, but I didn’t want to download the binaries from SourceForge ’cause I’m paranoid about malware. So, I compiled them myself.

The process turned out to be super easy!

They all have git repos:

https://github.com/xflouris/PEAR

https://github.com/BenLangmead/bowtie

https://github.com/BenLangmead/bowtie2

For example, for bowtie, you can do:

git clone https://github.com/BenLangmead/bowtie.git
cd bowtie
make

For bowtie, you need libtbb, and for bowtie2, you need to compile with NO_TBB=1.

I’m pleasantly surprised because I remember the struggle of building open source projects when I was a young’un.

Just wanted to share!

Fire Emblem Heroes

Here’s a fanart of Anna from the new Fire Emblem iOS game.

I haven’t really drawn fanart like this since a time in my youth, when I was obsessed with Nintendo.

This doodle was inspired by a need to do something more productive/theraputic than iOS games.

Perhaps there’ll be more.