This year I spent a bit of time playing with Python, after having mostly ignored it since 2005 when was learning it originally. I did like Python back then, but a few years afterwards I discovered Ruby and quickly focused my entire attention on it.| (think)
Recently I’ve been wondering how to name Ruby methods that have predicate looking names (e.g. foo?), but don’t behave like predicates - namely they return other values besides the canonical true and false.1 This came up in the context of RuboCop, in case someone’s wondering. ↩| (think)
Here’s another small Vim tip - how to deal with typos quickly. Generally, most people do something along those lines:| (think)
One of my pet peeves with Vim is that by default the buffer splitting behaves a bit weird:| (think)
When I started to play with OCaml I was kind of surprised that there was no id (identity) function that was available out-of-box (in Stdlib module, that’s auto-opened). A quick search lead me to the Fun module, which is part of the standard library and is nested under Stdlib. It was introduced in OCaml 4.08, alongside other modules such as Int, Result and Option.1 It was part of some broader efforts to slim down Stdlib and move in the direction of a more modular standard library. ↩| (think)
Today I’m going to cover a very basic topic - conversions between OCaml’s primary numeric types int and float. I guess most of you are wondering if such a basic topic deserves a special treatment, but if you read on I promise that it will be worth it.| (think)
zoxide is a smart and fast alternative to cd that learns your directory usage patterns and allows you to jump to directories quickly. It’s one of my favorite command-line tools and it’s an essential part of my workflow.| (think)
I love Fish, because it makes a lot of common everyday tasks easier and more convenient. One such task is moving (switching) between folders you’ve visited recently. In my case I often jump between project directories, configuration directories, etc. Historically I’ve used things like cd -, pushd/popd and autojump/zoxide, but ever since I moved to Fish I realized all I needed was covered by the following built-in commands:| (think)
ESC (Escape) is one of the most central key in the world of Vim. It takes you from Insert mode to Normal mode and it also serves to interrupt operations in progress in Vim. You’ll be using it a lot!| (think)
In Vim (and many other editors) we interact with the contents of files via the “file buffer” abstraction. Basically, that’s the in-memory representation of a file within a text editor, that occasionally gets synchronized with the disk one (the actual file).| (think)
When people think of OCaml they are usually thinking of compiling code to a| The OCaml Planet
One of the things that bothered me initially in OCaml was the poor support for working in regular expressions in the standard library. Technically speaking, there’s no support for them at all!| (think)
Every programming language comes with some “batteries” included - mostly in the form of its standard library. That’s typically all of the functionality that’s available out-of-the-box, without the need to install additional libraries. (although the definition varies from language to language) Usually standard libraries are pretty similar, but I think that OCaml’s a bit “weird” and slightly surprising in some regards, so I decided to write down a few thoughts on it and how to mak...| (think)
The people who live in a Golden Age usually go around complaining how yellow everything looks. – Randall Jarell| (think)
What is dead cannot die. – A Song of Ice and Fire (a.k.a. Game of Thrones)| (think)
redux adjective brought back; resurgent: the Victorian era redux.| (think)
Another year is behind us and it’s time for the obligatory “year in review” blog post. I’ve been feeling a bit lazy, that’s why I’m getting to writing it a bit of a delay, but you’ll forgive me.| (think)
A couple of weeks ago I made a spectacular and quite unexpected return to Android, after a long period of being exclusively in Apple’s mobile devices ecosystem. My last Android phone was the Sony Xperia Arc, which I bought way back in 2011. Afterwards I got an iPhone 5(S?) in 2012/2013 and never looked back.| (think)
Yesterday I had a very frustrating start of my day for the most unexpected of reasons - a (supposedly) simple CPU cooler upgrade for my desktop computer turned into a nightmare. It was also a very educational experience and reminded me about a few valuable lessons, I’ve learned over the years.| (think)