RSSAmplifier

Blog

pema.dev

pema.devRSS feed ↗9 posts

Latest posts

Mipmap selection in too much detail

In this post, I want to shed some light on something I’ve been wondering about for a while: How exactly are mipmap levels selected when sampling textures on the GPU? If you already know what mipmapping is, why we use it, and what pixel derivatives ( ddx() / ddy() ) are, you can skip to the section Derivatives to mipmap levels . The post does, however, assume some knowledge of graphics programming.…

Haskell is not category theory

What, why, who? If you have hung out in Haskell communities, you might have heard people mentioning concepts from the mathematical field of category theory, perhaps even claiming that Haskell is built upon category-theoretic foundations. There is some truth to this, but I think it is more accurate to say that certain abstractions in Haskell are inspired by category theory. When learning Haskell, I…

6 interesting languages and their selling points

Foreword I’ve long been obsessed with everything relating to programming language design and implementation. I make an effort to seek out and try languages with novel features. In this post, I’d like to briefly present and attempt to sell you on some lesser-known, but very interesting languages I’ve come across. I won’t go very in-depth with any of them, but instead, try to demonstrate why you…

Blogs I love

I spend a lot of my time seeking out and reading through technical blogs. I realized today, that my list of go-to blogs only exists mentally. I thought I should write them down somewhere, which is what this post is. I’ll likely be updating this page in the future. Functional programming https://bartoszmilewski.com/ Chad category theorist writes about chad category theorist things.…

Shaderception - a deep dive

Intro A while back, I wrote a compiler for a shading language, named Shaderception . The compiler runs within the social VR platform VRChat, which poses some interesting and odd technical challenges. The result was a virtual world accessible through VRChat, which functions similar to Shadertoy and lets users write and execute interactive shaders entirely from within the platform. The name comes…

Weird HLSL tricks Unity doesn't want you to know about

Intro A while back, I wrote a compiler for a shading language that targets a stack based virtual machine which is, itself, written in an (Unity-flavored) HLSL shader. The project was aptly named Shaderception , and was what I consider to be a true display of esotericism - a trait I value highly. While writing it, I learned a few nifty and/or evil tricks, which I’ve been meaning to write down for…

Setting up Haskell Language Server with VSCode is cursed

Haskell setup is pain I’ve been enjoying writing Haskell a lot lately, but my god has the tooling been a mixed experience. I recently bought a new laptop, which I’ve installed Arch Linux on, and wanted to set up the Haskell language server (HLS) to work with Visual Studio Code on it. Every time I’ve attempted this in the past, it has been extraordinarily painful. Here is a cheatsheet to my future…

What the hell is a monoid

For some reason, I keep getting asked the same few questions about common constructs in functional programming. I want a page to point friends towards. That is what this is. Without further ado, welcome to the 999th terrible monad tutorial. What is a monoid A monoid is a set equipped with an associative binary operation and a neutral element. For those who may not remember, the associative…

Notes on Hindley-Milner type inference

Motivation I hate how hard type theory can be to get into. I’ve recently been fiddling with Hindley-Milner type systems and wanted to write down some notes that are hopefully understandable to future-me. If they are of use to anyone - cool, if not - also cool. I’ll definitely be referring to them in the future. What and why A Hindley-Milner (HM) type system is essentially an extension of typed…