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.

Watch Los Angeles get built, one building at a time (1880–2026)

https://lax-skyline.parcelscope.net/
106•rustywasm•2h ago•39 comments

Finding a bug in Dummit and Foote's Abstract Algebra

https://kallus.org/blog/dummit_and_foote.html
31•evakhoury•3d ago•3 comments

WeatherNext 3

https://deepmind.google/science/weathernext/
110•matthieu_bl•4d ago•16 comments

Trusting-Trust Attack against an Entire Linux Distribution

https://arxiv.org/abs/2607.24888
51•signa11•2d ago•7 comments

Scientists observe Einstein's gravity in the quantum world

https://www.ox.ac.uk/news/2026-08-28-scientists-observe-einsteins-gravity-in-the-quantum-world
40•mudil•3d ago•6 comments

Macbeth and His Problems

https://porticoquarterly.com/essay/macbeth-and-his-problems/
6•apophatic•35m ago•0 comments

Methods for Random Gradients (2024)

https://justinjay.wang/methods-for-random-gradients/
31•nickswalker•3d ago•3 comments

Decoding the NEC V20 Microcode

https://martypc.blogspot.com/2026/09/decoding-nec-v20-microcode.html
85•mariuz•3d ago•4 comments

Simple Is Not Small

https://jyn.dev/simple-is-not-the-same-as-small/
151•zdw•3d ago•46 comments

Caltech Mathathon – first hackathon ever devoted to research level mathematics

https://mathathonchallenge.com/index.html
197•astroanax•11h ago•60 comments

Decapitating a MacBook (2025)

https://mm-dev.rocks/series/decapitating-macbook-an-odyssey/
30•luu•1d ago•16 comments

The Dataflow Model Revisited

https://www.vldb.org/pvldb/volumes/19/paper/The%20Dataflow%20Model%20Revisited
69•scott_s•1d ago•12 comments

216M Spy TVs – The LG Smart TV Problem [video]

https://www.youtube.com/watch?v=6IFVTcM28KA
303•treve•20h ago•612 comments

Icy Moons Are Ocean Worlds

https://mceglowski.substack.com/p/icy-moons-are-ocean-worlds
84•worldvoyageur•1d ago•10 comments

bzip3

https://github.com/iczelia/bzip3
337•tosh•7h ago•95 comments

Replaceable but Employed: Automation and the Meaning of Work

https://www.nber.org/papers/w35559
23•mooreds•2h ago•0 comments

This Month in Ladybird – August 2026

https://ladybird.org/newsletter/2026-08-31/
89•exploraz•2d ago•9 comments

Academia as a d-index measuring contest

https://kevinmunger.substack.com/p/introducing-the-k-index
24•surprisetalk•5d ago•2 comments

Keep Our Servers Running

https://blog.archive.org/2026/09/01/keep-our-servers-running-your-recurring-donation-goes-3x-this...
908•sonicrocketman•17h ago•223 comments

Show HN: HomeCat – Design your backyard office

https://myhomecat.com
18•dearilos•2h ago•11 comments

My practical approach to surfing the web safely

https://molily.de/safe-websurfing/
35•ethanhawksley•5d ago•12 comments

Whistle Synth Mac App

https://www.jefftk.com/p/whistle-synth-mac-app
49•luu•3d ago•12 comments

Schemy Lisp En DOS

https://sled.neocities.org/
21•AlexeyBrin•1d ago•1 comments

How to bring up the Linux Kernel on a new platform

https://werwolv.net/posts/linux_bringup/
38•WerWolv•4d ago•4 comments

She Also Found It at the Movies

https://hedgehogreview.com/web-features/thr/posts/she-also-found-it-at-the-movies
11•prismatic•3d ago•0 comments

Live map of public transport in Belgium

https://openbaarvervoerbelgie.be/
169•coinfused•12h ago•72 comments

Rebuilding a 1995 GPS Time Server so I don't get Telstra'd

https://www.jeffgeerling.com/blog/2026/truetime-xl-gps-time-server-restomod/
16•Brajeshwar•2d ago•6 comments

Bill Gates tries to install MovieMaker (2003)

https://www.techemails.com/p/bill-gates-tries-to-install-movie-maker
285•highfrequency•5h ago•188 comments

Catching Crumbs from the Table (2000)

https://www.nature.com/articles/35014679
8•stefanpie•1d ago•3 comments

Show HN: Wg-admin – web UI for an existing WireGuard host

https://github.com/logimaxx/wg-admin
15•vsergione•4h ago•3 comments