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.

Amazon, Facebook, FBI have access to a private intelligence-sharing network

https://prismreports.org/2026/05/20/seattle-shield-private-companies-surveillance/
100•root-parent•29m ago•19 comments

Project Hail Mary – Stellar Navigation Chart

https://valhovey.github.io/gaia-mary/
129•speleo•2h ago•36 comments

Flipper One – we need your help

https://blog.flipper.net/flipper-one-we-need-your-help/
802•sandebert•7h ago•356 comments

Was my $48K GPU server worth it?

https://rosmine.ai/2026/05/13/was-my-48k-gpu-worth-it/
54•apwheele•2d ago•34 comments

Indexing a year of video locally on a 2021 MacBook with Gemma4-31B (50GB swap)

https://blog.simbastack.com/indexed-a-year-of-video-locally/
148•asenna•4h ago•54 comments

More than 340 local news outlets are limiting the Internet Archive's access

https://www.niemanlab.org/2026/05/more-than-340-local-news-outlets-are-limiting-the-internet-arch...
19•jaredwiener•1h ago•2 comments

Python 3.15: features that didn't make the headlines

https://blog.changs.co.uk/python-315-features-that-didnt-make-the-headlines.html
234•rbanffy•7h ago•114 comments

BBEdit 16 Is Here

https://www.barebones.com/products/bbedit/bbedit16.html
4•qaz_plm•3m ago•0 comments

ParadeDB (YC S23) Is Hiring Distributed Systems/Platform Engineers

1•philippemnoel•1h ago

Lost Images from the 1945 Trinity Nuclear Test Restored

https://spectrum.ieee.org/trinity-nuclear-test
194•pseudolus•7h ago•55 comments

Launch HN: Runtime (YC P26) – Sandboxed coding agents for everyone on a team

https://www.runtm.com/
28•gustrigos•2h ago•7 comments

We're testing new ad formats in Search and expanding our Direct Offers pilot

https://blog.google/products/ads-commerce/google-marketing-live-search-ads/
481•sofumel•8h ago•413 comments

Mounting Git commits as folders with NFS

https://jvns.ca/blog/2023/12/04/mounting-git-commits-as-folders-with-nfs/
45•pvtmert•2d ago•30 comments

Waymo pauses Atlanta service as its robotaxis keep driving into floods

https://techcrunch.com/2026/05/21/waymo-pauses-atlanta-service-as-its-robotaxis-keep-driving-into...
113•mattas•1h ago•126 comments

Michael Keating has died

https://www.bigfinish.com/news/v/michael-keating-1947-2026
64•speckx•3h ago•34 comments

Chewing gum restores dad's taste and smell years after Covid

https://discover.swns.com/2026/05/chewing-gum-restores-dads-taste-and-smell-years-after-covid/
41•speckx•1h ago•12 comments

Show HN: I Dedicated 4 Years to Mastering Offline Password Cracking

134•bojta-lepenye•5h ago•12 comments

Museum of Pocket Calculating Devices

https://www.calculators.de/
20•ohjeez•2h ago•2 comments

What Is Happening to Publishing?

https://resobscura.substack.com/p/what-is-happening-to-publishing
39•benbreen•1d ago•12 comments

FatGid: FreeBSD 14.x kernel local privilege escalation

https://fatgid.io/
62•WhyNotHugo•6h ago•28 comments

Vivaldi 8.0

https://vivaldi.com/blog/vivaldi-on-desktop-8-0/
264•OuterVale•11h ago•189 comments

We Reverse-Engineered Docker Sandbox's Undocumented MicroVM API

https://rivet.dev/blog/2026-02-04-we-reverse-engineered-docker-sandbox-undocumented-microvm-api/
40•yakkomajuri•3h ago•5 comments

Magic the Gathering format: Fun 40

https://fabiensanglard.net/mtg/fun/
51•ibobev•5h ago•46 comments

Google's Antigravity Bait and Switch

https://www.0xsid.com/blog/antigravity-bait-n-switch
362•ssiddharth•4h ago•198 comments

Show HN: Rmux – A programmable terminal multiplexer with a Playwright-style SDK

https://github.com/helvesec/rmux
147•shideneyu•9h ago•69 comments

What Do Gödel's Incompleteness Theorems Mean?

https://www.quantamagazine.org/what-do-godels-incompleteness-theorems-truly-mean-20260518/
102•baruchel•3d ago•43 comments

A Bipartisan Amendment Would End Police License Plate Tracking Nationwide

https://www.wired.com/story/a-bipartisan-amendment-would-end-police-license-plate-tracking-nation...
168•cdrnsf•5h ago•47 comments

AI is just unauthorised plagiarism at a bigger scale

https://axelk.ee/ai-is-just-unauthorised-plagiarism-at-a-bigger-scale/
665•speckx•4h ago•539 comments

Stop throwing AI-generated walls of text into conversations

https://noslopgrenade.com/
342•napolux•8h ago•199 comments

IBM invented semiconductor manufacturing automation

https://spectrum.ieee.org/semiconductor-fabrication
59•rbanffy•7h ago•2 comments