Lint Your Markdown Files in Vim

Why Should You Lint Markdown? Isn't the syntax easy enough? There's nothing that can go wrong. The goal of some markdown linters is to offer a consistent style, and to avoid obvious mistakes (e.g., duplicated headings). Some plugins also provide help in improving your writing style. Linting in Vim ALE is a popular lint engine for Vim and NeoVim. ALE also offers interfaces for markdown linters. You can see a list of all supported plugins on GitHub.
Read more →

Nim First Impressions

I've started dabbling in Nim some days ago. My experience level: I'm a self-taught hobby developer. No professional experience, but a lot of enthusiasm. I've created some toy applications, but nothing production-grade. I'm most familiar with JavaScript and React.js, but also know a bit of Clojure, Elixir, Python, and Reason. What is Nim? From the Nim website: Efficient, expressive, elegant Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula.
Read more →

How to Start and Restore Tmux Sessions Automatically With tmux-continuum

You've created a tmux session and worked with it. You've created a pane layout that works for you, and started your Vim editor. What happens when you shut down your computer, and start it again later? Tmux doesn't remember your sessions. When you restart tmux, you loose all your running programs, etc. There are two tmux plugins that can help with that: Tmux Resurrect and tmux-continuum. Installation with Tmux Plugin Manager Add theses lines to the list of plugins inside tmux.
Read more →

Copy and Paste in Tmux

A few days ago, I wanted to copy text from my tmux shell. Unfortunately, the defaults from your standard terminal and shell ([kitty][kitty] and [fish][fish]) don't work, as tmux has its own key bindings. I came across an excellent blog post called [Everything you need to know about Tmux copy past - Ubuntu][everythingcopy], which listed all the steps you need to take. First, the default behavior: Enter ‘copy mode’ by pressing CTRL+b, [.
Read more →

Friday Picks 032

Here are 5 links for this Friday: How to create a simple REST API with Python and Flask in 5 minutes - a beginner-friendly Python & Flask tutorial What is Phoenix LiveView - a good overview about the new experimental feature in Elixir's web framework For a Good strftime - if you quickly want to look up how to format a string in Python Introduction to CSS - Youtube series about CSS A Recap of Frontend Development in 2019 - what happened in 2019?
Read more →

Step-by-Step Guide to Manage OCaml Installations With asdf

Use asdf to manage opam (and OCaml) asdf is a command-line tool which allows you to install multiple versions of a programming language. With asdf you have absolute control over which language version gets installed on your system. You can also switch between different versions. That's useful if you work with several projects that might use different versions. I wrote about asdf a while ago. In this post, I will go over the steps on how to manage OCaml via asdf.
Read more →

Learning Progress Nim

I've finished chapter 3 of Nim in Action. I completed the terminal-based chat application. Learning Nim is fun, but there are still many concepts I'm unsure about. For example, I don't know how the memory model works. I started chapter 6 of the book, and I don't understand how to parse a file. Chapter 6 introduces parallelism, and I'm confused about locks. Still, I like that the book uses practical examples to teach concepts.
Read more →

TIL: Objects in Nim

Objects in Nim use the type constructor:

Type Definition type MusicTrack = object index: int title: string # (Mutable) Value var summer = MusicTrack(index: 1, title: "Summer in the City") That reminds me of Records in Reason:

/* Type definition */ type musicTrack = {index: int, title: string} /* Value */ let summerInTheCity = {index: 1, title: "Summer in the City"} In Nim, “An object is a value type, which means that when an object is assigned to a new variable all its components are copied as well.

Read more →

Reading “Nim in Action”

I'm currently working through the excellent book Nim in Action by Dominik Picheta. Nim looks like a promising and fresh language: Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. What I like about Nim is that it looks like Python, but it compiles to a dependency-free executable (C, C++, or JavaScript). The language is fairly small, but it allows for writing macros (meta-programming) like a Lisp.
Read more →

Setup Nim With Neovim

Use Neovim as your Nim IDE Why Nim? Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. 1 Nim resembles Python, but the language is significantly faster and statically compiled. Nim comes with meta-programming abilities (like a LISP). You can compile a Nim program into a stand-alone C binary that runs on every system.
Read more →