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.

Microsoft's "Fix" for Windows 11: Flowers After the Beating

https://www.sambent.com/microsofts-plan-to-fix-windows-11-is-gaslighting/
31•h0ek•57m ago•3 comments

Box of Secrets: Discreetly modding an apartment intercom to work with Apple Home

https://www.jackhogan.me/blog/box-of-secrets/
141•jackhogan11•21h ago•46 comments

Opera: Rewind The Web to 1996 (Opera at 30)

https://www.web-rewind.com
35•thushanfernando•2h ago•28 comments

Log File Viewer for the Terminal

https://lnav.org/
134•wiradikusuma•5h ago•19 comments

Show HN: ProofShot – Give AI coding agents eyes to verify the UI they build

https://proofshot.argil.io/
35•jberthom•2h ago•28 comments

Ripgrep is faster than grep, ag, git grep, ucg, pt, sift (2016)

https://burntsushi.net/ripgrep/
30•jxmorris12•4h ago•15 comments

Autoresearch on an old research idea

https://ykumar.me/blog/eclip-autoresearch/
365•ykumards•15h ago•80 comments

BIO – The Bao I/O Co-Processor

https://www.crowdsupply.com/baochip/dabao/updates/bio-the-bao-i-o-co-processor
43•hasheddan•2d ago•8 comments

iPhone 17 Pro Demonstrated Running a 400B LLM

https://twitter.com/anemll/status/2035901335984611412
620•anemll•20h ago•279 comments

No-build, no-NPM, SSR-first JavaScript framework if you hate React, love HTML

https://qitejs.qount25.dev
17•usrbinenv•4d ago•7 comments

FCC updates covered list to include foreign-made consumer routers

https://www.fcc.gov/document/fcc-updates-covered-list-include-foreign-made-consumer-routers
321•moonka•13h ago•219 comments

Show HN: Cq – Stack Overflow for AI coding agents

https://blog.mozilla.ai/cq-stack-overflow-for-agents/
148•peteski22•18h ago•55 comments

A 6502 disassembler with a TUI: A modern take on Regenerator

https://github.com/ricardoquesada/regenerator2000
40•wslh•3d ago•4 comments

Gerd Faltings, who proved the Mordell conjecture, wins the Abel Prize

https://www.scientificamerican.com/article/gerd-faltings-mathematician-who-proved-the-mordell-con...
41•digital55•4d ago•5 comments

Claude Code Cheat Sheet

https://cc.storyfox.cz
417•phasE89•12h ago•122 comments

Dune3d: A parametric 3D CAD application

https://github.com/dune3d/dune3d
167•luu•2d ago•59 comments

Abusing Customizable Selects

https://css-tricks.com/abusing-customizable-selects/
119•speckx•5d ago•5 comments

The Resolv hack: How one compromised key printed $23M

https://www.chainalysis.com/blog/lessons-from-the-resolv-hack/
94•timbowhite•12h ago•128 comments

Finding all regex matches has always been O(n²)

https://iev.ee/blog/the-quadratic-problem-nobody-fixed/
210•lalitmaganti•4d ago•57 comments

Pompeii's battle scars linked to an ancient 'machine gun'

https://phys.org/news/2026-03-pompeii-scars-linked-ancient-machine.html
78•pseudolus•3d ago•20 comments

Microservices and the First Law of Distributed Objects (2014)

https://martinfowler.com/articles/distributed-objects-microservices.html
19•pjmlp•3d ago•16 comments

IRIX 3dfx Voodoo driver and glide2x IRIX port

https://sdz-mods.com/index.php/2026/03/23/irix-3dfx-voodoo-driver-glide2x-irix-port/
72•zdw•11h ago•8 comments

An incoherent Rust

https://www.boxyuwu.blog/posts/an-incoherent-rust/
195•emschwartz•19h ago•98 comments

Trivy under attack again: Widespread GitHub Actions tag compromise secrets

https://socket.dev/blog/trivy-under-attack-again-github-actions-compromise
210•jicea•2d ago•70 comments

Ju Ci: The Art of Repairing Porcelain

https://thesublimeblog.org/2025/03/13/ju-ci-the-ancient-art-of-repairing-porcelain/
92•lawrenceyan•2d ago•10 comments

I built an AI receptionist for a mechanic shop

https://www.itsthatlady.dev/blog/building-an-ai-receptionist-for-my-brother/
284•mooreds•1d ago•286 comments

A retro terminal music player inspired by Winamp

https://github.com/bjarneo/cliamp
97•mkagenius•13h ago•27 comments

Sunsetting the Techempower Framework Benchmarks

https://github.com/TechEmpower/FrameworkBenchmarks/issues/10932
42•nbrady•8h ago•8 comments

BIO: The Bao I/O Coprocessor

https://www.bunniestudios.com/blog/2026/bio-the-bao-i-o-coprocessor/
156•zdw•3d ago•37 comments

Local Stack Archived their GitHub repo and requires an account to run

https://github.com/localstack/localstack
196•ecshafer•15h ago•114 comments