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•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.

Prolog Coding Horror

https://www.metalevel.at/prolog/horror
39•RohanAdwankar•2h ago•9 comments

ThinkPad: From IBM's Bento Box to Lenovo's AI Workstations

https://www.jdhodges.com/blog/thinkpad-history/
19•zdw•1h ago•1 comments

GenCAD

https://gencad.github.io/
21•dagenix•1h ago•2 comments

Fabricked: Misconfiguring Infinity Fabric to Break AMD SEV-SNP

https://xca-attacks.github.io/fabricked/
10•negura•1h ago•1 comments

I turned a $80 RK3562 Android tablet into a Debian Linux workstation

https://github.com/tech4bot/rk3562deb
217•tech4bot•10h ago•114 comments

Mercurial, 20 years and counting: how are we still alive and kicking? [video]

https://fosdem.org/2026/schedule/event/AGWUVH-mercurial-aint-you-dead-yet/
147•ibobev•2d ago•119 comments

VoIP brings back old-fashioned pay phones to rural Vermont (2025)

https://spectrum.ieee.org/payphone-voip
104•bookofjoe•3h ago•23 comments

Two EA-18 fighter jets collide at Mountain Home airshow, pilots ejected safely

https://idahonews.com/news/local/two-f-18-fighter-jets-have-crashed-during-an-airshow-at-mountain...
46•ChrisArchitect•1h ago•25 comments

Magical Realism: “Northern Exposure” 25 Years Later (2015)

https://www.rogerebert.com/streaming/magical-realism-nothern-exposure-25-years-later
54•walterbell•1d ago•21 comments

Ask an Astronaut: 333 hours of Q&A footage with astronauts

https://askanastronaut.issinrealtime.org/
9•gaws•2d ago•0 comments

Multi-Species Canopy Latrines in Costa Rican Cloud Forests

https://onlinelibrary.wiley.com/doi/10.1002/ece3.72964
37•PaulHoule•3d ago•5 comments

Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

https://github.com/MinishLab/semble
113•Bibabomas•8h ago•36 comments

Hindenburg’s Smoking Room

https://www.airships.net/hindenburg-smoking-room/
142•crescit_eundo•3d ago•86 comments

CUDA Books

https://github.com/alternbits/awesome-cuda-books
113•dariubs•10h ago•23 comments

I don't think AI will make your processes go faster

https://frederickvanbrabant.com/blog/2026-05-15-i-dont-think-ai-will-make-your-processes-go-faster/
468•TheEdonian•11h ago•334 comments

Prolog Basics Explained with Pokémon

https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
199•birdculture•2d ago•32 comments

High-Entropy Alloy

https://en.wikipedia.org/wiki/High-entropy_alloy
99•leonidasrup•3d ago•22 comments

New Nightmare Just Dropped: '3D' Animated Ads on Trucks in Traffic

https://www.thedrive.com/news/new-nightmare-just-dropped-3d-animated-ads-on-trucks-in-traffic
59•cf100clunk•1d ago•26 comments

Trials on veterans suggest ibogaine could provide a new treatment for PTSD

https://www.bbc.com/future/article/20260514-how-hallucinogenic-ibogaine-helps-veterans-overcome-ptsd
71•bushwart•11h ago•77 comments

An AI Hate Wave Is Here

https://www.axios.com/2026/05/17/ai-backlash-polling-sentiment
35•karakoram•2h ago•22 comments

The occasional ECONNRESET

https://movq.de/blog/postings/2026-05-05/1/POSTING-en.html
84•zdw•6h ago•19 comments

Schanuel's Conjecture and the Semantics of Triton's FPSan

https://cp4space.hatsya.com/2026/05/03/schanuels-conjecture-and-the-semantics-of-fpsan/
18•c1ccccc1•1d ago•3 comments

Native all the way, until you need text

https://justsitandgrin.im/posts/native-all-the-way-until-you-need-text/
369•dive•11h ago•248 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
131•celsoazevedo•19h ago•143 comments

AI is a technology not a product

https://daringfireball.net/2026/05/ai_is_technology_not_a_product
293•ch_sm•10h ago•116 comments

Apple Silicon costs more than OpenRouter

https://www.williamangel.net/blog/2026/05/17/offline-llm-energy-use.html
290•datadrivenangel•11h ago•242 comments

Mozilla to UK regulators: VPNs are essential privacy and security tools

https://blog.mozilla.org/netpolicy/2026/05/15/mozilla-to-uk-regulators-vpns-are-essential-privacy...
608•WithinReason•17h ago•261 comments

AI Wearables Are Coming but They'll Need to Pass the Coffee Shop Test to Survive

https://www.inc.com/connor-jewiss/ai-wearables-are-coming-but-theyll-need-to-pass-this-crucial-co...
15•connorjewiss•1h ago•3 comments

Colossus: The Forbin Project

https://en.wikipedia.org/wiki/Colossus:_The_Forbin_Project
209•doener•3d ago•77 comments

A nicer voltmeter clock

https://lcamtuf.substack.com/p/a-nicer-voltmeter-clock
305•surprisetalk•1d ago•39 comments