frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

We Developed a Rule Database

https://github.com/topling/ruledb-doc
1•rockeetterark•1h ago

Comments

rockeetterark•1h ago
database are often used to store data and search data by 'conditions', ex: `select * from ... where <conditions>`.

on the other side, in many cases we need to store MANY 'conditions' and search the stored conditions by 'data'. such as:

* online AD, the Advertisers define many conditions for user profiles, contexts ... * content filtering(forbidden words with very complex boolean expression) * risk control, alert ... conditions * data cleaning, curation... * auto labeling...

Such businesses often use Elastic Search percolator(or its underlying lucene monitor), more recent tantivy percolator(lucene's rust alternative).

Now, we have developed RuleDB for such use case, our enterprise users showing RuleDB is more than 1000x faster than ES(excluding RPC network overhead).

RuleDB has two parts: 1. the compiler and 2. the runtime.

1. The Compiler compiles rule code written by RuleDB DSL into binaries

  * AC automata binaries: for normal 'words'

  * **Multi** Regex engine: our **extended regex** with regular language algebras(not/and/or/concat/non-greedy-op...), many different extended regex in many rules are compiled into one DFA(the supported regex num  is 100x of hyperscan)

  * cost based recall optimization: for example in `A and B and C`, the least frequent of A,B,C is selected as the recall term, this is in recursive approach.

  * The rule verification VM: AC automata and regex just scan text for atoms, such atoms are combined with boolean expressions, ex: a near/3 quick near/4 "brown fox" and not(lazy near/+2 dog or diligent near/2 wolf).
     * The VM code are highly optimized by the compiler
2. The applications use RuleDB API calling the runtime lib

  * load the compiled binaries(just mmap)
  * scan + verify
Advanct features:

  * numbers:  integeral range `{i{3000,5000}}`, real number range `{r{2.71828,3.14159265}}`, -- save and matched as text, no width limit

  * composite index: `gender[1] and age[23] and income{i{3000,5000}}` will be compiled into an composite index 'i-gender-age-income'.

  * multi dimentions: the typical case geofencing: `longitude{r{116.2418,116.2441}} and latitude {r{39.5424,39.5450}}` -- RuleDB natively support any dimention search

  * such numeric expression and text expressions can be mixed: `(america or china) and gender[1] and age[23] and income{i{3000,5000}}`
A complex rule:

``` gender{{1}} and age{i{20,28}} and income{i{18000,23000}} and longitude{r{116.2418,116.2441}} and latitude {r{39.5424,39.5450}} and interesting{{movie|food|sport}} and books{{The Red and the Black|The Great Gatsby}} and a near/3 quick near/4 "brown fox" and not(lazy near/+2 dog or diligent near/2 wolf) ```

There are real world single rule with more than 50KB in our enterprise users, a rule source code file with 2MB is fully compiled in 150 milliseconds, a query using a 10KB document to search 70000 rules with 20 matched rules takes just 300us(micro seconds, not milli seconds)!

---- I'am also the author of ToplingDB, I had posted several months ago https://news.ycombinator.com/item?id=44432322

Use Deterministic Guardrails for Your LLM Agents

https://www.balajeerc.info/Use-Deterministic-Guardrails-for-your-LLM-Agents/
1•hannofcart•36s ago•0 comments

Did A.I. Take Your Job? Or Was Your Employer 'A.I.-Washing'?

https://www.nytimes.com/2026/02/01/business/layoffs-ai-washing.html
1•cainxinth•1m ago•0 comments

Resurrecting Crimsonland – Decompiling and preserving a cult 2003 classic game

https://banteg.xyz/posts/crimsonland/
1•Tiberium•2m ago•0 comments

Don't Get Scammed by Fake Power Tools [video]

https://www.youtube.com/watch?v=C_3bIv33f4o
1•burnt-resistor•3m ago•0 comments

Gyms, Zoos, and Museums: Your documentation should be in-game

https://rystorm.com/blog/gyms-zoos-museums-your-documentation-should-be-in-game
1•gyomu•4m ago•0 comments

How id Software made Catacomb 3D

https://www.youtube.com/watch?v=ZcUqwMf01pI
1•nailer•4m ago•0 comments

I made a WebRTC powered fidget spinner that syncs up between clients

https://a.rno.tt
1•acorn221•5m ago•1 comments

58% of Photographers Have Lost Work to Generative AI: Survey

https://petapixel.com/2026/01/30/58-of-photographers-have-lost-work-to-generative-ai-survey/
2•giuliomagnifico•5m ago•0 comments

Does selling AI capabilities as licensed, downloaded software make sense

https://cmpsbl.com/capabilities
1•promptfluid•6m ago•2 comments

Poetry will free us from the LLM mind

https://tumbleweedwords.substack.com/
1•tumbleweedwords•6m ago•0 comments

Show HN: Archon – 4 parallel Claude terminals that build software autonomously

https://github.com/martino-vigiani/Archon
1•martinovigiani•8m ago•0 comments

Show HN: Public domain classics delivered as weekly email installments

https://www.confabulists.com/
2•pipnonsense•10m ago•0 comments

A Taxonomy for AI Agents

https://www.osohq.com/post/you-cant-secure-what-you-cant-categorize-a-taxonomy-for-ai-agents
2•meghan•11m ago•0 comments

KeepSanity – an AI newsletter without daily noise, ads and FOMO-increasing sh*t

https://keepsanity.ai
1•mcPear•12m ago•0 comments

This Month in Ladybird – January 2026

https://ladybird.org/newsletter/2026-01-31/
2•exploraz•14m ago•0 comments

Show HN: Ziggy – high performance lock free MPMC channel in under 200 LOC

https://github.com/nubskr/ziggy
1•jakesullivan11•16m ago•0 comments

Custom machine kept man alive without lungs for 48 hours

https://arstechnica.com/health/2026/01/custom-machine-kept-man-alive-without-lungs-for-48-hours/
2•sohkamyung•17m ago•1 comments

Microsoft is using Claude Code internally while selling you Copilot

https://blog.devgenius.io/microsoft-is-using-claude-code-internally-while-selling-you-copilot-d58...
3•tessierashpool9•18m ago•1 comments

Context-Generic Programming v0.6.1 Release: Improving Ergonomics and Debugging

https://contextgeneric.dev/blog/v0-6-1-release/
1•maybevoid•19m ago•0 comments

Haplodiploidy

https://en.wikipedia.org/wiki/Haplodiploidy
1•cl3misch•20m ago•0 comments

The physics of an unethical daycare model that uses illness to maximize profits

https://physicsworld.com/a/the-physics-of-an-unethical-daycare-model-that-uses-illness-to-maximis...
1•sohkamyung•22m ago•0 comments

An open source universal back end framework

https://nitric.io
2•milsebg•23m ago•0 comments

Show HN: Cryptography Interactive Visualization

https://vizcipher.com/
1•bladecd•25m ago•0 comments

HeyCalc is your online intelligent calculation expert

https://heycalc.org
1•zhouhua•26m ago•0 comments

Show HN: TensorSeal – Zero-disk-footprint secure model loader for Android

https://github.com/NerdzHub/TensorSeal_Android
2•orcunozyurt•26m ago•1 comments

How to Tessellate

http://graphicrants.blogspot.com/2026/02/how-to-tessellate.html
1•ingve•27m ago•0 comments

Gambling with Research Quality

https://tomstafford.substack.com/p/gambling-with-research-quality
1•Tomte•28m ago•0 comments

MobelPrize: Let agents do meaningful work together on a large scale

https://mobelprize.com/
1•brainbun•29m ago•0 comments

The addictive behavior induced by food monosodium glutamate [pdf]

https://rjmp.com.ro/articles/2013.4/PM_Nr-4_2013_Art-4.pdf
1•mgh2•33m ago•0 comments

EU must become a 'genuine federation' to avoid deindustrialisation and decline

https://www.euronews.com/my-europe/2026/02/02/eu-must-become-a-genuine-federation-to-avoid-deindu...
25•saubeidl•34m ago•24 comments