frontpage.
newsnewestaskshowjobs

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.

Launch HN: Magnitude (YC S25) – Self-optimizing inference engine for agents

https://github.com/magnitudedev/magnitude
39•anerli•51m ago•16 comments

Commit Description as a Thinking Tool

https://yedhu.me/posts/commit-description-as-a-thinking-tool/
42•yedhukrishnan•1h ago•7 comments

A brief history of the Bloomberg terminal

https://spectrum.ieee.org/bloomberg-terminal
116•rbanffy•3h ago•41 comments

You Said No MCP

https://earendil.com/posts/you-said-no-mcp/
494•yarapavan•8h ago•278 comments

Burning Man Death Rates – A Short Lesson in Statistics

https://ihavenapkinthoughts.substack.com/p/burning-man-death-rates-a-short-lesson
41•viraj_shah•1d ago•22 comments

I Could've Accessed 17T Microsoft Records

https://blog.faav.net/how-i-couldve-accessed-17-trillion-microsoft-records
152•luispa•1d ago•71 comments

SDF vs. MSDF vs. Slug: GPU Text Rendering

https://alphapixeldev.com/sdf-vs-msdf-vs-slug-vs-rive-gpu-text-rendering/
86•ibobev•4h ago•35 comments

Moist-Electric Wallpaper for Indoor Energy Harvesting and Humidity Management

https://advanced.onlinelibrary.wiley.com/doi/10.1002/aenm.71603
31•croes•2h ago•24 comments

Bild AI (YC W25) Is Hiring a Founding Product Engineer

https://www.ycombinator.com/companies/bild-ai/jobs/dAbC3Gd-founding-product-engineer
1•rooppal•1h ago

What TLA+ can and can't check

https://buttondown.com/hillelwayne/archive/what-tla-can-and-cant-check/
48•b-man•4h ago•8 comments

SDF Public Access Unix System ... est. 1987

https://sdf.org/
37•kmstout•3h ago•3 comments

5x faster Edge Functions: V8 isolates to Firecracker MicroVMs

https://www.netlify.com/blog/edge-functions-firecracker-microvms/
3•jbott•11m ago•0 comments

The last time my family was replaced by technology

https://manuel.darcemont.fr/posts/the-last-time-my-family-was-replaced-by-technology/
68•megalomanu•5h ago•144 comments

Reverse-engineering a $35 backup camera display (AMT630A)

https://github.com/mogrinz/AMT630A
39•mogrinz•1d ago•10 comments

Livenerf: Has Opus 5.5 been nerfed yet?

https://github.com/ninjahawk/livenerf
836•bryan0•19h ago•349 comments

Show HN: JBR-001 – An open-source 3D printable desktop robot

https://projecthub.arduino.cc/syntheticaidata/jbr-001-a-desktop-companion-robot-powered-by-arduin...
108•gvuksic•1d ago•24 comments

Energy Timelines Photovoltaic

https://www.eia.gov/kids/history-of-energy/timelines/photovoltaic.php
4•thelastgallon•1d ago•1 comments

LinkedIn Larpmaxxing

https://hereticpleb.vercel.app/blog/linkedin-larpmaxxing/
63•BurnerBurner•14h ago•63 comments

Solving Factorio Quality

https://exyr.org/2026/solving-factorio-quality/
227•laurenth•1d ago•84 comments

Mathematical Origami

https://mathigon.org/origami
91•signa11•1d ago•21 comments

Getting out of the way: my robotics crash course

https://thisismypersonalblog.com/posts/2026-09-25-getting-out-of-the-way/
42•systemerror•2d ago•9 comments

Dots: Always-on agents

https://openai.com/index/introducing-dots/
724•alvis•1d ago•610 comments

Vermont replacing power plants with home batteries

https://www.bbc.com/future/article/20260928-a-virtual-power-plant-hidden-in-vermont-homes-is-keep...
344•devonnull•1d ago•254 comments

NASA asked several former SR-71A staffers to help secret restart

https://aviationweek.com/defense/aircraft-propulsion/nasa-asked-several-former-sr-71a-staffers-he...
285•ilamont•1d ago•327 comments

Show HN: Ledge.sh – Runnable Markdown Notes

https://ledge.sh
33•dancablam•18h ago•28 comments

Show HN: Dental Scope – Interactive 3D dental anatomy

https://dental-scope.com/
82•Zeruxe•1d ago•48 comments

Show HN: A working 3D model of an Enigma machine

https://enigma.design
80•primitivesuave•1d ago•31 comments

Show HN: Strata – an expressive semantic layer that can say no to your LLM

https://strata.do/try/
4•ajoski9•3h ago•0 comments

Show HN: Real-time Solar System with 526k asteroids and all tracked satellites

https://space.bl2.net/
357•wanick•23h ago•93 comments

U.S. postal inspectors shut down website selling counterfeit postage labels

https://postalemployeenetwork.com/news/2026/09/26/u-s-postal-inspectors-shut-down-website-selling...
269•ilamont•22h ago•160 comments