frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Secache – Sampling Eviction Cache

https://pkg.go.dev/github.com/Snawoot/secache
1•Snawoot•8h ago
I'd like to share a curious cache implementation I recently came up with: https://pkg.go.dev/github.com/Snawoot/secache

It's a small (<200 LOC) simple cache implementation. What makes it curious is how it approaches item expiration. Usually in-memory cache libraries either scan entire key space from time to time or maintain priority queue to kick out oldest items. This library handles item expiration differently: on each new item addition it performs fixed small number of eviction attempts against keys selected randomly. This way it is able to maintain stable high ratio of valid elements in cache.

What's more important is that validity of item is decided by user-provided function. That allows to bring in your own notion of item validity: item age, frequency of the item use, internal state of shared object and so on. E.g. I use it, among other things, to evict per-user instances of "golang.com/x/time/rate".Limiter as soon as token bucket recovered to initial state and limiter has no shared lock being held on it.

X shuts down the European Commission's ad account the day after major fine

https://www.engadget.com/social-media/x-shuts-down-the-european-commissions-ad-account-the-day-af...
1•MilnerRoute•2m ago•0 comments

I created A-Lang – a new lightweight language, focused on simplicity and speed

https://alang-doc.vercel.app/
1•alexandrelanda•6m ago•2 comments

Optimizing Associative Operations (2015)

https://ericlippert.com/2015/10/27/optimizing-associative-operations/
1•mooreds•7m ago•0 comments

For a Literary Saint, Margaret Atwood Can Sure Hold a Grudge

https://www.nytimes.com/2025/11/01/books/review/margaret-atwood-book-of-lives-memoir.html
3•mooreds•7m ago•0 comments

Navigating the future of AI agent security with Dan Moore [audio]

https://overcommitted.dev/ep-36-navigating-the-future-of-ai-agent-security-with-dan-moore/
1•mooreds•8m ago•0 comments

Using AI to Modernize Ubuntu Error Tracker Produced Code That Was 'Plain Wrong'

https://www.phoronix.com/news/Ubuntu-Error-Tracker-AI-Error
1•Lockal•10m ago•0 comments

Sitekick – simple AI-driven web chat and lead-capture for any website

1•nagendraallam•10m ago•1 comments

Claude Code Tips

https://agenticcoding.substack.com/p/32-claude-code-tips-from-basics-to
2•ykdojo•12m ago•0 comments

First explorations in Indian classical music

https://andrewbatson.com/2025/10/11/first-explorations-in-indian-classical-music/
5•surprisetalk•13m ago•0 comments

Ignore the pessimists – we are living through a literary golden age

https://www.commonreader.co.uk/p/ignore-the-pessimists-we-are-living
3•surprisetalk•13m ago•0 comments

(Dis)Assembling Experience

https://www.raphkoster.com/games/presentations/disassembling-games/
2•surprisetalk•13m ago•0 comments

So What Should We Call This – A Grue Jay?

https://cns.utexas.edu/news/research/so-what-should-we-call-grue-jay
2•surprisetalk•13m ago•0 comments

Why Fighter Jets Ban 90% of C++ Features [video]

https://www.youtube.com/watch?v=Gv4sDL9Ljww
11•AareyBaba•18m ago•2 comments

Musicians must embrace 'unstoppable force' of AI, Eurythmics' Dave Stewart urges

https://www.theguardian.com/music/2025/dec/05/musicians-must-embrace-unstoppable-force-of-ai-eury...
2•binning•21m ago•2 comments

Supercomputer Creates One of the Most Realistic Virtual Brains Ever Seen

https://www.sciencealert.com/supercomputer-creates-one-of-the-most-realistic-virtual-brains-ever-...
2•wjSgoWPm5bWAhXB•22m ago•0 comments

Why do so many girls in Blackpool want to become boys?

https://juliebindel.substack.com/p/why-do-so-many-girls-in-blackpool-a6a
2•binning•23m ago•0 comments

Internet became 'enshittified' – and how to fix it

https://www.rnz.co.nz/news/on-the-inside/581142/how-internet-became-enshittified-and-how-to-fix-it
5•billybuckwheat•23m ago•0 comments

Show HN: Honest Reviews Club – Deep, transparent digital product reviews

https://honest-reviews.club/
2•launchzilla•27m ago•0 comments

Rape victims will no longer be depicted as serial liars in England and Wales

https://www.theguardian.com/society/2025/dec/02/rape-victims-england-wales-protected-serial-liar-...
6•binning•30m ago•0 comments

A series of tricks and techniques I learned doing tiny GLSL demos

https://blog.pkh.me/p/48-a-series-of-tricks-and-techniques-i-learned-doing-tiny-glsl-demos.html
2•ux•34m ago•0 comments

Who Invented ClassPass?

https://twitter.com/JonasBrandon/status/1997694250692293069
2•metricmissions•34m ago•0 comments

"They're not designed for that": An ocean robot's lucky Antarctic discoveries

https://reportearth.substack.com/p/one-of-my-best-stories-was-about
3•MaysonL•36m ago•0 comments

Key (Programming) Language Features – Does Yours Qualify?

https://wiki.c2.com/?KeyLanguageFeature
2•gurjeet•40m ago•0 comments

Future of Vancouver's repair cafés uncertain after city cuts funding for 2026

https://www.cbc.ca/news/canada/british-columbia/city-of-vancouver-cuts-funding-repair-cafe-9.7006210
3•cf100clunk•42m ago•0 comments

Did Asteroids Invent Gum Billions of Years Ago?

https://www.universetoday.com/articles/did-asteroids-invent-gum-billions-of-years-ago
4•fcpguru•45m ago•0 comments

Thoughts on AI progress (Dec 2025)

https://www.dwarkesh.com/p/thoughts-on-ai-progress-dec-2025
3•paulpauper•49m ago•0 comments

How Much Are US Firms Using AI Tools?

https://conversableeconomist.com/2025/12/02/how-much-are-us-firms-using-ai-tools/
3•paulpauper•50m ago•0 comments

Pyramids to Columns

https://blog.andrewyang.com/p/pyramids-to-columns
4•paulpauper•50m ago•0 comments

One week left to wean Australian kids off social media platforms

https://www.themandarin.com.au/304293-one-week-left-to-wean-australian-kids-off-social-media-plat...
2•mooreds•51m ago•0 comments

High-quality, ubiquitous, and portable telemetry for effective observability

https://opentelemetry.io/
2•mooreds•54m ago•0 comments