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.

Stateless MCP has recaptured my interest

https://simonwillison.net/2026/Jul/31/stateless-mcp/
96•tosh•4d ago•51 comments

The Golden Age of British Ice Cream

https://www.vittlesmagazine.com/p/the-golden-age-of-british-ice-cream
27•bryanrasmussen•12h ago•9 comments

Pi's Minimalism Is Its Advantage

https://earendil.com/posts/pi-autoresearch-and-databricks/
261•luispa•8h ago•105 comments

"Gravity is worth asking about."

https://unsung.aresluna.org/gravity-is-worth-asking-about/
12•nozzlegear•6d ago•3 comments

Eight Myths on Software Engineering and GenAI

https://queue.acm.org/detail.cfm?id=3807963
174•tchalla•7h ago•128 comments

Mistral's Shieldstral: 3B open-weights model for multimodal moderation

https://mistral.ai/news/shieldstral/
374•riadsila•14h ago•90 comments

IP and DNS Leaks in WebKit Affecting Proxy Browsers and iCloud Private Relay

https://mysk.blog/2026/08/04/webkit-proxy-icloud-private-relay-ip-leak/
86•lapcat•7h ago•11 comments

Why is it all in the kernel?

https://lawrencecpaulson.github.io//2026/07/30/Collatz.html
26•ibobev•4d ago•8 comments

Zero-Mem: Zero-Token Memory Operations for LLM Agents

https://arxiv.org/abs/2607.29377
11•theanonymousone•2h ago•2 comments

Rio-vt and librio: Rio's terminal engine, now embeddable

https://rioterm.com/blog/2026/07/27/rio-vt-and-librio
20•vinhnx•1w ago•4 comments

Show HN: Simple algorithm and color space to generate diverse skin tones

https://toneyalexander.github.io/inclusive-color-space/
502•automatoney•15h ago•91 comments

Show HN: Maple-Preview – Ternary 20B MoE running at 120 tok/s on a iPhone

https://deepgrove.ai/maple-preview
95•edwardbzhang•11h ago•25 comments

DuckDB – Data power tools for your laptop, now in Clojure (2023)

https://techascent.com/blog/just-ducking-around.html
81•sourdecor•8h ago•13 comments

In Memory of My Wife, Elise Cawley, with Thanks for 36 Wonderful Years

https://writings.stephenwolfram.com/2026/08/in-memory-of-my-wife-elise-cawley-1961-2026-with-than...
1226•jdcampolargo•12h ago•70 comments

Zigbee vs. Matter over Thread:Understanding IoT Protocol Performance in Practice

https://arxiv.org/abs/2603.04221
70•teleforce•6h ago•52 comments

Bugtraq is back

https://lists.securityfocus.com/hyperkitty/list/bugtraq@securityfocus.com/thread/CHKLXLA7SJEWLDFH...
37•bashtoni•6h ago•7 comments

libexpat now funded by the City of Munich for up to 6 months

https://blog.hartwork.org/posts/libexpat-city-of-munich-open-source-sabbatical/
243•spyc•7h ago•32 comments

AI fuels more than half of cybercrime in Africa as scams surge – Interpol

https://www.africanews.com/2026/08/04/ai-fuels-more-than-half-of-cybercrime-in-africa-as-digital-...
195•bookofjoe•8h ago•152 comments

Waymo in Dallas

https://waymo.com/blog/shorts/dallas-open-to-all/
284•xnx•12h ago•476 comments

Video2NAND – Abusing video codecs for great computational power

https://sharedobject.blog/posts/vp8-combinatorial-logic/
53•firer•2d ago•10 comments

Godox Transparent Viewfinder Camera C100

https://www.godox.com/product-e/C100.html
28•routeroff•1d ago•14 comments

We finally learned to center a div, then browsers added sidebars

https://seg6.space/posts/center-div/
105•seg6•8h ago•91 comments

I am retiring from fulltime writing (& pseudonymity) to launch Guardian Angel

https://twitter.com/gwern/status/2084739205071343837
253•mattsterett•10h ago•152 comments

Flowise is shutting down

https://flowiseai.com/sunset
39•llmgraph•6h ago•19 comments

An SLM trained on $8 ESP32-S3

https://github.com/Carloscodix/qapla
15•pavelai•2h ago•6 comments

There Will Come Soft Rains (1950) [pdf]

https://users.wpi.edu/~zrbutzke/Docs/BradburyStories(1).pdf
374•pmg101•1d ago•393 comments

Show HN: SIMD Viterbi Decoder in Rust

https://github.com/brian-armstrong/fec
39•brian-armstrong•8h ago•3 comments

Don't stop early: Case-folding source code at memory speed

https://github.blog/engineering/architecture-optimization/dont-stop-early-case-folding-source-cod...
63•sbulaev•4d ago•24 comments

When AI Benchmarks Plateau: A Systematic Study of Benchmark Saturation

https://arxiv.org/abs/2602.16763
90•doppp•14h ago•94 comments

Xbox goes down. You can't play games you own on disc

https://birchtree.me/blog/xbox-goes-down-you-cant-play-games-you-own-on-disc/
623•surprisetalk•18h ago•656 comments