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.

GPT-5.6 used a prompt to close a 30-year gap in convex optimization

https://old.reddit.com/r/math/comments/1uxj3cy/after_openais_cdc_proof_announcement_gpt56_used_a/
155•mbustamanter•1h ago•80 comments

Fable 5 vs. GPT-5.6 Sol on an NP-Hard Problem: Does /goal help?

https://charlesazam.com/blog/fable-5-gpt-5-6-sol-goal/
90•couAUIA•3h ago•36 comments

Is this the end of the once-mighty GoPro?

https://amateurphotographer.com/latest/photo-news/going-going-gone-is-this-the-end-of-the-once-mi...
45•aanet•3d ago•62 comments

Tech note: making your own V-I plots at home

https://lcamtuf.substack.com/p/tech-note-making-your-own-v-i-plots
16•zdw•18h ago•0 comments

LG monitors silently install software through Windows Update without consent

https://videocardz.com/newz/lg-monitors-silently-install-software-through-windows-update-without-...
498•baranul•4h ago•261 comments

Regressive JPEGs

https://maurycyz.com/projects/bad_jpeg/
513•vitaut•11h ago•48 comments

What AI did to stackoverflow in a graph

https://data.stackexchange.com/stackoverflow/query/1953768#graph
146•secretslol•3h ago•167 comments

The Computer at the Bottom of a Canal

https://negroniventurestudios.com/2026/07/18/the-computer-at-the-bottom-of-a-canal/
76•Kudos•6h ago•13 comments

AWS: Inaccurate Estimated Billing Data – $1.7 billion

1239•nprateem•1d ago•721 comments

Reviving a 15-year-old netbook with Arch Linux

https://parksb.github.io/en/article/41.html
171•parksb•4d ago•105 comments

Thanks HN for 15 years of support and helping me find my life's work

708•nicholasjbs•21h ago•82 comments

Qubes OS Security in the Public Record

https://arxiv.org/abs/2607.14587
44•sciences44•6h ago•6 comments

First atmosphere found on Earth-like planet in habitable zone of distant star

https://www.bbc.com/news/articles/cy4kdd1e0ejo
485•neversaydie•1d ago•288 comments

Steam Machine: Between 12k and 15k Units Sold per week

https://boilingsteam.com/steam-machine-between-10k-and-15k-sold-per-week/
66•ekianjo•3h ago•47 comments

Funny item co-occurrences in 3.2M Instacart orders

https://rogerdickey.com/funny-item-co-occurrences-in-3-million-instacart-orders/
30•rogerdickey•2d ago•51 comments

The Zilog Z80 has turned 50

https://goliath32.com/blog/z80.html
247•st_goliath•19h ago•99 comments

TP-Link Kasa cameras leaked home GPS via unauthenticated UDP for 6 years

https://github.com/BadChemical/IoT-Vulnerability-Research-Public/blob/main/TP-Link_Kasa_EC71/Kasa...
173•BadChemical•17h ago•61 comments

Show HN: IKEA Complexity Index

https://ikea.greg.technology/
108•gregsadetsky•11h ago•60 comments

Learning a few things about running SQLite

https://jvns.ca/blog/2026/07/17/learning-about-running-sqlite/
288•surprisetalk•21h ago•75 comments

Waldi: A quiet place to write, and to be read

https://github.com/waaldev/waldi
40•waaldev•6d ago•19 comments

In-toto: A framework to secure the integrity of software supply chains

https://in-toto.io/
49•Erenay09•1d ago•7 comments

Kimi K3, and what we can still learn from the pelican benchmark

https://simonwillison.net/2026/Jul/16/kimi-k3/
372•droidjj•1d ago•199 comments

EU ban on destruction of unsold clothes and shoes enters into application

https://environment.ec.europa.eu/news/ban-destruction-unsold-clothes-and-shoes-enters-application...
7•robtherobber•48m ago•1 comments

Engineering Peace

https://asteriskmag.com/issues/14/engineering-peace
6•jkly•1w ago•1 comments

I started a “dirt notebook”

https://pinewind.bearblog.dev/i-started-a-dirt-notebook/
89•herbertl•13h ago•77 comments

LG ThinQ Terms of Use

8•tedggh•47m ago•3 comments

Stenchill: 3D Printable Solder Paste Stencil Generator

https://www.stenchill.com/en/
67•radeeyate•14h ago•19 comments

Static search trees: 40x faster than binary search (2024)

https://curiouscoding.nl/posts/static-search-tree/
156•lalitmaganti•18h ago•12 comments

Revisiting Yliluoma's ordered dither algorithm

https://30fps.net/pages/revisiting-yliluoma-2/
18•ibobev•5d ago•2 comments

Open Book Touch: open-source e-reader

https://www.crowdsupply.com/oddly-specific-objects/open-book-touch
149•surprisetalk•18h ago•47 comments