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

Comments

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

Our investigation into the suspicious pressure on Archive.today

https://adguard-dns.io/en/blog/archive-today-adguard-dns-block-demand.html
782•immibis•8h ago•264 comments

Transgenerational Epigenetic Inheritance: the story of learned avoidance

https://elifesciences.org/articles/109427
12•nabla9•38m ago•2 comments

Linux on the Fujitsu Lifebook U729

https://borretti.me/article/linux-on-the-fujitsu-lifebook-u729
116•ibobev•3h ago•67 comments

Boa: A standard-conforming embeddable JavaScript engine written in Rust

https://github.com/boa-dev/boa
37•maxloh•1w ago•16 comments

The computer poetry of J. M. Coetzee's early programming career

https://sites.utexas.edu/ransomcentermagazine/2017/06/28/the-computer-poetry-of-j-m-coetzees-earl...
6•bluejay2•35m ago•0 comments

Weighting an average to minimize variance

https://www.johndcook.com/blog/2025/11/12/minimum-variance/
35•ibobev•3h ago•13 comments

Windhawk Windows classic theme mod for Windows 11

https://windhawk.net/mods/classic-theme-enable
94•znpy•2h ago•48 comments

I implemented an ISO 42001-certified AI Governance program in 6 months

https://beabytes.com/iso42001-certified-ai-governance/
15•azhenley•2h ago•1 comments

TCP, the workhorse of the internet

https://cefboud.com/posts/tcp-deep-dive-internals/
227•signa11•12h ago•104 comments

The Nature of the Beast: Charles Le Brun's Human-Animal Hybrids (1806)

https://publicdomainreview.org/collection/le-brun-human-animal-hybrids/
34•Petiver•5d ago•5 comments

Trellis AI (YC W24) Is Hiring: Streamline access to life-saving therapies

https://www.ycombinator.com/companies/trellis-ai/jobs/f4GWvH0-forward-deployed-engineer-full-time
1•macklinkachorn•2h ago

AWS Deprecates Two Dozen Services (Most of Which You've Never Heard Of)

https://www.lastweekinaws.com/blog/aws-deprecates-two-dozen-services-most-of-which-youve-never-he...
9•mooreds•23m ago•0 comments

Messing with scraper bots

https://herman.bearblog.dev/messing-with-bots/
149•HermanMartinus•11h ago•55 comments

Strap Rail

https://www.construction-physics.com/p/strap-rail
21•juliangamble•1w ago•1 comments

One Handed Keyboard

https://github.com/htx-studio/One-Handed-Keyboard
116•doppp•9h ago•77 comments

Lawmakers want to ban VPNs

https://www.eff.org/deeplinks/2025/11/lawmakers-want-ban-vpns-and-they-have-no-idea-what-theyre-d...
504•gslin•1d ago•268 comments

Designing a Language (2017)

https://cs.lmu.edu/~ray/notes/languagedesignnotes/
145•veqq•13h ago•95 comments

USA Gives South Korea Green Light to Build Nuclear Submarines

https://www.navalnews.com/naval-news/2025/10/usa-gives-south-korea-green-light-to-build-nuclear-s...
10•JumpCrisscross•50m ago•0 comments

Streaming AI agent desktops with gaming protocols

https://blog.helix.ml/p/technical-deep-dive-on-streaming
53•quesobob•1w ago•20 comments

The Mighty Simplex (2023)

https://galileo-unbound.blog/2023/05/03/the-mighty-simplex/
18•just_human•2h ago•4 comments

A new Google model is nearly perfect on automated handwriting recognition

https://generativehistory.substack.com/p/has-google-quietly-solved-two-of
440•scrlk•4d ago•252 comments

Unofficial Microsoft Teams client for Linux

https://github.com/IsmaelMartinez/teams-for-linux
237•basemi•1w ago•208 comments

Go's Sweet 16

https://go.dev/blog/16years
232•0xedb•20h ago•174 comments

History and use of the Estes AstroCam 110

https://www.dembrudders.com/history-and-use-of-the-estes-astrocam-110.html
31•mmmlinux•1w ago•6 comments

An Antivenom Cocktail, Made by a Llama

https://www.asimov.press/p/broad-antivenom
3•surprisetalk•1w ago•1 comments

'No One Lives Forever' turns 25 and you still can't buy it legitimately

https://www.techdirt.com/2025/11/13/no-one-lives-forever-turns-25-you-still-cant-buy-it-legitimat...
327•speckx•1d ago•173 comments

Löb and Möb: Loops in Haskell (2013)

https://github.com/quchen/articles/blob/master/loeb-moeb.md
83•fanf2•1w ago•13 comments

SSL Configuration Generator

https://ssl-config.mozilla.org/
221•smartmic•21h ago•72 comments

HipKittens: Fast and furious AMD kernels

https://hazyresearch.stanford.edu/blog/2025-11-09-hk
220•dataminer•1d ago•73 comments

AI World Clocks

https://clocks.brianmoore.com/
1258•waxpancake•1d ago•352 comments