frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

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

Google DeepMind Releases AlphaGenome Atlas

https://blog.google/innovation-and-ai/models-and-research/google-deepmind/alphagenome-atlas/
456•utiiiD•7h ago•108 comments

Large Language Models Develop Novel Social Biases Through Adaptive Exploration

https://openreview.net/challenge?redirect=%2Fforum%3Fid%3Dpc7fqaOcAH
26•paimapi•57m ago•4 comments

Navier-Stokes – Tristan Buckmaster [pdf]

https://cims.nyu.edu/~tristanb/statement.pdf
1019•procedurecall•17h ago•445 comments

Kimi K3 (2.8T) at 1 token/s on a MacBook Pro, streamed from four SSDs

https://github.com/argonautlabsai/deltafin
180•Argonautlabs•2h ago•77 comments

On the Navier–Stokes Millennium Prize Problem

https://openai.com/index/navier-stokes-solution/
997•tedsanders•5h ago•808 comments

DaVinci Resolve 21.1

https://www.blackmagicdesign.com/media/release/20260908-03
325•tosh•9h ago•143 comments

Benchmarking Qwen3.8 27B quantizations: 4-bit holds up, 1-bit collapses

https://quesma.com/blog/qwen38-27b-quantizations-benchmarked/
195•stared•7h ago•97 comments

Mercury 2.5

https://www.inceptionlabs.ai/blog/introducing-mercury-2-5
85•Topfi•2h ago•9 comments

Animation in Bevy: The Big Picture

https://glocq.com/en/blog/20260827/
28•ibobev•2h ago•1 comments

How to Build a Printer

https://nishantjosh.dev/blogs/how-to-build-a-fking-printer/
11•cat-whisperer•1h ago•1 comments

I-have-ADHD: A skill to stop coding agents from burying the answer

https://github.com/ayghri/i-have-adhd
262•domhudson•8h ago•204 comments

Muse: Meta's personal AI agent, features and capabilities

https://ai.meta.com/muse/
202•yks•3h ago•195 comments

Implementation of GCC's Nested Functions (vs. C++ Lambdas)

https://uecker.codeberg.page/2026-09-05.html
45•uecker•3d ago•5 comments

Show HN: LLM Attention Visualization

https://ishamf.dev/p/llm-attention-visualizer/
99•ifz•5h ago•19 comments

Tracing np.add, all the way down

https://blog.veitheller.de/numpy.html
22•luu•4d ago•1 comments

Replacing a Rust Enum with a 64-Bit Word Made My Interpreter 17% Faster

https://pointersgonewild.com/2026-08-25-replacing-a-rust-enum-with-a-64-bit-word/
64•metrofun•3d ago•27 comments

The Helicopter with Radioactive Blades

https://hackaday.com/2026/09/07/the-helicopter-with-radioactive-blades/
138•zdw•1d ago•34 comments

Show HN: Copperhead – Hardware as Fast as Software

https://copperhead.sh/
191•animeshchouhan•9h ago•76 comments

The 92-Year-Old Mathematician and the Teenage Apprentice

https://www.nytimes.com/2026/09/06/science/92-year-old-mathematician-apprentice.html
118•robinhouston•2d ago•10 comments

C*: Unifying Programming and Verification in C

https://arxiv.org/abs/2504.02246
65•rramadass•6h ago•38 comments

The two Christian saints who are the Buddha

https://signoregalilei.com/2026/08/30/the-two-christian-saints-who-are-secretly-the-buddha/
195•surprisetalk•8h ago•136 comments

Reverse Engineering an ASIC

https://kjartanvandriel.github.io/asic/
7•burekqueen•1d ago•0 comments

Trey Parker and Matt Stone Are Changing the Name of South Park to South America

https://twitter.com/SouthPark/status/2097364141237539116
117•HelloUsername•2h ago•56 comments

Connecting the Machines

https://herdr.dev/blog/connecting-the-machines/
68•collinmanderson•6h ago•24 comments

ZX Spectrum: Experimenting with 1-Bit Sound

https://bumbershootsoft.wordpress.com/2026/09/05/zx-spectrum-experimenting-with-1-bit-sound/
89•ibobev•7h ago•26 comments

AlphaGenome Atlas predictive map of every DNA letter change in the human genome

https://deepmind.google/blog/alphagenome-atlas-a-predictive-map-of-every-possible-dna-letter-chan...
73•fady0•8h ago•9 comments

Function Arguments Are Not Function Colors

https://jerf.org/iri/post/2026/func_args_are_not_colors/
25•ingve•3h ago•9 comments

FreeBSD 14.5-Release

https://www.freebsd.org/releases/14.5R/announce/
104•joshcsimmons•10h ago•18 comments

Getting your hands dirty is good for you

https://www.bbc.com/future/article/20260904-how-getting-your-hands-dirty-boosts-your-health-withi...
205•HatchedLake721•12h ago•172 comments

Paramount Caught Using 'Astroturf' Group to Drum Up Fake Support for Merger

https://www.techdirt.com/2026/09/08/paramount-caught-using-astroturf-group-to-drum-up-fake-suppor...
313•hn_acker•8h ago•105 comments