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.

Show HN: 30u30.fyi – Is your startup founder on Forbes' most fraudulent list?

https://30u30.fyi
66•not-chatgpt•31m ago•14 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
308•speckx•4h ago•99 comments

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
274•karimf•10h ago•84 comments

Learn Claude Code by doing, not reading

https://claude.nagdy.me/
68•taubek•2h ago•31 comments

Android Developer Verification

https://android-developers.googleblog.com/2026/03/android-developer-verification-rolling-out-to-a...
30•ingve•36m ago•4 comments

Turning a MacBook into a touchscreen with $1 of hardware (2018)

https://anishathalye.com/macbook-touchscreen/
129•HughParry•3h ago•54 comments

How to turn anything into a router

https://nbailey.ca/post/router/
535•yabones•9h ago•198 comments

Agents of Chaos

https://agentsofchaos.baulab.info/report.html
35•luu•3d ago•2 comments

Bird brains (2023)

https://www.dhanishsemar.com/writing/bird-brains
275•DiffTheEnder•9h ago•181 comments

The stealthy startup that pitched brainless human clones

https://www.technologyreview.com/2026/03/30/1134780/r3-bio-brainless-human-clones-full-body-repla...
26•joozio•11h ago•26 comments

Cherri – programming language that compiles to an Apple Shortuct

https://github.com/electrikmilk/cherri
205•mihau•2d ago•43 comments

Researchers find 3,500-year-old loom that reveals textile revolution

https://web.ua.es/en/actualidad-universitaria/2026/marzo2026/23-31/ua-researchers-find-3-500-year...
36•geox•3d ago•1 comments

Seeing Like a Spreadsheet

https://davidoks.blog/p/how-the-spreadsheet-reshaped-america
53•paulpauper•2d ago•16 comments

Agentic AI and the next intelligence explosion

https://arxiv.org/abs/2603.20639
14•silverpiranha•1h ago•2 comments

Roulette Computers: Hidden Devices That Predict Spins

https://www.roulette-computers.com/
40•o4c•2d ago•7 comments

OCR for construction documents does not work, we fixed it

https://www.getanchorgrid.com/developer/docs/endpoints/drawings-doors
109•wcisco17•6h ago•69 comments

William Blake, Remote by the Sea

https://www.laphamsquarterly.org/roundtable/william-blake-remote-sea
36•occurrence•3h ago•1 comments

A sea of sparks: Seeing radioactivity

https://maurycyz.com/projects/spinthariscope/
40•maurycyz•4h ago•16 comments

Show HN: Coasts – Containerized Hosts for Agents

https://github.com/coast-guard/coasts
47•jsunderland323•7h ago•18 comments

CodingFont: A game to help you pick a coding font

https://www.codingfont.com/
271•nvahalik•7h ago•160 comments

Recover Apple Keychain

https://arkoinad.com/posts/apple_keychain_recovery.html
39•speckx•5h ago•12 comments

In math, rigor is vital, but are digitized proofs taking it too far?

https://www.quantamagazine.org/in-math-rigor-is-vital-but-are-digitized-proofs-taking-it-too-far-...
86•isaacfrond•4d ago•76 comments

Build123d: A Python CAD programming library

https://github.com/gumyr/build123d
103•Ivoah•1d ago•43 comments

IronGlass Brings Legendary Soviet Cinema Lenses to Mirrorless Cameras

https://petapixel.com/2026/02/19/ironglass-brings-legendary-soviet-cinema-lenses-to-mirrorless-ca...
5•PaulHoule•4d ago•0 comments

Mathematical methods and human thought in the age of AI

https://arxiv.org/abs/2603.26524
184•zaikunzhang•11h ago•74 comments

I am definitely missing the pre-AI writing era

https://www.lesswrong.com/posts/BJ4pnropWdnzzgeJc/i-am-definitely-missing-the-pre-ai-writing-era
227•joozio•15h ago•181 comments

Take better notes, by hand

https://brianschrader.com/archive/take-better-notes-by-hand/
159•sonicrocketman•6h ago•73 comments

An NSFW filter for Marginalia search

https://www.marginalia.nu/log/a_134_nsfw/
84•speckx•6h ago•14 comments

Tickets Are Prompts

https://dheer.co/tickets-are-prompts/
9•bushido•1h ago•2 comments

FTC action against Match and OkCupid for deceiving users, sharing personal data

https://www.ftc.gov/news-events/news/press-releases/2026/03/ftc-takes-action-against-match-okcupi...
212•gnabgib•7h ago•110 comments