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

Comments

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

Gemini 3.1 Pro

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-1-pro/
497•MallocVoidstar•9h ago•680 comments

Show HN: Micasa – track your house from the terminal

https://micasa.dev
419•cpcloud•9h ago•129 comments

Micropayments as a reality check for news sites

https://blog.zgp.org/micropayments-as-a-reality-check-for-news-sites/
106•speckx•5h ago•245 comments

Show HN: Ghostty-based terminal with vertical tabs and notifications

https://github.com/manaflow-ai/cmux
81•lawrencechen•3h ago•44 comments

America vs. Singapore: You can't save your way out of economic shocks

https://www.governance.fyi/p/america-vs-singapore-you-cant-save
207•guardianbob•10h ago•320 comments

A terminal weather app with ASCII animations driven by real-time weather data

https://github.com/Veirt/weathr
153•forinti•7h ago•22 comments

Archaeologists find possible first direct evidence of Hannibal's war elephants

https://www.smithsonianmag.com/smart-news/archaeologists-unearthed-a-2200-year-old-bone-they-say-...
72•bryanrasmussen•6h ago•20 comments

US plans online portal to bypass content bans in Europe and elsewhere

https://www.reuters.com/world/us-plans-online-portal-bypass-content-bans-europe-elsewhere-2026-02...
139•c420•1d ago•141 comments

Paged Out Issue #8 [pdf]

https://pagedout.institute/download/PagedOut_008.pdf
300•SteveHawk27•12h ago•52 comments

Pebble Production: February Update

https://repebble.com/blog/february-pebble-production-and-software-updates
261•smig0•12h ago•121 comments

Dinosaur Food: 100M year old foods we still eat today (2022)

https://borischerny.com/food/2022/01/17/Dinosaur-food.html
92•simonebrunozzi•9h ago•82 comments

My 1981 adventure game is now a multimedia extravaganza

https://technologizer.com/home/2026/02/16/arctic-adventure-2026/
54•vontzy•3d ago•15 comments

AI is not a coworker, it's an exoskeleton

https://www.kasava.dev/blog/ai-as-exoskeleton
138•benbeingbin•5h ago•143 comments

Don't Trust the Salt: AI Summarization, Multilingual Safety, and LLM Guardrails

https://royapakzad.substack.com/p/multilingual-llm-evaluation-to-guardrails
176•benbreen•3d ago•75 comments

Single vaccine could protect against all coughs, colds and flus

https://www.bbc.com/news/articles/cx2g8rz7yedo
99•dabinat•2h ago•65 comments

We're no longer attracting top talent: the brain drain killing American science

https://www.theguardian.com/us-news/2026/feb/19/trump-science-funding-cuts
279•mitchbob•4h ago•255 comments

Overall, the colorectal cancer story is encouraging

https://www.hankgreen.com/crc
97•ZeroGravitas•4h ago•94 comments

Type-based alias analysis in the Toy Optimizer

https://bernsteinbear.com/blog/toy-tbaa/
8•chunkles•3d ago•0 comments

Show HN: A physically-based GPU ray tracer written in Julia

https://makie.org/website/blogposts/raytracing/
157•simondanisch•14h ago•60 comments

Measuring AI agent autonomy in practice

https://www.anthropic.com/research/measuring-agent-autonomy
77•jbredeche•10h ago•35 comments

Show HN: Mini-Diarium - An encrypted, local, cross-platform journaling app

https://github.com/fjrevoredo/mini-diarium
108•holyknight•13h ago•52 comments

Zero downtime migrations at petabyte scale (2024)

https://planetscale.com/blog/zero-downtime-migrations-at-petabyte-scale
80•Ozzie_osman•3d ago•16 comments

Coding Tricks Used in the C64 Game Seawolves (2025)

https://kodiak64.co.uk/blog/seawolves-technical-tricks
122•atan2•12h ago•18 comments

Show HN: A small, simple music theory library in C99

https://github.com/thelowsunoverthemoon/mahler.c
3•lowsun•2h ago•0 comments

AI makes you boring

https://www.marginalia.nu/log/a_132_ai_bores/
522•speckx•6h ago•298 comments

Level of Detail

https://phinze.com/writing/level-of-detail
28•zdw•2d ago•3 comments

Mark Zuckerberg grilled on usage goals and underage users at California trial

https://www.wsj.com/us-news/law/meta-mark-zuckerberg-social-media-trial-0e9a7fa0
157•1vuio0pswjnm7•8h ago•89 comments

Voith Schneider Propeller

https://en.wikipedia.org/wiki/Voith_Schneider_Propeller
118•Luc•4d ago•31 comments

Farewell, Rust for web

https://yieldcode.blog/post/farewell-rust/
118•skwee357•6h ago•116 comments

Bridging Elixir and Python with Oban

https://oban.pro/articles/bridging-with-oban
121•sorentwo•13h ago•52 comments