frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

QRS: Epsilon Wrangling

https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling
13•zdw•7h ago

Comments

o11c•2h ago
I also have been playing with regexes recently. One observation that I've made: if you're willing to setting for something slightly weaker than regexes, you can make your code trivial to understand (and go straight to a DFA instead of going through NFA). AFAICT the only "hard" case (which I'm erroring out on) involves things like /(AB)+|(AC)+/ (where A, B, and C are arbitrarily complex patterns), since everything else can be easily simplified. And at least for the contexts I care about, that kind of regex is exceptionally rare.

... I probably should actually read the papers on how to do it properly though. Last time I tried, I got stuck in a tangle of "why does C make efficient hashmaps so hard!" - this time, I'm avoiding C until I have a fully-tested prototype (current status: 1.0KLoC logic, 0.5KLoC comments, 4.4KLoC test suite, 40% tests failing after a recent refactor [edit: I forgot Python enums don't compare equal to integers], 100% of the time being annoyed at how stupidly slow Python is if you use obscure programming features like "loops", "strings", "branching", or "functions").

kragen•1h ago
Plausibly this approach is trivial to understand and implements full regexes, but it is slower than the NFA or DFA approach: http://canonical.org/~kragen/sw/dev3/redl.py

PEGs are in some ways more powerful than regexes, and in other ways less powerful, but usually the former matter more. This is not trivial to understand but I think it's not that hard either; it's a page of code: https://github.com/kragen/peg-bootstrap/blob/master/peg.md

That version doesn't memoize and so doesn't enjoy Packrat parsing's linear-time guarantee, but you can easily modify it to do so.

Another subset of regexes that's easy to understand is this single-page pattern matcher by Rob Pike from TPOP: https://www.cs.princeton.edu/courses/archive/spr09/cos333/be... which is enormously less code than my single-page PEG parser generator above. But then, it doesn't have to compile itself.

o11c•53m ago
Unfortunately, neither "waste time" nor "waste space" are approaches worth pursuing.

We already have too many programs being written that are too simple and thus slow and/or wrong. We need to write code that is as simple as possible, but no simpler.

Systemd has been a complete, utter, unmitigated success

https://www.osnews.com/story/142741/systemd-has-been-a-complete-utter-unmitigated-success/
1•sertsa•1m ago•0 comments

World Spider Catalog Version 26

https://wsc.nmbe.ch/
1•noleary•4m ago•0 comments

Show HN: I built Envilo.app to automate editable Stripe invoicing

1•envilo•8m ago•0 comments

Seedance.ai

https://www.seedance.ai/
1•wangava•8m ago•1 comments

Why is Elon Musk always late for its livestream?

1•feizhuzheng•9m ago•0 comments

Bash-5.3

https://lwn.net/Articles/1029079/
2•thunderbong•24m ago•0 comments

Searching for family history as told by a storied WWII telegram

https://mklyons.com/blog/searching-family-history-telegram
1•mklyons•24m ago•0 comments

Can we believe anything about markups anymore?

https://nicholasdecker.substack.com/p/can-we-believe-anything-about-markups
1•OgsyedIE•25m ago•0 comments

Show HN: Still coding in VC++ 6.0 after losing everything, living in a trailer

6•CodeAndExile•26m ago•3 comments

Discovery of ancient riverbeds suggests Mars once wetter than thought

https://www.theguardian.com/science/2025/jul/10/mars-once-wetter-than-thought-surprise-discovery-10000-miles-ancient-riverbeds
2•pseudolus•31m ago•0 comments

Design Considerations for an Anthropophilic Computer (1979)

https://web.stanford.edu/dept/SUL/sites/mac/primary/docs/bom/anthrophilic.html
1•akkartik•34m ago•0 comments

Offpolicy: Generating offline policy data for RL agent environments

https://github.com/arthurcolle/offpolicy
1•arthurcolle•39m ago•0 comments

JEDEC Releases New LPDDR6 Standard to Enhance Mobile and AI Memory Performance

https://www.businesswire.com/news/home/20250709315796/en/JEDEC-Releases-New-LPDDR6-Standard-to-Enhance-Mobile-and-AI-Memory-Performance
2•transpute•43m ago•0 comments

Why Trump Appointed the Secretary of Transportation to Lead NASA

https://arstechnica.com/space/2025/07/nasa-has-a-new-interim-administrator-the-secretary-of-transportation/
4•LorenDB•45m ago•0 comments

How to trick ChatGPT into revealing Windows keys? Say "I give up"

https://www.theregister.com/2025/07/09/chatgpt_jailbreak_windows_keys/
6•LorenDB•47m ago•1 comments

A Virginia public library is fighting off a takeover by private equity

https://lithub.com/a-virginia-public-library-is-fighting-off-a-threatened-takeover-by-private-equity/
5•sharkweek•47m ago•0 comments

Height, body size, and longevity: is smaller better for the humanbody? (2002)

https://pmc.ncbi.nlm.nih.gov/articles/PMC1071721/
1•sandwichsphinx•50m ago•0 comments

Privilege Escalation on the Playdate

https://www.peterstefek.me/foul-play.html
2•underanalyzer•51m ago•0 comments

Windows BSoD to Watson: The Reliability Journey (2022)

https://hardcoresoftware.learningbyshipping.com/p/061-bsod-to-watson-the-reliability
2•transpute•58m ago•0 comments

Show HN: Google ADK and Vertex AI Memory Bank for Persistent Conversational AI

https://github.com/serkanh/adk-with-memorybank
1•serkanh•58m ago•0 comments

How airports could help aliens spot Earth

https://www.ras.ac.uk/news-and-press/research-highlights/how-airports-heathrow-and-gatwick-could-help-aliens-spot-earth
2•geox•1h ago•0 comments

El Salvador Tells UN That US Has "Exclusive" Jurisdiction over Detainees

https://www.techdirt.com/2025/07/09/el-salvador-throws-doj-under-the-bus-tells-un-that-us-has-exclusive-jurisdiction-over-renditioned-detainees/
5•nadermx•1h ago•0 comments

eBPF: Connecting with Container Runtimes

https://h0x0er.github.io/blog/2025/06/29/ebpf-connecting-with-container-runtimes/
1•tanelpoder•1h ago•0 comments

Why Is LabEx Considered the Best Choice for Linux Beginners?

https://www.indiehackers.com/post/why-is-labex-considered-the-best-choice-for-linux-beginners-bu1XHUGzyK4zqRYvACHK
2•huhuhang•1h ago•1 comments

Bell advances to build phase of secretive DARPA high-speed VTOL contest

https://www.flightglobal.com/defence/bell-advances-to-build-phase-of-secretive-darpa-high-speed-vtol-contest/163727.article
2•bouchard•1h ago•1 comments

The Author and the Assistant

https://zmj.dev/author_assistant.html
1•zmj•1h ago•1 comments

Who Needs Action Items?

https://coops.dev/who-needs-action-items
2•theonething•1h ago•0 comments

Closures for Hare

https://lists.sr.ht/~sircmpwn/hare-rfc/%3CDB54BK1QFAMO.VURD1415NHT3@ddevault.org%3E
1•todsacerdoti•1h ago•0 comments

A lightweight Cloudflare Dynamic DNS shell script

https://github.com/fernvenue/cloudflare-ddns
2•fernvenue•1h ago•0 comments

Menoq – QR Menus for Restaurants with Instant Updates

https://menoq.app
1•whit3hawks•1h ago•0 comments