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.

Qwenputer: A functioning, deterministic RISC-V CPU inside Qwen3.5

https://divagr.com/blog/qwenputer
29•csmantle•1h ago•2 comments

Why is this fingerprinting script creating bioweapons?

https://nullpt.rs/fingerprinting-bioweapons
840•hazebooth•8h ago•184 comments

GitLab Security Incident: Attempted Exploitation of CVE-2026-97229

https://alpinelinux.org/posts/GitLab-security-incident-CVE-2026-97229.html
65•sashk•1h ago•19 comments

New York Times adds more AI features to its Cooking app. Users aren't thrilled

https://www.niemanlab.org/2026/10/the-new-york-times-is-adding-more-ai-features-to-its-cooking-ap...
22•ilamont•1h ago•18 comments

A Health Update

https://furbo.org/2026/10/28/a-health-update/
92•frizlab•4h ago•8 comments

The first wired XR glasses powered by Android XR

https://blog.google/products-and-platforms/platforms/android/xreal-aura/
18•yincrash•1h ago•13 comments

CNC Stone Carving

https://carmelitegothic.com/cnc-stone-carving/
399•bschne•10h ago•118 comments

Gemini 4 Carbon

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-carbon/
800•acossta•8h ago•658 comments

MicroZig to Adopt Strict No LLM / No AI Policy

https://github.com/ZigEmbeddedGroup/microzig/blob/main/CODE_OF_CONDUCT.md
12•paaloeye•55m ago•12 comments

StackOverflow now gets fewer than 1000 questions a month

https://data.stackexchange.com/stackoverflow/query/1926661#graph?t=1
85•babelfish•1h ago•87 comments

MacBook Pro with PROLED XDR Display and Touch

https://www.apple.com/macbook-pro/proled-xdr-display/
497•etothet•8h ago•846 comments

The Grid, a factory-scale robot in Massachusetts that builds PCBs on demand

https://www.circuithub.com/post/unveiling-the-grid
413•seddona•2d ago•199 comments

Start Doing Graph Theory

https://vertex.degree/
582•ibobev•5d ago•126 comments

Formlabs Studio 1 $699 Resin Printer

https://formlabs.com/products/form-studio-1-basic-founders-edition/
108•mhb•4h ago•80 comments

Nango (YC W23) Is Hiring Across Eng, FDE, Marketing, DevRel

https://nango.dev/careers
1•bastienbeurier•4h ago

How we made our MMDB files a 33% smaller

https://ipinfo.io/blog/how-made-mmdb-files-smaller
12•mmaia•3d ago•1 comments

Dayjob: Tax – evaluating AI agents on 50 professional tax assignments

https://surgehq.ai/blog/dayjob-tax
202•landonxi•9h ago•125 comments

The case of the 9 bit AES key

https://v12.sh/blog/the-case-of-the-9bit-aes-key
76•ledoge•4h ago•40 comments

Why Birds Can Fly over Mount Everest

https://lede-v2.nautil.us/why-birds-can-fly-over-mount-everest-237864
62•andsoitis•4d ago•10 comments

Image generation has come a long way since August 2022

https://www.hbrooks.com/writing/image-generation-has-come-a-long-way
35•hunterbrooks•2d ago•8 comments

AlpineBSD

https://wiki.alpinebsd.org
176•bradley_taunt•10h ago•161 comments

Spiders Spin 'Silk Dope' into Nature's Toughest Material

https://www.quantamagazine.org/how-spiders-spin-silk-dope-into-natures-toughest-material-20261028/
47•ibobev•7h ago•3 comments

Apple's git still trusts the compromised eMudhra certificates

https://emudhra.we-have-a-problem.com/apple.html
1037•galadran•14h ago•378 comments

Gaussian Splats part 3: There's always a bigger scene

https://www.magnopus.com/blog/gaussiansplats-part-3-theres-always-a-bigger-scene
101•ibobev•5d ago•21 comments

The Agent SDK

https://cursor.com/blog/agent-sdk
94•torutofu•11h ago•111 comments

Scaling Hierarchical Networks

https://www.cartesia.ai/blog/from-tokens-to-bytes-part-1
30•guybedo•7h ago•1 comments

Show HN: SlideBySide – Present slides without sharing your screen

https://slidebyside.com/
55•denismenace•8h ago•24 comments

Leak website releases data on DHS employees

https://www.reuters.com/legal/government/leak-website-releases-data-tens-thousands-dhs-employees-...
71•wondersky•4h ago•15 comments

Emacs Turns 50

https://www.technologyreview.com/2026/10/20/1145399/emacs-turns-50/
411•internet_points•12h ago•175 comments

Oseberg Tapestry Fragments

https://en.wikipedia.org/wiki/Oseberg_tapestry_fragments
16•benbreen•2d ago•1 comments