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.

Valve releases Steam Controller CAD files under Creative Commons license

https://www.digitalfoundry.net/news/2026/05/valve-releases-steam-controller-cad-files-under-creat...
1066•haunter•10h ago•350 comments

The Vatican's Website in Latin

https://www.vatican.va/latin/latin_index.html
25•ks2048•37m ago•8 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
721•diebillionaires•9h ago•284 comments

The Old Guard: Confronting America's Gerontocratic Crisis

https://harpers.org/archive/2026/05/the-old-guard-samuel-moyn-gerontocracy/
26•Caiero•1h ago•12 comments

Vibe coding and agentic engineering are getting closer than I'd like

https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/
400•e12e•10h ago•435 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
204•stevekrouse•8h ago•129 comments

The bottleneck was never the code

https://www.thetypicalset.com/blog/thoughts-on-coding-agents
512•Anon84•2d ago•331 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
211•unforgivenpasta•8h ago•204 comments

How I made $350K from an open-source JavaScript library using dual licensing

https://www.paritydeals.com/blog/monetize-open-source-dual-licensing/
34•sachinneravath•1h ago•9 comments

Building my own Vi text editor in BASIC

https://leetusman.com/nosebook/yvi
24•zeech•1d ago•9 comments

Show HN: Hallucinopedia

http://halupedia.com/
151•bstrama•9h ago•154 comments

Learning the Integral of a Diffusion Model

https://sander.ai/2026/05/06/flow-maps.html
92•benanne•7h ago•17 comments

Show HN: Tilde.run – Agent sandbox with a transactional, versioned filesystem

https://tilde.run/
127•ozkatz•10h ago•95 comments

Community firmware for the Xteink X4 e-paper reader

https://github.com/crosspoint-reader/crosspoint-reader
48•dmos62•1d ago•20 comments

Programming Still Sucks

https://www.stvn.sh/writing/programming-still-sucks-fqffhyp
95•jeromechoo•6h ago•17 comments

How do I inform Windows that I'm writing a binary file?

https://devblogs.microsoft.com/oldnewthing/20260504-00/?p=112296
15•ingve•1d ago•14 comments

A Theory of Deep Learning

https://elonlit.com/scrivings/a-theory-of-deep-learning/
125•elonlit•1d ago•28 comments

Inkscape 1.4.4

https://inkscape.org/doc/release_notes/1.4.4/Inkscape_1.4.4.html
217•s1291•6h ago•59 comments

Ted Turner has died

https://www.cnn.com/2026/05/06/us/ted-turner-death
227•pseudolus•11h ago•186 comments

Show HN: I built an open-source email builder, alternative to Beefree/Unlayer

https://play.templatical.com
99•oahmadov•9h ago•24 comments

Iran hit more U.S. military targets than has been reported, satellite images

https://www.washingtonpost.com/investigations/2026/05/06/iran-us-bases-satellite-images/
77•SanjayMehta•1h ago•39 comments

Perturb-MARS: Reading mouse experiments through a human lens

https://www.noetik.blog/p/perturb-mars-reading-mouse-experiments
3•crescit_eundo•2d ago•0 comments

Show HN: PHP-fts – Full-text search engine in pure PHP, no extensions

https://github.com/olivier-ls/php-fts
31•asmodios•5h ago•7 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
12•whatisabcdefgh•4h ago•1 comments

Higher usage limits for Claude and a compute deal with SpaceX

https://www.anthropic.com/news/higher-limits-spacex
386•meetpateltech•9h ago•334 comments

Setting up a Sun Ray server on OpenIndiana Hipster 2025.10

https://catstret.ch/202605/srss-hipster202510/
127•jandeboevrie•15h ago•46 comments

SoundOff: Low-Cost Passive Ultrasound Tags

https://yibo-fu.com/SoundOff-Low-cost-Passive-Ultrasound-Tags-for-Non-invasive-and-Non
33•jonbaer•8h ago•1 comments

What makes a good smartphone camera?

https://cadence.moe/blog/2026-05-05-what-makes-a-good-smartphone-camera
79•zdw•1d ago•55 comments

Virtual violin produces realistic sounds

https://news.mit.edu/2026/mit-engineers-virtual-violin-produces-realistic-sounds-0429
77•gmays•3d ago•61 comments

ADT says customer data stolen in cyber intrusion

https://therecord.media/ADT-data-breach-cyberattack
15•PaulHoule•2h ago•2 comments