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.

iOS 27, iPadOS 27, and macOS 27

https://www.apple.com/newsroom/2026/09/major-updates-for-apples-software-platforms-are-now-availa...
367•throw0101d•7h ago•409 comments

Pion, an agent designed to run any company autonomously

https://andonlabs.com/blog/why-we-built-pion
280•lukaspetersson•8h ago•299 comments

Charts built for Chat

https://dbtcharts.com/blog/charts-built-for-chat/
88•thingsilearned•4h ago•28 comments

Show HN: Macros with a Behringer FCB1010 MIDI Pedalboard in macOS

https://github.com/JamesRyanATX/fcbnerd
30•fretlessjazz•2h ago•2 comments

Compressing a Flag to 11 Bits

https://read.vantezzen.io/miniflags
62•bennett_dev•2d ago•27 comments

Distributed Systems Classics (2017)

https://nvartolomei.com/dist-sys-classics/
231•grep_it•9h ago•52 comments

OpenAI bots knew about the RubyGems caching vulnerability

https://tenderlovemaking.com/2026/09/11/what-a-time-to-be-alive/
370•gregnavis•12h ago•315 comments

XCancel service is suspended until further notice

https://xcancel.com/#
447•gaganyaan•15h ago•758 comments

Dropping eBPF CPU Cost by About 90% with Memoization (Not AI Gen)

https://nathannaveen.dev/posts/dropping-ebpf-cpu-cost-by-90/
23•nathannaveen•10h ago•4 comments

Principles for Fast Tokio Applications

https://dial9-rs.github.io/blog/principles-for-fast-tokio-applications/
161•carllerche•9h ago•41 comments

Amazon vs. Perplexity – U.S. Court of Appeals for the Ninth Circuit

https://law.justia.com/cases/federal/appellate-courts/ca9/26-1444/26-1444-2026-08-04.html
168•neom•4h ago•171 comments

Optimizing a Spin-Lock

https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/
41•signa11•2d ago•19 comments

How my e-reader lost its stripes

https://www.serpentine.com/posts/2026/x3-stripes/
150•simonmic•9h ago•25 comments

Steam Frame starts at $1059

https://store.steampowered.com/hardware/steamframe
489•bsimpson•7h ago•363 comments

Why don't machine learning research agents overfit?

https://www.amazon.science/blog/why-dont-machine-learning-research-agents-overfit
103•Betelbuddy•8h ago•58 comments

A Beginning for Mathematics

https://www.daniellitt.com/blog/2026/9/13/a-beginning-for-mathematics/
167•robinhouston•9h ago•96 comments

4,400-Year-Old Tomb of Egyptian Judge Found at Saqqara with Colors on Walls

https://arkeonews.net/4400-year-old-tomb-of-an-egyptian-judge-found-at-saqqara-with-colors-still-...
7•arunbahl•2d ago•3 comments

Cloudflare AKE cuts origin HelloRetryRequests from 52% to 3.7%

https://blog.cloudflare.com/automatic-key-exchange-for-origins/
85•iamsyr•8h ago•24 comments

Ask HN: What are you working on? (September 2026)

295•david927•1d ago•931 comments

People who can't picture anything are rewriting the science of imagination

https://dailyneuron.com/aphantasia-mental-imagery-brain-network/
92•giuliomagnifico•12h ago•160 comments

Show HN: Neobrutalism.dev – Just added Base UI support and added new color theme

https://www.neobrutalism.dev/
140•samke-•9h ago•66 comments

Notes on gotchas while migrating 35kb preprompts from Opus to self-hosted Ollama

https://patrickmccanna.net/notes-on-migrating-large-prompts-away-from-anthropic-openai-to-self-ho...
114•0o_MrPatrick_o0•11h ago•63 comments

Cua (YC P25) Is Hiring a Founding Technical GTM Lead

https://www.ycombinator.com/companies/cua/jobs/1IWEKVH-founding-technical-gtm-lead
1•frabonacci•8h ago

Backprop Alternative: Augmented Lagrangian Predictive Coding

https://pub.sakana.ai/pc-alm/
38•guld•7h ago•6 comments

Largest known Roman mosaic, beneath Baths of Trajan, opens to the public

https://www.theartnewspaper.com/2026/09/14/largest-roman-mosaic-opens-to-the-public
46•bookofjoe•12h ago•8 comments

GPT-5.6 Luna vs. GPT-6 Astra: Is a $1.20 Model Good Enough for Code Review?

https://entelligence.ai/blogs/gpt-5.6-luna-vs-gpt-6-astra-is-a-1.20-model-good-enough-for-code-re...
105•theanonymousone•5h ago•109 comments

Dario, Please

https://pop.rdi.sh/dario-please/
267•0x5FC3•10h ago•140 comments

Microsoft patches Windows and Excel – breaks audio, remote access, and paste

https://www.theregister.com/os-platforms/2026/09/14/microsoft-patches-windows-and-excel-breaks-au...
202•Alephinitesimal•9h ago•123 comments

Show HN: Nari Qwen3-TTS and Qwen3-ASR – High accuracy, low latency and cost

https://narilabs.com/blog/nari-labs-leads-coval-voice-ai-benchmarks/
64•toebee•9h ago•19 comments

Trying to Make a Loop Auto-Vectorize

https://jsgroth.dev/blog/posts/trying-to-make-a-loop-auto-vectorize/
70•zdw•4d ago•15 comments