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.

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
1481•Kaibeezy•11h ago•501 comments

Apple fixes bug that cops used to extract deleted chat messages from iPhones

https://techcrunch.com/2026/04/22/apple-fixes-bug-that-cops-used-to-extract-deleted-chat-messages...
452•cdrnsf•7h ago•111 comments

How the Heck does Shazam work?

https://perthirtysix.com/how-the-heck-does-shazam-work
60•datadrivenangel•2d ago•8 comments

We found a stable Firefox identifier linking all your private Tor identities

https://fingerprint.com/blog/firefox-tor-indexeddb-privacy-vulnerability/
520•danpinto•10h ago•158 comments

Borrow-checking without type-checking

https://www.scattered-thoughts.net/writing/borrow-checking-without-type-checking/
17•jamii•1h ago•0 comments

Qwen3.6-27B: Flagship-Level Coding in a 27B Dense Model

https://qwen.ai/blog?id=qwen3.6-27b
758•mfiguiere•15h ago•363 comments

5x5 Pixel font for tiny screens

https://maurycyz.com/projects/mcufont/
480•zdw•3d ago•113 comments

Over-editing refers to a model modifying code beyond what is necessary

https://nrehiew.github.io/blog/minimal_editing/
321•pella•10h ago•181 comments

Tempest vs. Tempest: The Making and Remaking of Atari's Iconic Video Game

https://tempest.homemade.systems
35•mwenge•3h ago•14 comments

OpenAI's response to the Axios developer tool compromise

https://openai.com/index/axios-developer-tool-compromise/
43•shpat•3h ago•15 comments

Website streamed live directly from a model

https://flipbook.page/
198•sethbannon•10h ago•63 comments

Flow Map Learning via Nongradient Vector Flow [pdf]

https://openreview.net/pdf?id=C1bkDPqvDW
6•E-Reverance•1h ago•0 comments

Verus is a tool for verifying the correctness of code written in Rust

https://verus-lang.github.io/verus/guide/
32•fanf2•2d ago•5 comments

Technical, cognitive, and intent debt

https://martinfowler.com/fragments/2026-04-02.html
226•theorchid•12h ago•56 comments

Ping-pong robot beats top-level human players

https://www.reuters.com/sports/ping-pong-robot-ace-makes-history-by-beating-top-level-human-playe...
92•wslh•13h ago•98 comments

A True Life Hack: What Physical 'Life Force' Turns Biology's Wheels?

https://www.quantamagazine.org/what-physical-life-force-turns-biologys-wheels-20260420/
8•Prof_Sigmund•1d ago•0 comments

It's time to reclaim the word "Palantir" for JRR Tolkien

https://www.zig.art/p/its-time-to-reclaim-the-word-palantir
3•IdahoSpring•50m ago•3 comments

The handmade beauty of Machine Age data visualizations

https://resobscura.substack.com/p/the-handmade-beauty-of-machine-age
19•benbreen•14h ago•1 comments

Scoring Show HN submissions for AI design patterns

https://www.adriankrebs.ch/blog/design-slop/
289•hubraumhugo•13h ago•211 comments

Parallel agents in Zed

https://zed.dev/blog/parallel-agents
193•ajeetdsouza•10h ago•108 comments

Another Day Has Come

https://daringfireball.net/2026/04/another_day_has_come
215•ndr42•1d ago•149 comments

Ultraviolet corona discharges on treetops during storms

https://www.psu.edu/news/earth-and-mineral-sciences/story/treetops-glowing-during-storms-captured...
212•t-3•14h ago•63 comments

Effectful Recursion Schemes

https://effekt-lang.org/blog/recursion-schemes/
21•marvinborner•2d ago•1 comments

The Neon King of New Orleans

https://gardenandgun.com/new-orleans-neon-king
45•renameme•6h ago•7 comments

What killed the Florida orange?

https://slate.com/business/2026/04/florida-state-orange-food-houses-real-estate.html
136•danso•2d ago•126 comments

Approximating Hyperbolic Tangent

https://jtomschroeder.com/blog/approximating-tanh/
32•jtomschroeder•4h ago•4 comments

Bring your own Agent to MS Teams

https://microsoft.github.io/teams-sdk/blog/bring-your-agent-to-teams/
31•umangsehgal93•5h ago•16 comments

Bodega cats of New York

https://bodegacatsofnewyork.com
174•zdw•5d ago•60 comments

Workspace Agents in ChatGPT

https://openai.com/index/introducing-workspace-agents-in-chatgpt/
119•mfiguiere•10h ago•45 comments

The Illuminated Man: an unconventional portrait of JG Ballard

https://www.theguardian.com/books/2026/apr/20/the-illuminated-man-by-christopher-priest-and-nina-...
51•agronaut•8h ago•17 comments