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.

EuroBirdPortal – Live bird movements across Europe

https://www.eurobirdportal.org/ebp/en/
83•NKosmatos•3h ago•29 comments

Fable 5.1 Solves the Cyphral Distich, a 370-year-old cipher

https://www.vals.ai/blogs/fable-solves-cyphral-distich
1007•u1hcw9nx•14h ago•438 comments

A 386 PC for Your RP2350

https://github.com/rh1tech/frank-386
60•SamuraiLion•3h ago•19 comments

OpenArch – PyTorch implementations of modern LLM architectures

https://github.com/anuj0456/OpenArch
43•anuj0456•3h ago•10 comments

An atlas of periodic solutions to the three-body problem

https://www.threebodyorbits.com/
47•danielmorozoff•2d ago•6 comments

Spaceships (Reverse Asteroid)

https://spaceships.treybastian.com/
268•zdw•4d ago•52 comments

Registration without a phone number on Signal will use zero-knowledge proofs

https://community.signalusers.org/t/registration-without-a-phone-number/2222?page=10
296•Cider9986•13h ago•146 comments

Apple's Dimensional Drawings

https://developer.apple.com/accessories/dimensional-drawings/
236•herbertl•11h ago•86 comments

Watch AI materials-science and bioscience abilities closely

https://www.lesswrong.com/posts/SCtkSz4nQ9icLZ4uq/watch-ai-materials-science-and-bioscience-abili...
3•joozio•43m ago•0 comments

HP ZGX Fury Is Now Orderable: GB300 Superchip, 748GB Unified Memory

https://www.storagereview.com/news/hp-zgx-fury-is-now-orderable-gb300-superchip-748gb-unified-mem...
14•rbanffy•38m ago•11 comments

The case against JPEG XL

https://giannirosato.com/blog/post/case-against-jxl/
185•contact9879•10h ago•245 comments

How Much Has Trump Made from Crypto? ($1.4B from 2025 Federal Disclosure)

https://www.thepricer.org/how-much-has-trump-made-from-crypto/
23•cinderelacinder•47m ago•1 comments

Show HN: 1080p is 920px tall – 1k real browser viewports

https://screensize.net/reports/viewport-stats
23•zenpe•4h ago•16 comments

Who Aligns the Aligners?

https://prestonbyrne.com/2026/09/13/aligners/
3•timr•1h ago•1 comments

Mullenweg has returned as CEO after attempted board ouster

https://techcrunch.com/2026/09/12/automattic-confirms-mullenweg-has-returned-as-ceo-after-attempt...
189•ilamont•15h ago•254 comments

The Nature of Dance

https://vester.si/blog/nature-of-dance/
21•wonger_•2d ago•25 comments

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

194•david927•18h ago•588 comments

Rope, twine and thread: Invisible technologies of the Stone Age

https://knowablemagazine.org/content/article/society/2026/prehistory-lost-threads
82•knowablemag•2d ago•30 comments

Julia 1.13 highlights

https://julialang.org/blog/2026/09/julia-1.13-highlights/
239•eigenspace•3d ago•31 comments

A Vacuum Diode for Make: Magazine

https://www.nickpoole.me/2023/12/10/a-vacuum-diode-for-make-magazine/
8•luu•3d ago•0 comments

Why is Google still serving dodgy ads?

https://www.atomic14.com/2026/09/13/why-is-google-still-serving-dodgy-ads
850•iamflimflam1•18h ago•376 comments

The GDR and Vietnam: From Fake Coffee to Coffee Empire

https://www.katjahoyer.uk/p/the-gdr-and-vietnam-from-fake-coffee
91•NaOH•3d ago•47 comments

Bad benchmarks and evals: Senior SWE-Bench, napkin math, and winter tires

https://danluu.com/exercise-7/
37•luu•3d ago•14 comments

Flawed routers flood University of Wisconsin internet time server (2003)

https://pages.cs.wisc.edu/~plonka/netgear-sntp/
90•walrus01•15h ago•11 comments

Nike exits the S&P 100 after 18 years and a $200B market-cap wipeout

https://fortune.com/2026/09/08/nike-stock-plummets-sp500-market-cap-index/
172•andsoitis•8h ago•231 comments

Why the software industry needs a lot of regulation

https://petewarden.com/2026/09/10/why-the-software-industry-needs-a-lot-of-regulation/
3•jreynar•14m ago•0 comments

D-Matrix Raptor 3D-DRAM Accelerator for Generative Inference at Hot Chips 2026

https://www.servethehome.com/d-matrix-raptor-3d-dram-accelerator-for-generative-inference-at-hot-...
3•rbanffy•16m ago•0 comments

CUDA for AMD on Windows

https://github.com/Speedstu/CUDA-for-AMD-Windows
170•chiassedu80•21h ago•92 comments

Open-source AI and open models reading list

https://www.interconnects.ai/p/open-source-ai-reading-list
120•simonpure•11h ago•24 comments

Show HN: EterDB, a Postgres fork that makes it easy to recover from incidents

https://eterdb.com/
41•fdeth•3d ago•19 comments