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.

Dirtyfrag: Universal Linux LPE

https://www.openwall.com/lists/oss-security/2026/05/07/8
296•flipped•3h ago•139 comments

Canvas (Instructure) LMS Down in Ongoing Ransomware Attack

https://www.theverge.com/tech/926458/canvas-shinyhunters-breach
25•stefanpie•40m ago•2 comments

The Burning Man MOOP Map

https://www.not-ship.com/burning-man-moop/
500•speckx•8h ago•268 comments

Agents need control flow, not more prompts

https://bsuh.bearblog.dev/agents-need-control-flow/
261•bsuh•6h ago•147 comments

AlphaEvolve: Gemini-powered coding agent scaling impact across fields

https://deepmind.google/blog/alphaevolve-impact/
232•berlianta•8h ago•89 comments

Natural Language Autoencoders: Turning Claude's Thoughts into Text

https://www.anthropic.com/research/natural-language-autoencoders
149•instagraham•5h ago•46 comments

AI slop is killing online communities

https://rmoff.net/2026/05/06/ai-slop-is-killing-online-communities/
343•thm•4h ago•322 comments

DeepSeek 4 Flash local inference engine for Metal

https://github.com/antirez/ds4
248•tamnd•7h ago•72 comments

I want to live like Costco people

https://tastecooking.com/i-want-to-live-like-costco-people/
179•speckx•7h ago•404 comments

Chrome removes claim of On-device Al not sending data to Google Servers

https://old.reddit.com/r/chrome/comments/1t5qayz/chrome_removes_claim_of_ondevice_al_not_sending/
402•newsoftheday•7h ago•153 comments

Colored Shadow Penumbra

https://chosker.github.io/blog/colored-shadow-penumbra
30•ibobev•3h ago•11 comments

Easy Random Trees

https://blog.wilsonb.com/posts/2026-02-27-easy-random-trees.html
15•aebtebeten•2d ago•1 comments

Principles for agent-native CLIs

https://twitter.com/trevin/status/2051316002730991795
46•blumpy22•5h ago•28 comments

Rolling the Root Key

https://blog.apnic.net/2026/05/05/rolling-the-root-key/
5•jandeboevrie•2d ago•0 comments

Creating for a niche

https://www.davesnider.com/posts/working-in-a-niche
18•snide•3h ago•1 comments

PySimpleGUI 6

https://github.com/PySimpleGUI/PySimpleGUI
84•geophph•2d ago•39 comments

Two Home Affairs officials suspended after AI 'hallucinations' found

https://www.citizen.co.za/news/home-affairs-officials-suspended-ai-hallucinations/
15•jruohonen•3h ago•1 comments

Draw Marc Andreessen on an Egg

https://eieio.games/blog/marc-andreessen-egg-game/
18•LorenDB•2h ago•3 comments

The Self-Cancelling Subscription

https://predr.ag/blog/the-self-cancelling-subscription/
134•surprisetalk•8h ago•60 comments

Child marriages plunged when girls stayed in school in Nigeria

https://www.nature.com/articles/d41586-026-00720-8
319•surprisetalk•9h ago•241 comments

RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust

https://ratex.lites.dev/
153•atilimcetin•3d ago•85 comments

OpenBSD Stories: The closest thing to cute kittens (OpenBSD/zaurus)

http://miod.online.fr/software/openbsd/stories/zaurus1.html
57•zdw•1d ago•7 comments

OurCar: What I learned making an app for my family

https://mendelgreenberg.com/posts/ourcar/
96•chabad360•1d ago•68 comments

Show HN: TRUST – Coding Rust like it's 1989

https://github.com/wojtczyk/trust
108•wojtczyk•17h ago•70 comments

Boris Cherny: TI-83 Plus Basic Programming Tutorial (2004)

https://www.ticalc.org/programming/columns/83plus-bas/cherny/
180•suoken•3d ago•80 comments

I switched from Mac to a Lenovo Chromebook

https://blog.johnozbay.com/i-left-apples-ecosystem-for-a-lenovo-chromebook-and-you-can-too.html
101•speckx•7h ago•131 comments

GovernGPT (YC W24) Is Hiring Engineers to Build Thinking Systems in Montreal

https://www.ycombinator.com/companies/governgpt/jobs/hRyltS0-backend-engineer-thinking-systems
1•owalerys•11h ago

ZAYA1-8B matches DeepSeek-R1 on math with less than 1B active parameters

https://firethering.com/zaya1-8b-open-source-math-coding-model/
84•steveharing1•14h ago•50 comments

Mozilla says 271 vulnerabilities found by Mythos and "almost no false positives"

https://arstechnica.com/information-technology/2026/05/mozilla-says-271-vulnerabilities-found-by-...
68•epistasis•3h ago•24 comments

Motherboard sales 'collapse' amid unprecedented shortages fueled by AI

https://www.tomshardware.com/pc-components/motherboards/motherboard-sales-collapse-by-more-than-2...
229•speckx•7h ago•270 comments