871 private links
In Ray Tracing in One Weekend, you will build a simple brute-force path tracer. Continuing with Ray Tracing: The Next Week, you will add textures, volumes (like fog), rectangles, instances, lights, and support for lots of objects using a bounding volume hierarchy (BVH). Finally, with Ray Tracing: The Rest Of Your Life, we'll dive into the math of creating a very serious ray tracer.
Looks like a great guide on ray tracing.
An awk trick nicely explained. Though it's a trick that I may never use. I recommend this article mostly for the extraordinary pedagogy style.
I was piqued by this, so I went on read Ken Thompson's original article. I am amazed by it. It's a quite surprising application of quine. Don't worry, it doesn't give me a feeling of existential crisis as I still have faith on the beloved fellow compiler workers.
Read about it in https://dl.acm.org/doi/10.1145/358198.358210 .
Rust questions which are quite tricky. I learned a lot (mostly useless) knowledge form it.
An interesting and simple algorithm to blend two images seamlessly.
TL;DR: do not copy-paste the pixel itself, copy-paste the gradient of the pixel, and then solve for the optimal pixel's value subjecting to an energy function, which takes into account the boundary of background image and the gradient of the source image.
More articles on the topic:
Web based game console (and mobile) simulator presented as a feed.
Project repo: https://github.com/webrcade/webrcade
I always wanted to write an article about how to write readable code. This article did it for me!
The core idea is that our brain has a small working memory. We are able to hold 4-6 things simultaneously, but no more. So to make the code more digestible, we need to abstract related things together into a bigger chunk if there are more than a handful of things to be dealt with.
Another thing the article didn't mention is that we can use symmetry to reduce the amount of memory needed. Symmetrical things require fewer places in working memory. "match cases" and "pipelining operators" are useful to construct symmetrical structures. The structures hints the brain on what to expect and we know the sub-expressions are equal in rank. This is why I am against using pipeline operator in places where there is no pipeline semantics (each step should be an endofunction).
Various bitrate control methods are suitable for different purposes. This article gives a clear description on how to use them in ffmpeg and when to use them.
Inspect mp4 box structure.
Rust Higher-Rank Trait Bound (HRTB) explained beautifully!
A short summary of the book.
A short introduction to the idea behind the LSM tree.
This trick has greatly increased the browser usability on my phone.
You may also be interested in:
- how to enforce on desktop mode: https://old.reddit.com/r/firefox/comments/p38p6t/guide_how_to_always_use_desktop_view_in_firefox/
- you can use any UA switchers, which can come in handy by providing per-domain settings
- how to force allow pinch to zoom: https://old.reddit.com/r/firefox/comments/igijal/pinch_to_zoom_broken_in_latest_firefox_android/
Explore composable geometry shapes, shaders, transformations with a lisp-like language called Janet. The rendering by compiling the code to glsl, running a raymarching engine (that why it's easy to define composite shapes).
For more (fancy) raymarching demo, check out https://iquilezles.org/articles/raymarchingdf/.
This article explains the various mix xref
usages to analyze dependency-induced slow compilation issue.
Wondered how fly.io works? Or how to use Firecracker?
The article explains how MicroVM works and how to use it via command line tools.
Emacs has a lot of little known built-in features that can cover a lot of use cases provided by packages. This article presented some of them. Really nice to learn about them.
Also read the sequel, "More batteries included with emacs" (https://karthinks.com/software/more-batteries-included-with-emacs/).
ImageOptim equivalent on Linux.
Command line version: https://rubenerd.com/losslessly-optimise-images/
Stable Diffusion is an open source text-to-image model with performance comparable to DALL-E. I'm surprised to learn that its model size is only 4.2 GiB.
Peek inside everyday electronic parts!