frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Flashbang – Sub-1ms DuckDuckGo bang redirects via Service Workers

https://github.com/ph1losof/flashbang
1•t3ntxcles•1h ago
I liked DuckDuckGo's bangs (shortcuts like !g to search Google directly) but didn't want to use DuckDuckGo as my search engine and the bang redirects were slow. Projects like unduck solved this by redirecting bangs locally — but they all load a webpage, execute JavaScript, then call window.location.replace(). Searches had a visible flash before the redirect. Every alternative I've tested — whether it's a page-load redirect, a Cloudflare Worker, or a browser extension — adds measurable latency. I knew a Service Worker could solve this entirely — intercept the request before the browser renders anything. So I built my own tool.

Flashbang intercepts the request at the Service Worker level before the browser renders anything. The SW does a hashmap lookup and a string template fill on raw URL-encoded bytes. Median redirect latency is sub-1ms. The browser never loads a page.

How it works:

- Service Worker intercepts every search request before it becomes a navigation and before page starts loading

- Bang parsing operates on raw encoded strings — no decodeURIComponent, no regex, no new URL() in the hot path

- Supports all 7 DuckDuckGo bang syntax patterns (prefix, suffix, no-space, mid-query, etc.)

- 14,000+ bangs from DDG + Kagi, plus custom bangs

- Address bar autocomplete via OpenSearch with a radix trie, ranked by frecency (exponential decay, 14-day half-life)

- Once the SW is installed, redirects work fully offline

What it's not:

- Not a browser extension — it's a web app you set as your default search engine

- No tracking, no analytics, no telemetry

- Zero runtime dependencies

- AGPL-3.0

~2,600 lines of TypeScript, 1,200 lines of tests. I'd love feedback on the architecture.

https://github.com/ph1losof/flashbang

Comments

t3ntxcles•1h ago
If you want to verify the sub-1ms claim, there's a benchmark page you can run yourself: https://flashbang-dyr.pages.dev/bench

Ask HN: How do solo founders find academic co-founders for STTR grants?

1•Rao_Atreya•27s ago•0 comments

Would You Buy Generic AI?

https://tomtunguz.com/white-label-ai/
1•swolpers•41s ago•0 comments

Show HN: Arbor – AI research workbench, question to knowledge graph

https://www.arborinquiries.com/
1•FlynnLachendro•1m ago•0 comments

PEP 827 – Type Manipulation

https://peps.python.org/pep-0827/
1•pboulos•2m ago•0 comments

Regenerator 2000: interactive disassembler for the C64 and other 6502 systems

https://regenerator2000.readthedocs.io/en/latest/
2•homarp•2m ago•1 comments

CEOs are betting big on AI while barely using it

https://www.charterworks.com/ceos-are-betting-big-on-ai-while-barely-using-it/
2•swolpers•3m ago•0 comments

The AI Bubble Is an Information War

https://www.wheresyoured.at/the-ai-bubble-is-an-information-war/
2•spking•4m ago•0 comments

Google violates its 14-day deprecation policy for Gemini 3 Pro Preview

2•goolulusaurs•5m ago•0 comments

US Stock Market has lost $1 TRILLION in value since open Tuesday

https://old.reddit.com/r/StockMarket/comments/1rjtww8
1•ck2•6m ago•0 comments

A lightweight, embeddable Prolog interpreter written in C11

https://github.com/no382001/prolog
1•triska•9m ago•0 comments

Blackberry Growth Monitoring and Feature Quantification with UAV Remote Sensing

https://www.mdpi.com/2624-7402/6/4/260
1•PaulHoule•9m ago•0 comments

The Court's (Selective) Impatience Is a Vice

https://www.stevevladeck.com/p/214-the-courts-selective-impatience
1•hn_acker•9m ago•1 comments

Show HN: Boosted LightFace – A Hybrid DNN and GBM Model for Facial Recognition

https://dergipark.org.tr/en/pub/gujs/article/1794891
1•serengil•9m ago•0 comments

Isn't P2P WebRTC better than SSH for connecting to Mac terminal from iPhone?

https://macky.dev/#architecture
1•eureka_boy•10m ago•2 comments

Anthropic's Claude sees 'elevated errors' as it tops Apple's free apps

https://www.cnbc.com/2026/03/02/anthropic-claude-ai-outage-apple-pentagon.html
1•LostMyLogin•10m ago•1 comments

Bio-Inspired Adapters: Improving Models Beyond LoRA Fine-Tuning

https://www.genbais.com/
1•lazarko•11m ago•0 comments

Show HN: Design Jam, ASCII wireframes and annotations that export as AI prompts

https://getdesignjam.com
1•Adrig•12m ago•0 comments

Show HN: Free Math Sheets – Generate math worksheets for K-5 problems

https://www.freemathsheets.com/
1•mchaver•12m ago•0 comments

What the First Billionaire Reveals About the First Trillionaire

https://www.bloomberg.com/news/features/2026-02-26/elon-musk-and-the-first-trillionaire-what-rock...
3•robtherobber•13m ago•0 comments

A New Rembrandt Discovered

https://www.rijksmuseum.nl/en/stories/themes/rembrandt/story/a-new-rembrandt-discovered
1•Tomte•13m ago•0 comments

What AI-justified mass layoffs reveal about what we were never owed

https://codeplusconduct.substack.com/p/grateful-for-your-contributions
1•mooreds•13m ago•0 comments

Show HN: I rewrote an inventory app 4 times over 5 years before releasing v1

https://upzonehq.com/
1•florentmsl•14m ago•0 comments

Floyd is an enterprise-level world model

https://www.loom.com/share/7b3ba36113e446548f3a79cf5fc1e42c
1•tjarzu•15m ago•0 comments

Walk me through this "Safety Third" thing

https://mikerowe.com/2020/03/walk-me-through-this-safety-third-thing/
2•andsoitis•15m ago•0 comments

Perplexity Computer Is Groundbreaking

https://karozieminski.substack.com/p/perplexity-computer-review-examples-guide
2•Lunaboo•18m ago•0 comments

Jack Dorsey Blamed AI for Block's Layoffs. Skeptics Aren't Buying It

https://www.wsj.com/business/jack-dorseys-latest-far-out-bet-an-ai-future-with-fewer-employees-25...
2•nradov•18m ago•0 comments

A new 'uncertainty relation' for quantum measurement errors

https://phys.org/news/2026-03-uncertainty-quantum-errors.html
2•bikenaga•18m ago•1 comments

Building an Elite AI Engineering Culture in 2026

https://www.cjroth.com/blog/2026-02-18-building-an-elite-engineering-culture
1•mooreds•18m ago•0 comments

Idaho considers an 'apocalyptic' choice for disabled people and families

https://19thnews.org/2026/03/idaho-medicaid-budget-cuts-disability-programs/
1•mooreds•19m ago•0 comments

Where AI Agents Are Heading: What We Learned from Recent YC Startups

https://e2b.dev/blog/yc-companies-ai-agents
1•tizkovatereza•22m ago•2 comments