Episode 4 of Mykola’s Music Podcast is out

Did you know I have a music podcast on Mixcloud? Me neither! I do! :D

Here it is: mixcloud.com/mvmn.

The podcast is about music I listen to (which is like 60% metal and rock, 20% synth/futurepop and related electronic music, 10% darkwave, gothic rock, ethereal, dark ambient and other “schwarze scene” stuff, and 10% everything else). 

And I’ve just uploaded 4-th episode (about metal bands that incorporate synth/electro elements up to 50/50 metal/electronic mix).

Give it a spin.


ZSH completions for teamocil/itermocil

I’ve noticed that even with installed OhMyZSH I don’t get proper completions for an itermocil in Z-shell (ZSH) terminal – proper completions being list of names of files from ~/.teamocil folder, sans extensions.

I’ve looked at OhMyZSH plugins and wrote my own for itermocil – a file ~/.oh-my-zsh/plugins/itermocil/itermocil.plugin.zsh with this content:

_itermocil () {
  compadd -- `ls -1 ~/.teamocil/ | rev | cut -d "." -f 2- | rev`

compdef _itermocil itermocil

And added it to plugins environment variable in .zshrc.

However, while doing so I’ve noticed that my .zshrc already contained this line:

compctl -g '~/.teamocil/*(:t:r)' teamocil

Googling a bit revealed that (:t:r) modifier to * wildcard are the basename sans extension modifiers for wildcard expansion in ZSH.

Which meant all I really needed was the same line in my .zshrc again, only this time with itermocil at the end instead of teamocil.

Xtext build surprises

Found a surprising issue in Xtext.

Apparently, Xtext generator has this AntlrToolFacade class that tries to download http://download.itemis.com/antlr-generator-3.2.0-patch.jar and save it in current dir as .antlr-generator-3.2.0-patch.jar to then load classes out of it.

Which is pretty crazy.

First of all, if you use Nexus or Artifactory to make sure your builds do not depend on thirdparty resources being up – this breaks it.

Second, downloading something over HTTP without any checksums and stuff is as unsafe as you can think. The issue occurred in a first place because Itemis started to redirect from HTTP to HTTPS link on this path – but the code that does download can’t even follow redirects :facepalm: And the “fix” that has been made was to disable redirect and still serve the JAR over HTTP (counts as a quickfix, but otherwise – :double-facepalm: ).

And in general, having URLs hardcoded is just ugly.

So, quickest solution is to simply commit antlr-generator-3.2.0-patch.jar as .antlr-generator-3.2.0-patch.jar into the root of your project – so that it would not be downloaded during builds.

If you have a better idea though – drop me a comment ;-)

launchd tip of the day

I have a launchd service that fetches me some data from a website and sends them to an email. It uses password from keychain to do so. A week ago that password has expired and I had to update it. Aaand…

I was using security find-generic-password/add-generic-password, I’ve added security to the list of apps that don’t require password entry, done all that. It was all working fine before, but not this time. I’ve tried everything and just couldn’t figure it out.
Continue reading

New laptop? Check your hosts. /etc/hosts

I’ve just run into a weird problem where RabbitMQ server was running EXTREMELY slow on my laptop for no apparent reason.

After trying a bunch of things and googlig for a while I’ve found out that possible reason for that might be slow host resolution. But everything was running on a localhost!

I’ve checked my /etc/hosts and found out… Well, when I’ve upgraded my MacBook Pro laptop I’ve imported all stuff from previous one (using Apple’s migration assistant), but also did change the new laptop’s network name to avoid conflicts with the old laptop being on the same network. But I did not update /etc/hosts accordingly – it only had associated with the old network name.

Apparently, this is a big deal for RabbitMQ. I’ve been running it like that for more than a month and had no issues with any software whatsoever so far – but RabbitMQ (or possibly the underlying Erlang VM) was doing some special name resolution using my computer network name apparently, and that just didn’t work. Causing it not to report any errors though, but just run EXTREMELY (I mean it!) slow.