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.

Astronauts told to return to ISS after sheltering over air leak repairs

https://www.bbc.com/news/live/c4g44ew3g1kt
322•janpot•7h ago•205 comments

Three of our worst VC stories

https://twitter.com/eastdakota/status/2062860530360959273
131•orgonon•3h ago•57 comments

pg_durable: Microsoft open sources in-database durable execution

https://github.com/microsoft/pg_durable
247•coffeemug•6h ago•66 comments

Gemma 4 QAT models: Optimizing compression for mobile and laptop efficiency

https://blog.google/innovation-and-ai/technology/developers-tools/quantization-aware-training-gem...
203•theanonymousone•6h ago•66 comments

New method turns ocean water into drinking water, without waste

https://www.rochester.edu/newscenter/what-is-desalination-definition-ocean-water-704732/
168•speckx•7h ago•81 comments

My Agent Skill for Test-Driven Development

https://www.saturnci.com/my-agent-skill-for-test-driven-development.html
85•laxmena•1d ago•34 comments

Mouseless – keyboard-driven control of macOS/Linux/Windows

https://mouseless.click
404•riddley•2d ago•175 comments

Transformers Are Inherently Succinct

https://openreview.net/pdf?id=Yxz92UuPLQ
57•brandonb•3h ago•19 comments

Gov.uk has replaced Stripe with Dutch provider Adyen

https://www.theregister.com/public-sector/2026/06/04/govuk-goes-dutch-on-payments-as-it-dumps-str...
249•toomuchtodo•5h ago•82 comments

Conventional Commits encourages focus on the wrong things

https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/
223•jsve•6h ago•175 comments

Did Claude increase bugs in rsync?

https://alexispurslane.github.io/rsync-analysis/
216•logicprog•9h ago•213 comments

Ask HN: What was your "oh shit" moment with GenAI?

72•andrehacker•22h ago•230 comments

I tested every IP KVM in my Homelab

https://www.jeffgeerling.com/blog/2026/i-tested-every-ip-kvm/
202•vquemener•7h ago•57 comments

Hacker News, Sans AI

https://elijahpotter.dev/articles/hacker-news-sans-AI
72•chilipepperhott•1h ago•45 comments

"Maybe later" was a feature

https://arnorhs.dev/posts/2026-06-04/maybe-later-was-a-feature/
52•arnorhs•1d ago•9 comments

Cooldown Support for Ruby Bundler

https://blog.rubygems.org/2026/06/03/cooldown-let-new-gems-be-vetted.html
134•calyhre•2d ago•35 comments

The Empty Field That Wasn't: GPS, OTAD and Two Decades of Encrypted Broadcasts

https://lsc-pagepro.mydigitalpublication.com/publication/?i=865273&p=62&view=issueViewer
37•lordgilman•9h ago•9 comments

Accidentally deleted subscriptions for chat integrations (Slack and MS Teams)

https://www.githubstatus.com/incidents/2nmfnbknhlnv
96•SparkyDogs•3h ago•39 comments

Inside FAISS: Billion-Scale Similarity Search

https://fremaconsulting.ch/blog/faiss
28•tohms•1d ago•0 comments

Launch HN: General Instinct (YC P26) – Frontier models on edge devices

37•guanming0717•5h ago•13 comments

Mantine-datatable (and others) compromised – owner account suspended

https://github.com/icflorescu/mantine-datatable/discussions/813
52•justsomehuman•5h ago•20 comments

India's surprise baby bust

https://www.economist.com/leaders/2026/06/04/indias-surprise-baby-bust-is-a-warning-to-the-world
92•hakonbogen•7h ago•447 comments

Tracing a powerful GNSS interference source over Europe

https://arxiv.org/abs/2606.03673
340•mimorigasaka•13h ago•185 comments

Redis 8.8: New array data structure, rate limiter, performance improvements

https://redis.io/blog/announcing-redis-8-8/
189•ksec•2d ago•86 comments

C++: The Documentary

https://herbsutter.com/2026/06/04/c-the-documentary-released-today/
352•ingve•17h ago•263 comments

Dutch gov't will only allow European company to operate DigiD platform

https://nltimes.nl/2026/06/05/dutch-govt-will-allow-european-company-operate-digid-platform
233•TechTechTech•7h ago•72 comments

Nango (YC W23, dev infra) is hiring staff back end engineers

https://nango.dev/careers
1•bastienbeurier•10h ago

Entanglement Builds Space-Time. Now "Magic" Gives It Gravity

https://www.quantamagazine.org/entanglement-builds-space-time-now-magic-gives-it-gravity-20260603/
162•rbanffy•13h ago•158 comments

Show HN: Lowfat – pluggable CLI filter that saved 91.8% of my LLM tokens

https://github.com/zdk/lowfat
95•zdkaster•13h ago•52 comments

Aging and Eye Problems

https://ldstephens.net/posts/aging-and-eye-problems/
11•speckx•3h ago•0 comments