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.

Cloudflare Turnstile requiring fingerprintable WebGL

https://hacktivis.me/articles/cloudflare-turnstile-webgl-fingerprinting
518•HypnoticOcelot•11h ago•293 comments

New Beam Spring Keyboards

https://www.modelfkeyboards.com/product/beam-spring-b104-keyboard/
61•recursivedoubts•2d ago•37 comments

1-Bit Bonsai Image 4B Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
288•modinfo•11h ago•101 comments

Chuwi Minibook X: the netbook we deserve

https://tylercipriani.com/blog/2026/05/28/chuwi-minibook-x/
91•thcipriani•3h ago•78 comments

Reconciling Kubernetes cost estimates with CUR / FOCUS billing data

https://github.com/tanrikuluozlem/burn
23•OzlemT•2d ago•0 comments

Creatine raises brain energy levels and slows cognitive decline: study

https://thesciverse.org/scientists-found-that-the-creatine-supplement-millions-take-for-muscle-ga...
479•MrJagil•9h ago•321 comments

Dav2d

https://jbkempf.com/blog/2026/dav2d/
395•captain_bender•14h ago•144 comments

United Airlines 767 returns to Newark after Bluetooth name sparks alert

https://simpleflying.com/united-airlines-767-returns-newark-bluetooth-name-alert/
268•Eridanus2•13h ago•425 comments

The four programming questions from my 1994 Microsoft internship interview (2023)

https://www.computerenhance.com/p/the-four-programming-questions-from
77•tosh•3d ago•31 comments

Meta launches Instagram, Facebook, and WhatsApp subscriptions

https://techcrunch.com/2026/05/27/meta-officially-launches-instagram-facebook-and-whatsapp-subscr...
120•tambourine_man•9h ago•191 comments

Linux/M68k

http://www.linux-m68k.org/
61•doener•2d ago•16 comments

Codex just found a "workaround" of not having sudo on my PC

https://twitter.com/i/status/2060746160558543217
385•thunderbong•7h ago•185 comments

The Speed of Prototyping in the Age of AI

https://darylcecile.net/notes/speed-of-prototyping-age-of-ai
115•mooreds•9h ago•63 comments

What if remote working, not AI, is to blame for weak junior hiring?

https://www.ft.com/content/2205e2d0-50dc-4e80-9bf7-78d0272276c0
88•uxhacker•2d ago•128 comments

Show HN: Streambed – Stream Postgres to Iceberg on S3, Supports Postgres Wire

https://github.com/viggy28/streambed
64•vira28•7h ago•12 comments

Restartable Sequences

https://justine.lol/rseq/
180•grappler•11h ago•51 comments

It's Not Just X. It's Y

https://mail.cyberneticforests.com/its-not-just-data-its-post-training/
102•mooreds•4h ago•89 comments

Decades of Effort Restore Steelhead and Salmon Passage on Alameda Creek

https://www.fisheries.noaa.gov/feature-story/decades-effort-restore-steelhead-and-salmon-passage-...
6•rawgabbit•2d ago•1 comments

Unix in East Germany (GDR) (1990)

https://groups.google.com/g/comp.unix.wizards/c/QX_dxElrVNs
25•downbad_•2d ago•4 comments

The Website Specification

https://specification.website/
439•k1m•19h ago•182 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
123•Brajeshwar•3d ago•29 comments

London's Free Roof Terraces

https://diamondgeezer.blogspot.com/2026/05/londons-free-roof-terraces.html
269•zeristor•18h ago•132 comments

Using safe-area-inset to build mobile-safe layouts

https://polypane.app/blog/using-safe-area-inset-to-build-mobile-safe-layouts/
9•eustoria•1d ago•1 comments

Re: [PATCH] OOM_pardon, a.k.a. don't kill my xlock (2004)

https://lwn.net/Articles/104185/
59•luu•8h ago•45 comments

Having 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...
127•speckx•3d ago•140 comments

'Backrooms' Stuns with $81M Debut

https://variety.com/2026/film/box-office/backrooms-box-office-record-opening-weekend-obsession-ju...
157•mindcrime•6h ago•78 comments

Odysseus – self-hosted AI workspace

https://github.com/pewdiepie-archdaemon/odysseus
117•Dzheky•10h ago•61 comments

Backpressure is all you need

https://www.lucasfcosta.com/blog/backpressure-is-all-you-need
151•lucasfcosta•13h ago•86 comments

FROST: Fingerprinting Remotely using OPFS-based SSD Timing [pdf]

https://hannesweissteiner.com/pdfs/frost.pdf
57•simjnd•12h ago•15 comments

The History of "Prisencolinensinainciusol"

https://dirkdeklein.net/2026/02/03/the-fascinating-history-of-prisencolinensinainciusol-the-nonse...
24•NaOH•6h ago•7 comments