frontpage.
newsnewestaskshowjobs

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.

OpenAI and Hugging Face address security incident during model evaluation

https://openai.com/index/hugging-face-model-evaluation-security-incident/
414•mfiguiere•2h ago•267 comments

FreeInk: Open ecosystem for e-readers

https://freeink.org/
297•FriedPickles•3h ago•68 comments

A digestion of the Jacobian conjecture counterexample

https://terrytao.wordpress.com/2026/07/21/a-digestion-of-the-jacobian-conjecture-counterexample/
55•jeremyscanvic•1h ago•12 comments

Gemini 3.6 Flash, 3.5 Flash-Lite, and 3.5 Flash Cyber

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-6-flash-3-5-flas...
552•logickkk1•7h ago•443 comments

Long presumed dead, a thriving coral reef is discovered in West Africa

https://e360.yale.edu/digest/benin-coral-reef
262•speckx•6h ago•48 comments

Jack Dorsey launches Buzz to combine team chat, AI agents and Git hosting

https://runtimewire.com/article/jack-dorsey-block-buzz-team-chat-ai-agents-git
180•ryanmerket•5h ago•172 comments

'VPNs are lawful technical tools,' says EU Court in landmark copyright ruling

https://www.techradar.com/vpn/vpn-privacy-security/vpns-are-lawful-technical-tools-says-eu-court-...
243•healsdata•2h ago•37 comments

Apple defeats liability for not scanning iCloud for CSAM

https://blog.ericgoldman.org/archives/2026/07/apple-defeats-liability-for-not-scanning-icloud-for...
292•speckx•7h ago•250 comments

"Drawing" the Mona Lisa with GPT-5.6, Claude, Gemini, and Grok

https://www.tryai.dev/blog/ai-drawing-arena-colored-pencils-claude-gpt-grok
24•hershyb_•1h ago•7 comments

The Birth of Prolog (1996)

https://dl.acm.org/doi/10.1145/234286.1057820
30•Jtsummers•3d ago•1 comments

Laguna S 2.1

https://poolside.ai/blog/introducing-laguna-s-2-1
182•rexledesma•5h ago•39 comments

Apple Private Cloud Compute SoC 3 audit reports

https://support.apple.com/guide/certifications/apple-private-cloud-compute-soc-3-audit-apc95a31b9...
74•throwfaraway4•4h ago•30 comments

Qwen-Image-3.0: Rich Content, Authentic Details, Deep Knowledge

https://qwen.ai/blog?id=qwen-image-3.0
523•ilreb•13h ago•208 comments

PCjs Machines

https://www.pcjs.org/
180•naves•8h ago•21 comments

Show HN: Justif – Knuth-Plass justification and microtypography for the web

https://justif.lyall.co/
34•lyall•4d ago•6 comments

Show HN: Read the Tape – Wordle for daytrading, five blind S&P 500 charts a day

https://readthetape.cc/
23•will_asouka•1d ago•19 comments

Bloomy (YC S26) is hiring a founding engineer

1•alexsouthmayd•5h ago

Meta's AI models are powering the first wave of Genesis Mission projects

https://ai.meta.com/blog/genesis-mission-lawrence-berkeley-national-laboratory-segment-anything-d...
84•surprisetalk•5h ago•60 comments

Show HN: A self-running space economy SIM in Rust and Bevy

https://github.com/Kalcode/spaceprojectsim
62•kalcode•3h ago•23 comments

Celestrak adds catalog digit, fixes Y2K bug

https://www.celestrak.org/satcat/
5•1970-01-01•5d ago•0 comments

France's Anssi Will Block PQC-Free Products from Certification Starting 2027

https://postquantum.com/security-pqc/anssi-pqc-certification-2027/
78•Sami_Lehtinen•6h ago•37 comments

The Price of Happiness (2024)

https://happiness-science.org/price-of-happiness/
41•andyjohnson0•3h ago•16 comments

My USB Drive Has a Hidden Encrypted Vault

https://rootkitlabs.com/2026/06/22/I%27m-Building-a-Secure-USB-Drive/
124•machinehum•1d ago•80 comments

Show HN: Browser Tools SDK – an optimal browser harness for agents

https://libretto.sh/browser-tools
6•tanishqkanc•1h ago•1 comments

The unreasonable difficulty of time series forecasting

https://suzyahyah.github.io/machine%20learning/2026/06/27/trouble-with-time-series.html
102•suzyahyah•3d ago•39 comments

Slater – Low-memory graphdb designed for read-heavy graphs

https://github.com/Hikari-Systems/slater
32•rickkjp•3h ago•8 comments

Advertise in ChatGPT

https://ads.openai.com/
227•montecarl•3h ago•229 comments

AI Agent – TRMNL

https://help.trmnl.com/en/articles/14130438-ai-agent
35•joeyespo•3h ago•21 comments

Show HN: Computable – Buy, sell, and redeem GPU for the exact weeks you want

https://www.getcomputable.com/
5•yuansong98•38m ago•2 comments

Show HN: CodeAlmanac – Karpathy-style codebase wiki from your conversations

https://github.com/AlmanacCode/codealmanac/
40•divitsheth•5h ago•13 comments