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.

Computer Hobby Movement in Canada

https://museum.eecs.yorku.ca/exhibits/show/hobby_canada/hobby_canada
65•rbanffy•2h ago•8 comments

MIT: 20% drop in incoming graduate students

https://president.mit.edu/writing-speeches/video-transcript-message-president-kornbluth-about-fun...
6•dmayo•6m ago•0 comments

Show HN: Running the second public ODoH relay

https://numa.rs/blog/posts/odoh-anonymous-dns-without-an-account.html
83•rdme•4h ago•25 comments

Claude for Small Business

https://www.anthropic.com/news/claude-for-small-business
415•neilfrndes•10h ago•381 comments

Meta's New Reality: Record High Profits. Record Low Morale

https://www.wired.com/story/meta-layoffs-bad-vibes-mark-zuckerberg-ai/
49•rustoo•40m ago•35 comments

USDA Projects Smallest US Wheat Harvest Since 1972 Due to Plains Drought

https://www.agweb.com/news/usda-projects-smallest-us-wheat-harvest-1972-due-plains-drought
124•littlexsparkee•1h ago•88 comments

Al Jazeera documentary highlights USC's sale of dead bodies to US Navy, Israel

https://www.uscannenbergmedia.com/2026/05/11/al-jazeera-documentary-highlights-uscs-sale-of-dead-...
12•diogenescynic•8m ago•0 comments

The Tree House: A voyage to the source of a backyard dream

https://www.laphamsquarterly.org/roundtable/tree-house
35•Caiero•2d ago•2 comments

Myths about /dev/urandom (2014)

https://www.2uo.de/myths-about-urandom/
44•signa11•3h ago•25 comments

Linux gaming is faster because Windows APIs are becoming Linux kernel features

https://www.xda-developers.com/linux-gaming-is-getting-faster-because-windows-apis-are-becoming-l...
872•haunter•3d ago•536 comments

Scorched Earth 2000 – Web

http://www.scorch2000.com/web/
326•meshko•14h ago•133 comments

Sam Altman's Business Dealings Under GOP Scrutiny Ahead of OpenAI's IPO

https://www.wsj.com/tech/ai/sam-altmans-business-dealings-under-gop-scrutiny-ahead-of-openais-ipo...
69•1vuio0pswjnm7•2h ago•45 comments

Leaving the Physical World

https://www.eff.org/pages/leaving-physical-world
99•andsoitis•4d ago•44 comments

Saying Goodbye to one line of APL

https://homewithinnowhere.com/posts/2026-05-10-one-line.html#fnref1
40•tosh•3d ago•10 comments

Pipes, Forks, and Zombies

https://cs61.seas.harvard.edu/wiki/2017/Shell3/
18•tosh•4h ago•3 comments

Setting up a free *.city.state.us locality domain (2025)

https://fredchan.org/blog/locality-domains-guide/
590•speckx•1d ago•192 comments

A Claude Code and Codex Skill for Deliberate Skill Development

https://github.com/DrCatHicks/learning-opportunities
141•cdrnsf•11h ago•27 comments

MacBook Neo Deep Dive: Benchmarks, Wafer Economics, and the 8GB Gamble

https://www.jdhodges.com/blog/macbook-neo-benchmarks-analysis/
281•tosh•20h ago•336 comments

The Siri for Families Apple Will Never Build

https://taoofmac.com/space/blog/2026/05/14/1220
55•rcarmo•3h ago•32 comments

A History of IDEs at Google

https://laurent.le-brun.eu/blog/a-history-of-ides-at-google
421•laurentlb•5d ago•272 comments

The Emacsification of Software

https://sockpuppet.org/blog/2026/05/12/emacsification/
357•rdslw•1d ago•222 comments

Claude AI recovers an 11 yrs old BTC wallet holding 400k USD

https://www.tomshardware.com/tech-industry/cryptocurrency/bitcoin-trader-recovers-usd400-000-usin...
7•cednore•8m ago•0 comments

Swift bricks to be installed on all new buildings in Scotland

https://www.theguardian.com/environment/2026/jan/28/swift-bricks-to-be-installed-in-all-new-build...
59•bookofjoe•4d ago•25 comments

Technical Dimensions of Live Feedback in Programming Systems

https://joshuahhh.com/dims-of-feedback/
34•tobr•4d ago•5 comments

Beware of Drunk Deer, French Police Say, Announcing Season of Inebriation

https://www.nytimes.com/2026/05/13/world/europe/france-drunk-deer.html
18•bookofjoe•1h ago•1 comments

The European Union backs Italy's right to make Meta pay for news

https://www.niemanlab.org/2026/05/the-eu-backs-italys-right-to-make-meta-pay-for-news/
45•giuliomagnifico•3h ago•32 comments

Chess puzzle I found in my dad's old book

https://ardoedo.it/kempelen/
203•Eswo•2d ago•63 comments

Avoiding and reducing microplastic false positives from dry glove contact

https://pubs.rsc.org/en/content/articlelanding/2026/ay/d5ay01801c
84•efavdb•13h ago•36 comments

Show HN: Needle: We Distilled Gemini Tool Calling into a 26M Model

https://github.com/cactus-compute/needle
698•HenryNdubuaku•1d ago•199 comments

Show HN: Nibble

https://github.com/glouw/nibble
79•glouwbug•13h ago•21 comments