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.

Keep Our Servers Running

https://blog.archive.org/2026/09/01/keep-our-servers-running-your-recurring-donation-goes-3x-this...
391•sonicrocketman•5h ago•90 comments

Making a Python interpreter in 1024 bytes

https://austinhenley.com/blog/python1024.html
218•azhenley•9h ago•80 comments

It's time for Mark Zuckerberg to resign from Meta

https://www.theguardian.com/technology/commentisfree/2026/sep/04/mark-zuckerberg-resign-meta
32•domhudson•55m ago•37 comments

Programming is Art

https://orchidfiles.com/programming-is-art/
4•theorchid•49m ago•1 comments

Ask HN: How do you manage skills files?

109•imadtaieber•13h ago•92 comments

Ask HN: Fable hacked my piano, can I release the results?

147•jmpman•1d ago•86 comments

It took a year to ship WebAssembly in Anubis

https://anubis.techaro.lol/blog/2026/anubis-wasm/
261•xena•12h ago•133 comments

Show HN: Engrim – A universal, local-first SQLite memory engine for AI CLIs

https://github.com/timgordontg/engrim
30•timgordontg•4h ago•8 comments

Nitter and XCancel resume service after legal advice

https://github.com/zedeus/nitter/commit/1428b4c2b4246f92a7e5b2673438e5fb39fcc4a3
721•zImPatrick•15h ago•313 comments

Show HN: GET Together – A social network where you don't need POST to Post

https://gettogether.dev
48•nchudleigh•7h ago•18 comments

Babylonian Lamb Stew with Beets (1750–1730 BCE)

https://babylonian-collection.yale.edu/about/babylonian-cooking
139•yubblegum•3d ago•104 comments

GrapheneOS Overhauled Default Apps and Secure Clipboard

https://grapheneos.social/@GrapheneOS/117225539756835649
281•Cider9986•12h ago•201 comments

Harnessing the Universal Geometry of Embeddings

https://arxiv.org/abs/2505.12540
74•ur-whale•12h ago•27 comments

NIXI has killed the "Dot In" domain name (2025)

https://www.naavi.org/wp/nixi-has-killed-the-dot-in-domain-name/
7•pkd•3d ago•3 comments

Research acceleration: The view inside OpenAI

https://openai.com/index/research-acceleration-view-inside-openai
169•iamsyr•17h ago•112 comments

TiVo to charge money for skipping commercials in your own recordings

https://cordcuttersnews.com/tivo-plans-to-end-free-automatic-commercial-skipping-in-november-test...
58•dmitrygr•4h ago•22 comments

Has anybody seen my keys? A key-hierarchy strategy for rack-level security

https://rfd.shared.oxide.computer/rfd/0301
28•cyb0rg0•6h ago•1 comments

Asahi Linux on M3

https://asahilinux.org/2026/09/m2-episode-1/
456•mdp2021•18h ago•279 comments

The NX bit is not just about security

https://purplesyringa.moe/blog/guest/the-nx-bit-is-not-just-about-security/
67•torutofu•2d ago•34 comments

I'm a seeing-eye dog for a computer

https://claytonwramsey.com/blog/seeing-eye/
67•claytonwramsey•3d ago•68 comments

Please don't rearrange our shoes when we turn up, paramedics in Japan urge

https://www.theguardian.com/world/2026/aug/28/never-tidy-paramedics-shoes-japan-custom-etiquette
103•high_na_euv•3d ago•111 comments

Signing TLS handshakes inside a TPM

https://bschaatsbergen.com/posts/go-tpm-tls/
25•bschaatsbergen•11h ago•34 comments

Switzerland's Federal Government Is Replacing Microsoft on 3k Computers

https://itsfoss.com/news/switzerland-replace-microssoft-pilot/
93•ivell•3h ago•71 comments

Is mathematics about to enter the conservatory?

https://mbmccoy.dev/posts/mathematical-conservatory/
43•_alternator_•9h ago•63 comments

An Alien Mind

https://openai.com/index/an-alien-mind/
405•tosh•16h ago•354 comments

NetBSD 9.5 released and EOL for NetBSD-9

https://blog.netbsd.org/tnf/entry/netbsd_9_5_released_and
131•jaypatelani•17h ago•12 comments

Show HN: Mador – Make any DOM reactive with a tiny 80-line Proxy state tuple

https://github.com/marsbos/mador
86•bosmarcel•12h ago•28 comments

Reverse engineering the storage format for an undocumented database

https://blog.glazer.ee/posts/converting-cronos/
50•pintprint•3d ago•4 comments

Black Hole of Los Alamos: Seller of surplus nuclear research materials (2011)

https://www.atlasobscura.com/places/black-hole-of-los-alamos
62•Bluestein•4d ago•15 comments

Ask HN: Would you read a statistics textbook?

77•usernametaken29•1d ago•46 comments