frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

Small models also found the vulnerabilities that Mythos found

https://aisle.com/blog/ai-cybersecurity-after-mythos-the-jagged-frontier
148•dominicq•1h ago•49 comments

Advanced Mac Substitute is an API-level reimplementation of 1980s-era Mac OS

https://www.v68k.org/advanced-mac-substitute/
69•zdw•2h ago•12 comments

Cirrus Labs to join OpenAI

https://cirruslabs.org/
161•seekdeep•4h ago•83 comments

Surelock: Deadlock-Free Mutexes for Rust

https://notes.brooklynzelenka.com/Blog/Surelock
83•codetheweb•3d ago•22 comments

Phone Trips

http://www.wideweb.com/phonetrips/
16•bookofjoe•1h ago•0 comments

Filing the corners off my MacBooks

https://kentwalters.com/posts/corners/
1182•normanvalentine•19h ago•542 comments

Keeping a Postgres Queue Healthy

https://planetscale.com/blog/keeping-a-postgres-queue-healthy
14•tanelpoder•1h ago•0 comments

Every plane you see in the sky – you can now follow it from the cockpit in 3D

https://flight-viz.com/cockpit.html?lat=40.64&lon=-73.78&alt=3000&hdg=220&spd=130&cs=DAL123
12•coolwulf•2d ago•6 comments

The Problem That Built an Industry

https://ajitem.com/blog/iron-core-part-1-the-problem-that-built-an-industry/
48•ShaggyHotDog•3h ago•20 comments

Show HN: Pardonned.com – A searchable database of US Pardons

230•vidluther•11h ago•81 comments

Starfling: A one-tap endless orbital slingshot game in a single HTML file

https://playstarfling.com
433•iceberger2001•2d ago•111 comments

Optimal Strategy for Connect 4

https://2swap.github.io/WeakC4/explanation/
206•marvinborner•2d ago•27 comments

South Korea introduces universal basic mobile data access

https://www.theregister.com/2026/04/10/south_korea_data_access_universal/
163•saikatsg•4h ago•50 comments

Volunteers turn a fan's recordings of 10K concerts into an online treasure trove

https://apnews.com/article/aadam-jacobs-collection-concerts-internet-archive-chicago-b1c9c4466a2d...
268•geox•3d ago•45 comments

Cooperative Vectors Introduction

https://www.evolvebenchmark.com/blog-posts/cooperative-vectors-introduction
30•JasperBekkers•1d ago•1 comments

The disturbing white paper Red Hat is trying to erase from the internet

https://www.osnews.com/story/144776/the-disturbing-white-paper-red-hat-is-trying-to-erase-from-th...
23•choult•1h ago•2 comments

1D Chess

https://rowan441.github.io/1dchess/chess.html
931•burnt-resistor•1d ago•154 comments

Previously unknown verses by Empedocles found on papyrus

https://www.thehistoryblog.com/archives/75792
35•danielam•2d ago•6 comments

The future of everything is lies, I guess – Part 5: Annoyances

https://aphyr.com/posts/415-the-future-of-everything-is-lies-i-guess-annoyances
113•aphyr•3h ago•63 comments

How Much Linear Memory Access Is Enough?

https://solidean.com/blog/2026/how-much-linear-memory-access-is-enough/
48•PhilipTrettner•3d ago•4 comments

How Passive Radar Works

https://www.passiveradar.com/how-passive-radar-works/
110•surprisetalk•2d ago•38 comments

Installing every* Firefox extension

https://jack.cab/blog/every-firefox-extension
570•RohanAdwankar•19h ago•70 comments

Chimpanzees in Uganda locked in eight-year 'civil war', say researchers

https://www.bbc.com/news/articles/cr71lkzv49po
390•neversaydie•22h ago•235 comments

Rockstar Games Hacked, Hackers Threaten a Massive Data Leak If Not Paid Ransom

https://kotaku.com/rockstar-games-reportedly-hacked-massive-data-leak-ransom-gta-6-shinyhunters-2...
24•c420•1h ago•11 comments

Borges' cartographers and the tacit skill of reading LM output

https://galsapir.github.io/sparse-thoughts/2026/04/11/map-and-territory/
22•galsapir•4h ago•3 comments

AI assistance when contributing to the Linux kernel

https://github.com/torvalds/linux/blob/master/Documentation/process/coding-assistants.rst
443•hmokiguess•23h ago•324 comments

Artemis II safely splashes down

https://www.cbsnews.com/live-updates/artemis-ii-splashdown-return/
1140•areoform•17h ago•361 comments

France's government is ditching Windows for Linux, says US tech a strategic risk

https://www.xda-developers.com/frances-government-ditching-windows-for-linux/
309•pabs3•9h ago•178 comments

WireGuard makes new Windows release following Microsoft signing resolution

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009561.html
524•zx2c4•1d ago•150 comments

Bitcoin miners are losing on every coin produced as difficulty drops

https://www.coindesk.com/markets/2026/03/22/bitcoin-miners-are-losing-usd19-000-on-every-btc-prod...
144•PaulHoule•4h ago•134 comments