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

Comments

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

GPT-5.2

https://openai.com/index/introducing-gpt-5-2/
827•atgctg•9h ago•679 comments

Nokia N900 Necromancy

https://yaky.dev/2025-12-11-nokia-n900-necromancy/
98•yaky•3h ago•34 comments

Denial of service and source code exposure in React Server Components

https://react.dev/blog/2025/12/11/denial-of-service-and-source-code-exposure-in-react-server-comp...
225•sangeeth96•6h ago•119 comments

Rivian Unveils Custom Silicon, R2 Lidar Roadmap, and Universal Hands Free

https://riviantrackr.com/news/rivian-unveils-custom-silicon-r2-lidar-roadmap-universal-hands-free...
242•doctoboggan•9h ago•323 comments

The highest quality codebase

https://gricha.dev/blog/the-highest-quality-codebase
449•Gricha•3d ago•308 comments

An SVG is all you need

https://jon.recoil.org/blog/2025/12/an-svg-is-all-you-need.html
175•sadiq•8h ago•73 comments

Litestream VFS

https://fly.io/blog/litestream-vfs/
246•emschwartz•9h ago•77 comments

Programmers and software developers lost the plot on naming their tools

https://larr.net/p/namings.html
179•todsacerdoti•9h ago•285 comments

My Father's Instant Mashed Potatoes

https://www.astralcodexten.com/p/your-review-my-fathers-instant-mashed
29•nvader•6d ago•22 comments

Laying out the 404 Media zine

https://tedium.co/2025/12/10/404-media-zine-linux-affinity/?
30•robenkleene•3h ago•2 comments

Pdsink: USB Power Delivery Sink library for embedded devices

https://github.com/pdsink/pdsink
21•zdw•4d ago•8 comments

The architecture of “not bad”: Decoding the Chinese source code of the void

https://suggger.substack.com/p/the-architecture-of-not-bad-decoding
75•Suggger•13h ago•82 comments

Show HN: Sim – Apache-2.0 n8n alternative

https://github.com/simstudioai/sim
157•waleedlatif1•10h ago•33 comments

Craft software that makes people feel something

https://rapha.land/craft-software-that-makes-people-feel-something/
260•lukeio•13h ago•125 comments

The Invisible Cost: From Creator to Consumer

https://edwardnoaland.substack.com/p/the-invisible-cost-from-creator-to
6•edwardnoaland•1w ago•1 comments

The Walt Disney Company and OpenAI Partner on Sora

https://openai.com/index/disney-sora-agreement/
169•inesranzo•13h ago•422 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
578•__rito__•1d ago•251 comments

Cadmium Zinc Telluride: The wonder material powering a medical 'revolution'

https://www.bbc.com/news/articles/c24l223d9n7o
5•1659447091•2h ago•0 comments

Almond (YC X25) Is Hiring SWEs and MechEs

https://www.ycombinator.com/companies/almond-2/jobs
1•shawnpatel•6h ago

Notes on Gamma

https://poniesandlight.co.uk/reflect/gamma/
6•todsacerdoti•2h ago•0 comments

Stoolap: High-performance embedded SQL database in pure Rust

https://github.com/stoolap/stoolap
12•murat3ok•3h ago•3 comments

UK House of Lords attempting to ban use of VPNs by anyone under 16

https://alecmuffett.com/article/134925
317•nvarsj•7h ago•311 comments

French supermarket's Christmas advert is worldwide hit (without AI) [video]

https://www.youtube.com/watch?v=Na9VmMNJvsA
243•gbugniot•14h ago•137 comments

EFF launches Age Verification Hub

https://www.eff.org/press/releases/eff-launches-age-verification-hub-resource-against-misguided-laws
260•iamnothere•1d ago•228 comments

My productivity app is a never-ending .txt file (2020)

https://jeffhuang.com/productivity_text_file/
177•simonebrunozzi•8h ago•127 comments

Powder and stone, or, why medieval rulers loved castles

https://1517.substack.com/p/powder-and-stone-or-why-medieval
32•areoform•6h ago•4 comments

Launch HN: BrowserBook (YC F24) – IDE for deterministic browser automation

62•cschlaepfer•12h ago•32 comments

iPhone Typos? It's Not Just You – The iOS Keyboard Is Broken [video]

https://www.youtube.com/watch?v=hksVvXONrIo
505•walterbell•12h ago•344 comments

Going Through Snowden Documents, Part 1

https://libroot.org/posts/going-through-snowden-documents-part-1/
205•libroot•8h ago•132 comments

Prove It All Night: With no fame or fortune, what keeps a band onstage? (1999)

https://chicagoreader.com/news/prove-it-all-night/
63•NaOH•1w ago•27 comments