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.

DeepSeek: DeepSeek v4.1 Flash 1017

https://openrouter.ai/deepseek/deepseek-v4.1-flash-1017
281•theanonymousone•4h ago•106 comments

Super Intelligence

https://www.si.gov/
12•wiradikusuma•14m ago•2 comments

Ultramarine 1 Flash

https://www.paperinstruments.com/ultramarine
279•i_rush_carriers•1d ago•90 comments

Tesla Roadster

https://www.tesla.com/roadster
1477•shekhar101•1d ago•2651 comments

Show HN: Llmspeed – feel how fast a local LLM runs before you buy the hardware

https://llmspeed.dev/
118•albinstman•8h ago•41 comments

DeepSeek-v4.1-Flash-1017

https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
241•theykk•4h ago•97 comments

Intuitive concurrent programming in any language

https://www.lf-lang.org/
69•mpweiher•1d ago•14 comments

Llama.cpp on a jailbroken PS5: run any GGUF model natively on the console

https://github.com/cobanov/PS5LM
307•Anon84•18h ago•75 comments

You could have invented transformers from memory

https://alexwang.ai/posts/associative-memory/
335•speckx•17h ago•78 comments

Recipes Are Moving from Maven Central to the Code Genome Project

https://docs.openrewrite.org/reference/latest-versions-of-every-openrewrite-module
19•javahippie•1d ago•4 comments

Claude reveals ECDSA curve origins

https://www.anthropic.com/research/ecdsa-curve-origins
912•ahlCVA•17h ago•338 comments

FLUX 3 Image Klein

https://bfl.ai/blog/flux-3-image-klein
177•gmays•17h ago•51 comments

Apple ML Research: Muse Spark Open with MLX on Mac Studio

https://machinelearning.apple.com/research/mlx-distributed-inference
329•antipaul•23h ago•167 comments

eBay Restricts Listings of Radio Equipment, but Exempts Ham-Band-Only Gear

https://www.arrl.org/arrlletterissue?issue=2026-10-15#eBay-Restricts-Listings-of-Radio-Equipment_...
233•7402•18h ago•210 comments

Designing more efficient quantum circuits with Claude

https://www.anthropic.com/research/designing-efficient-quantum-circuits
152•pretext•18h ago•32 comments

JPEG XL vs. AVIF for web use-cases

https://jakearchibald.com/2026/jpeg-xl-vs-avif/
276•farlight•20h ago•188 comments

0/1 Knapsack Problem in PyTorch

https://jedrzej.maczan.pl/2025_11_21_dp_knapsack_sliding_hirschberg
28•yu3zhou4•2d ago•2 comments

Butlerian Jihad

https://dune.fandom.com/wiki/Butlerian_Jihad
275•wetwater•10h ago•156 comments

Monte-Carlo Simulations

https://eli.thegreenplace.net/2026/monte-carlo-simulations/
134•ibobev•3d ago•26 comments

I built the RealWorld app in Lean 4

https://leangineer.com/blog/realworld-in-lean/
69•saviorand•2d ago•6 comments

Nine-Inch Snails

https://www.theatlantic.com/science/2026/10/giant-african-snails-florida-invasion/688850/
81•zdw•14h ago•38 comments

90% of US working hours are spent on tasks not covered well by AI benchmarks

https://www.mercor.com/research/labor-index/benchmark-map/
534•speckx•19h ago•452 comments

A story of WiFi secrets, UART lockdowns and a damaged flash memory chip

https://adepts.of0x.cc/eufy-homestation2-firmware/
57•michidk•21h ago•3 comments

How the Claude Code team does code review

https://claude.dev/blog/solving-code-review-at-anthropic/
381•pretext•17h ago•351 comments

Orbital Angular Momentum of Light

https://en.wikipedia.org/wiki/Orbital_angular_momentum_of_light
7•peter_d_sherman•2d ago•1 comments

Flexport Is Hiring a Biz Ops Leader in Office of CEO

https://www.flexport.com/company/careers/
1•thedogeye•11h ago

New 'super ice' 10 times stronger, bringing it close to the strength of concrete

https://www.sciencealert.com/a-new-super-ice-is-10-times-stronger-bringing-it-close-to-the-streng...
111•andrewl•3d ago•82 comments

Show HN: Gemini 4 Argon plays StarCraft

https://starskirmish.com/bench/v0-2/
228•__cayenne__•22h ago•102 comments

I love software rendering

https://www.jamesfmackenzie.com/2026/10/13/i-love-software-rendering/
331•speckx•23h ago•208 comments

Stolen Renoir paintings found hidden, and damaged, behind cinder block wall

https://www.cbsnews.com/news/stolen-renoir-paintings-found-behind-wall-france/
129•ohjeez•3d ago•84 comments