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.

Internet Archive Switzerland

https://internetarchive.ch/
157•hggh•2h ago•18 comments

Google broke reCAPTCHA for de-googled Android users

https://reclaimthenet.org/google-broke-recaptcha-for-de-googled-android-users
1225•anonymousiam•19h ago•440 comments

How LEDs are made (2014)

https://learn.sparkfun.com/tutorials/how-leds-are-made/all
33•smig0•2d ago•5 comments

Using Claude Code: The unreasonable effectiveness of HTML

https://twitter.com/trq212/status/2052809885763747935
263•pretext•9h ago•152 comments

A recent experience with ChatGPT 5.5 Pro

https://gowers.wordpress.com/2026/05/08/a-recent-experience-with-chatgpt-5-5-pro/
454•_alternator_•11h ago•308 comments

LLMs Corrupt Your Documents When You Delegate

https://arxiv.org/abs/2604.15597
64•rbanffy•5h ago•23 comments

Mythical Man Month

https://martinfowler.com/bliki/MythicalManMonth.html
234•ingve•2d ago•149 comments

OpenAI’s WebRTC problem

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

America's carpet capital: an empire and its toxic legacy

https://apnews.com/projects/pfas-forever-stained/
81•rawgabbit•2d ago•46 comments

Killswitch: Per-function short-circuit mitigation primitive

https://lwn.net/ml/all/20260507070547.2268452-1-sashal@kernel.org/
41•signa11•5h ago•9 comments

Making Julia as Fast as C++ (2019)

https://flow.byu.edu/posts/julia-c++
40•d_tr•2d ago•25 comments

David Attenborough's 100th Birthday

https://www.bbc.com/news/articles/cp3pww9g0p5o
734•defrost•1d ago•144 comments

Reviving the IBM Selectric Composer Fonts (2023)

https://www.kutilek.de/selectric/
28•tangus•2d ago•1 comments

What causes lightning? The answer keeps getting more interesting

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

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

https://www.wiisfi.com/
292•homebrewer•2d ago•76 comments

Removing fsync from our local storage engine

https://fractalbits.com/blog/remove-fsync/
15•zzsheng•2d ago•4 comments

Read Programming as Theory Building

https://codeutopia.net/blog/2026/05/09/you-should-read-programming-as-theory-building/
13•birdculture•1h ago•0 comments

AI is breaking two vulnerability cultures

https://www.jefftk.com/p/ai-is-breaking-two-vulnerability-cultures
365•speckx•20h ago•145 comments

Cartoon Network Flash Games

https://www.webdesignmuseum.org/flash-game-exhibitions/cartoon-network-flash-games
374•willmeyers•22h ago•116 comments

AWS North Virginia data center outage – resolved

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

An Introduction to Meshtastic

https://meshtastic.org/docs/introduction/
469•ColinWright•1d ago•166 comments

The React2Shell Story

https://lachlan.nz/blog/the-react2shell-story/
177•mufeedvh•22h ago•22 comments

Teaching Claude Why

https://www.anthropic.com/research/teaching-claude-why
210•pretext•20h ago•97 comments

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

https://ze3tar.github.io/post-zcrx.html
197•MrBruh•19h ago•120 comments

Forking the Web

https://dillo-browser.org/lab/web-fork/
56•wrxd•3h ago•54 comments

Can LLMs model real-world systems in TLA+?

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

Serving a website on a Raspberry Pi Zero running in RAM

https://btxx.org/posts/memory/
234•xngbuilds•23h ago•92 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...
88•geox•2d ago•28 comments

US Government releases first batch of UAP documents and videos

https://www.war.gov/UFO/
317•david-gpu•1d ago•469 comments

Roadside Attraction

https://theoffingmag.com/essay/roadside-attraction/
30•aways•18h ago•4 comments