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.

I Hate: Programming Wayland Applications

https://www.p4m.dev/posts/29/index.html
63•dwdz•1h ago•21 comments

Flash-Moe: Running a 397B Parameter Model on a Mac with 48GB RAM

https://github.com/danveloper/flash-moe
183•mft_•5h ago•62 comments

Building an FPGA 3dfx Voodoo with Modern RTL Tools

https://noquiche.fyi/voodoo
72•fayalalebrun•3h ago•13 comments

Project Nomad – Knowledge That Never Goes Offline

https://www.projectnomad.us
134•jensgk•4h ago•21 comments

A Coherent Vision for the Future of Version Control

https://bramcohen.com/p/manyana
14•c17r•1h ago•2 comments

iBook Clamshell

https://www.ibook-clamshell.com/index.php/en/
35•polishdude20•2h ago•26 comments

More common mistakes to avoid when creating system architecture diagrams

https://www.ilograph.com/blog/posts/more-common-diagram-mistakes/
61•billyp-rva•4h ago•22 comments

Brute-Forcing My Algorithmic Ignorance with an LLM in 7 Days

http://blog.dominikrudnik.pl/my-google-recruitment-journey-part-1
48•qikcik•4h ago•23 comments

A Review of Dice That Came with the White Castle

https://boardgamegeek.com/thread/3533812/a-review-of-dice-that-came-with-the-white-castle
69•doener•3d ago•11 comments

Windows native app development is a mess

https://domenic.me/windows-native-dev/
101•domenicd•6h ago•100 comments

A case against currying

https://emi-h.com/articles/a-case-against-currying.html
44•emih•3h ago•59 comments

25 Years of Eggs

https://www.john-rush.com/posts/eggs-25-years-20260219.html
157•avyfain•4d ago•47 comments

Cloudflare flags archive.today as "C&C/Botnet"; no longer resolves via 1.1.1.2

https://radar.cloudflare.com/domains/domain/archive.today
225•winkelmann•12h ago•184 comments

Apple's intentional crippling of Mobile Safari

https://pwa.gripe/
99•xd1936•3h ago•97 comments

The IBM scientist who rewrote the rules of information just won a Turing Award

https://www.ibm.com/think/news/ibm-scientist-charles-bennett-turing-award
26•rbanffy•4h ago•3 comments

My first patch to the Linux kernel

https://pooladkhay.com/posts/first-kernel-patch/
173•pooladkhay•2d ago•31 comments

Bored of eating your own dogfood? Try smelling your own farts

https://shkspr.mobi/blog/2026/03/bored-of-eating-your-own-dogfood-try-smelling-your-own-farts/
227•ColinWright•3h ago•134 comments

Node.js worker threads are problematic, but they work great for us

https://www.inngest.com/blog/node-worker-threads
40•goodoldneon•3d ago•20 comments

A Fuzzer for the Toy Optimizer

https://bernsteinbear.com/blog/toy-fuzzer/
25•surprisetalk•5d ago•4 comments

Why Lab Coats Turned White

https://www.asimov.press/p/lab-coat
26•mailyk•3d ago•14 comments

Tinybox – A powerful computer for deep learning

https://tinygrad.org/#tinybox
553•albelfio•20h ago•321 comments

Some things just take time

https://lucumr.pocoo.org/2026/3/20/some-things-just-take-time/
788•vaylian•1d ago•250 comments

Monuses and Heaps

https://doisinkidney.com/posts/2026-03-03-monus-heaps.html
34•aebtebeten•3d ago•2 comments

The three pillars of JavaScript bloat

https://43081j.com/2026/03/three-pillars-of-javascript-bloat
408•onlyspaceghost•14h ago•240 comments

How We Synchronized Editing for Rec Room's Multiplayer Scripting System

https://www.tyleo.com/blog/how-we-synchronized-editing-for-rec-rooms-multiplayer-scripting-system
12•tyleo•4h ago•11 comments

Professional video editing, right in the browser with WebGPU and WASM

https://tooscut.app/
324•mohebifar•19h ago•118 comments

Ask HN: AI productivity gains – do you fire devs or build better products?

35•Bleiglanz•6h ago•45 comments

Chest Fridge (2009)

https://mtbest.net/chest-fridge/
161•wolfi1•15h ago•87 comments

$ teebot.dev – from terminal to tee in 6 seconds

https://teebot.dev
26•foxpress•4h ago•29 comments

Atlassian says it had right to fire engineer for suggesting CEO is 'rich jerk'

https://www.bloomberg.com/news/articles/2026-03-16/atlassian-defends-firing-worker-who-suggested-...
84•FiddlerClamp•1h ago•74 comments