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.

Tailscale didn't stop the Hugging Face intrusion

https://tailscale.com/blog/hugging-face-intrusion
414•bluehatbrit•5h ago•163 comments

Elevators

https://john.fun/elevators
843•Jrh0203•9h ago•214 comments

qm

https://github.com/yc-software/qm
426•tosh•6h ago•92 comments

Twenty-five years ago it was cryptography, today it's model weights

https://weeraman.com/because-we-can/
133•aweeraman•3d ago•49 comments

The Absurdity of Albert Camus

https://www.historytoday.com/archive/portrait-author-historian/absurdity-albert-camus
36•apollinaire•1d ago•21 comments

June in Servo: real world compat, media queries, SharedWorker, and more

https://servo.org/blog/2026/07/31/june-in-servo/
97•iamnothere•6h ago•30 comments

Big Food vs. the People

https://www.lighthousereports.com/investigation/big-food-vs-the-people/
188•jruohonen•8h ago•123 comments

Progressive Web Components

https://arielsalminen.com/2026/progressive-web-components/
72•hosteur•14h ago•11 comments

DeepSeek V4 Flash 0731 Intelligence, Performance and Price Analysis

https://artificialanalysis.ai/models/deepseek-v4-flash
528•theanonymousone•16h ago•288 comments

Demystifying DRAM Read Disturbance: RowHammer and RowPress Phenomena

https://arxiv.org/abs/2607.28233
27•Jimmc414•4h ago•16 comments

Let's make the worst Htmx

https://zserge.com/posts/worst-htmx-ever/
59•RebelPotato•19h ago•18 comments

Golang proposal: container/: generic collection types

https://github.com/golang/go/issues/80590
118•jabits•6h ago•72 comments

Run Kimi K3 using 29 GB of RAM at 0.50 tok/s

https://github.com/sqliteai/waste
139•marcobambini•10h ago•57 comments

Loops (YC W22) Is Hiring a Product Educator

https://www.ycombinator.com/companies/loops/jobs/zqUnwqB-product-educator-technical-content-creator
1•chrisfrantz•3h ago

Getting 25 Gbps Thunderbolt Ethernet on My Mac Studio

https://www.jeffgeerling.com/blog/2026/getting-25g-ethernet-mac-thunderbolt/
126•speckx•8h ago•76 comments

Anime Professions

https://github.com/elmiram/anime-professions
9•Gray0Ed•5d ago•3 comments

Termixer (TUI DJ Mixer)

https://github.com/l00sed/termixer
49•l00sed•6h ago•34 comments

How JPEG works: Interactively explore JPEG's lossy compression methods

https://cgjennings.ca/articles/jpeg-compression/
99•at1as•4d ago•11 comments

The most official water costs $120k a gallon

https://signoregalilei.com/2026/07/26/the-most-official-water-costs-120000-a-gallon/
131•surprisetalk•9h ago•105 comments

A past and future of trade secrets

https://www.cabinetmagazine.org/issues/70/kofen.php
11•Hooke•1d ago•1 comments

Dubious research tied to Red Bull has shaped energy drink policy

https://www.theexamination.org/articles/red-bull-funded-research-energy-drinks-alcohol
112•Jimmc414•8h ago•171 comments

The First Transatlantic Telegraph Cable Was a Bold, Beautiful Failure

https://spectrum.ieee.org/the-first-transatlantic-telegraph-cable-was-a-bold-beautiful-failure
14•sparsesignal•2d ago•3 comments

Using the railway network as a flatbed scanner [video]

https://media.ccc.de/v/emf2026-74-1-using-the-railway-network-as-a-flatbed-scanner
48•Jimmc414•6h ago•24 comments

Authorize, don't authenticate

https://blog.marcua.net/2026/07/31/authorize-dont-authenticate.html
47•marcua•10h ago•11 comments

Everyone is building LLM routers, we deprecated ours

https://manifest.build/blog/why-we-deprecated-our-llm-router/
85•brunaxLorax•6h ago•44 comments

Predictive Speculative KV Replication for Bursty LLM Inference

https://jwlabs.vercel.app/post/biting-the-bullet
22•shreybirmiwal•4h ago•2 comments

Is AI reasoning right for the wrong reasons?

https://www.quantamagazine.org/is-ai-reasoning-right-for-the-wrong-reasons-20260731/
112•retupmoc01•9h ago•145 comments

Algorithms on billion-scale graph using 10GB RAM: I love DataFusion

https://semyonsinchenko.github.io/ssinchenko/post/datafusion-graphs-cc-2/
95•speckx•8h ago•31 comments

Severance

https://lcamtuf.substack.com/p/severance
198•surprisetalk•7h ago•60 comments

Anti-fraud tools can't keep pace with robocall scammers

https://broadbandbreakfast.com/how-to-fight-back-against-fraudulent-robocalls/
72•dredmorbius•11h ago•94 comments