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.

A recent experience with ChatGPT 5.5 Pro

https://gowers.wordpress.com/2026/05/08/a-recent-experience-with-chatgpt-5-5-pro/
179•_alternator_•4h ago•74 comments

Using Claude Code: The unreasonable effectiveness of HTML

https://twitter.com/trq212/status/2052809885763747935
80•pretext•2h ago•38 comments

Google broke reCAPTCHA for de-googled Android users

https://reclaimthenet.org/google-broke-recaptcha-for-de-googled-android-users
897•anonymousiam•12h ago•296 comments

OpenAI's WebRTC problem

https://moq.dev/blog/webrtc-is-the-problem/
256•atgctg•1d ago•64 comments

Mythical Man Month

https://martinfowler.com/bliki/MythicalManMonth.html
114•ingve•1d ago•87 comments

What Causes Lightning? The Answer Keeps Getting More Interesting

https://www.quantamagazine.org/what-causes-lightning-the-answer-keeps-getting-more-interesting-20...
17•Tomte•2d ago•0 comments

AI is breaking two vulnerability cultures

https://www.jefftk.com/p/ai-is-breaking-two-vulnerability-cultures
312•speckx•13h ago•129 comments

David Attenborough's 100th Birthday

https://www.bbc.com/news/articles/cp3pww9g0p5o
577•defrost•19h ago•111 comments

The React2Shell Story

https://lachlan.nz/blog/the-react2shell-story/
120•mufeedvh•14h ago•5 comments

Wi is Fi: Understanding Wi-Fi 4/5/6/6E/7/8 (802.11 n/AC/ax/be/bn)

https://www.wiisfi.com/
192•homebrewer•2d ago•50 comments

EU calls VPNs "a loophole that needs closing" in age verification push

https://cyberinsider.com/eu-calls-vpns-a-loophole-that-needs-closing-in-age-verification-push/
67•muse900•1h ago•24 comments

AWS North Virginia data center outage – recovery to take hours

https://www.cnbc.com/2026/05/08/aws-outage-data-center-fanduel-coinbase.html
201•christhecaribou•1d ago•131 comments

Cartoon Network Flash Games

https://www.webdesignmuseum.org/flash-game-exhibitions/cartoon-network-flash-games
327•willmeyers•14h ago•104 comments

You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

https://ze3tar.github.io/post-zcrx.html
174•MrBruh•11h ago•97 comments

Bitter Lessons from the ISSpresso

https://mceglowski.substack.com/p/bitter-lessons-from-the-isspresso
84•zdw•2d ago•21 comments

An Introduction to Meshtastic

https://meshtastic.org/docs/introduction/
422•ColinWright•19h ago•155 comments

Can LLMs model real-world systems in TLA+?

https://www.sigops.org/2026/can-llms-model-real-world-systems-in-tla/
73•mad•14h ago•14 comments

Light without electricity? Glowing algae could make it possible

https://www.colorado.edu/today/2026/05/06/light-without-electricity-glowing-algae-could-make-it-p...
61•geox•2d ago•17 comments

PortalVR Motion – use any VR content in 2D with 3D tracked Joy-Cons

https://portalvr.io/motion
13•gfodor•2d ago•1 comments

Teaching Claude Why

https://www.anthropic.com/research/teaching-claude-why
147•pretext•13h ago•75 comments

The Soul of Maintaining a New Machine

https://books.worksinprogress.co/book/maintenance-of-everything/communities-of-practice/the-soul-...
40•akkartik•3d ago•5 comments

Serving a website on a Raspberry Pi Zero running in RAM

https://btxx.org/posts/memory/
212•xngbuilds•16h ago•89 comments

Mojo 1.0 Beta

https://mojolang.org/
333•sbt567•1d ago•212 comments

All means are fair except solving the problem

https://yosefk.com/blog/all-means-are-fair-except-solving-the-problem.html
49•akkartik•2d ago•43 comments

Over 97% of the 'Linux' Foundation's Budget Goes Not to Linux

https://techrights.org/n/2026/05/08/Over_97_of_the_Linux_Foundation_s_Budget_Goes_Not_to_Linux.shtml
103•esaym•3h ago•43 comments

When is your birthday? The math behind hash collisions

https://0xkrt26.github.io/math_behind_security/2026/05/08/birthday-problem.html
40•denismenace•11h ago•7 comments

Mux (YC W16) Is Hiring

https://www.mux.com/jobs
1•mmcclure•10h ago

US Government releases first batch of UAP documents and videos

https://www.war.gov/UFO/
278•david-gpu•19h ago•421 comments

Meta Shuts Down End-to-End Encryption for Instagram Messaging

https://www.pcmag.com/news/meta-shuts-down-end-to-end-encryption-for-instagram-dms-messaging
240•tcp_handshaker•9h ago•155 comments

Looking at the data behind prediction markets

https://asteriskmag.com/issues/14/are-prediction-markets-good-for-anything
92•kqr•1d ago•36 comments