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.

Gemini 3.7 Flash

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-3-7-fl...
577•thisisauserid•7h ago•328 comments

Accelerating GPT-5.6 Sol Ultrafast

https://www.cerebras.ai/blog/accelerating-gpt-5-6-sol-ultrafast-with-openai
394•pr337h4m•6h ago•164 comments

Bluesky Protocol Services

https://atproto.com/blog/introducing-bluesky-protocol-services
8•danabramov•14m ago•0 comments

NP-Overrated

https://gruhn.me/blog/2026-08-13/
120•theanonymousone•4h ago•64 comments

Understanding is the new bottleneck

https://www.geoffreylitt.com/2026/07/02/understanding-is-the-new-bottleneck
176•sebg•5h ago•92 comments

Donkey.bas is 45 Years Old – 131 line of Glory

https://donkeybas.com/
181•jkrauska•6h ago•78 comments

DeepSeek Harness developer preview

https://deepseek.com/harness/en/
541•bjin•11h ago•239 comments

Mistral OCR 4.1

https://docs.mistral.ai/models/ocr-4-1
239•spelk•7h ago•93 comments

Spaghettifying DRAM

https://github.com/xoreaxeaxeax/skitter-creek-bath-salts
479•matt_d•10h ago•138 comments

Choose Boring Technology (2015)

https://mcfunley.com/choose-boring-technology
228•tosh•6h ago•119 comments

Finite State Machines in Forth (1994)

https://www.forth.org/literature/noble.html
38•ofalkaed•5d ago•0 comments

How AI text watermarking works

https://declaude.org/watermarking/
21•padolsey•1h ago•7 comments

Where did the old web go? We followed 657,607 links to find out

https://0.mk/blog/link-rot
121•tdx•6h ago•86 comments

How Gödel's Proof Works (2020)

https://www.quantamagazine.org/how-godels-proof-works-20200714/
58•tzury•4h ago•32 comments

Single log line is 49KB+ (ext4) / 110KB+ (btrfs) of systemd-journald disk writes

https://github.com/systemd/systemd/issues/40262
137•ValdikSS•5h ago•89 comments

How Organizations Use AI: Evidence from ChatGPT [pdf]

https://cdn.openai.com/pdf/how-organizations-use-chatgpt.pdf
58•malshe•5h ago•34 comments

How Compaction Works in Pi

https://earendil.com/posts/compaction-in-pi/
89•tosh•6h ago•33 comments

How a device finds encrypted DNS by itself

https://blog.dundns.eu/posts/ddr-encrypted-dns-discovery/
6•majorchord•6d ago•1 comments

Nine PBS sues Iron Mountain over blocked access to archival data

https://current.org/2026/08/nine-pbs-sues-iron-mountain-over-blocked-access-to-archival-data/
225•vinayakborkar•11h ago•123 comments

Idol Mahjong Final Romance: A Slideshow Disguised as a Video Game

https://nicole.express/2026/more-like-idle-mahjong.html
39•nicole_express•4d ago•8 comments

Smooth Move: Taming Trajectories with Polynomials

https://nick.zoic.org/art/smooth-move-taming-trajectories-with-polynomials/
18•lioeters•3d ago•0 comments

Kubernetes on Oxide: How customer needs shaped our integrations

https://oxide.computer/blog/kubernetes-on-oxide
151•stevehipwell•10h ago•68 comments

AI At Home Part 1: A Box Of Scraps

https://jdagostino.github.io/ai-pt1-box-o-scraps/index.html
83•timmmmmmay•8h ago•43 comments

Launch HN: Bullet (YC S26) – A Faster Coding Agent

https://www.codewithbullet.com
80•adi1•16h ago•51 comments

Ordinary abundance

https://ordinaryabundance.com/
195•yen223•10h ago•106 comments

Tocharian Online

https://lrc.la.utexas.edu/eieol/tokol/0
56•Bluestein•7h ago•12 comments

Text AI watermarks will always be trivial to remove

https://www.seangoedecke.com/text-ai-watermarks/
91•pseudolus•9h ago•78 comments

Choosing an AI model: one prompt, 11 models, different results

https://www.netlify.com/blog/one-prompt-11-models-very-different-results/
170•toddmorey•11h ago•71 comments

Gloomberb

https://gloom.sh/
377•rbanffy•10h ago•193 comments

ATG (YC F25) Is Hiring Member of Technical Staff (Data Platform)

https://atg.science/careers
1•dkobran•12h ago