Generating sudokus for fun and no profit
A guide on how to generate sudokus of any difficulty.
The latest blog posts to take off on Hacker News. 14,540 posts.
A guide on how to generate sudokus of any difficulty.
In 1890 Giuseppe Peano discovered a square-filling curve , and a year later David Hilbert published his variation . In those days people did not waste readers’ attention with dribble – Peano explained it all on 3 pages, and Hilbert on just 2 pages, with a picture!
On the Origin of Emacs in 1976 (Emacs blog articles)
“Summing ASCII Encoded Integers on Haswell at the Speed of memcpy” turned out more popular than I expected, which inspired me to take on another challenge on HighLoad: Counting uint8s . I’m currently only #13 on the leaderboard, ~7% behind #1, but I have already learned some interesting things. In this post I’ll…
For the past few days, I have been toying with an idea for a board game. To test it out, I wanted to write a simple implementation of it. Here’s an example of a type we might need in a critical phase of the game.
Author: Alexey Makhotkin squadette@gmail.com. Introduction In this database design tutorial (~9000 words) I’m going to show how to design the database tables for a real-world project of substantial complexity. We’ll design a clone of Google Calendar. We will model as much as possible of the functionality that is…
ASCII, a standard whose legacy defines to this day how most of the letters and numbers in your computer get encoded into ones and zeroes, is elegant and beautiful. Via lessons in computer history, punched tape, and typewriters, I'd love to share some of its logic with you.
Clojure macros have two modes: avoid them at all costs/do very basic stuff, or go absolutely crazy.
Five patterns to help Single Page Applications fetch data from remote sources
The Pin type (and the concept of pinning in general) is a foundational building block on which the rest of the the Rust async ecosystem stands. Unfortunately, it has also been one of the least accessible and most misunderstood elements of async Rust. This post is meant to explain what Pin achieves, how it came to be…
This is the second part of a series of interactive articles on the x86-64 architecture. This part will focus on the first assembly instructions, visualizing the way data moves in memory when they are executed.
Introducing Ruxguitar, a guitar tablature player written in Rust
👋🏼 This is part of series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into 12 main parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods are colorless The…
Does this sound familar? You make a change to a library to optimize its performance or clean up technical debt or fix a bug, only to get a bug report: some very large, incomprehensibly opaque test is now failing. Or you add a new compiler optimization with a similar result. Now you have a major debugging job in an…
Practical tips that allow you to build an evolving architecture
Large language models (LLM) have been all the rage for quite some time now. Looking beyond the hype though, they have severe limitations: hallucinations, lack o
Bézier curves are widely used for defining vector graphics. They are basically polynomial parametric curves, but given in the Bernstein basis, which enables us to define the curve using control points. The first and last control point define the start and endpoint of the curves, the intermediate control points kind of…
Learning math early guards you against numerous academic risks, opens all kinds of doors to career opportunities, and allows you to enter those doors earlier in life (which in turn allows you to accomplish more over the course of your career).
If you've used CSS, you know what a class name is. They're a very poor proxy for the web today. Let's stop using them.
Today I noticed via a tweet by @mitsuhiko that Mermaid Gantt diagrams are great for displaying distributed trace information like what you’d get from JaegerU...
Can I make math operations run 100x faster on really, really big numbers?
NSCopyObject is a very old Foundation function – pre-dating Mac OS X entirely; from the NeXT era – that was originally basically just memcpy , but now it’s complicated. A lot more complicated.
A new way to make games
In the previous two golden ages (1950s-1960s and the 1980s), our expectations outpaced the capabilities of the technology at the time, leading to disappointment. In contrast, the AI technology of the current golden age, which began in the mid-2010s, has consistently exceeded our expectations.
In a previous post, I used a simple interpreter bug to demonstrate the research skill of manually reducing test cases. This time, I show off the excellent Shrinkray reducer to see how it can automate the same process. The tricky part when using automated test-case reducers is writing an interestingness test that…
Just like CAD didn't make everyone an industrial designer, visual programming isn't going to make everyone a programmer. Whether textual or visual, there'd still be a lot of underlying concepts (and how they are composed) to learn. But still, I think it's underexplored. Most visual programming paradigms focus on…
strlcpy(3) is an OpenBSD function which is often hailed as a safer replacement for strcpy(3) and/or strncpy(3) . One of the obvious issues with strlcpy is that it's not safe if src isn't null-terminated. However, that's not the reason I don't like strlcpy. In fact despite knowing this, I used to think it was an okay…
Spaced repetition is complicated in hierarchical bodies of knowledge, like mathematics, because repetitions on advanced topics should trickle down to update the repetition schedules of simpler topics that are implicitly practiced (while being discounted appropriately since these repetitions are often too early to…