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.

OpenLogi

https://openlogi.org/en
591•amatheus•7h ago•159 comments

Where Human Sleep Went Wrong

https://nautil.us/where-human-sleep-went-wrong-1283797
43•XzetaU8•1h ago•26 comments

Cerebras CS-4

https://www.cerebras.ai/cs4
264•sunils34•8h ago•185 comments

Palomar: A registry of Lean verified mathematics

https://terrytao.wordpress.com/2026/08/18/palomar-a-registry-of-lean-verified-mathematics/
98•matt_d•6h ago•17 comments

Scientists stunned by children's lung recovery in ultra low emission zone

https://www.bbc.com/news/articles/c1l1r1zne1ro
245•dabinat•8h ago•175 comments

Supersonic Trebuchet [video]

https://www.youtube.com/watch?v=Co57SfcT-h0
93•CharlesW•4d ago•21 comments

Being ambitious and being a dad

https://nicholascharriere.com/blog/being-ambitious-and-being-a-dad/
479•nichochar•2d ago•287 comments

A 3D fruit fly on macOS desktop powered by the real FlyWire connectome

https://github.com/DenisSergeevitch/desktop-fly
269•phoenix120•11h ago•105 comments

The Two Factions of C++

https://herecomesthemoon.net/2024/11/two-factions-of-cpp/
12•signa11•3d ago•4 comments

λλ: A Programming Language for Silicon Photonics

https://dl.acm.org/doi/10.1145/3789240.3829151
17•matt_d•3h ago•4 comments

Solo – a .so loader for static Linux binaries

https://github.com/pg83/solo
143•zX41ZdbW•9h ago•148 comments

How does IKEA come up with names for its products?

https://www.ikea.com/se/en/customer-service/knowledge/articles/6f564c4d-2ccc-46de-b643-545a3948dc...
344•NaOH•15h ago•223 comments

The Vietnam Binh Chau (Chau Tan) Late Tang Wreck

https://www.koh-antique.com/client/tangwreck/tangwreck.html
37•teleforce•7h ago•3 comments

"Sabotage": Experts, lawmakers blast RFK Jr. for destroying healthcare research

https://arstechnica.com/health/2026/08/sabotage-experts-lawmakers-blast-rfk-jr-for-destroying-hea...
41•01-_-•1h ago•4 comments

AI usage patterns in software teams

https://linear.app/data
134•giuliomagnifico•11h ago•69 comments

CUDA Shared Memory Swizzling

https://leimao.github.io/blog/CUDA-Shared-Memory-Swizzling/
48•jxmorris12•5d ago•1 comments

Meta's blockbuster trial draws parallels to big tobacco

https://www.economist.com/business/2026/08/18/metas-blockbuster-trial-draws-parallels-to-big-tobacco
229•newsomix9xl•6h ago•179 comments

Finger: the 1971 social network that never died

https://en.andros.dev/blog/54572bc7/finger-the-1971-social-network-that-never-died/
210•andros•1d ago•65 comments

The Mojo language (by Modular, now Qualcomm) is now open-source

https://www.modular.com/blog/modcon-announcements
31•flaburgan•1h ago•7 comments

Show HN: Automatically detect and patch walking-dead states in Sierra games

https://github.com/katiahayati/lucasartsifier/
55•wkfauna•7h ago•21 comments

Turbovec – Google's TurboQuant for vector search in Rust

https://github.com/RyanCodrai/turbovec
248•fittingopposite•15h ago•31 comments

A 25-year-old video patent just expired, ending a legal headache for Linux

https://www.xda-developers.com/25-year-old-brazilian-video-patent-expired-legal-headache-linux/
181•theanonymousone•3d ago•65 comments

Looking for Missed Alarm Bugs in a Formal Verification Tool

https://blog.regehr.org/archives/2124
13•luu•5d ago•0 comments

And then the men with guns tell you to do it anyway

https://shkspr.mobi/blog/2026/08/and-then-the-men-with-guns-tell-you-to-do-it-anyway/
314•_djo_•16h ago•199 comments

The Amazon tax

https://seths.blog/2026/08/the-amazon-tax/
1171•herbertl•19h ago•625 comments

Claude writing a macOS driver for my obscure HP printer built only for Windows

https://twitter.com/kuberwastaken/status/2089377982536388964
194•porridgeraisin•20h ago•157 comments

We turned off Pub/Sub and nobody noticed

https://incident.io/blog/we-turned-off-pub-sub-and-nobody-noticed
35•patrickhamann•5d ago•5 comments

Show HN: Interactive, animated architecture of any HuggingFace models

https://modelmap.cc
78•lizhaoliu•9h ago•7 comments

Apple announces changes for apps in the European Union

https://www.apple.com/newsroom/2026/08/apple-announces-changes-for-apps-in-the-european-union/
185•newusertoday•16h ago•261 comments

Tiny satellite will use the dark side of the Moon as a shield

https://www.cam.ac.uk/research/news/tiny-satellite-will-use-the-dark-side-of-the-moon-to-eavesdro...
38•NordStreamYacht•8h ago•6 comments