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

Comments

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

A Love Letter to FreeBSD

https://www.tara.sh/posts/2025/2025-11-25_freebsd_letter/
173•rbanffy•4h ago•96 comments

In Re: 23andMe, Inc. Customer Data Security Breach Litigation

https://www.23andmedatasettlement.com/
13•toomuchtodo•10m ago•2 comments

Algorithms for Optimization [pdf]

https://algorithmsbook.com/optimization/files/optimization.pdf
72•Anon84•2h ago•3 comments

Writing a good Claude.md

https://www.humanlayer.dev/blog/writing-a-good-claude-md
317•objcts•8h ago•101 comments

Advent of Code 2025

https://adventofcode.com/2025/about
726•vismit2000•12h ago•251 comments

Bricklink suspends Marketplace operations in 35 countries

https://jaysbrickblog.com/news/bricklink-suspends-marketplace-operations-in-35-countries/
65•makeitdouble•3h ago•20 comments

Grokipedia Is the Antithesis of Wikipedia

https://www.404media.co/grokipedia-is-the-antithesis-of-everything-that-makes-wikipedia-good-usef...
28•surprisetalk•1h ago•10 comments

Advent of Sysadmin 2025

https://sadservers.com/advent
18•lazyant•47m ago•4 comments

Windows drive letters are not limited to A-Z

https://www.ryanliptak.com/blog/windows-drive-letters-are-not-limited-to-a-z/
371•LorenDB•12h ago•180 comments

Migrating Dillo from GitHub

https://dillo-browser.org/news/migration-from-github/
272•todsacerdoti•11h ago•163 comments

LLVM-MOS – Clang LLVM fork targeting the 6502

https://llvm-mos.org/wiki/Welcome
109•jdmoreira•9h ago•37 comments

ESA Sentinel-1D delivers first high-resolution images

https://www.esa.int/Applications/Observing_the_Earth/Copernicus/Sentinel-1/Sentinel-1D_delivers_f...
82•giuliomagnifico•8h ago•26 comments

GitHub to Codeberg: my experience

https://eldred.fr/blog/forge-migration/
143•todsacerdoti•9h ago•63 comments

Program-of-Thought Prompting Outperforms Chain-of-Thought by 15% (2022)

https://arxiv.org/abs/2211.12588
71•mkagenius•7h ago•20 comments

ETH-Zurich: Digital Design and Computer Architecture; 227-0003-10L, Spring, 2025

https://safari.ethz.ch/ddca/spring2025/doku.php?id=start
114•__rito__•8h ago•17 comments

CachyOS: Fast and Customizable Linux Distribution

https://cachyos.org/
262•doener•15h ago•233 comments

Mike Gordon and Hardware Verification

https://lawrencecpaulson.github.io/2023/01/04/Hardware_Verification.html
4•sebg•6d ago•0 comments

"Boobs check" – Technique to verify if sites behind CDN are hosted in Iran

https://twitter.com/hkashfi/status/1995109785679573167
210•defly•5h ago•67 comments

The Thinking Game Film – Google DeepMind documentary

https://thinkinggamefilm.com
145•ChrisArchitect•9h ago•107 comments

Show HN: Fixing Google Nano Banana Pixel Art with Rust

https://github.com/Hugo-Dz/spritefusion-pixel-snapper
130•HugoDz•4d ago•21 comments

Show HN: Real-time system that tracks how news spreads across 200k websites

https://yandori.io/news-flow/
223•antiochIst•5d ago•56 comments

Stereo Images of Giant Galaxies

https://www.bbc.com/future/article/20251121-sir-brian-mays-stereo-vision-of-galaxies
5•benbreen•5d ago•3 comments

There is No Quintic Formula [video]

https://www.youtube.com/watch?v=9HIy5dJE-zQ
60•DamnInteresting•7h ago•21 comments

RetailReady (YC W24) Is Hiring Associate Product Manager

https://www.ycombinator.com/companies/retailready/jobs/KPKDu3D-associate-product-manager
1•sarah74•9h ago

Langjam Gamejam: Build a programming language then make a game with it

https://langjamgamejam.com/
55•birdculture•10h ago•39 comments

Paul Hegarty's updated CS193p SwiftUI course released by Stanford

https://cs193p.stanford.edu/
150•yehiaabdelm•5d ago•35 comments

A Second Look at Geolocation and Starlink

https://www.potaroo.net/ispcol/2025-11/starlinkgeo2.html
29•speckx•5d ago•8 comments

Finding the grain of sand in a heap of Salt

https://blog.cloudflare.com/finding-the-grain-of-sand-in-a-heap-of-salt/
22•privacyops•3d ago•8 comments

Malware embedded into audio driver is silently recording from system mic

https://twitter.com/Officialwhyte22/status/1995024999934001602
12•CGMthrowaway•1h ago•1 comments

NixOS 25.11 released

https://nixos.org/blog/announcements/2025/nixos-2511/
162•trulyrandom•7h ago•46 comments