Learn Nim: Create a README Template Downloader

Create a command-line tool which downloads a README template for your coding projects Why Nim? Nim is a statically typed systems programming language. Nim generates small, native dependency-free executables. The language combines a Python-like syntax with powerful features like meta-programming. Nim supports macOS, Linux, BSD, and Windows. The language is open-source and has no corporate affiliation. Nim compiles to multiple backends, for example, C, C++, or JavaScript. The ecosystem and community are small, but the language has reached its first stable release.
Read more →

Friday Picks 036

Read more →

A Walkthrough of the “Complete Machine Learning and Data Science: Zero to Mastery” Course (Part 01)

I'm going through the Udemy course Complete Machine Learning and Data Science: Zero to Mastery. The course runs under the flag of Andrei Neagoie. Andrei is a popular instructor on Udemy, with almost 200.000 students, and top reviews. For this course, he has paired up with Daniel Bourke, a self-taught Machine Learning Engineer from Australia. In this blog post series, I will jot down my thoughts on the course, and what I've learned.
Read more →

Trying Out FastAPI

Read more →

TIL: kitty @ set-colors

kitty is the terminal emulator that I use in conjunction with fish. Kitty is fast, customizable, and has font ligatures. When I start a Vim session from the kitty terminal, Vim looks smooth (I use Victor Mono as my font). If you want to switch kitty's color scheme, you can use kitty @ set-colors –all <path-to-colors-file> to interactively switch colors in your session. I wrote a fish function that uses kitty @ set-colors and sed to switch colors for both kitty and (Neo)Vim.
Read more →

Run Nim Docker Container as Non Root

Today I improved my Nim web application by running the docker container as non=root-user:

base imageFROMnimlang/nim:1.0.4-regular# install dependenciesRUN apt-get update && \ apt-get install -y –no-install-recommends libpq-dev netcat-openbsd# set working directoryWORKDIR/usr/src/app# add userRUN addgroup –system nim && adduser –system –group nimRUN chown -R nim:nim /usr/src/app && chmod -R 755 /usr/src/app# Nim environmentENV NIM_ENV=production ENV NIMBLE_DIR=/home/nim/.nimbleENV PATH=$PATH:/home/nim/.nimble/bin# copy entrypoint, make executableCOPY ./entrypoint.sh .RUN chmod +x entrypoint.sh# install dependencies, bundle assets, compileRUN nimble refresh && nimble install nimassets jesterCOPY .

Read more →

Feat Accomplished: Nim Jester App Finished

Read more →

How to Serve Static Files With Nim and Jester on Heroku

The Problem Let's say that you create a simple web application with the Nim Heroku Buildpack. Project structure: ├── nim_heroku.nimble ├── Procfile ├── src │ ├── nim_heroku │ ├── nim_heroku.nim │ └── views │ └── general.nim ├── static_dir │ ├── favicon.ico │ └── style.css └── tags 3 directories, 8 files Bin file (src/nim_heroku.nim): import jester, asyncdispatch, os, strutils import views/general var settings = newSettings() if existsEnv("PORT"): settings.port = Port(parseInt(getEnv("PORT"))) settings.staticDir = ".
Read more →

Friday Picks 035

Read more →

Taking a Pause

Read more →