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.

Advertisements

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 ;-)