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.

AlphaProof Code

https://deepmind.google/blog/introducing-alphaproof-code/
363•ilreb•4h ago•126 comments

The Hardest Tarball?

https://stoppels.ch/2026/11/07/the-hardest-tarball.html
63•thatslast•1h ago•1 comments

Amazon saves millions by replacing Sonnet 4.6 with Strands Decider

https://strandsagents.com/blog/amazon-saves-millions-replacing-sonnet-with-strands-decider/
549•aloukissas•10h ago•195 comments

NetBSD 11 desktop on a Raspberry Pi 4

https://neongd.com/articles/netbsd11-rpi4.gmi
70•jaypatelani•2d ago•22 comments

Taking another shot at the cheap IP camera, part 2

https://ericswpark.com/blog/2026/2026-11-09-ip-camera-pt2/
39•ericswpark•1d ago•16 comments

Queens Public library under ransomware attack e-borrowing suspended

https://connect.queenslibrary.org/
133•rustyhancock•7h ago•87 comments

Claude Fable 5.2 and Mythos 5.2

https://www.anthropic.com/claude-fable-and-mythos-5-2
789•lairv•22h ago•924 comments

Smart home devices should work without the internet

https://docodethatmatters.com/home-automation-overnight-success/
6•skittleson•46m ago•1 comments

The Death Knell of Digital Search

https://www.newyorker.com/culture/infinite-scroll/the-death-knell-of-digital-search
15•bookofjoe•1h ago•4 comments

Here comes the sun[light]:An ambient Daylight Clock with time and space controls

https://hannahilea.com/blog/daylight-clock/
30•evakhoury•20h ago•1 comments

Show HN: Ghanaian street games you can play in the browser

https://www.ghanastreetgames.com/
67•samuelaidoo45•2d ago•11 comments

Let over Lambda–50 Years of Lisp (2008)

https://letoverlambda.com/
37•theanonymousone•3h ago•5 comments

Simon Winchester, Author of 'The Professor and the Madman,' Has Died

https://www.nytimes.com/2026/11/04/obituaries/simon-winchester-dead.html
45•benbreen•2d ago•15 comments

USPS now offers official ZIP Code boundary polygons

https://postalpro.usps.com/zcb
697•munro•20h ago•360 comments

Your TV can see through walls (2025)

https://maurycyz.com/projects/fading/
229•Curiositry•10h ago•99 comments

'C:\> FORMAT C:' – relax, it's just a screen saver

https://fakedos.com/
56•TheIncredibleCh•5h ago•41 comments

Fireworks AI security breach impacts Notion and their customers

https://www.notion.com/help/security-incident-involving-a-third-party-ai-vendor
127•werrett•8h ago•43 comments

Show HN: A 15 MB self-hosted Netflix and Spotify for your media server

https://github.com/HolyArrs/HolyArrs
140•CoderLuii•4h ago•75 comments

Foldable Flight: The Best Paper Airplanes

https://www.foldableflight.com
1139•vismit2000•1d ago•159 comments

PHP2Shell Deep Dive

https://djad04.github.io/php2shell-deep-dive/
4•moebrowne•2d ago•1 comments

Locating the source of a mysterious beep

https://simonwillison.net/2026/Nov/9/mysterious-beeps/
275•bigwheels•16h ago•141 comments

Payments Canada announces launch of Canada's Real-Time Rail (RTR) payment system

https://www.payments.ca/canada-launches-real-time-rail-bringing-247-payment-infrastructure-nation...
565•ocd•1d ago•326 comments

E-means: Outperforming k-means in one-tenth the epochs

https://e-means.github.io/
465•porridgeraisin•21h ago•68 comments

Billion Watts in the Speaker [video]

https://www.youtube.com/watch?v=PHOcTXYaMfg
75•Element_•2d ago•39 comments

.NET 11

https://devblogs.microsoft.com/dotnet/announcing-dotnet-11/
8•runesoerensen•10m ago•1 comments

How hard is it to check for whitespace?

https://serce.me/posts/2026-10-30-how-hard-is-it-to-check-for-whitespace
97•theanonymousone•4d ago•24 comments

Building an Order RISC-V CPU from scratch

https://prawns.dev/blogs/specula
12•random__duck•4d ago•4 comments

Ableton Live 13

https://www.ableton.com/en/live/
134•phaser•3h ago•160 comments

Horible public key tricks

https://maurycyz.com/projects/badcert/
225•Curiositry•16h ago•77 comments

What's new in the .NET 11 runtime

https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/runtime
85•stevefan1999•3h ago•24 comments