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

Comments

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

The Microstructure of Wealth Transfer in Prediction Markets

https://www.jbecker.dev/research/prediction-market-microstructure
66•jonbecker•2h ago•32 comments

What came first: the CNAME or the A record?

https://blog.cloudflare.com/cname-a-record-order-dns-standards/
19•linolevan•1h ago•4 comments

CSS Web Components for marketing sites (2024)

https://hawkticehurst.com/2024/11/css-web-components-for-marketing-sites/
49•zigzag312•3h ago•20 comments

Apple testing new App Store design that blurs the line between ads and results

https://9to5mac.com/2026/01/16/iphone-apple-app-store-search-results-ads-new-design/
127•ksec•1h ago•71 comments

GLM-4.7-Flash

https://huggingface.co/zai-org/GLM-4.7-Flash
206•scrlk•3h ago•61 comments

Show HN: Pipenet – A Modern Alternative to Localtunnel

https://pipenet.dev/
27•punkpeye•2h ago•6 comments

A Brief History of Ralph

https://www.humanlayer.dev/blog/brief-history-of-ralph
11•dhorthy•18m ago•2 comments

Bypassing Gemma and Qwen safety with raw strings

https://teendifferent.substack.com/p/apply_chat_template-is-the-safety
8•teendifferent•13h ago•0 comments

Iterative image reconstruction using random cubic bézier strokes

https://tangled.org/luthenwald.tngl.sh/splined
34•luthenwald•4d ago•9 comments

A decentralized peer-to-peer messaging application that operates over Bluetooth

https://bitchat.free/
462•no_creativity_•11h ago•264 comments

Folding NASA Experience into an Origamist's Toolkit

https://spinoff.nasa.gov/Folding_NASA_Experience_into_an_Origamist%E2%80%99s_Toolkit
51•andsoitis•2d ago•4 comments

Cows Can Use Sophisticated Tools

https://nautil.us/the-far-side-had-it-all-wrong-cows-really-can-use-sophisticated-tools-1262026/
33•Tomte•1h ago•14 comments

Radboud University selects Fairphone as standard smartphone for employees

https://www.ru.nl/en/staff/news/radboud-university-selects-fairphone-as-standard-smartphone-for-e...
429•ardentsword•9h ago•199 comments

Luxury Yacht is a desktop app for managing Kubernetes clusters

https://github.com/luxury-yacht/app
43•mooreds•5d ago•13 comments

Conditions in the Intel 8087 floating-point chip's microcode

https://www.righto.com/2025/12/8087-microcode-conditions.html
7•diogotozzi•4d ago•0 comments

Dead Internet Theory

https://kudmitry.com/articles/dead-internet-theory/
581•skwee357•22h ago•626 comments

San Francisco coyote swims to Alcatraz

https://www.sfgate.com/local/article/san-francisco-coyote-alcatraz-21302218.php
26•kaycebasques•15h ago•1 comments

Bootstrapping Bun

https://walters.app/blog/bootstrapping-bun
6•zerf•1h ago•1 comments

Robust Conditional 3D Shape Generation from Casual Captures

https://facebookresearch.github.io/ShapeR/
28•lastdong•6h ago•2 comments

Nepal's Mountainside Teahouses Elevate the Experience for Trekkers

https://www.smithsonianmag.com/travel/nepal-mountainside-teahouses-elevate-experience-trekkers-he...
89•bookofjoe•4d ago•36 comments

Ask HN: COBOL devs, how are AI coding affecting your work?

123•zkid18•5h ago•127 comments

I set all 376 Vim options and I'm still a fool

https://evanhahn.com/i-set-all-376-vim-options-and-im-still-a-fool/
60•todsacerdoti•2d ago•20 comments

"Anyone else out there vibe circuit-building?"

https://twitter.com/beneater/status/2012988790709928305
91•thetrustworthy•3h ago•59 comments

Raccoons break into liquor stores, scale skyscrapers and pick locks

https://theconversation.com/raccoons-break-into-liquor-stores-scale-skyscrapers-and-pick-locks-st...
17•pseudolus•1h ago•5 comments

Flux 2 Klein pure C inference

https://github.com/antirez/flux2.c
402•antirez•1d ago•130 comments

Two Concepts of Intelligence

https://cacm.acm.org/blogcacm/two-concepts-of-intelligence/
42•1970-01-01•5d ago•49 comments

The Code-Only Agent

https://rijnard.com/blog/the-code-only-agent
131•emersonmacro•15h ago•58 comments

The space and motion of communicating agents (2008) [pdf]

https://www.cl.cam.ac.uk/archive/rm135/Bigraphs-draft.pdf
26•dhorthy•3d ago•2 comments

Self Sanitizing Door Handle

https://www.jamesdysonaward.org/en-US/2019/project/self-sanitizing-door-handle/
41•rendaw•4d ago•45 comments

MTOTP: Wouldn't it be nice if you were the 2FA device?

https://github.com/VBranimir/mTOTP/tree/develop
54•brna-2•9h ago•77 comments