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.

I don't think AI will make your processes go faster

https://frederickvanbrabant.com/blog/2026-05-15-i-dont-think-ai-will-make-your-processes-go-faster/
301•TheEdonian•4h ago•236 comments

I turned a $80 RK3562 Android tablet into a Debian Linux workstation

https://github.com/tech4bot/rk3562deb
89•tech4bot•3h ago•43 comments

Security researcher says Microsoft built a Bitlocker backdoor, releases exploit

https://www.techspot.com/news/112410-security-researcher-microsoft-secretly-built-backdoor-bitloc...
296•nolok•3h ago•134 comments

Native all the way, until you need text

https://justsitandgrin.im/posts/native-all-the-way-until-you-need-text/
261•dive•5h ago•172 comments

Every AI Subscription Is a Ticking Time Bomb for Enterprise

https://www.thestateofbrand.com/news/ai-subscription-time-bomb
243•mooreds•5h ago•211 comments

Hindenburg's Smoking Room

https://www.airships.net/hindenburg-smoking-room/
46•crescit_eundo•2d ago•17 comments

Prolog Basics Explained with Pokémon

https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
132•birdculture•2d ago•18 comments

Scientists believe ibogaine can help veterans overcome PTSD

https://www.bbc.com/future/article/20260514-how-hallucinogenic-ibogaine-helps-veterans-overcome-ptsd
39•bushwart•5h ago•30 comments

AI is a technology not a product

https://daringfireball.net/2026/05/ai_is_technology_not_a_product
128•ch_sm•3h ago•43 comments

High-Entropy Alloy

https://en.wikipedia.org/wiki/High-entropy_alloy
37•leonidasrup•3d ago•4 comments

Apple Silicon costs more than OpenRouter

https://www.williamangel.net/blog/2026/05/17/offline-llm-energy-use.html
193•datadrivenangel•4h ago•166 comments

WHO Declares Ebola Outbreak a Global Health Emergency

https://www.nytimes.com/2026/05/17/world/africa/ebola-congo-uganda-who-public-health-emergency.html
167•zzzeek•3h ago•87 comments

Zerostack – A Unix-inspired coding agent written in pure Rust

https://crates.io/crates/zerostack/1.0.0
494•gidellav•18h ago•271 comments

CUDA Books

https://github.com/alternbits/awesome-cuda-books
39•dariubs•4h ago•4 comments

Agentic Trading with Safe Guardrails

https://github.com/ShurikenTrade/shuriken-skills
24•jgan0978•4h ago•9 comments

Mozilla to UK regulators: VPNs are essential privacy and security tools

https://blog.mozilla.org/netpolicy/2026/05/15/mozilla-to-uk-regulators-vpns-are-essential-privacy...
482•WithinReason•10h ago•213 comments

How Diamonds Are Made

https://diamond.jaydip.me/
56•lemonberry•1d ago•34 comments

Colossus: The Forbin Project

https://en.wikipedia.org/wiki/Colossus:_The_Forbin_Project
178•doener•2d ago•58 comments

A nicer voltmeter clock

https://lcamtuf.substack.com/p/a-nicer-voltmeter-clock
266•surprisetalk•18h ago•33 comments

Legacy Update for Windows 8.1 for x64-based Systems

https://legacyupdate.net/download-center/download/51025/update-for-windows-8.1-x64-kb3132080
5•kristianp•1d ago•5 comments

Hosting a website on an 8-bit microcontroller

https://maurycyz.com/projects/mcusite/
190•zdw•15h ago•16 comments

Moving away from Tailwind, and learning to structure my CSS

https://jvns.ca/blog/2026/05/15/moving-away-from-tailwind--and-learning-to-structure-my-css-/
621•mpweiher•1d ago•351 comments

OpenAI and Government of Malta partner to roll out ChatGPT Plus to all citizens

https://openai.com/index/malta-chatgpt-plus-partnership/
275•bookofjoe•20h ago•302 comments

Mado: Fast Markdown linter written in Rust

https://github.com/akiomik/mado
35•nateb2022•2d ago•2 comments

XS: A programming language. Anywhere, anytime, by anyone

https://xslang.org
6•yacin•2h ago•0 comments

SANA-WM, a 2.6B open-source world model for 1-minute 720p video

https://nvlabs.github.io/Sana/WM/
379•mjgil•1d ago•144 comments

We've made the world too complicated

https://user8.bearblog.dev/the-world-is-too-complicated/
399•James72689•1d ago•374 comments

Roman Letters

https://romanletters.org/
79•diodorus•2d ago•10 comments

Illusions of understanding in the sciences

https://link.springer.com/article/10.1007/s42113-026-00271-1
88•sebg•2d ago•43 comments

Twilight of the Velocipede: Typesetting Races Before the Age of Linotype

https://publicdomainreview.org/essay/twilight-of-the-velocipede/
40•benbreen•19h ago•2 comments