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.

Async Rust never left the MVP state

https://tweedegolf.nl/en/blog/237/async-rust-never-left-the-mvp-state
195•pjmlp•4h ago•92 comments

Should I Run Plain Docker Compose in Production in 2026?

https://distr.sh/blog/running-docker-in-production/
68•pmig•4d ago•44 comments

Bun is being ported from Zig to Rust

https://github.com/oven-sh/bun/commit/46d3bc29f270fa881dd5730ef1549e88407701a5
556•SergeAx•10h ago•391 comments

Empty Screenings – Finds AMC movie screenings with few or no tickets sold

https://walzr.com/empty-screenings
172•MrBuddyCasino•6h ago•133 comments

When everyone has AI and the company still learns nothing

https://www.robert-glaser.de/when-everyone-has-ai-and-the-company-still-learns-nothing/
25•youngbrioche•2h ago•9 comments

Lessons for Agentic Coding: What should we do when code is cheap?

https://www.dbreunig.com/2026/05/04/10-lessons-for-agentic-coding.html
86•ingve•4h ago•65 comments

Hand Drawn QR Codes

https://sethmlarson.dev/hand-drawn-qr-codes
130•jollyjerry•7h ago•22 comments

Google Chrome silently installs a 4 GB AI model on your device without consent

https://www.thatprivacyguy.com/blog/chrome-silent-nano-install/
321•john-doe•3h ago•334 comments

How OpenAI delivers low-latency voice AI at scale

https://openai.com/index/delivering-low-latency-voice-ai-at-scale/
416•Sean-Der•15h ago•130 comments

CVE-2026-31431: Copy Fail vs. rootless containers

https://www.dragonsreach.it/2026/05/04/cve-2026-31431-copy-fail-rootless-containers/
116•averi•7h ago•51 comments

Farewell to a Giant of Botany

https://nautil.us/farewell-to-a-giant-of-botany-1280409
36•Brajeshwar•2d ago•0 comments

Train Your Own LLM from Scratch

https://github.com/angelos-p/llm-from-scratch
277•kristianpaul•7h ago•29 comments

Agent Skills

https://addyosmani.com/blog/agent-skills/
270•BOOSTERHIDROGEN•13h ago•131 comments

Why I Created phpc.tv

https://afilina.com/why-phpc-tv
27•luu•1d ago•4 comments

The Frog for Whom the Bell Tolls

https://sethmlarson.dev/the-frog-for-whom-the-bell-tolls
18•anujbans•4h ago•5 comments

How Many Children Learned Mathematics from Kiselev's Textbooks?

https://valeman.medium.com/how-many-children-learned-mathematics-from-kiselevs-textbooks-ff4efcea...
22•ibobev•21h ago•4 comments

Mouse Pointer as a Mere Mortal

https://unsung.aresluna.org/mouse-pointer-as-a-mere-mortal/
34•zdw•2d ago•10 comments

Does Employment Slow Cognitive Decline? Evidence from Labor Market Shocks

https://www.nber.org/papers/w35117
304•littlexsparkee•19h ago•288 comments

Securing a DoD contractor: Finding a multi-tenant authorization vulnerability

https://www.strix.ai/blog/how-strix-found-zero-auth-vulnerability-dod-backed-startup
200•bearsyankees•17h ago•82 comments

pgxbackup: Continuity Support for pgBackRest

https://thebuild.com/blog/2026/05/01/pgxbackup-continuity-support-for-pgbackrest/
57•Wingy•2d ago•10 comments

Redis array: short story of a long development process

https://antirez.com/news/164
287•antirez•21h ago•103 comments

Biscuit

https://github.com/yattsu/biscuit
59•unixfg•8h ago•3 comments

When networking doesn't work

https://www.os2museum.com/wp/when-networking-doesnt-work/
70•kencausey•14h ago•11 comments

Formatting a 25M-line codebase overnight

https://stripe.dev/blog/formatting-an-entire-25-million-line-codebase-overnight-the-rubyfmt-story
174•r00k•15h ago•88 comments

Talking to strangers at the gym

https://thienantran.com/talking-to-35-strangers-at-the-gym/
1384•thitran•23h ago•658 comments

Kids bypass age verification with fake moustaches

https://www.theregister.com/2026/05/04/uk_online_safety_act_age_checks_subvert/
119•dreadsword•6h ago•84 comments

Gap between national food production and food-based dietary guidance (2025)

https://www.nature.com/articles/s43016-025-01173-4
65•simonebrunozzi•22h ago•48 comments

2-D Mathematical Curves

https://www.2dcurves.com/
39•the-mitr•7h ago•2 comments

1966 Ford Mustang Converted into a Tesla with Working 'Full Self-Driving'

https://electrek.co/2026/05/02/tesla-1966-mustang-ev-conversion-full-self-driving/
173•Brajeshwar•20h ago•132 comments

Testing Mac OS on the Apple Network Server 2.0 ROMs

http://oldvcr.blogspot.com/2026/05/testing-macos-on-apple-network-server.html
87•zdw•1d ago•17 comments