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.

JetKVM Mini

https://jetkvm.com/blog/introducing-jetkvm-mini
35•taubek•57m ago•15 comments

Why are AI agents lying, cheating and coordinating?

https://yoshuabengio.org/en/publication/why-are-ai-agents-lying-cheating-and-coordinating
167•jonifico•7h ago•203 comments

The Interim Computer Museum

https://icm.museum/
105•mulmen•6h ago•11 comments

Make your first edit to OpenStreetMap

https://high5apps.github.io/josm-plugin-website-wizard/
442•juliantigler•16h ago•107 comments

I Added a Non-Wi-Fi Mitsubishi AC to Home Assistant

https://medium.com/@ivangomezarnedo/how-i-added-a-non-wi-fi-mitsubishi-ac-to-home-assistant-22770...
66•ichacas•2d ago•32 comments

Aligned to whom?

https://hyperbo.la/w/aligned-to-whom/
41•lopopolo•5h ago•12 comments

Apple iPod Engraver (2019)

https://dunstanorchard.com/apple-ipod-engraver/
201•NaOH•4d ago•51 comments

Nvidia is the central bank of AI

https://www.economist.com/interactive/briefing/2026/09/03/nvidia-is-the-central-bank-of-ai
472•tolugenius•17h ago•334 comments

Everyone should slow down AI development except for me

https://xeiaso.net/notes/2026/everyone-slowdown-but-me/
431•xena•8h ago•257 comments

Stabilizing Rust's Never Type

https://lwn.net/SubscriberLink/1091015/d9e48318ed242b41/
184•cjd8•3d ago•51 comments

A succession crisis that tore England apart (2023)

https://www.historytoday.com/archive/feature/succession-crisis-tore-england-apart
30•pepys•5h ago•15 comments

Operation Smart Kettle – Börzels Blog

https://blog.boerzel.de/de/blog/operation-smart-kettle
4•marbartolome•2d ago•3 comments

Don't be the out of touch Kung Fu master

https://twitter.com/ID_AA_Carmack/status/2098443262214230095
113•dsubburam•10h ago•102 comments

AgentsDock: An IDE designed for agentic AI research

https://agentsdock.net/
48•ZihuiGeorgia•9h ago•27 comments

P(doom)

https://lucumr.pocoo.org/2026/9/12/pdoom/
77•lumpa•11h ago•39 comments

Vintage Scientific Papers with LaTeX

https://github.com/Foadsf/vintage-latex
63•petalmind•3d ago•6 comments

A wandering black hole caught feeding on the run

https://phys.org/news/2026-08-black-hole-caught.html
15•wglb•5h ago•3 comments

LG denies TV spying claims, says tracking and snooping concerns 'not true'

https://www.tomshardware.com/tech-industry/big-tech/lg-strongly-denies-tv-security-claims-says-tr...
516•datakan•2d ago•411 comments

Durable execution without history replay

https://trigora.dev/blog/durable-execution-without-history-replay/
18•hypervs•3d ago•4 comments

Getting 50 GB/S Back from the Apple Neural Engine

https://eiln.github.io/posts/ane-dma.html
136•eiln•3d ago•27 comments

Dramatic insider warnings over AI fall flat with some in Silicon Valley

https://www.bbc.co.uk/news/articles/cq635037g18o
10•chrisjj•40m ago•3 comments

After Math

https://terrytao.wordpress.com/2026/09/12/after-math/
63•throwaway81523•5h ago•46 comments

Liesegang Rings

https://chillphysicsenjoyer.substack.com/p/liesegang-rings
34•surprisetalk•3d ago•4 comments

We must pace the frontier

https://darioamodei.com/post/we-must-pace-the-frontier
636•apsec112•18h ago•890 comments

Will there be a 7G?

https://arxiv.org/abs/2609.01877
100•Betelbuddy•15h ago•157 comments

I made a build visualizer to understand Bun's compile times

https://lalitm.com/post/buildprof/
127•lalitmaganti•18h ago•23 comments

Real-SWE: Benchmarking AI models on private, real-world, enterprise codebases

https://withspecific.com/benchmarks/real-swe
234•theanonymousone•12h ago•133 comments

Microcode in Intel's 8087 floating-point chip: the scale instruction

https://www.righto.com/2026/09/8087-microcode-reverse-engineering-fscale.html
106•pwg•16h ago•33 comments

Linux Zoom client proactively reading everything written to X11 clipboard

https://hachyderm.io/@simontatham/117201594980991062
300•encyclopedism•13h ago•95 comments

Why So Many AI Researchers Think the Machines Could Kill Everyone

https://www.wired.com/story/why-so-many-ai-researchers-think-the-machines-could-kill-everyone/
8•joozio•1h ago•5 comments