Re

Rectfillcurve – generate rectangle-filling curves

Hacker News

Rectfillcurve – generate rectangle-filling curves

How do you visit every coordinate in an NxM grid once? The easiest is to process line-by-line, from the first to last column, but if you want better caching you might try alternating the column direction for each row. The Morton/Z-order and Hilbert order give even better cache coherency for some tasks, although the classic versions only work on squares with power-of-two length sides. Luckily for me, people have developed generalized versions of those algorithms which can handle arbitrary-sized rectangles. I've taken those and packaged all of the those curves into "rectfillcurve", with an iterator API for generating those curves, and a bonus "mlcg curve" with a pseudo-random visit order that should have poor cache behavior. Implemented in stand-alone C, and also available as a Python module.

Share card

Actual performance

24points
10comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: tasks · Missing: mac, agents, macos
77%77% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
67%67% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
56%56% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
42%42% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
32%32% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
3%3% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

St
Stochastically generate a March Madness bracket51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Stochastically generate a March Madness bracket

Hacker News2
Ge
Generate your own mosaic41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate your own mosaic

Hacker News1
Ge
Generate x86 Assembly with Go65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate x86 Assembly with Go

Hacker News34
Ge
Generate Your Waifu41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Your Waifu

Hacker News14
Ge
Generate Yourself – Consumerizing Stable Diffusion66%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Yourself – Consumerizing Stable Diffusion

Hacker News2
Ge
Generate Blocklists by ASN53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Blocklists by ASN

Hacker News2
Ge
Generate Ruby bindings from headers with Clang31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Ruby bindings from headers with Clang

Hacker News2
Ge
Generate RDB DDL/DML from GraphDB41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate RDB DDL/DML from GraphDB

Hacker News1
De
Define, Generate, Parse Sequences36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Define, Generate, Parse Sequences

Hacker News2
Cd
Cdef – Generate C Constant Definitions from Matlab Vectors55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cdef – Generate C Constant Definitions from Matlab Vectors

Hacker News12