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.

Park by Robot at London Gatwick Airport

https://aerospaceglobalnews.com/news/gatwick-airport-robotic-parking-stanley-robotics/
161•agotterer•3h ago•89 comments

Design Is Compromise

https://stephango.com/design-is-compromise
68•ankitg12•1h ago•20 comments

Kill The Cookie Banner

https://killthecookiebanner.eu/
270•rapnie•5h ago•152 comments

Show HN: CheapSecurity – Lightweight, Self-Hosted CCTV for Linux SBCs

https://github.com/gmrandazzo/CheapSecurity
24•zeldone•1h ago•6 comments

An Inside Look at the Token Reseller Market

https://vectoral.com/blog/token-relay-market
65•mlenhard•2h ago•24 comments

Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

https://astral.sh/blog/ruff-v0.16.0
287•vismit2000•8h ago•177 comments

Go Analysis Framework: modular static analysis by go team

https://pkg.go.dev/golang.org/x/tools/go/analysis
121•AbuAssar•5h ago•11 comments

Jimothy the raccoon has a rare spinal condition. Here's what that means

https://www.popsci.com/science/whats-jimothy-raccoon-condition/
32•speckx•4d ago•1 comments

What if LLMs escape through inferences itself? This is fiction. For now

https://www.agrillo.it/EvasionEn.html
15•ConteMascetti71•1h ago•18 comments

Htmx 4.0, the first JavaScript library to release exclusively on the Game Boy

https://swag.htmx.org/en-cad/products/htmx-4-the-game
137•rcy•5h ago•40 comments

Make an Origami Circuit Board

https://spectrum.ieee.org/origami-circuit-boards
14•ohjeez•1h ago•0 comments

I learned PCB design, 3D printing and C just to listen to music

https://pentaton.app/blog/2026-07-12-introducing-pentaton-lp/
107•interfeco•3d ago•11 comments

How to Write English Prose

https://thelampmagazine.com/blog/how-to-write-english-prose
3•geneticdrifts•13m ago•0 comments

The New AI Superpowers: Focus and Followthrough

https://www.rickmanelius.com/p/the-new-ai-superpowers-focus-and
46•mooreds•4h ago•13 comments

GrapheneOS protections against data extraction from locked devices

https://discuss.grapheneos.org/d/40700-grapheneos-protections-against-data-extraction-from-locked...
286•Cider9986•11h ago•171 comments

What's Under Your Feet in New York City?

https://practical.engineering/blog/2026/7/21/whats-under-your-feet-in-new-york-city
81•sohkamyung•4d ago•10 comments

Google Discloses $94.1B in SpaceX Stock, Marking 6% Stake

https://www.wsj.com/tech/google-discloses-94-1-billion-in-spacex-stock-marking-6-stake-91655d7c
234•1vuio0pswjnm7•4h ago•171 comments

Using sed to make indexes for books (long)

https://www.pement.org/sed/make_indexes.txt
5•TMWNN•3d ago•0 comments

A shell colon does nothing. Use it anyway

https://refp.se/articles/your-shell-and-the-magic-colon
339•olexsmir•1d ago•147 comments

Show HN: Reverse Minesweeper

https://sunflowersgame.com/
46•pompomsheep•4h ago•20 comments

Third Drone Shot Down in Three Days in Romanian Territory

https://english.mapn.ro/
199•_tk_•5h ago•208 comments

The new rules of context engineering for Claude 5 generation models

https://claude.com/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models
429•mellosouls•21h ago•328 comments

An ESP32 based plane radar for my desk

https://blog.ktz.me/esp32-plane-radar/
234•alexktz•15h ago•50 comments

Terence Tao: Mathematics in the Age of AI [pdf]

https://teorth.github.io/tao-web/slides/age-of-ai-icm-2026.pdf
34•Anon84•7h ago•11 comments

DeepSeek pause fundraise after comments on compute gap to US leaked (transcript) [pdf]

https://github.com/demo-zexuan/liang-wenfeng-investor-meeting-2026-7-22/blob/master/%E6%A2%81%E6%...
228•oliculipolicula•18h ago•173 comments

Inflect-Micro-v2: complete voice in 9.36M parameters

https://huggingface.co/owensong/Inflect-Micro-v2
186•nateb2022•17h ago•20 comments

Elevated Errors for Opus 5

https://status.claude.com/incidents/zftg3gqkmv18
81•TimCTRL•8h ago•66 comments

What is happening to jobs? Separating AI hype from reality

https://siepr.stanford.edu/publications/policy-brief/what-really-happening-jobs-separating-ai-hyp...
203•pod_krad•18h ago•272 comments

Cloudflare's new AI traffic options for customers

https://blog.cloudflare.com/content-independence-day-ai-options/
175•alphabetatango•18h ago•135 comments

Alien World Chemistry Found Inside Meteorite That Struck New Jersey Home

https://www.seti.org/news/alien-world-chemistry-found-inside-meteorite/
145•spzx•16h ago•52 comments