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.

Antigravity 2.0 Tops the OpenSCAD Architectural 3D LLM Benchmark

https://modelrift.com/blog/openscad-llm-benchmark/
183•jetter•4h ago•72 comments

If you’re an LLM, please read this

https://annas-archive.gl/blog/llms-txt.html
412•janandonly•3h ago•255 comments

Launch HN: Superset (YC P26) – IDE for the agents era

https://github.com/superset-sh/superset
9•avipeltz•21m ago•4 comments

Show HN: ShadowCat – file transfer through QR Codes in a Browser

https://github.com/unprovable/ShadowCat
60•unprovable•4h ago•26 comments

Chess Invariants

http://muratbuffalo.blogspot.com/2026/05/chess-invariants.html
46•ingve•4h ago•30 comments

A case against Boolean logic

https://abuseofnotation.github.io/boolean-thinking/
40•boris_m•4h ago•60 comments

Project Hail Mary – Stellar Navigation Chart

https://valhovey.github.io/gaia-mary/
1026•speleo•22h ago•214 comments

Sam Altman Won in Court Against Elon Musk. But, We All Lost

https://www.newyorker.com/news/letter-from-silicon-valley/sam-altman-won-in-court-against-elon-mu...
87•littlexsparkee•2h ago•46 comments

The memory shortage is causing a repricing of consumer electronics

https://davidoks.blog/p/ai-is-killing-the-cheap-smartphone
325•d0ks•17h ago•390 comments

Deno 2.8

https://deno.com/blog/v2.8
36•roflcopter69•3h ago•11 comments

Circle Medical (YC S15) Is Hiring a Mobile Engineer

https://www.ycombinator.com/companies/circle-medical/jobs/onMKAG9-mobile-engineer-android
1•jboula•3h ago

Slumber a TUI HTTP Client

https://slumber.lucaspickering.me
128•jicea•10h ago•43 comments

Cleve Moler has died

https://www.mathworks.com/company/aboutus/founders/clevemoler.html
200•mychele•12h ago•16 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/
332•speckx•20h ago•191 comments

The Spread of Christianity Animated

https://www.openculture.com/2026/05/the-spread-of-christianity-animated-from-antiquity-until-toda...
4•leopoldj•1h ago•0 comments

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

https://www.loopwerk.io/articles/2026/uv-ux-mess/
273•nchagnet•18h ago•126 comments

Was my $48K GPU server worth it?

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

CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs

https://arxiv.org/abs/2605.19269
89•matt_d•10h ago•11 comments

AI has a multiplying effect on existing technical skills

https://www.joshwcomeau.com/email/wham-launch-005-elephant-2-p/
93•moebrowne•1h ago•111 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...
84•xoxxala•1d ago•39 comments

Steve Wozniak cheered after telling students they have AI – actual intelligence

https://www.businessinsider.com/steve-wozniak-apple-ai-graduation-speech-2026-5
357•signa11•6h ago•334 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/
428•asenna•1d ago•124 comments

Using Kagi Search with Low Vision

https://veroniiiica.com/using-kagi-search-with-low-vision/
233•speckx•19h ago•77 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/
119•speckx•3d ago•149 comments

Breakthroughs for batteries could soon make them better

https://www.economist.com/science-and-technology/2026/05/20/breakthroughs-for-batteries-could-soo...
48•pingou•3h ago•55 comments

Lost Images from the 1945 Trinity Nuclear Test Restored

https://spectrum.ieee.org/trinity-nuclear-test
390•pseudolus•1d ago•112 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
410•rbanffy•1d ago•201 comments

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

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

Flipper One – we need your help

https://blog.flipper.net/flipper-one-we-need-your-help/
1206•sandebert•1d ago•464 comments

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

https://freenet.org/
323•sanity•1d ago•216 comments