Or

Order Stamps – A String-Based Trick for Effortless List Ordering

Hacker News

Order Stamps – A String-Based Trick for Effortless List Ordering

Hey HN, our small team recently stumbled onto a neat approach for handling ordered lists in DBs without all the reindexing headaches. We’ve been calling it Order Stamps, and we originally built it for our own distributed database project, GoatDB. The concept is simple—treat the “position” of each list item as an infinitely splittable string rather than an integer index. Why bother? Ever inserted an item “in the middle” of a large list and had to reorder everything afterward? We wanted O(1) list operations so you only ever update a single row per insertion/deletion. How to use it? Just add a string order column to your rows, then call the start() or end() functions to generates stamps that insert at either ends. There's also the between() function that generates a stamp between two others. Finally, just sort by this order column to get the correct list. The order of these stamps remain consistent even if you filter a subset of the rows, and it's also collision resistant so stamps can be safely generated without coordination. How does it work? Think of “AA” and “AB.” If you want something in the middle, pick “AAM” or “AAX” or keep making up new strings. There’s always room for more “in-between” values because strings can keep growing. We’re curious if this approach might be useful to you. Our code is a small TypeScript utility—no heavy lifts—and it plays nicely with standard DB indexes so your range queries stay fast. What do you think? We’d love the community’s take on the design choices or edge cases we might not have considered. We hope you’ll dig into the code and give us your thoughts! If you end up using Order Stamps (with or without GoatDB), let us know how it goes. Github Repo: https://github.com/goatplatform/orderstamp-js Looking forward to your feedback—thanks for reading!

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: new, single, using · Missing: mac, agents, macos
85%85% 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
65%65% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
44%44% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: platform · Missing: plus, intuitive, reviews
39%39% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
18%18% 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
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Sy
Systema Robotica, a treatise on the order and evolution of robotkind56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Systema Robotica, a treatise on the order and evolution of robotkind

Hacker News3
Fi
Firefox Addon, Supertab - list of tabs in most recently used order32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Firefox Addon, Supertab - list of tabs in most recently used order

Hacker News1
Order Tramadol Online
Order Tramadol Online25%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Order Tramadol Online

Indie Hackers
Plateable: Personalized Dining
Plateable: Personalized Dining37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Know What to Order Before You Order It

Indie Hackerscommitment-side-project
Wh
Who Next? - you provide a list, we pick the order47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Who Next? - you provide a list, we pick the order

Hacker News2
Or
Order Like a Malaysian56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Order Like a Malaysian

Hacker News5
Or
Order an Uber with the Click of Your Heels61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Order an Uber with the Click of Your Heels

Hacker News3
Si
Sift through recently dropped .com's in order of PRONOUNCEABILITY, etc41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sift through recently dropped .com's in order of PRONOUNCEABILITY, etc

Hacker News3
Si
Sift through recently dropped .com's in order of pronounceability, etc.41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sift through recently dropped .com's in order of pronounceability, etc.

Hacker News111
Ba
BackerETA – Crowdsourced order tracking for crowdfunding, and more39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

BackerETA – Crowdsourced order tracking for crowdfunding, and more

Hacker News1