Showing all entries tagged with: Programming

Nim types (originally a Reddit reply)

9th January 2018

While perusing the Nim subreddit I stumbled across a post asking for an explanation of how types work in Nim, especially how Nim allocates different types on the heap and the stack. Since the answer grew pretty long I decided to post it here as well for perpetuity. What follows is a copy of my response with some additional markdown.

First order of business heap vs. stack

Whenever you call a function it creates a stack…

Cross-platform GUIs and Nim macros

23rd March 2017

A while ago I read John Novaks great rant on how hard and annoying it can be to do something as simple as extending a cross-platform application with the simplest of GUIs. Or as he puts it:

You must not under any circumstance try to open a window (on the computer, I mean), attempt to change the colour of a single pixel in it, or—god forbid!—fantasise about using native (or any kind of, for the matter)…

Presentation on Functional programming

18th March 2017

Recently I held a presentation on functional programming at the University of Tromsø. The presentation was meant as an introduction to the concepts of the paradigm and some of the ideas behind it. It also contains a short section on how the data structures that facilitate the immutable state collections without copying everything. The entire presentation was done in one hour. As I habitually didn't write any notes for what I was going to say…

Git-hooks and web development

17th June 2016

In a previous post I wrote about how this website was created and how the content was managed with CouchCMS. However there is more than just the textual content to this site. In the recent post about my Nim implementation of TinyWM the need for syntax highlighted code became apparent. Other features recently added was the home and RSS-feed buttons along with their features. What all these have in common is the need to modify the HTML, CSS, and/or JavaScript of the site. CouchCMS touts itself…

TinyWM implementation in Nim

13th June 2016

Lately I've been toying with the idea of creating a window manager for Linux. It's not that there is a lack of them, rather quite the opposite, the Linux world is full of them. But suffice to say that I have some ideas which I think would be a welcome addition and I've started tinkering with creating my own. If for nothing else it would be an interesting challenge. However to create a window manager…