frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

Dav2d

https://jbkempf.com/blog/2026/dav2d/
122•captain_bender•1h ago•27 comments

Backpressure is all you need

https://www.lucasfcosta.com/blog/backpressure-is-all-you-need
20•lucasfcosta•1h ago•12 comments

The Website Specification

https://specification.website/
255•k1m•6h ago•101 comments

London's Free Roof Terraces

https://diamondgeezer.blogspot.com/2026/05/londons-free-roof-terraces.html
135•zeristor•5h ago•59 comments

Domain expertise has always been the real moat

https://www.brethorsting.com/blog/2026/05/domain-expertise-has-always-been-the-real-moat/
691•aaronbrethorst•16h ago•403 comments

Security Envelope Pattern collection – S.E.C.R.E.T

https://secret-archive.org/
33•ColinWright•2d ago•1 comments

Shantell Sans (2023)

https://shantellsans.com/process
296•aleda145•15h ago•35 comments

One year of Roto, a compiled scripting language for Rust

https://blog.nlnetlabs.nl/one-year-of-roto-the-compiled-scripting-language-for-rust/
59•Hasnep•1d ago•13 comments

A pictorial introduction to differential geometry (2017)

https://arxiv.org/abs/1709.08492
73•ricudis•7h ago•2 comments

The AV2 Video Standard Has Released (Final v1.0 Specification)

https://av2.aomedia.org
258•ksec•15h ago•115 comments

Avian Visitors

https://theodore.net/projects/AvianVisitors/
68•fdb•7h ago•7 comments

I found a seashell in the middle of the desert

https://github.com/Hawzen/I-found-a-seashell-in-the-middle-of-the-desert#i-found-a-seashell-in-th...
355•Hawzen•2d ago•99 comments

A Gentle Introduction to Lattice-Based Cryptography [pdf]

https://cryptography101.ca/wp-content/uploads/lattice-based-cryptography.pdf
107•jayhoon•2d ago•6 comments

Show HN: Breathe CLI – Paced resonance breathing in the macOS terminal

https://github.com/marekkowalczyk/breathe-cli
65•marekkowalczyk•16h ago•9 comments

What it's like to have your insulin pump die while you're on vacation

https://blog.lauramichet.com/what-its-like-to-have-the-machine-that-keeps-you-alive-die-while-you...
5•speckx•2d ago•2 comments

Accenture to acquire Ookla

https://newsroom.accenture.com/news/2026/accenture-to-acquire-ookla-to-strengthen-network-intelli...
298•Garbage•20h ago•150 comments

Associative learning turns DEET from aversive to appetitive in Aedes aegypti

https://journals.biologists.com/jeb/article/229/10/jeb251935/371741/Associative-learning-switches...
47•croes•2d ago•20 comments

Telli (YC F24) is hiring in engineering, design, and GTM [Berlin, on-site]

https://hi.telli.com/join-us
1•sebselassie•6h ago

Microsoft Office 2019 and 2021 for Mac view-only conversion

https://consumerrights.wiki/w/Microsoft_Office_2019_and_2021_for_Mac_view-only_conversion_(2026)
915•antipurist•13h ago•321 comments

Racket v9.2

https://blog.racket-lang.org/2026/05/racket-v9-2.html
161•spdegabrielle•3d ago•17 comments

Mechanical Pencil: An illustrated celebration of the engineering around us

https://mechanical-pencil.com/
113•Muhammad523•12h ago•15 comments

Openrsync: An implementation of rsync, by the OpenBSD team

https://github.com/kristapsdz/openrsync
436•sph•1d ago•160 comments

Voxel Space (2017)

https://s-macke.github.io/VoxelSpace/
291•davikr•22h ago•62 comments

Zig ELF Linker Improvements Devlog

https://ziglang.org/devlog/2026/#2026-05-30
216•kristoff_it•19h ago•80 comments

Mysteries of the Griffin iMate

https://www.projectgus.com/2023/04/griffin-imate/
23•geerlingguy•4d ago•5 comments

Pandoc Templates

https://pandoc-templates.org/
413•ankitg12•1d ago•54 comments

wolfSSL releases a new product; wolfCOSE a zero alloc C embbedded COSE stack

https://github.com/wolfSSL/wolfCOSE
99•aidangarske•16h ago•26 comments

Ahoy, DECmate II the little PDP-8 that could

http://oldvcr.blogspot.com/2026/05/ahoy-decmate-ii-little-pdp-8-that-could.html
39•TMWNN•8h ago•7 comments

Cheese Paper: a text editor specifically designed for writing

https://brie.gay/cheese-paper/
128•sohkamyung•14h ago•32 comments

Parallel Reconstruction of Lawful TLS Wiretapping

https://remyhax.xyz/posts/reproducing-lawful-tls-wiretapping/
111•jerrythegerbil•17h ago•52 comments