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.

Qwen3.8-Max: A New Bar for Coding and Cowork

https://qwen.ai/blog?id=qwen3.8
186•ai2027•2h ago•74 comments

Show HN: Isopolis – Isometric pixel map of SF

https://sf.isopolis.city/
105•nuwandavek•3h ago•27 comments

CP/M-386 – CP/M for 386 protected mode, derived from CP/M‑68K

https://github.com/johnsonjh/cpm386
45•TMWNN•3h ago•11 comments

Karpathy’s Pelican

https://twitter.com/karpathy/status/2083749667410727319
493•delichon•1d ago•358 comments

Show HN: ssh ssh.place

https://ssh.place
66•jeninh•4h ago•32 comments

Show HN: A Handwritten Blogging Platform

https://handwritten.blog/
37•emilesilvis•2d ago•12 comments

Why Book Corners won't sync contributions back to OpenStreetMap

https://www.andreagrandi.it/posts/why-book-corners-wont-sync-contributions-back-to-openstreetmap/
66•pizzaiolo•4h ago•37 comments

Autoregressive Language Model on the 6502 Processor

https://mattbeton.com/blog/bitnet-6502.html
75•nmstoker•2d ago•8 comments

Show HN: Kakehashi – Experimental userspace to run macOS binaries on Linux ARM

https://github.com/wie-project/kakehashi
194•vlad_kalinkin•12h ago•44 comments

Note-Taking and Personal Knowledge Management

https://unattributed.cc/note-taking-and-personal-knowledge-management
157•surprisetalk•5d ago•45 comments

Developers are attached to tools because tools encode trust

https://stackoverflow.blog/2026/07/29/developers-are-attached-to-tools-because-tools-encode-trust/
176•HieronymusBosch•4d ago•91 comments

SwiftUI After 7 Years

https://ykvm.com/2026/07/swiftui-a-story-of-mediocrity/
140•mpweiher•9h ago•121 comments

RFC 9851: TLS 1.2 is in Feature Freeze

https://www.rfc-editor.org/rfc/rfc9851.html
19•Jimmc414•3h ago•6 comments

Read the novels and forget everything else

https://hedgehogreview.com/web-features/thr/posts/read-the-novels-and-forget-everything-else
75•samclemens•2d ago•43 comments

The myth of Snow Leopard

https://www.rubenerd.au/the-myth-of-snow-leopard/
62•speckx•10h ago•50 comments

The Computational Theory of Mind (2015)

https://plato.stanford.edu/entries/computational-mind/
43•cyanregiment•6h ago•18 comments

Show HN: Mu – Tools for Agents

https://github.com/micro/mu
47•asim•6h ago•12 comments

How the words we teach English language learners changed

https://pudding.cool/2026/07/essential-words/
196•c-oreills•12h ago•145 comments

F*: A general-purpose proof-oriented programming language

https://fstar-lang.org/
169•ducktective•16h ago•76 comments

Show HN: Make your Framework 12 sound like a creaky door

https://github.com/ArcaEge/creakwork12
62•arcaege•8h ago•8 comments

My personal AI benchmark: “Generate an SVG of a frog with a Habsburg jaw”

https://frogs.vaguespac.es/
122•thebigship•8h ago•57 comments

Show HN: NixOS-DGX-Spark – Nix and NixOS on the DGX Spark

https://github.com/graham33/nixos-dgx-spark
103•graham33•11h ago•31 comments

When transit passes were designed by hand (2022)

https://letterformarchive.org/news/milwaukee-transit-passes/
120•nate•2d ago•29 comments

TinyNES Review – A Super Niche NES Console

https://blog.lon.tv/2023/02/05/tinynes-review-a-super-niche-nes-console/
42•throwoutway•8h ago•11 comments

Californians' data deletion requests, DROP, become enforceable Aug. 1

https://www.nbcsandiego.com/nbc-7-responds-2/californians-data-deletion-requests-drop-become-enfo...
117•MilnerRoute•6h ago•55 comments

Folding Paper Globes

https://foldingglobes.com/globes
163•dango2506•4d ago•32 comments

Show HN: Shitty – fast terminal. Memory-unsafe and faster than yours

https://github.com/pg83/shitty
106•pshirshov•5h ago•102 comments

Why we write our own C and C++ inference engines

https://localai.io/blog/why-we-write-our-own-engines/
11•eatonphil•2d ago•5 comments

Rooting, firmware analysis and persistent credentials of TP-Link TL-841N

https://blog.juni-mp4.com/posts/42/rooting-the-tplink-tl841n-pt1/
92•mindracer•12h ago•18 comments

Fasttracker II clone in C using SDL 2

https://16-bits.org/ft2.php
120•andsoitis•4d ago•48 comments