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.

GLM-5.3: Frontier coding with emergent cyber capabilities

https://z.ai/blog/glm-5.3
665•pella•7h ago•324 comments

Don't classify, hallucinate!

https://softwaredoug.com/blog/2026/08/10/hypothetical-classifications
27•softwaredoug•3d ago•6 comments

DeepSeek peak/off-peak pricing update

https://api-docs.deepseek.com/news/news260813/
89•fagnerbrack•3h ago•36 comments

Why does Opus 5 feel worse to work with?

https://mun-logadan.github.io/why-does-opus-5-feel-worse/
182•numeri•2h ago•156 comments

Gemini 3.7 Flash

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

Differential Heuristics

https://www.redblobgames.com/blog/2026-08-08-differential-heuristics/
52•ibobev•4d ago•3 comments

Accelerating GPT-5.6 Sol Ultrafast

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

Hello, me. It's been a while

https://themech.net/2026/08/hello-me-its-been-a-while/
278•somesoftdev•18h ago•149 comments

Show HN: C# Game Engine with its own scripting language and IDE

https://github.com/ArcadeMakerSources/ArcadeMaker
70•am-gm•2d ago•34 comments

DeepSeek Harness developer preview

https://deepseek.com/harness/en/
688•bjin•1d ago•280 comments

Spaghettifying DRAM

https://github.com/xoreaxeaxeax/skitter-creek-bath-salts
661•matt_d•22h ago•167 comments

Ruby 4.0 Universal RCE Deserialization Gadget Chain

https://www.elttam.com/blog/ruby-4-0-universal-rce-deserialization-gadget-chain
48•pentestercrab•6h ago•12 comments

Mistral OCR 4.1

https://docs.mistral.ai/models/ocr-4-1
380•spelk•19h ago•153 comments

Protect Your Relays

https://www.iroh.computer/blog/authenticated-relays
12•surprisetalk•4d ago•6 comments

We're not done with point clouds

https://claytonwramsey.com/blog/mvt/
22•claytonwramsey•3d ago•2 comments

Bluesky Protocol Services

https://atproto.com/blog/introducing-bluesky-protocol-services
180•danabramov•12h ago•47 comments

Understanding is the new bottleneck

https://www.geoffreylitt.com/2026/07/02/understanding-is-the-new-bottleneck
367•sebg•18h ago•202 comments

Show HN: Lumabri – Run Moe Models on a P2P Swarm with Colibri

https://github.com/JustVugg/lumabri
37•vforno•12h ago•13 comments

Choose Boring Technology (2015)

https://mcfunley.com/choose-boring-technology
379•tosh•19h ago•202 comments

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

https://donkeybas.com/
251•jkrauska•19h ago•126 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/
339•vinayakborkar•23h ago•195 comments

What an improv stage can teach you about leading cross-cultural teams in Tokyo

https://www.tokyodev.com/articles/yes-and-what-an-improv-stage-can-teach-you-about-leading-cross-...
27•pwim•1w ago•4 comments

How Compaction Works in Pi

https://earendil.com/posts/compaction-in-pi/
181•tosh•19h ago•74 comments

Blog about things you don't understand yet

https://www.seangoedecke.com/blog-about-things-you-dont-understand-yet/
128•gfysfm•13h ago•40 comments

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

https://0.mk/blog/link-rot
202•tdx•19h ago•191 comments

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

https://github.com/systemd/systemd/issues/40262
233•ValdikSS•18h ago•165 comments

The Library of Ashurbanipal (2025)

https://www.historytoday.com/archive/feature/library-ashurbanipal
44•samizdis•3d ago•9 comments

How Organizations Use AI: Evidence from ChatGPT [pdf]

https://cdn.openai.com/pdf/how-organizations-use-chatgpt.pdf
116•malshe•17h ago•92 comments

Ordinary Abundance

https://ordinaryabundance.com/
337•yen223•23h ago•165 comments

NP-overrated

https://gruhn.me/blog/2026-08-13/
225•theanonymousone•16h ago•159 comments