frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Minecraft Creeper meets 90s Tamagotchi

https://github.com/danielbrendel/krepagotchi-game
1•foxiel•3m ago•0 comments

Show HN: Termiteam – Control center for multiple AI agent terminals

https://github.com/NetanelBaruch/termiteam
1•Netanelbaruch•3m ago•0 comments

The only U.S. particle collider shuts down

https://www.sciencenews.org/article/particle-collider-shuts-down-brookhaven
1•rolph•6m ago•0 comments

Ask HN: Why do purchased B2B email lists still have such poor deliverability?

1•solarisos•6m ago•0 comments

Show HN: Remotion directory (videos and prompts)

https://www.remotion.directory/
1•rokbenko•8m ago•0 comments

Portable C Compiler

https://en.wikipedia.org/wiki/Portable_C_Compiler
2•guerrilla•10m ago•0 comments

Show HN: Kokki – A "Dual-Core" System Prompt to Reduce LLM Hallucinations

1•Ginsabo•11m ago•0 comments

Software Engineering Transformation 2026

https://mfranc.com/blog/ai-2026/
1•michal-franc•12m ago•0 comments

Microsoft purges Win11 printer drivers, devices on borrowed time

https://www.tomshardware.com/peripherals/printers/microsoft-stops-distrubitng-legacy-v3-and-v4-pr...
2•rolph•12m ago•0 comments

Lunch with the FT: Tarek Mansour

https://www.ft.com/content/a4cebf4c-c26c-48bb-82c8-5701d8256282
2•hhs•16m ago•0 comments

Old Mexico and her lost provinces (1883)

https://www.gutenberg.org/cache/epub/77881/pg77881-images.html
1•petethomas•19m ago•0 comments

'AI' is a dick move, redux

https://www.baldurbjarnason.com/notes/2026/note-on-debating-llm-fans/
3•cratermoon•20m ago•0 comments

The source code was the moat. But not anymore

https://philipotoole.com/the-source-code-was-the-moat-no-longer/
1•otoolep•20m ago•0 comments

Does anyone else feel like their inbox has become their job?

1•cfata•20m ago•0 comments

An AI model that can read and diagnose a brain MRI in seconds

https://www.michiganmedicine.org/health-lab/ai-model-can-read-and-diagnose-brain-mri-seconds
2•hhs•24m ago•0 comments

Dev with 5 of experience switched to Rails, what should I be careful about?

1•vampiregrey•26m ago•0 comments

AlphaFace: High Fidelity and Real-Time Face Swapper Robust to Facial Pose

https://arxiv.org/abs/2601.16429
1•PaulHoule•27m ago•0 comments

Scientists discover “levitating” time crystals that you can hold in your hand

https://www.nyu.edu/about/news-publications/news/2026/february/scientists-discover--levitating--t...
2•hhs•29m ago•0 comments

Rammstein – Deutschland (C64 Cover, Real SID, 8-bit – 2019) [video]

https://www.youtube.com/watch?v=3VReIuv1GFo
1•erickhill•30m ago•0 comments

Tell HN: Yet Another Round of Zendesk Spam

2•Philpax•30m ago•0 comments

Postgres Message Queue (PGMQ)

https://github.com/pgmq/pgmq
1•Lwrless•33m ago•0 comments

Show HN: Django-rclone: Database and media backups for Django, powered by rclone

https://github.com/kjnez/django-rclone
2•cui•36m ago•1 comments

NY lawmakers proposed statewide data center moratorium

https://www.niagara-gazette.com/news/local_news/ny-lawmakers-proposed-statewide-data-center-morat...
1•geox•38m ago•0 comments

OpenClaw AI chatbots are running amok – these scientists are listening in

https://www.nature.com/articles/d41586-026-00370-w
3•EA-3167•38m ago•0 comments

Show HN: AI agent forgets user preferences every session. This fixes it

https://www.pref0.com/
6•fliellerjulian•40m ago•0 comments

Introduce the Vouch/Denouncement Contribution Model

https://github.com/ghostty-org/ghostty/pull/10559
2•DustinEchoes•42m ago•0 comments

Show HN: SSHcode – Always-On Claude Code/OpenCode over Tailscale and Hetzner

https://github.com/sultanvaliyev/sshcode
1•sultanvaliyev•42m ago•0 comments

Microsoft appointed a quality czar. He has no direct reports and no budget

https://jpcaparas.medium.com/microsoft-appointed-a-quality-czar-he-has-no-direct-reports-and-no-b...
3•RickJWagner•44m ago•0 comments

Multi-agent coordination on Claude Code: 8 production pain points and patterns

https://gist.github.com/sigalovskinick/6cc1cef061f76b7edd198e0ebc863397
1•nikolasi•45m ago•0 comments

Washington Post CEO Will Lewis Steps Down After Stormy Tenure

https://www.nytimes.com/2026/02/07/technology/washington-post-will-lewis.html
15•jbegley•45m ago•3 comments
Open in hackernews

Can a regex match valid card numbers?

https://abstractnonsense.xyz/blog/2025-08-31-can-a-regex-match-valid-card-numbers/
4•subset•5mo ago

Comments

subset•5mo ago
This was a problem that was obsessing me for a couple sleepless nights...

Ordinarily, when you look up "regex for card numbers" you get a list of card provider prefixes and length constraints, but this doesn't do any validation on the check digit (calculated using the Luhn algorithm)!

Spoiler: Regex's _can_ recognise the set of valid card numbers, but the resulting regex would be exponential in the number of states for the minimal DFA (as far as I can reason).

bediger4000•5mo ago
This is excellent!

I worked at a Visa Level 1 merchant 2003-2006. We had Luhn checks scattered throughout the code, which led to some delightful bugs.

From the post: "walk over the digits from right-to-left, alternating between adding the digit and adding the “Luhn double” of the digit to a rolling sum."

That algorithm is good to see, and I'm glad that everyone has come around to that method, but in 2003, that was absolutely not how folks did it. MasterCard and Discover numbers were known to be 16 digits. Visas where 16 digits, and it was rumored that some accounts had 12 digit numbers. Never saw one in the wild. Of course American Express is from Mars and has 13 digit numbers, and a 4 digit CVV.

The several Luhn-checks in the code always looked at length of the card number and based on that, started with a "luhn double" or with a regular number. The Luhn check documentation at the time did it that way in their examples. That made for some super clunky code resembling Fortran, no matter what language you wrote it in.

subset•4mo ago
Thank you!! After some discussion with a kind reader, I actually managed to compile a working regex! It's 10s of millions of characters in length, but it works! (I've updated the post with the details :)