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•10mo ago

Comments

yxhuvud•10mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•10mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•10mo 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•10mo 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•10mo 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•10mo 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.

Anatomy of the .claude/ folder

https://blog.dailydoseofds.com/p/anatomy-of-the-claude-folder
187•freedomben•3h ago•100 comments

Installing a Let's Encrypt TLS Certificate on a Brother Printer with Certbot

https://owltec.ca/Other/Installing+a+Let%27s+Encrypt+TLS+certificate+on+a+Brother+printer+automat...
108•8organicbits•4h ago•31 comments

Desk for people who work at home with a cat

https://soranews24.com/2026/03/27/japan-now-has-a-special-desk-for-people-who-work-at-home-with-a...
141•zdw•2h ago•60 comments

Sand from Different Beaches in the World

https://magnifiedsand.com/
48•RAAx707•3d ago•7 comments

AI got the blame for the Iran school bombing. The truth is more worrying

https://www.theguardian.com/news/2026/mar/26/ai-got-the-blame-for-the-iran-school-bombing-the-tru...
72•cptroot•1h ago•28 comments

A Faster Alternative to Jq

https://micahkepe.com/blog/jsongrep/
319•pistolario•10h ago•193 comments

The 'paperwork flood': How I drowned a bureaucrat before dinner

https://sightlessscribbles.com/posts/the-paperwork-flood/
436•robin_reala•5h ago•349 comments

How and why to take a logarithm of an image [video]

https://www.youtube.com/watch?v=ldxFjLJ3rVY
142•jgwil2•4d ago•51 comments

People inside Microsoft are fighting to drop mandatory Microsoft Account

https://www.windowscentral.com/microsoft/windows-11/people-inside-microsoft-are-fighting-to-drop-...
187•breve•3h ago•168 comments

Building FireStriker: Making Civic Tech Free

https://firestriker.org/blog/building-firestriker-why-im-making-civic-tech-free
7•noleary•23h ago•3 comments

EMachines never obsolete PCs: More than a meme

https://dfarq.homeip.net/emachines-never-obsolete-pcs-more-than-a-meme/
38•zdw•3d ago•16 comments

Hold on to Your Hardware

https://xn--gckvb8fzb.com/hold-on-to-your-hardware/
439•LucidLynx•7h ago•368 comments

Schedule tasks on the web

https://code.claude.com/docs/en/web-scheduled-tasks
249•iBelieve•13h ago•208 comments

Apple discontinues the Mac Pro

https://9to5mac.com/2026/03/26/apple-discontinues-the-mac-pro/
586•bentocorp•20h ago•543 comments

Meow.camera

https://meow.camera/#4258783365322591678
32•surprisetalk•3h ago•4 comments

21,864 Yugoslavian .yu domains

https://jacobfilipp.com/yu/
27•freediver•1d ago•51 comments

‘Energy independence feels practical’: Europeans building mini solar farms

https://www.euronews.com/2026/03/26/suddenly-energy-independence-feels-practical-europeans-are-bu...
80•vrganj•8h ago•80 comments

Gzip decompression in 250 lines of Rust

https://iev.ee/blog/gzip-decompression-in-250-lines-of-rust/
64•vismit2000•3d ago•29 comments

Why so many control rooms were seafoam green (2025)

https://bethmathews.substack.com/p/why-so-many-control-rooms-were-seafoam
969•Amorymeltzer•2d ago•197 comments

Show HN: Sup AI, a confidence-weighted ensemble (52.15% on Humanity's Last Exam)

https://sup.ai
13•supai•1d ago•7 comments

Iran-linked hackers have breached FBI director's personal emails

https://www.cnn.com/2026/03/27/politics/iran-linked-hackers-fbi-director-patel
85•vrganj•1h ago•33 comments

Last gasps of the rent seeking class?

https://geohot.github.io//blog/jekyll/update/2026/02/26/the-last-gasps-of-the-rent-seeking-class....
82•surprisetalk•3h ago•66 comments

Should QA exist?

https://www.rubick.com/should-qa-exist/
38•PretzelFisch•7h ago•72 comments

Everything old is new again: memory optimization

https://nibblestew.blogspot.com/2026/03/everything-old-is-new-again-memory.html
129•ibobev•3d ago•99 comments

The European AllSky7 fireball network

https://www.allsky7.net/#archive
106•marklit•10h ago•8 comments

Netflix raises prices for every subscription tier by up to 12.5 percent

https://arstechnica.com/gadgets/2026/03/netflix-increases-prices-for-all-plans-by-up-to-2-per-month/
21•pseudolus•1h ago•16 comments

Apple says no one using Lockdown Mode has been hacked with spyware

https://techcrunch.com/2026/03/27/apple-says-no-one-using-lockdown-mode-has-been-hacked-with-spyw...
55•jbegley•1h ago•31 comments

The Legibility of Serif and Sans Serif Typefaces (2022)

https://library.oapen.org//handle/20.500.12657/53344
66•the-mitr•3d ago•51 comments

Embracing Bayesian Methods in Clinical Trials

https://jamanetwork.com/journals/jama/fullarticle/2847011
9•nextos•3d ago•0 comments

$500 GPU outperforms Claude Sonnet on coding benchmarks

https://github.com/itigges22/ATLAS
439•yogthos•1d ago•239 comments