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.

How the European Commission rolled out Matrix to more than 40k staff

https://element.io/blog/how-the-european-commission-rolled-out-matrix-to-more-than-40-000-staff/
479•liotier•5h ago•247 comments

Why AI Wants to Be Local – With Pete Warden (Creator of Moonshine Voice)

https://thedataexchange.media/pete-warden-moonshine/
41•datascientist•56m ago•21 comments

Everything you need to survive and rebuild society

https://lastbook.org/
101•tejohnso•1h ago•54 comments

Garage Door Spam

https://blog.harrison.page/garage-door-spam/
400•harrisonpage•3d ago•178 comments

Google Chrome dev team declares bug report bankruptcy

https://blog.plover.com/tech/bug-reports.html
15•speckx•14m ago•3 comments

Cooling buildings is overtaking heating them as an energy need, IEA says

https://maccus.fr/en/cooling-overtaking-heating/
38•robtherobber•1h ago•25 comments

Making 8-page foldable zines from a single A4 sheet in the browser

https://krthr.co/paper-folds-and-whats-new-in-fanzines-app/
102•krthr•3h ago•27 comments

Launch HN: Onlook (YC W25) – An open-source developer tool for designers

https://github.com/onlook-dev/onlook/
2•D_R_Farrell•55s ago•0 comments

Nintendo takes Picofly firmware down from GitHub [video]

https://www.youtube.com/watch?v=-TLCGUpoD6c
150•cowlevel•1d ago•48 comments

How to Make the Ink Used to Write Hamlet and the Declaration of Independence

https://lithub.com/how-to-make-the-ink-used-to-write-hamlet-the-declaration-of-independence-and-b...
18•ohjeez•1h ago•3 comments

Someone reported java4shell bug in September 2026

https://github.com/openjdk/jdk/pull/32781
126•notmine1337•4h ago•38 comments

Ruby2ßhell: Pre-authentication RCE on stock Rails

https://verialabs.com/ruby2shell/
293•jdns•11h ago•121 comments

What's New in PHP 8.6

https://www.php.net/releases/8.6/en.php
193•netol•7h ago•98 comments

Germany and Austria Call for European Control of TikTok

https://www.techcentral.ie/germany-and-austria-call-for-european-control-of-tiktok/
78•thm•1h ago•55 comments

Show HN: Foolscap – a writing app that reads your book and never writes for you

https://foolscap.works/
85•atugard•3h ago•50 comments

Gemini 4 Neon

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-neon/
967•yigitdemirag•19h ago•739 comments

Distributed, high-performance blob storage on SQLite

https://zerodha.tech/blog/high-performance-distributed-blob-storage/
174•ghostfoxgod•7h ago•46 comments

Oregon library dropped Dewey Decimal system, adopted bookstore-like arrangement

https://www.fastcompany.com/91597520/oregon-library-ditched-dewey-decimal-wayfinding-system
86•bookofjoe•1d ago•66 comments

Do not buy RAM, compress

https://curiousbits.nl/blog/do-not-buy-ram-compress/
97•Ecno92•7h ago•91 comments

I've Got Your Packages: Harvesting Customers' Delivery Order Information (2020)

https://dl.acm.org/doi/fullHtml/10.1145/3366423.3380062
7•gregsadetsky•3d ago•0 comments

Unblockable communication with gravity – Science Advances

https://www.science.org/doi/10.1126/sciadv.aee0802
48•rbanffy•4h ago•18 comments

C's designated initializers give us named arguments

https://quuxplusone.github.io/blog/2026/11/16/named-arguments-in-c/
44•joshcsimmons•1d ago•36 comments

It's All about the Allocator

https://aarol.dev/posts/zig-allocator/
16•ibobev•4d ago•2 comments

SSD prices will start going down the second half of next year

https://www.drivevault.io/blog/when-will-hard-drive-prices-come-down.html
222•illidan1000•7h ago•184 comments

I built Cornhole News. A Hacker News inspired site for news across the Midwest

https://cornholenews.news
18•cornholemedia•56m ago•17 comments

We taught robots to carve marble sculptures

https://eleanorwiesler.com/blog/robotic-stone-carving/
92•ewiesler•23h ago•70 comments

Show HN: Watch weight-space programming in action with WebGPU

https://tabbyml.github.io/weight-space-playground/
5•wsxiaoys•1h ago•0 comments

15M web servers on one VM – smoltcp, DPDK, AF_XDP

https://kapteko.com/15-million-webservers/
286•fessguid•10h ago•32 comments

Exponential Behavior in Magic: The Gathering

https://levineuwirth.org/essays/exponential-magic/
51•neuwirth•1d ago•26 comments

Multiple vulnerabilities in Regexp and String case conversion

https://www.ruby-lang.org/en/news/2026/11/18/multiple-vulnerabilities-in-regexp-and-string/
316•runesoerensen•16h ago•120 comments