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.

Patreon laying off 20% of staff

https://www.patreon.com/jackconte/posts/painful-update-164628951
51•gpi•42m ago•49 comments

Flux 3 X Mimic: The Next Generation of Video-Action Models

https://bfl.ai/blog/flux-3-mimic
193•kensai•4h ago•24 comments

It's getting harder to focus every day

https://glyphack.com/attention/
294•peykar•5h ago•150 comments

My security camera shipped a GitHub admin token in its login page

https://hhh.hn/hanwha-github-token/
28•hhh•1h ago•7 comments

I Tried Building a Real App with AI. It Took a Year

https://www.alexhyett.com/videos/tried-building-app-with-ai-it-took-a-year/
38•surprisetalk•1h ago•30 comments

Flux 3

https://bfl.ai/blog/flux-3
424•ThouYS•7h ago•107 comments

The case for MUDs in modern times

https://www.andrewzigler.com/feed/the-case-for-muds-in-modern-times
42•bw86•1h ago•39 comments

Ah, the Codeberg Drama

https://gagliardoni.net/#20260724_codeberg_drama
16•tomgag•44m ago•5 comments

India's first privately-developed rocket reaches orbit on dramatic debut launch

https://arstechnica.com/space/2026/07/indias-first-privately-developed-rocket-reaches-orbit-on-dr...
32•sohkamyung•4d ago•5 comments

Buz – A fork of Bun using modern Zig, with sub-1s incremental builds

https://ziggit.dev/t/buz-a-drop-in-replacement-for-bun-using-modern-zig-with-sub-1s-incremental-b...
103•kristoff_it•4h ago•69 comments

The IBM PC, Part 1: Arrival

https://technicshistory.com/2026/07/24/the-ibm-pc-part-1-arrival/
24•cfmcdonald•2h ago•5 comments

Programming language file extensions that match ISO 3166-1 alpha-2 country code

https://www.bruh.ltd/blog/programming-language-file-extensions-that-match-an-iso-3166-1-alpha-2-c...
13•speckx•1h ago•4 comments

IRGC Claims It Destroyed Amazon's Bahrain Data Center

https://houseofsaud.com/irgc-claims-destroyed-amazon-bahrain-data-center/
45•thisislife2•3h ago•19 comments

Nothing works and everyone is euphoric

https://ptrchm.com/posts/nothing-works-and-everyone-is-euphoric/
179•pchm•4h ago•141 comments

Claude Cookbook

https://platform.claude.com/cookbook/
158•saikatsg•8h ago•80 comments

Computational chemistry, Locally? My rant on SSH

https://chillphysicsenjoyer.substack.com/p/computational-chemistry-locally
27•crescit_eundo•2d ago•16 comments

Why is programming so captivating, yet so agonizing?

https://elsewhere.news/en/zhenfund/why-is-programming-so-captivating-yet-so-agonizing
11•ilreb•1h ago•5 comments

Em dashes are fucking amazing

https://psychotechnology.substack.com/p/em-dashes-are-fucking-amazing
56•surprisetalk•1h ago•53 comments

Game of Trees – Git-based version control from OpenBSD folks

https://www.gameoftrees.org/
23•gregnavis•3h ago•1 comments

Show HN: Echo – Fable-level results at 1/3 the cost using open-weight models

418•adam_rida•18h ago•202 comments

Tangleflow: Converts GitHub Actions workflows to tangled workflows and back

https://github.com/43081j/tangleflow
15•wertyk•2d ago•7 comments

The Book Prize Index

https://book-prize-index.vercel.app
35•Luc•5h ago•2 comments

Writing by hand is good for your brain

https://nealstephenson.substack.com/p/writing-by-hand-is-good-for-your
1372•dwwoelfel•23h ago•622 comments

How Do We Stop Vibe Coding?

https://alexklos.ca/blog/how-do-we-stop-vibe-coding
13•prohobo•3h ago•11 comments

Hetzner is working on LLM Inference

https://sliplane.io/blog/hetzner-inference
89•jonas_scholz•4h ago•38 comments

The day Steve Jobs dissed me in a keynote (2010)

https://sive.rs/itunes
147•downbad_•4h ago•37 comments

AMD's Instinct MI455X: Aiming for the Sun

https://chipsandcheese.com/p/amds-instinct-mi455x-aiming-for-the
40•ingve•6h ago•20 comments

Startup founders urge U.S. government not to shut off Chinese open weight AI

https://www.politico.com/news/2026/07/22/startup-founders-urge-trump-not-to-shut-off-chinese-open...
1003•theanonymousone•22h ago•811 comments

I regret migrating to Codeberg

https://xn--gckvb8fzb.com/i-regret-migrating-to-codeberg/
405•boramalper•23h ago•314 comments

What happened to TheNumbers.com

https://stephenfollows.com/p/what-just-happened-to-thenumberscom-should-worry-us-all
394•nickthegreek•20h ago•186 comments