RSSAmplifier

Blog

Mark Vasilkov

Mark Vasilkov

mvasilkov.animuchan.netRSS feed ↗12 posts

Latest posts

The making of King Thirteen

Hey hey people, I wrote a game recently for a certain coding competition, and thought I'd share the thought process behind it. Let's start with the Design King Thirteen is by far the most deliberately designed game I've made. It all began with a very...

Super Castle Game (js13kGames–2023)

An open mind is like a fortress with its gates unbarred and unguarded. This is the story of the Super Castle Game, a js13k game jam entry. Naturally, it begins with the theme of the 2023 edition of the compo: 13th Century. When it dropped, I was com...

Language Model API Parameters

An application talking to a language model API has control over the following parameters. Only the Vertex AI PaLM API allows setting Top-K and Top-P at the time of writing. Temperature The temperature (a floating-point number in the range 0.0–1.0) is...

CSV field larger than field limit in Python

So I was working on something very simple involving a CSV file: import csv with open('file.csv', 'r') as f: reader = csv.reader(f) lines = [ln for ln in reader] And as one would expect, the result of running this code was Error: field large...

ZX Spectrum system font

Old computer fonts are fascinating. Making a consistent-looking font is a remarkable achievement in its own right, but designing a monospaced font that is readable on a very low-resolution screen, is aesthetically pleasing, and has a distinct persona...

BigInt Embedded Bitmap Encoding

This is the second post in the series. See the previous post, ECMAScript Embedded Bitmap Encoding for context. My friend Roman pointed out that I was, in fact, doing things suboptimally in the EEBE post: The array of scanlines can be replaced with ...

ECMAScript Embedded Bitmap Encoding

I propose the following bitmap format, suitable for embedding small images in TypeScript or JavaScript source code: // ECMAScript Embedded Bitmap Encoding (EEBE) // Required fields: export const lines = [ 0b0001000, 0b0111000, 0b1101000, 0b10...

TypeScript Positive Integer Type

This is how you define the PositiveInteger dependent type in TypeScript without using type predicate functions or branded (tagged) types: type PositiveInteger = `${T}` extends '0' | `-${any}` | `${any}.${any}` ? never : T It can ...

System Font Stacks

My preferred system font stacks are as follows: html, button, input { font-family: -apple-system, 'Segoe UI', 'DejaVu Sans', system-ui, sans-serif; } code, kbd, pre, samp { font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sa...

Code scraps: linking node_modules during build

Before version 0.1, natlib had examples in the main repo, and they were built together with the library. (This is no longer the case, as the examples and tests moved to a separate repo.) To produce a node_modules folder as if natlib was installed as ...

Disable caret blinking in macOS

Recently I began using Obsidian (1.0), it's a great little offline wiki application. What it sorely lacks, however, is an option to turn off caret blinking. Thankfully there's the following macOS hidden setting: defaults write -g NSTextInsertionPoint...

The Neatness (js13kGames–2022)

This is the story of The Neatness. It all started when I began playing The Looker, a brilliant game by Bradley Lovell. Line-based puzzles in The Looker are mostly satire, the player being able to bypass many of those by scribbling madly. I was instan...