frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Fast(er) regular expression engines in Ruby

https://serpapi.com/blog/faster-regular-expression-engines-in-ruby/
60•davidsojevic•1y ago

Comments

yxhuvud•1y ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•1y ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•1y ago
> Another nuance was found in ruby, which cannot scan the haystack with invalid UTF-8 byte sequences.

This is extremely basic ruby: UTF-8 encoded strings must be valid UTF-8. This is not unique to ruby. If I recall correctly, python 3 does the same thing.

    2.7.1 :001 > haystack = "\xfc\xa1\xa1\xa1\xa1\xa1abc"
    2.7.1 :003 > haystack.force_encoding "ASCII-8BIT"
    => "\xFC\xA1\xA1\xA1\xA1\xA1abc" 
    2.7.1 :004 > haystack.scan(/.+/)
    => ["\xFC\xA1\xA1\xA1\xA1\xA1abc"]
This person is a senior engineer on their Team page. All they had to do was google "ArgumentError: invalid byte sequence in UTF-8". Or ask a coworker... the company has Ruby on Rails applications. headdesk
burntsushi•1y ago
The nuance is specifically relevant here because neither of the other two regex engines benchmarked have this requirement. It's doubly relevant because that means running a regex search doesn't require a UTF-8 validation step, and is therefore likely beneficial from a perf perspective, dependening on the workload.
kayodelycaon•1y ago
That’s a good point. I hadn’t considered it because I’ve hit the validation error long before getting to search. It is possible to avoid string operations with careful coding prior to the search.

Edit: After a little testing, the strings can be read from and written to files without triggering validation. Presumably this applies to sockets as well.

DmitryOlshansky•1y ago
I wonder how std.regex of dlang would fare in such test. Sadly due to a tiny bit of D’s GC use it’s hard to provide as a library for other languages. If there is an interest I might take it through the tests.

Making the news available at no cost is a victory

https://www.sltrib.com/opinion/commentary/2026/05/12/just-days-tribune-reporting/
58•danso•1h ago•36 comments

Setting up a free *.city.state.us locality domain (2025)

https://fredchan.org/blog/locality-domains-guide/
388•speckx•5h ago•116 comments

A History of IDEs at Google

https://laurent.le-brun.eu/blog/a-history-of-ides-at-google
140•laurentlb•4d ago•103 comments

Linux gaming is faster because Windows APIs are becoming Linux kernel features

https://www.xda-developers.com/linux-gaming-is-getting-faster-because-windows-apis-are-becoming-l...
179•haunter•2d ago•150 comments

MacBook Neo Deep Dive: Benchmarks, Wafer Economics, and the 8GB Gamble

https://www.jdhodges.com/blog/macbook-neo-benchmarks-analysis/
30•tosh•1h ago•9 comments

The Emacsification of Software

https://sockpuppet.org/blog/2026/05/12/emacsification/
101•rdslw•13h ago•53 comments

Rars: a Rust RAR implementation, mostly written by LLMs

https://bitplane.net/log/2026/05/rars/
8•davidsong•23m ago•3 comments

Xs of Y – roguelike that names itself every run. Written in 4kLoC

https://github.com/nooga/xsofy
107•andsoitis•3d ago•52 comments

Princeton mandates proctoring in-person exams, upending 133 years of precedent

https://www.dailyprincetonian.com/article/2026/05/princeton-news-adpol-proctoring-in-person-exami...
6•bookofjoe•10m ago•0 comments

GitHub Actions issued GitHub_TOKEN disclosure in GitHub Actions logs

https://github.com/composer/composer/security/advisories/GHSA-f9f8-rm49-7jv2
31•damienwebdev•8h ago•13 comments

S-100 Virtual Workbench

https://grantmestrength.github.io/S100/
68•rbanffy•4h ago•14 comments

Launch HN: Ardent (YC P26) – Postgres sandboxes in seconds with zero migration

https://www.tryardent.com/
41•vc289•3h ago•19 comments

The US is winning the AI race where it matters most: commercialization

https://avkcode.github.io/blog/us-winning-ai-race.html
109•akrylov•6h ago•289 comments

Reverting the incremental GC in Python 3.14 and 3.15

https://discuss.python.org/t/reverting-the-incremental-gc-in-python-3-14-and-3-15/107014
163•curiousgal•3d ago•52 comments

The great memory panic of 2026 – Asymco

https://asymco.com/2026/05/11/the-great-memory-panic-of-2026/
28•tambourine_man•2d ago•8 comments

A sentimental tour of late 1990s and early 2000s hacking tools

https://andreafortuna.org/2026/05/13/amarcord/
12•speckx•1h ago•7 comments

Exploring 8 Shaft Weaving

https://algorithmicpattern.org/2026/03/11/exploring-8-shaft-weaving/
5•surprisetalk•2d ago•0 comments

ReactOS

https://reactos.org/
21•DeathArrow•2h ago•2 comments

Leaving GitHub for Forgejo

https://jorijn.com/en/blog/leaving-github-for-forgejo/
463•jorijn•7h ago•248 comments

Twin brothers wipe 96 government databases minutes after being fired

https://arstechnica.com/tech-policy/2026/05/drop-database-what-not-to-do-after-losing-an-it-job/
160•jnord•21h ago•113 comments

An idiot's guide to lead optimisation for proteins

https://magnusross.github.io/posts/protein-lead-optimisation-1/
121•magni121•2d ago•9 comments

"Not Medically Necessary": Helping America's Health Insurers Deny Coverage

https://www.propublica.org/article/evicore-health-insurance-denials-cigna-unitedhealthcare-aetna-...
36•ceejayoz•1h ago•11 comments

Substrate (YC S24) Is Hiring a Technical Success Manager

https://www.ycombinator.com/companies/substrate/jobs/T2fMBhD-technical-success-manager
1•kunle•8h ago

New stainless steel can survive conditions for hydrogen production in seawater

https://www.sciencedaily.com/releases/2026/05/260510030950.htm
262•HardwareLust•2d ago•118 comments

Preserving Fisher-Price Pixter

https://dmitry.gr/?r=05.Projects&proj=37.%20Pixter
187•dmitrygr•2d ago•39 comments

I moved my digital stack to Europe

https://monokai.com/articles/how-i-moved-my-digital-stack-to-europe/
778•monokai_nl•8h ago•496 comments

Open Source Resistance: keep OSS alive on company time

https://ossresistance.com/
209•mikemcquaid•5h ago•69 comments

Show HN: Needle: We Distilled Gemini Tool Calling into a 26M Model

https://github.com/cactus-compute/needle
609•HenryNdubuaku•1d ago•177 comments

Deterministic Fully-Static Whole-Binary Translation Without Heuristics

https://arxiv.org/abs/2605.08419
284•matt_d•15h ago•65 comments

Heritability of human life span is ~50% when heritability is redefined

https://dynomight.net/lifespan/
67•surprisetalk•1d ago•47 comments