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.

Project Hail Mary – Stellar Navigation Chart

https://valhovey.github.io/gaia-mary/
877•speleo•16h ago•192 comments

CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs

https://arxiv.org/abs/2605.19269
55•matt_d•4h ago•4 comments

Slumber a TUI HTTP Client

https://slumber.lucaspickering.me
60•jicea•4h ago•26 comments

The surprising story behind the first British person in space

https://www.bbc.com/culture/article/20260518-helen-sharman-the-story-behind-the-first-british-per...
51•xoxxala•1d ago•11 comments

We should get rid of average CPU utilization

https://www.theocharis.dev/blog/why-we-should-get-rid-of-average-cpu-utilization/
17•JeremyTheo•52m ago•10 comments

Cleve Moler has died

https://www.mathworks.com/company/aboutus/founders/clevemoler.html
94•mychele•6h ago•7 comments

Blog ran on Ubuntu 16.04 for 10 years. I migrated it to FreeBSD

https://crocidb.com/post/this-blog-ran-on-ubuntu-16-04-for-10-years-i-migrated-it-to-freebsd/
277•speckx•14h ago•148 comments

The memory shortage is causing a repricing of consumer electronics

https://davidoks.blog/p/ai-is-killing-the-cheap-smartphone
184•d0ks•11h ago•195 comments

Deepfakes Tore a High School Apart

https://www.404media.co/radnor-high-school-pennsylvania-ai-deepfakes-child-sexual-abuse-material/
36•Brajeshwar•1h ago•23 comments

Was my $48K GPU server worth it?

https://rosmine.ai/2026/05/13/was-my-48k-gpu-worth-it/
439•apwheele•3d ago•319 comments

Uv is fantastic, but its package management UX is a mess

https://www.loopwerk.io/articles/2026/uv-ux-mess/
196•nchagnet•12h ago•103 comments

Using Kagi Search with Low Vision

https://veroniiiica.com/using-kagi-search-with-low-vision/
195•speckx•13h ago•63 comments

The death of the brick and mortar toy store

https://brainbaking.com/post/2026/05/the-death-of-the-brick-and-mortar-toy-store/
85•speckx•2d ago•75 comments

Indexing a year of video locally on a 2021 MacBook with Gemma4-31B (50GB swap)

https://blog.simbastack.com/indexed-a-year-of-video-locally/
373•asenna•19h ago•112 comments

Mycorrhizal Fungi, Nature's Key to Plant Survival and Success

https://pacifichorticulture.org/articles/mycorrhizal-fungi-natures-key-to-plant-survival-and-succ...
93•mooreds•1d ago•12 comments

Show HN: Freenet, a peer-to-peer platform for decentralized apps

https://freenet.org/
280•sanity•18h ago•173 comments

Lost Images from the 1945 Trinity Nuclear Test Restored

https://spectrum.ieee.org/trinity-nuclear-test
346•pseudolus•22h ago•104 comments

Python 3.15: features that didn't make the headlines

https://blog.changs.co.uk/python-315-features-that-didnt-make-the-headlines.html
375•rbanffy•21h ago•184 comments

Flipper One – we need your help

https://blog.flipper.net/flipper-one-we-need-your-help/
1149•sandebert•22h ago•442 comments

Tristan Davey's Punch Card Archive

https://punchcards.tristandavey.com/
27•ohjeez•2d ago•6 comments

Spotify will start reserving concert tickets for fans

https://www.hollywoodreporter.com/music/music-industry-news/spotify-will-start-reserving-concert-...
147•elffjs•16h ago•297 comments

Launch HN: Runtime (YC P26) – Sandboxed coding agents for everyone on a team

https://www.runtm.com/
85•gustrigos•17h ago•23 comments

Deciphering the Hashihara Castle Town Map

https://www.obayashi.co.jp/en/kikan_obayashi/detail/kikan_64_project.html
45•1970-01-01•2d ago•0 comments

Waymo pauses Atlanta service as its robotaxis keep driving into floods

https://techcrunch.com/2026/05/21/waymo-pauses-atlanta-service-as-its-robotaxis-keep-driving-into...
308•mattas•16h ago•389 comments

Multi-Stream LLMs: new paper on parallelizing/separating prompts, thinking, I/O

https://arxiv.org/abs/2605.12460
105•atomicthumbs•13h ago•12 comments

Throwing AI-generated walls of text into conversations

https://noslopgrenade.com/
602•napolux•23h ago•351 comments

Google's Antigravity bait and switch

https://www.0xsid.com/blog/antigravity-bait-n-switch
668•ssiddharth•19h ago•299 comments

News outlets are limiting the Internet Archive’s access to their journalism

https://www.niemanlab.org/2026/05/more-than-340-local-news-outlets-are-limiting-the-internet-arch...
280•jaredwiener•16h ago•94 comments

We're testing new ad formats in Search and expanding our Direct Offers pilot

https://blog.google/products/ads-commerce/google-marketing-live-search-ads/
601•sofumel•23h ago•540 comments

Seattle Shield, an intelligence-sharing network operated by the Seattle police

https://prismreports.org/2026/05/20/seattle-shield-private-companies-surveillance/
455•root-parent•15h ago•186 comments