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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

Taking on CUDA with ROCm: 'One Step After Another'

https://www.eetimes.com/taking-on-cuda-with-rocm-one-step-after-another/
82•mindcrime•4h ago•67 comments

All elementary functions from a single binary operator

https://arxiv.org/abs/2603.21852
22•pizza•1h ago•11 comments

Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

https://arxiv.org/abs/2604.07902
19•mpweiher•18h ago•0 comments

Show HN: boringBar – a taskbar-style dock replacement for macOS

https://boringbar.app/
263•a-ve•10h ago•160 comments

Bring Back Idiomatic Design (2023)

https://essays.johnloeber.com/p/4-bring-back-idiomatic-design
488•phil294•15h ago•251 comments

DIY Soft Drinks

https://blinry.org/diy-soft-drinks/
291•_Microft•10h ago•77 comments

Ask HN: What Are You Working On? (April 2026)

150•david927•11h ago•439 comments

Most people can't juggle one ball

https://www.lesswrong.com/posts/jTGbKKGqs5EdyYoRc/most-people-can-t-juggle-one-ball
275•surprisetalk•3d ago•86 comments

A Perfectable Programming Language

https://alok.github.io/lean-pages/perfectable-lean/
71•yuppiemephisto•6h ago•20 comments

I gave every train in New York an instrument

https://www.trainjazz.com/
229•joshuawolk•2d ago•43 comments

Show HN: Oberon System 3 runs natively on Raspberry Pi 3 (with ready SD card)

https://github.com/rochus-keller/OberonSystem3Native/releases
173•Rochus•14h ago•36 comments

Apple's accidental moat: How the "AI Loser" may end up winning

https://adlrocha.substack.com/p/adlrocha-how-the-ai-loser-may-end
9•walterbell•39m ago•1 comments

Uncharted island soon to appear on nautical charts

https://www.awi.de/en/about-us/service/press/single-view/unkartierte-insel-demnaechst-auf-seekart...
55•tannhaeuser•7h ago•22 comments

Google removes "Doki Doki Literature Club" from Google Play

https://bsky.app/profile/serenityforge.com/post/3mj3r4nbiws2t
337•super256•7h ago•165 comments

Tell HN: Docker pull fails in Spain due to football Cloudflare block

704•littlecranky67•15h ago•271 comments

The peril of laziness lost

https://bcantrill.dtrace.org/2026/04/12/the-peril-of-laziness-lost/
334•gpm•7h ago•114 comments

State of Homelab 2026

https://mrlokans.work/posts/state-of-homelab-2026/
6•swq115•1h ago•0 comments

Investigating How Long-Distance Couples Use Digital Games to Facilitate Intimacy

https://arxiv.org/abs/2505.09509
74•radeeyate•11h ago•21 comments

We have a 99% email reputation, but Gmail disagrees

https://blogfontawesome.wpcomstaging.com/we-have-a-99-email-reputation-gmail-disagrees/
189•em-bee•14h ago•181 comments

Is Math Big or Small?

https://chessapig.github.io/talks/Big-Small
18•robinhouston•19h ago•2 comments

Seven countries now generate 100% of their electricity from renewable energy

https://www.the-independent.com/tech/renewable-energy-solar-nepal-bhutan-iceland-b2533699.html
526•mpweiher•14h ago•270 comments

JVM Options Explorer

https://chriswhocodes.com/vm-options-explorer.html
175•0x54MUR41•17h ago•77 comments

Happy Map

https://pudding.cool/2026/02/happy-map/
226•surprisetalk•5d ago•41 comments

The End of Eleventy

https://brennan.day/the-end-of-eleventy/
207•ValentineC•1d ago•175 comments

Pro Max 5x quota exhausted in 1.5 hours despite moderate usage

https://github.com/anthropics/claude-code/issues/45756
548•cmaster11•14h ago•497 comments

Exploiting the most prominent AI agent benchmarks

https://rdi.berkeley.edu/blog/trustworthy-benchmarks-cont/
497•Anon84•1d ago•129 comments

EasyPost (YC S13) Is Hiring

https://www.easypost.com/careers
1•jstreebin•10h ago

Phyphox – Physical Experiments Using a Smartphone

https://phyphox.org/
196•_Microft•18h ago•32 comments

Show HN: Claudraband – Claude Code for the Power User

https://github.com/halfwhey/claudraband
97•halfwhey•10h ago•32 comments

Mark's Magic Multiply

https://wren.wtf/shower-thoughts/marks-magic-multiply/
43•luu•1d ago•2 comments