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•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.

Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

https://twitter.com/jarredsumner/status/2053047748191232310
434•heldrida•16h ago•420 comments

Internet Archive Switzerland

https://blog.archive.org/2026/05/06/internet-archive-switzerland-expanding-a-global-mission-to-pr...
545•hggh•14h ago•80 comments

The Serial TTL connector we deserve

https://kohlschuetter.github.io/blog/posts/2026/05/07/serial-ttl-connector/
52•kohlschuetter•2d ago•39 comments

I’ve banned query strings

https://chrismorgan.info/no-query-strings
275•susam•10h ago•158 comments

Rust but Lisp

https://github.com/ThatXliner/rust-but-lisp
86•thatxliner•4h ago•43 comments

Local privilege escalation via execve()

https://www.freebsd.org/security/advisories/FreeBSD-SA-26:13.exec.asc
95•Deeg9rie9usi•6h ago•59 comments

Show HN: I made a Clojure-like language in Go, boots in 7ms

https://github.com/nooga/let-go
97•marcingas•8h ago•30 comments

Zed Editor Theme-Builder

https://zed.dev/theme-builder
162•cuechan•9h ago•46 comments

Making your own programming language is easier than you think (but also harder)

https://lisyarus.github.io/blog/posts/making-your-own-programming-language.html
56•ibobev•2d ago•20 comments

The first microcomputer: The transfluxor-powered Arma Micro Computer from 1962

https://www.righto.com/2024/02/the-first-microcomputer-transfluxor.html
23•rsecora•3d ago•0 comments

Distributing Mac software is increasing my cortisol levels

https://blog.kronis.dev/blog/apple-is-increasing-my-cortisol-levels
214•LorenDB•11h ago•150 comments

CPanel's Black Week: 3 New Vulnerabilities Patched After Attack on 44k Servers

https://www.copahost.com/blog/cpanels-black-week-three-new-vulnerabilities-patched-after-ransomwa...
110•ggallas•9h ago•62 comments

I'm writing a history of Visual Basic, Chapter 1 is up

https://evilgeniuslabs.ca/blog/visual-basic-history-chapter-1-launch
21•speckx•3d ago•11 comments

Production engineering when trading billions of dollars a day [video]

https://www.youtube.com/watch?v=zR9PpXWsKFQ
97•abstrus•1d ago•25 comments

LLMs corrupt your documents when you delegate

https://arxiv.org/abs/2604.15597
360•rbanffy•17h ago•139 comments

A recent experience with ChatGPT 5.5 Pro

https://gowers.wordpress.com/2026/05/08/a-recent-experience-with-chatgpt-5-5-pro/
608•_alternator_•23h ago•431 comments

Surfel-based global illumination on the web

https://juretriglav.si/surfel-based-global-illumination-on-the-web/
18•vmg12•7h ago•0 comments

I caught the car

https://undecidability.net/senior/
41•holden_nelson•6h ago•42 comments

The hypocrisy of cyberlibertarianism

https://matduggan.com/the-intolerable-hypocrisy-of-cyberlibertarianism/
268•ColinWright•12h ago•226 comments

EU Parliamentary Research Service calls VPNs "a loophole that needs closing"

https://cyberinsider.com/eu-calls-vpns-a-loophole-that-needs-closing-in-age-verification-push/
405•muse900•20h ago•279 comments

Meta's embrace of A.I. is making its employees miserable

https://www.nytimes.com/2026/05/08/technology/meta-ai-employees-miserable.html
306•JumpCrisscross•8h ago•275 comments

Using Claude Code: The unreasonable effectiveness of HTML

https://twitter.com/trq212/status/2052809885763747935
422•pretext•21h ago•238 comments

France Moves to Break Encrypted Messaging

https://reclaimthenet.org/france-moves-to-break-encrypted-messaging
87•Cider9986•4h ago•49 comments

The Trail of Jeremiah

https://theamericanscholar.org/on-the-trail-of-jeremiah/
3•samclemens•3d ago•0 comments

OpenAI’s WebRTC problem

https://moq.dev/blog/webrtc-is-the-problem/
471•atgctg•2d ago•141 comments

Mythical Man Month

https://martinfowler.com/bliki/MythicalManMonth.html
351•ingve•2d ago•195 comments

PipeDream on the Acorn Archimedes

https://stonetools.ghost.io/pipedream-archimedes/
77•msephton•11h ago•36 comments

Getting arrested in Japan

https://sundaicity.com/blogs/getting-arrested-in-japan
151•bane•4h ago•169 comments

Forking the Web

https://dillo-browser.org/lab/web-fork/
109•wrxd•15h ago•117 comments

Random tie knots (2014)

https://tieknots.how/
13•surprisetalk•3d ago•1 comments