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 SWE points 48 AI agents at NASA Lidar, finds unmapped Maya pyramid in 72h

https://pietromiotti.com/latest/maya-site/?maya
617•eyvindn•4h ago•241 comments

Pharo in the Browser with WebAssembly

https://massimo-nocentini.github.io/pharo-vm/world.html
64•xkriva11•2h ago•16 comments

Atuin Threads: All your agent sessions on every machine

https://blog.atuin.sh/threads-agent-sessions/
63•linsomniac•2h ago•27 comments

Can a Linear Program Do Weight-Space Programming?

https://nathan.rs/posts/weight-space-lp/
138•emschwartz•3h ago•20 comments

Hyper-Realistic Sand with WebGL2

https://av.github.io/safe-sand/
71•everlier•2h ago•13 comments

Using voltage glitching to unleash the A100 in my mining card

https://blog.kate.land/posts/using-voltage-glitching-to-unlock-the-a100/
151•lae•5h ago•56 comments

I asked every TV manufacturer 17 questions about how they spy on you

https://www.theverge.com/tech/1012372/tv-privacy-acr-questions
169•Brajeshwar•2h ago•81 comments

Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)

https://github.com/0xdeadf1sh/AssemblyForNeovim
34•0xdeadf1sh•2h ago•4 comments

In Defense of Giving a Shit

https://www.possibilityspace.org/blog/posts/in-defence-of-giving-a-shit/
64•mrkn1•4h ago•39 comments

Protecting SSH Keys with macOS Secure Enclave

https://gatezh.com/posts/macos-secure-enclave-ssh-keys/
335•js2•11h ago•121 comments

Apple is killing its Support Community forum next week

https://www.theverge.com/tech/1031507/apple-community-support-forum-shutting-down
118•saikatsg•2h ago•64 comments

We need more goat sacrifices

https://www.experimental-history.com/p/we-need-more-goat-sacrifices
72•iamnothere•3h ago•41 comments

EventSourcingDB 1.3.0 Is Available

https://www.eventfoundation.io/resources/blog/eventsourcingdb-1-3-0-is-available
18•goloroden•3h ago•0 comments

Peer-to-peer WebRTC connections with built-in signaling and discovery

https://github.com/lukks/like-webrtc
31•LuKks•2d ago•9 comments

Tinfoil (YC P25) is hiring an applied AI security engineer in San Francisco

1•FrasiertheLion•4h ago

Next-Level Benchmarking Overfitting – Thomas Neumann

http://databasearchitects.blogspot.com/2026/11/next-level-benchmarking-overfitting.html
45•artrax•4h ago•7 comments

Apple has new Mac app coming to make running local AI models easy

https://9to5mac.com/2026/11/10/apple-has-new-mac-app-coming-to-make-running-local-ai-models-easy/
433•linolevan•19h ago•448 comments

Scion is back and is going to sell a kei truck in America

https://www.theautopian.com/scion-is-back-and-its-going-to-sell-a-freaking-kei-truck-in-america/
533•NaOH•20h ago•366 comments

Attention to Mamba: A Recipe for Cross-Architecture Distillation

https://machinelearning.apple.com/research/attention-mamba-distillation
10•zerop•2h ago•1 comments

Open research, stronger privacy: Making Firefox users harder to fingerprint

https://blog.mozilla.org/security/2026/11/10/open-research-stronger-privacy-making-firefox-users-...
101•Vinnl•3h ago•21 comments

Welcome to Ed and Sam's great adventure

https://www.hintz.org/trip/
3•mooreds•1d ago•0 comments

Physically Controllable Relighting of Photographs

https://yaksoy.github.io/PhysicalRelighting/
43•summarity•4h ago•7 comments

Six Math Essentials

https://teorth.github.io/tao-web/six-math-essentials.html
313•digital55•19h ago•57 comments

Greg Kurtzer's Ginux is now a userspace kernel

https://github.com/gmkurtzer/ginux
109•d3Xt3r•11h ago•68 comments

Starlink Mini 2

https://starlink.com/mini-2
485•robertjfclarke•22h ago•538 comments

A great old-timey game-programming hack (2013)

https://blog.moertel.com/posts/2013-12-14-great-old-timey-game-programming-hack.html
234•palsecam•14h ago•52 comments

Synaptics patent claims stop work on DisplayLink drivers

https://lwn.net/SubscriberLink/1102549/acbc92e00cee3a3f/
458•speckx•22h ago•256 comments

Show HN: Black Ops II statically recompiled to native ARM64 macOS

https://github.com/adrbn/bo2-mac
103•adrbn•11h ago•46 comments

Why I wrote the BEAM book (2025)

https://happihacking.com/blog/posts/2025/why_I_wrote_theBEAMBook/
168•zenincognito•2d ago•33 comments

Make this forward pass as fast as possible

https://ianbarber.blog/2026/11/09/make-this-forward-pass-as-fast-as-possible/
26•matt_d•1d ago•3 comments