tohray - a microblogging application in Nim

writing code is the best way to learn a programming language

Created: by Pradeep GowdaUpdated:Aug 18, 2024 From: Carmel, INTagged: tohray · nim · blogging .

tohray

ತೊರೆ, pronounced “toh-ray” (with a dental ‘t’ sound), is a microblogging application to capture stream of thoughts inspired by Linus Lee’s Stream

The word ತೊರೆ in Kannada has multiple meanings, but most commonly as rivulet, forego, divest; which are indeed appropriate description for the intent.

You can see this in action at https://tohray.fly.dev, and the source code is on github/btbytes/tohray.

Currently, it runs on Fly, but it can be made to run on the metal with a simple compile or on docker as Nilesh’s PR, (the first contribution to this repo!) shows.

Writing this allowed me to be lot more confident in my abilities to write Nim code. Nim has always fascinated me because it is a very capable language (See Aditya’s “Nim Nuggets: Systems Programming & Metaprogramming Magic” talk.

The best, and the fastest way to learn is to do.

Features

Non-Features

Technology Details

Linus wrote his stream app using a language he created himself - Oaklang. I wanted an excuse to use Nim for something “useful”, so I used Nim, and it was a great experience.

Nim is a fast, and friendly language that is statically typed, while looking like Python in Syntax. It compiles the source code into C (or C++, or Javascript), which allows the programs written in it to be very fast, small, and quite portable.

Programming Notes