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

Comments

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

OpenBSD-current now runs as guest under Apple Hypervisor

https://www.undeadly.org/cgi?action=article;sid=20260115203619
56•gpi•56m ago•1 comments

Cloudflare threatens Italy exit over €14M fine

https://ioplus.nl/en/posts/cloudflare-threatens-italy-exit-over-14m-fine
34•soheilpro•1h ago•33 comments

Apple is fighting for TSMC capacity as Nvidia takes center stage

https://www.culpium.com/p/exclusiveapple-is-fighting-for-tsmc
608•speckx•13h ago•366 comments

Pocket TTS: A high quality TTS that gives your CPU a voice

https://kyutai.org/blog/2026-01-13-pocket-tts
251•pain_perdu•22h ago•47 comments

Inside The Internet Archive's Infrastructure

https://hackernoon.com/the-long-now-of-the-web-inside-the-internet-archives-fight-against-forgetting
280•dvrp•1d ago•63 comments

Briar keeps Iran connected via Bluetooth and Wi-Fi when the internet goes dark

https://briarproject.org/manual/fa/
173•us321•8h ago•78 comments

Linux boxes via SSH: suspended when disconected

https://shellbox.dev/
136•messh•7h ago•86 comments

Show HN: Gambit, an open-source agent harness for building reliable AI agents

https://github.com/bolt-foundry/gambit
46•randall•3h ago•11 comments

Ask HN: How can we solve the loneliness epidemic?

455•publicdebates•11h ago•767 comments

JuiceFS is a distributed POSIX file system built on top of Redis and S3

https://github.com/juicedata/juicefs
125•tosh•9h ago•67 comments

Claude is good at assembling blocks, but still falls apart at creating them

https://www.approachwithalacrity.com/claude-ne/
193•bblcla•1d ago•142 comments

Photos capture the breathtaking scale of China's wind and solar buildout

https://e360.yale.edu/digest/china-renewable-photo-essay
555•mrtksn•18h ago•427 comments

My Gripes with Prolog

https://buttondown.com/hillelwayne/archive/my-gripes-with-prolog/
40•azhenley•3h ago•28 comments

Go-legacy-winxp: Compile Golang 1.24 code for Windows XP

https://github.com/syncguy/go-legacy-winxp/tree/winxp-compat
85•Oxodao•3d ago•32 comments

Data is the only moat

https://frontierai.substack.com/p/data-is-your-only-moat
92•cgwu•9h ago•24 comments

Show HN: Reversing YouTube’s “Most Replayed” Graph

https://priyavr.at/blog/reversing-most-replayed/
15•prvt•2h ago•3 comments

CVEs affecting the Svelte ecosystem

https://svelte.dev/blog/cves-affecting-the-svelte-ecosystem
146•tobr•10h ago•28 comments

Show HN: OpenWork – An open-source alternative to Claude Cowork

https://github.com/different-ai/openwork
145•ben_talent•1d ago•26 comments

SETI Home Flags 100 Signals After Sorting 12B Others

https://news.berkeley.edu/2026/01/12/for-21-years-enthusiasts-used-their-home-computers-to-search...
39•TMEHpodcast•1h ago•7 comments

Aviator (YC S21) is hiring to build multiplayer AI coding platform

https://www.ycombinator.com/companies/aviator/jobs
1•ankitdce•7h ago

The five orders of ignorance (2000)

https://cacm.acm.org/opinion/the-five-orders-of-ignorance/
4•svilen_dobrev•3d ago•1 comments

First impressions of Claude Cowork

https://simonw.substack.com/p/first-impressions-of-claude-cowork
152•stosssik•1d ago•84 comments

All 23-Bit Still Lifes Are Glider Constructible

https://mvr.github.io/posts/xs23.html
19•HeliumHydride•4h ago•1 comments

I Built a 1 Petabyte Server from Scratch [video]

https://www.youtube.com/watch?v=vVI7atoAeoo
12•zdw•5d ago•0 comments

Why senior engineers let bad projects fail

https://lalitm.com/post/why-senior-engineers-let-bad-projects-fail/
148•SupremumLimit•5h ago•108 comments

Use of Bayesian methodology in clinical trials of drug and biological products [pdf]

https://www.fda.gov/media/190505/download
52•brendanashworth•20h ago•15 comments

What a Programmer Does (1967) [pdf]

http://archive.computerhistory.org/resources/text/Knuth_Don_X4100/PDF_index/k-9-pdf/k-9-u2769-1-B...
30•nz•5d ago•5 comments

Supply Chain Vuln Compromised Core AWS GitHub Repos & Threatened the AWS Console

https://www.wiz.io/blog/wiz-research-codebreach-vulnerability-aws-codebuild
96•uvuv•10h ago•20 comments

25 Years of Wikipedia

https://wikipedia25.org
463•easton•14h ago•375 comments

Found: Medieval Cargo Ship – Largest Vessel of Its Kind Ever

https://www.smithsonianmag.com/smart-news/archaeologists-say-theyve-unearthed-a-massive-medieval-...
135•bookofjoe•12h ago•31 comments