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.

OpenBSD 7.9 Released

https://www.openbsd.org/79.html
192•bradley_taunt•2h ago•95 comments

New accessibility features powered by Apple Intelligence

https://www.apple.com/newsroom/2026/05/apple-unveils-new-accessibility-features-and-updates-with-...
266•interpol_p•3h ago•135 comments

Andrej Karpathy joins Anthropic

https://twitter.com/karpathy/status/2056753169888334312
141•dmarcos•24m ago•25 comments

Gaussian Splat of a Strawberry

https://superspl.at/scene/84df8849
285•danybittel•4h ago•122 comments

Show HN: I made a 3D pose maker for artists

https://setpose.com/
32•augustvdv•1h ago•14 comments

Hanoi's humble beer glass and the memory of a nation

https://sundaylongread.com/2026/05/15/hanois-humble-beer-glass-and-the-memory-of-a-nation/
41•NaOH•21h ago•2 comments

An Apple (II) for Teacher

https://technicshistory.com/2026/05/19/an-apple-ii-for-teacher/
30•cfmcdonald•15h ago•5 comments

I Found Ultra-Pure Quantum Crystals in an Abandoned Mine in the Atacama Desert

https://medium.com/@breid.at/ultra-pure-quantum-crystals-from-an-abandoned-mine-in-a-mysterious-d...
177•vi_sextus_vi•2d ago•50 comments

CISA Admin Leaked AWS GovCloud Keys on GitHub

https://krebsonsecurity.com/2026/05/cisa-admin-leaked-aws-govcloud-keys-on-github/
120•LelouBil•7h ago•22 comments

Peter Neumann has died

https://www.tuhs.org/pipermail/tuhs/2026-May/033748.html
244•pabs3•12h ago•19 comments

Mini Shai-Hulud Strikes Again: 314 npm Packages Compromised

https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/
250•theanonymousone•10h ago•159 comments

Nim-Presto – REST API Framework for Nim Language

https://github.com/status-im/nim-presto
39•TheWiggles•2d ago•7 comments

Polypad

https://polypad.amplify.com/
160•ivank•2d ago•15 comments

Intro to TLA+ for the LLM Era: Prompt Your Way to Victory

https://emptysqua.re/blog/intro-to-tla-plus-for-the-llm-era/
13•zdw•1d ago•3 comments

Photo GIMP – A Patch for GIMP 3 for Photoshop Users

https://github.com/Diolinux/PhotoGIMP
145•SockThief•2d ago•105 comments

Colonization of Venus

https://en.wikipedia.org/wiki/Colonization_of_Venus
78•simonebrunozzi•3h ago•43 comments

Click (2016)

https://clickclickclick.click/
342•andrewzeno•16h ago•86 comments

Cursor Introduces Composer 2.5

https://cursor.com/blog/composer-2-5
229•asar•22h ago•173 comments

Kv4p HT – A homebrew 1W radio (VHF or UHF) that plugs into an Android phone

https://www.kv4p.com/
129•krupan•2d ago•51 comments

Iran demands Big Tech pay fees for undersea Internet cables in Strait of Hormuz

https://arstechnica.com/tech-policy/2026/05/iran-demands-big-tech-pay-fees-for-undersea-internet-...
20•JeanKage•1h ago•6 comments

U.S. Cybersecurity Agency Leaves Its Digital Keys Out in Public on GitHub

https://gizmodo.com/the-worst-leak-that-ive-witnessed-u-s-cybersecurity-agency-leaves-its-digital...
55•neogodless•3h ago•11 comments

Anthropic acquires Stainless

https://www.anthropic.com/news/anthropic-acquires-stainless
503•tomeraberbach•22h ago•354 comments

The lasting influence of Netscape Time

https://thehistoryoftheweb.com/the-lasting-influence-of-netscape-time/
78•zdw•2d ago•21 comments

PyTorch Landscape

https://pytorch.landscape2.io
71•salamo•11h ago•20 comments

1024000^2 Blocks, 2B2T Minecraft Server World Download Project, and Discoveries

https://github.com/2b2tplace/1m_release
165•exploraz•1d ago•104 comments

The last six months in LLMs in five minutes

https://simonwillison.net/2026/May/19/5-minute-llms/
599•yakkomajuri•14h ago•491 comments

We let AIs run radio stations

https://andonlabs.com/blog/andon-fm
322•lukaspetersson•21h ago•245 comments

Regex Chess: A 2-ply minimax chess engine in 84,688 regular expressions

https://nicholas.carlini.com/writing/2025/regex-chess.html
161•surprisetalk•5d ago•43 comments

Show HN: Number Gacha, a gacha game distilled to its essence

https://isabisabel.com/gacha/
208•babel16•5d ago•105 comments

Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

https://hyperpolyglot.org/lisp
177•veqq•20h ago•42 comments