Kakoune offers already various integrations for external tools such as git, ranger and various others. Recently there was also some nice integration of fzf made public (although afaik not (yet) included in the kakoune distribution).

I took all this, put it in my config, modified it to my needs and extended it a little.

images/screenshots/kakoune_external_thumb.png
Read more...

These days there are some damn cool things out there to build up your Unixoid (development) environment. This is a medium-sized elaboration on the stuff I like.

Spoilers: Including an editor that can be considered better than VIM in some regards and the single most awesome shell there is (no, not ZSH). I structured it a bit though so you can skip through the parts that are boring to you :-).

Read more...

Python notes

Posted: Sunday, 2017-01-22 11:02 | Tags: Programming, Python

I've been watching some PyCon talks online lately and stumbled across a few interesting things, these are mostly notes for myself but feel free to consider them useful ;-)

Read more...

Implementing state-machines: An evaluation

Posted: Sunday, 2015-10-18 10:15 | Tags: Programming, C++

In the previous article I raised the question on whether -- from a performance standpoint -- one should implement state machines using switch-statements or function pointers.

We saw that switch-statements are compiled to a number of jump/compare instructions that grow at least logarithmically with the number of case-labels. I had to close with the observation that a too contrived example however leads to our compiler actually analyzing our state machine good enough to be able to rewrite our code into unrolled instructions and loops.

In this post I want to discuss a slightly less contrived example that is a (stupid and useless) "parser" for XML data. We will observe that even when the state logic is more complex and transitions depend on unforeseeable input data, the compiler can do smart transformations with switch-statements.

Read more...

Implementing state-machines: switch() vs. method pointers

Posted: Saturday, 2015-10-17 15:51 | Tags: Programming, C++

Finite-state machines are useful for many purposes: Say we have a long running computation that goes back and forth between different phases and is executed chunk-by-chunk in a main loop that does other things in between (e.g. updating some user interface). Yes, you scream "threads", but there are some situations where those are just not necessary or wanted for whatever reason.

Another common use is building a lexer/parser that reads some kind of input and interprets the incoming characters differently depending on "in what state we are" e.g. whether we just read a '' or not might influence how we interpret the current character.

Most state-machine code I've seen so far is built with giant switch()-blocks and recently I've come to wonder whether this is always the way to go.

Read more...