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

Comments

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

How I use Claude Code: Separation of planning and execution

https://boristane.com/blog/how-i-use-claude-code/
202•vinhnx•3h ago•116 comments

Palantir's secret weapon isn't AI – it's Ontology. An open-source deep dive

https://github.com/Leading-AI-IO/palantir-ontology-strategy
35•leading-AI•1h ago•21 comments

Japanese Woodblock Print Search

https://ukiyo-e.org/
12•curmudgeon22•33m ago•2 comments

Show HN: Llama 3.1 70B on a single RTX 3090 via NVMe-to-GPU bypassing the CPU

https://github.com/xaskasdf/ntransformer
130•xaskasdf•6h ago•29 comments

A Botnet Accidentally Destroyed I2P

https://www.sambent.com/a-botnet-accidentally-destroyed-i2p-the-full-story/
31•Cider9986•2h ago•11 comments

Evidence of the bouba-kiki effect in naïve baby chicks

https://www.science.org/doi/10.1126/science.adq7188
89•suddenlybananas•6h ago•24 comments

How far back in time can you understand English?

https://www.deadlanguagesociety.com/p/how-far-back-in-time-understand-english
398•spzb•3d ago•231 comments

Scientists discover recent tectonic activity on the moon

https://phys.org/news/2026-02-scientists-tectonic-moon.html
19•bookmtn•4d ago•1 comments

Parse, Don't Validate and Type-Driven Design in Rust

https://www.harudagondi.space/blog/parse-dont-validate-and-type-driven-design-in-rust/
141•todsacerdoti•8h ago•39 comments

zclaw: personal AI assistant in under 888 KB, running on an ESP32

https://github.com/tnm/zclaw
122•tosh•15h ago•64 comments

The Internet Is Becoming a Dark Forest – and AI Is the Hunter

https://opennhp.org/blog/the-internet-is-becoming-a-dark-forest.html
16•windcbf•2h ago•15 comments

Two Bits Are Better Than One: making bloom filters 2x more accurate

https://floedb.ai/blog/two-bits-are-better-than-one-making-bloom-filters-2x-more-accurate
15•matheusalmeida•4d ago•0 comments

CXMT has been offering DDR4 chips at about half the prevailing market rate

https://www.koreaherald.com/article/10679206
167•phront•13h ago•148 comments

Claws are now a new layer on top of LLM agents

https://twitter.com/karpathy/status/2024987174077432126
222•Cyphase•1d ago•664 comments

EDuke32 – Duke Nukem 3D (Open-Source)

https://www.eduke32.com/
161•reconnecting•7h ago•59 comments

Forward propagation of errors through time

https://nicolaszucchet.github.io/Forward-propagation-errors-through-time/
13•iNic•2d ago•0 comments

Toyota Mirai hydrogen car depreciation: 65% value loss in a year

https://carbuzz.com/toyota-mirai-massive-depreciation-one-year/
112•iancmceachern•9h ago•253 comments

Canvas_ity: A tiny, single-header <canvas>-like 2D rasterizer for C++

https://github.com/a-e-k/canvas_ity
67•PaulHoule•9h ago•23 comments

Finding forall-exists Hyperbugs using Symbolic Execution

https://dl.acm.org/doi/full/10.1145/3689761
23•todsacerdoti•5d ago•0 comments

Inputlag.science – Repository of knowledge about input lag in gaming

https://inputlag.science
73•akyuu•8h ago•12 comments

Acme Weather

https://acmeweather.com/blog/introducing-acme-weather
213•cryptoz•20h ago•127 comments

I verified my LinkedIn identity. Here's what I handed over

https://thelocalstack.eu/posts/linkedin-identity-verification-privacy/
1192•ColinWright•20h ago•416 comments

What not to write on your security clearance form (1988)

https://milk.com/wall-o-shame/security_clearance.html
401•wizardforhire•10h ago•179 comments

Be wary of Bluesky

https://kevinak.se/blog/be-wary-of-bluesky
259•kevinak•1d ago•177 comments

Personal Statement of a CIA Analyst

https://antipolygraph.org/statements/statement-038.shtml
188•grubbs•10h ago•113 comments

I Don't Like Magic

https://adactio.com/journal/22399
122•edent•3d ago•99 comments

Permacomputing

https://wiki.xxiivv.com/site/permacomputing.html
110•tosh•4d ago•27 comments

Uncovering insiders and alpha on Polymarket with AI

https://twitter.com/peterjliu/status/2024901585806225723
135•somerandomness•1d ago•127 comments

A16z partner says that the theory that we’ll vibe code everything is wrong

https://www.aol.com/articles/a16z-partner-says-theory-well-050150534.html
94•paulpauper•1d ago•138 comments

Keep Android Open

https://f-droid.org/2026/02/20/twif.html
2006•LorenDB•1d ago•693 comments