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.

An ESP32 based plane radar for my desk

https://blog.ktz.me/esp32-plane-radar/
68•alexktz•3h ago•13 comments

JetZero

https://www.jetzero.aero
128•lisper•2h ago•91 comments

Show HN: I mapped every US golf course

https://golfcoursebrowser.com/
90•rickmf•3h ago•39 comments

A shell colon does nothing. Use it anyway

https://refp.se/articles/your-shell-and-the-magic-colon
23•olexsmir•16h ago•5 comments

The new rules of context engineering for Claude 5 generation models

https://claude.com/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models
250•mellosouls•9h ago•159 comments

W4ME Station – a WASM-4 runtime for Java ME phones

https://github.com/mulfyx/w4me-station
10•sqshi•1h ago•1 comments

Inflect-Micro-v2: complete voice in 9.36M parameters

https://huggingface.co/owensong/Inflect-Micro-v2
67•nateb2022•5h ago•5 comments

Rethinking Legal Education in the AI Era

https://www.law.uchicago.edu/news/ai-strategy-statement
47•jjwiseman•2d ago•9 comments

Clinical failure rates over the decades: yikes

https://www.science.org/content/blog-post/clinical-failure-rates-over-decades-yikes
82•EA-3167•6h ago•45 comments

Cloudflare's new AI traffic options for customers

https://blog.cloudflare.com/content-independence-day-ai-options/
84•alphabetatango•7h ago•55 comments

Systems and Delays

https://martin.janiczek.cz/2026/07/24/systems-and-delays.html
48•vinhnx•5h ago•11 comments

Running a 28.9M parameter LLM on an $8 microcontroller

https://github.com/slvDev/esp32-ai
129•boveyking•10h ago•28 comments

Agatha Christie's Disappearance: Amnesia, Suicide, or Despair?

https://www.historicmysteries.com/unexplained-mysteries/agatha-christie-disappearance/23136/
14•thunderbong•3d ago•5 comments

Alien World Chemistry Found Inside Meteorite That Struck New Jersey Home

https://www.seti.org/news/alien-world-chemistry-found-inside-meteorite/
27•spzx•4h ago•7 comments

GM Backs Sodium Ion Batteries for U.S. Grid Storage

https://spectrum.ieee.org/sodium-ion-battery-peak-energy
163•rbanffy•8h ago•64 comments

LLM Usage in Debian: Three Proposals

https://www.debian.org/vote/2026/vote_002
120•zdw•10h ago•106 comments

Stinkpot: SQLite-backed shell history

https://tangled.org/oppi.li/stinkpot
9•nerdypepper•1d ago•1 comments

Retry Storm Lab

https://github.com/telemetry-sh/retry-storm-lab
5•flurly•3d ago•0 comments

Open-weight AI is having its Kubernetes moment

https://tobi.knaup.me/2026-07-25-open-weight-ai-is-having-its-kubernetes-moment/
354•tknaup•15h ago•279 comments

SIMD for Collision

https://box2d.org/posts/2026/07/simd-for-collision/
79•birdculture•3d ago•25 comments

Zero roadkill as Amazon canopy bridges secure 15,000 crossings

https://news.mongabay.com/2026/07/zero-roadkill-as-amazon-canopy-bridges-secure-15000-crossings/
328•hn_acker•3d ago•98 comments

Producing ammonia and fertiliser using wind power in Morris, Minnesota

https://ammoniaenergy.org/articles/flexible-renewable-ammonia-demonstrator-now-operational-in-min...
112•gritzko•10h ago•78 comments

Show HN: I made some transistor animations

https://brandonli.net/semisim/animations
151•stunningllama•1d ago•19 comments

Show HN: Brolly, a plain-text weather forecast site

https://brolly.sh/forecast/RWFP2qW8
162•jsax•12h ago•48 comments

Humans haven't stopped evolving

https://www.harvardmagazine.com/research/harvard-human-evolution-genes-selective-pressure
45•ilamont•2h ago•46 comments

Negative Resistance

https://lcamtuf.substack.com/p/negative-resistance
9•surprisetalk•2d ago•4 comments

Turn And Face The Strange

https://fly.io/blog/kurt-scott-money-sprites/
179•subarctic•9h ago•123 comments

DeepSeek pause fundraise after comments on compute gap to US leaked (transcript) [pdf]

https://github.com/demo-zexuan/liang-wenfeng-investor-meeting-2026-7-22/blob/master/%E6%A2%81%E6%...
120•oliculipolicula•6h ago•84 comments

Memory Safety Absolutists

https://itsallaboutthebit.com/memory-safety-absolutists/
78•drogus•11h ago•104 comments

Did They Ghost You?

https://didtheyghostyou.com/
350•mooreds•9h ago•159 comments