frontpage.
newsnewestaskshowjobs

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.

Java4Shell: RCE in OpenJDK when processing Base64

https://calif.io/java4shell/
495•werrett•4h ago•135 comments

GPT‑6.2 Astra and Sol

https://openai.com/index/introducing-gpt-6-2-astra-sol/
1073•jasondavies•7h ago•688 comments

Quad9's withdrawal from France: A canary in the coal mine

https://blog.cloudflare.com/quad9-withdrawal-from-france/
263•subset•3h ago•74 comments

Google's AI answers reducing search traffic by 40%

https://revscope.co/blog/search-seo-geo-2026/
36•slashdev•1h ago•17 comments

Archive Team is archiving the Apple Support Community (closes November 20, 2026)

https://wiki.archiveteam.org/index.php/Apple_Discussions
60•digitaldragon•1h ago•17 comments

Microsoft's ONNX Runtime has disappeared from GitHub

https://github.com/microsoft/onnxruntime
104•nvader•2h ago•23 comments

ID.me terms required for IRS sign-in

https://consumerrights.wiki/w/ID.me_terms_required_for_IRS_sign-in
27•DeepLogin•31m ago•2 comments

Nvidia stopped disclosing Singapore sales as revenues hit $104B

https://www.ft.com/content/dbde7a30-548c-4f9d-a4be-7898a0c24dcf
382•louiereederson•8h ago•187 comments

jQuery 4.1.0

https://github.com/jquery/jquery/releases/tag/4.1.0
250•petecooper•5h ago•135 comments

MAI Code 2 and Code 2 Flash

https://microsoft.ai/news/introducing-mai-code-2-and-mai-code-2-flash/
282•lemonish97•6h ago•132 comments

Highly classified US national security communications network goes down

https://www.cnn.com/2026/11/17/politics/highly-classified-national-security-communications-networ...
462•monkeydust•9h ago•541 comments

Phrack 73 Released

https://phrack.org/issues/73/introduction_md
270•notmine1337•6h ago•31 comments

350 years ago, Ole Rømer discovered that light has a finite speed

https://www.sciencenorway.no/culture-history-history-of-science/350-years-ago-this-man-discovered...
239•dxs•5h ago•74 comments

Solid 2.0

https://www.solidjs.com/blog/solid-2-0-the-long-hold/
219•pier25•6h ago•58 comments

Launch HN: StarSling (YC P25) – Self-improving CI for agent-volume repos

https://starsling.dev
53•yonasb•6h ago•31 comments

What is the best harness for each model?

https://runta.com/blog/introducing-frontierharness-eval-v1-1/
333•Edward40•10h ago•115 comments

Web Browser Engineering (2021)

https://browser.engineering/
119•ibobev•5h ago•20 comments

Harvard researchers find AI coding agents shifted the bottleneck to code review

https://complexdiscovery.com/harvard-researchers-find-ai-coding-agents-shifted-the-bottleneck-to-...
39•judahmeek•4h ago•66 comments

Apple Services Down

https://developer.apple.com/system-status/
625•willy_k•7h ago•347 comments

Tencent Hy4 Flash

https://hy.tencent.ai/research/hy4-flash
46•lyra1337•4h ago•9 comments

Effects of a Nuclear Detonation in Low Earth Orbit

https://arxiv.org/abs/2611.09827
75•PaulHoule•5h ago•44 comments

Who Builds the Machines That Build the Machines?

https://read.corematter.com/p/section-232-us-machine-tools
92•gmays•7h ago•28 comments

YC wrote software to run our internship expo – and an 8-bit SIM to show it off

1•ryankicks•8h ago

Not Everything Needs an LLM

https://newsletter.posthog.com/p/decision-models
93•speckx•7h ago•38 comments

Munich Laser Emits a Beam of Matter Waves (1999)

https://www.sciencedaily.com/releases/1999/03/990317060831.htm
10•peter_d_sherman•2d ago•3 comments

Latent Lattice Language Models

https://shivamduggal4.github.io/latent-lattice-language-models/
19•E-Reverance•3h ago•4 comments

Mouse Party

https://aboard.com/lets-have-a-mouse-party/
60•bookofjoe•3d ago•10 comments

How the Claude Code team thinks about verification

https://claude.dev/blog/how-the-claude-code-team-thinks-about-verification/
262•craigmart•15h ago•202 comments

New Evidence Shows School Phone Bans Are Gradually Improving Test Scores

https://www.nytimes.com/2026/11/17/upshot/school-phone-bans-study-scores.html
1152•donohoe•13h ago•578 comments

Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off

https://alloyhtml.com/example.html
179•prafandy•10h ago•31 comments