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.

A Deterministic Subexponential-Time Algorithm for the Discrete Logarithm Problem [pdf]

https://eprint.iacr.org/2026/3020.pdf
67•yuvadam•1h ago•26 comments

The group chat where your AI talks behind your back

https://construct22.com/
401•utiiiD•6h ago•178 comments

Counseling for mental health decreases likelihood of protesting by 34%–39%

https://onlinelibrary.wiley.com/doi/abs/10.1111/ssqu.70219
7•bko•23m ago•0 comments

Kimi for Science More scientific ideas, made possible

https://www.kimi.ai/news/kimi-for-science-program
15•theanonymousone•1h ago•3 comments

AI made self-hosting fun again

https://janlukas.blog/posts/ai-self-hosting
832•jlelse•15h ago•405 comments

Kamil Khan Mumtaz: Pakistani architect, admired at home, almost invisible abroad

https://worksinprogress.co/issue/the-greatest-architect-youve-never-heard-of-is-in-pakistan/
421•dverlaeckt80•16h ago•109 comments

YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays

https://github.com/antonpictures/youtube-punisher
445•iantongeorge•19h ago•525 comments

New York and California Age Gating Rules Go into Effect in the New Year

https://www.eff.org/deeplinks/2026/11/new-york-and-california-age-gating-rules-go-effect-new-year
10•frutiger•41m ago•0 comments

AMD-specific fork of llama.cpp

https://devnull.land/amd-specific-llama-cpp
389•julianlam•20h ago•96 comments

Hard Drive pricing has gotten bad

https://blog.ktz.me/black-friday-hard-drive-prices-are-messed-up/
418•zdw•12h ago•352 comments

CTO of 'RansomwareHelp' indicted for wire fraud

https://krebsonsecurity.com/2026/11/cto-of-ransomwarehelp-indicted-for-wire-fraud/
290•Bender•19h ago•141 comments

Company Culture = Slack Emoji ÷ √Headcount

https://lia.mg/posts/measuring-company-culture-with-slack-emoji/
432•liamg•16h ago•210 comments

Intel One Mono font (2023)

https://github.com/intel/intel-one-mono
539•saikatsg•1d ago•260 comments

Buy Nothing Day – Friday November 27th 2026

https://www.buynothingday.co.uk/
170•f_allwein•7h ago•41 comments

European Commission Declares Browser Competition a Digital Markets Act Priority

https://open-web-advocacy.org/es/blog/commission-responds-declares-browser-competition-a-dma-prio...
122•anilgulecha•5h ago•81 comments

Google Will Make AI Agents Use Its MCP Servers. The Gmail One Can't Send Email

https://techstackups.com/articles/google-workspace-ai-agents-mcp/
359•ritzaco•1d ago•308 comments

The need for a formally verifiable mainstream programming language

https://blainehansen.me/post/mainstream-verifiable-language/
199•todsacerdoti•8h ago•182 comments

An introduction to uncertainty in machine learning

https://chrhenning.com/blog/2026/introduction-to-uncertainty/
103•chrhenning•18h ago•8 comments

Pizza history: AI agent's cardless purchase is a first for UK

https://www.theguardian.com/business/2026/nov/27/ai-agent-cardless-transaction-pizza-papa-john-uk...
11•6LLvveMx2koXfwn•1h ago•14 comments

Show HN: I wrote an entire Vim manual over 4 years

http://themouseless.dev/vim/
226•thanato0s•22h ago•69 comments

Rvoip: VoIP stack in Rust

https://github.com/eisenzopf/rvoip
143•zerosegfaults•18h ago•34 comments

Indie web browser Ladybird enters alpha testing

https://www.theregister.com/software/2026/11/26/indie-web-browser-ladybird-enters-alpha-testing/5...
49•01-_-•5h ago•10 comments

Novita, StreamLake, etc. are ByteDance Ark wrappers

https://kendell.dev/blog/arkwrapper/
111•leafingensemble•15h ago•19 comments

The Cutthroat Business of Shipwrecks

https://daily.jstor.org/the-cutthroat-business-of-shipwrecks/
37•herbertl•12h ago•11 comments

An algebraic quantization of gravity from the null cone

https://arxiv.org/abs/2611.34924
251•hecmmm•1d ago•99 comments

Largest 2D Chart library in the world using BUI: BlenderUI

https://bui.preetham.top/charts/
121•ppmpreetham•18h ago•34 comments

The USAID Files

https://reclaimthenet.org/usaid-files
291•MassPikeMike•1d ago•358 comments

Curiosity Is No Solo Act

https://thereader.mitpress.mit.edu/curiosity-is-no-solo-act/
167•Petiver•2d ago•43 comments

Moat: OpenRouter replacement

https://commandcode.ai/moat
300•amanverasia•1d ago•157 comments

Show HN: Olumino, a Markdown notes and spaced repetition app

https://olumino.app
117•Wiyseful•1d ago•49 comments