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.

Rob Pike Goes Nuclear over GenAI

https://skyview.social/?url=https%3A%2F%2Fbsky.app%2Fprofile%2Frobpike.io%2Fpost%2F3matwg6w3ic2s&...
120•christoph-heiss•29m ago•36 comments

Package managers keep using Git as a database, it never works out

https://nesbitt.io/2025/12/24/package-managers-keep-using-git-as-a-database.html
103•birdculture•1h ago•59 comments

Joan Didion and Kurt Vonnegut had something to say. We have it on tape

https://www.nytimes.com/2025/12/19/books/james-baldwin-joan-didion-92ny-recordings.html
25•tintinnabula•4d ago•2 comments

LearnixOS

https://www.learnix-os.com
17•gtirloni•1h ago•1 comments

I'm a laptop weirdo and that's why I like my new Framework 13

https://blog.matthewbrunelle.com/im-a-laptop-weirdo-and-thats-why-i-like-my-new-framework-13/
101•todsacerdoti•2h ago•82 comments

The Algebra of Loans in Rust

https://nadrieril.github.io/blog/2025/12/21/the-algebra-of-loans-in-rust.html
93•g0xA52A2A•3d ago•47 comments

Undefinable yet Indispensable

https://aeon.co/essays/the-word-religion-resists-definition-but-remains-necessary
9•Thevet•1h ago•0 comments

Maybe the default settings are too high

https://www.raptitude.com/2025/12/maybe-the-default-settings-are-too-high/
714•htk•15h ago•231 comments

Codex vs. Claude Code (today)

https://build.ms/2025/12/22/codex-vs-claude-code-today/
48•gmays•2h ago•34 comments

ChatGPT conversations still lack timestamps after years of requests

https://community.openai.com/t/timestamps-for-chats-in-chatgpt/440107?page=3
63•Valid3840•1h ago•40 comments

What happened to all the gold Spain got from the New World? (1985)

https://www.straightdope.com/21341789/what-happened-to-all-the-gold-spain-got-from-the-new-world
6•titaniumtown•4d ago•4 comments

An 11-qubit atom processor in silicon with all fidelities from 99.10% to 99.99%

https://www.nature.com/articles/s41586-025-09827-w
18•giuliomagnifico•5d ago•10 comments

Geometric Algorithms for Translucency Sorting in Minecraft [pdf]

https://douira.dev/assets/document/douira-master-thesis.pdf
35•HeliumHydride•4h ago•12 comments

TurboDiffusion: 100–200× Acceleration for Video Diffusion Models

https://github.com/thu-ml/TurboDiffusion
136•meander_water•11h ago•27 comments

Show HN: Gaming Couch – a local multiplayer party game platform for 8 players

https://gamingcouch.com
279•ChaosOp•5d ago•92 comments

MiniMax M2.1: Built for Real-World Complex Tasks, Multi-Language Programming

https://www.minimaxi.com/news/minimax-m21
174•110•13h ago•64 comments

Unix "find" expressions compiled to bytecode

https://nullprogram.com/blog/2025/12/23/
5•rcarmo•2h ago•0 comments

Building an AI agent inside a 7-year-old Rails monolith

https://catalinionescu.dev/ai-agent/building-ai-agent-part-1/
64•cionescu1•7h ago•26 comments

How to Reproduce This Book with LaTeX

https://github.com/BenjaminGor/Latex_Notes_Tutorial
45•nill0•6d ago•6 comments

Overlooked No More: Inge Lehmann, Who Discovered the Earth's Inner Core

https://www.nytimes.com/2025/12/20/obituaries/inge-lehmann-overlooked.html
20•Hooke•3d ago•3 comments

Understanding the Northern Lights

https://www.historytoday.com/archive/feature/understanding-northern-lights
6•benbreen•6d ago•0 comments

Tiled Art

https://tiled.art/en/home/?id=SilverAndGold
195•meander_water•1w ago•11 comments

Fahrplan – 39C3

https://fahrplan.events.ccc.de/congress/2025/fahrplan/
318•rurban•19h ago•135 comments

Hardware Touch, Stronger SSH

https://www.ubicloud.com/blog/hardware-touch-stronger-ssh
22•furkansahin•4d ago•8 comments

Python 3.15’s interpreter for Windows x86-64 should hopefully be 15% faster

https://fidget-spinner.github.io/posts/no-longer-sorry.html
379•lumpa•1d ago•128 comments

Show HN: GeneGuessr – a daily biology web puzzle

https://geneguessr.brinedew.bio/
60•brinedew•3d ago•11 comments

The entire New Yorker archive is now digitized

https://www.newyorker.com/news/press-room/the-entire-new-yorker-archive-is-now-fully-digitized
445•thm•5d ago•58 comments

Lessons from a year of Postgres CDC in production

https://clickhouse.com/blog/postgres-cdc-year-in-review-2025
55•saisrirampur•6d ago•3 comments

Tachyon: High frequency statistical sampling profiler

https://docs.python.org/3.15/library/profiling.sampling.html
79•vismit2000•4d ago•3 comments

The First Web Server

https://dfarq.homeip.net/the-first-web-server/
5•giuliomagnifico•3h ago•1 comments