frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Hardware Attestation as Monopoly Enabler

https://grapheneos.social/@GrapheneOS/116550899908879585
952•ChuckMcM•8h ago•347 comments

Local AI needs to be the norm

https://unix.foo/posts/local-ai-needs-to-be-norm/
636•cylo•9h ago•309 comments

I'm going back to writing code by hand

https://blog.k10s.dev/im-going-back-to-writing-code-by-hand/
67•dropbox_miner•1h ago•28 comments

Running local models on an M4 with 24GB memory

https://jola.dev/posts/running-local-models-on-m4
107•shintoist•3h ago•48 comments

Incident Report: CVE-2024-YIKES

https://nesbitt.io/2026/02/03/incident-report-cve-2024-yikes.html
412•miniBill•9h ago•101 comments

Obsidian plugin was abused to deploy a remote access trojan

https://cyber.netsecops.io/articles/obsidian-plugin-abused-in-campaign-to-deploy-phantom-pulse-rat/
91•cmbailey•4h ago•47 comments

An AI coding agent, used to write code, needs to reduce your maintenance costs

https://www.jamesshore.com/v2/blog/2026/you-need-ai-that-reduces-your-maintenance-costs
36•cratermoon•3h ago•5 comments

Ask HN: What are you working on? (May 2026)

140•david927•9h ago•483 comments

First tunnel element of the Fehmarnbelt Tunnel immersed

https://www.arup.com/en-us/news/first-fehmarnbelt-tunnel-element-lowered/
52•robin_reala•3d ago•13 comments

Guy Goma's Accidental BBC Interview Lives on After 20 Years

https://www.nytimes.com/2026/05/06/business/media/bbc-guy-goma-interview.html
63•nxobject•2d ago•12 comments

Traces Of Humanity

https://tracesofhumanity.org/hello-world/
130•alex77456•9h ago•19 comments

The people preserving the scientific practice of bird banding

https://thenarwhal.ca/bird-banding-ontario/
34•bookofjoe•3d ago•0 comments

I returned to AWS and was reminded why I left

http://fourlightyears.blogspot.com/2026/05/i-returned-to-aws-and-was-reminded-hard.html
666•andrewstuart•1d ago•488 comments

Maryland citizens hit with $2B power grid upgrade for out-of-state AI

https://www.tomshardware.com/tech-industry/artificial-intelligence/maryland-citizens-slapped-with...
160•lemonberry•5h ago•75 comments

How Fast Does Claude, Acting as a User Space IP Stack, Respond to Pings?

https://dunkels.com/adam/claude-user-space-ip-stack-ping/
13•adunk•3h ago•2 comments

Stop MitM on the first SSH connection, on any VPS or cloud provider

https://www.joachimschipper.nl/Stop%20MITM%20on%20the%20first%20SSH%20connection,%20on%20any%20VP...
84•JoachimSchipper•2d ago•47 comments

I designed Microsoft's EA channel in 2001. It's being dismantled in 2026

https://www.brendanoconnor.net/case-studies/microsoft-enterprise-channel/
26•brendo_y•2d ago•7 comments

Eight More '8-Bit Era' Microprocessors

https://thechipletter.substack.com/p/eight-more-8-bit-era-microprocessors
52•klelatti•2d ago•14 comments

The locals don't know

https://www.quarter--mile.com/The-Locals-Dont-Know
104•herbertl•10h ago•73 comments

PS3 Emulator Devs Politely Ask That People Stop Flooding It with AI PRs

https://kotaku.com/playstation-3-emulator-devs-politely-ask-that-people-stop-flooding-it-with-ai-...
84•stalfosknight•3h ago•59 comments

dBase: 1979-2026

https://delphinightmares.substack.com/p/dbase-1979-2026
9•deeaceofbase•2d ago•2 comments

Idempotency is easy until the second request is different

https://blog.dochia.dev/blog/idempotency/
286•ludovicianul•3d ago•174 comments

Walking slower? Your ears, not your knees, might be the problem

https://www.wsj.com/health/wellness/hearing-loss-walking-speed-iphone-study-c53c482a
91•marc__1•1d ago•64 comments

What's a mathematician to do? (2010)

https://mathoverflow.net/questions/43690/whats-a-mathematician-to-do
155•ipnon•15h ago•75 comments

Lakebase architecture delivers faster Postgres writes

https://www.databricks.com/blog/how-lakebase-architecture-delivers-5x-faster-postgres-writes
97•sp_from_db•2d ago•29 comments

Louis Rossmann offers to pay legal fees for a threatened OrcaSlicer developer

https://www.tomshardware.com/3d-printing/louis-rossmann-tells-3d-printer-maker-bambu-lab-to-go-bl...
487•iancmceachern•11h ago•263 comments

Think Linear Algebra (2023)

https://allendowney.github.io/ThinkLinearAlgebra/index.html
171•tamnd•17h ago•20 comments

Task Paralysis and AI

https://g5t.de/articles/20260510-task-paralysis-and-ai/index.html
202•MrGilbert•20h ago•109 comments

Show HN: An index of indie web/blog indexes

https://theindex.fyi
97•rocketpastsix•13h ago•37 comments

Space Cadet Pinball on Linux

https://brennan.io/2026/05/09/pinball-and-escrow/
318•jandeboevrie•15h ago•107 comments