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

Comments

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

We Haven't Seen the Worst of What Gambling and Prediction Markets Will Do

https://www.derekthompson.org/p/we-havent-seen-the-worst-of-what
27•mmcclure•12m ago•1 comments

Why so many control rooms were seafoam green (2025)

https://bethmathews.substack.com/p/why-so-many-control-rooms-were-seafoam
286•Amorymeltzer•1d ago•45 comments

John Bradley, author of xv, has passed away

https://voxday.net/2026/03/25/rip-john-bradley/
61•linsomniac•1h ago•26 comments

My minute-by-minute response to the LiteLLM malware attack

https://futuresearch.ai/blog/litellm-attack-transcript/
193•Fibonar•4h ago•88 comments

Doom entirely from DNS records

https://github.com/resumex/doom-over-dns
92•Venn1•3d ago•25 comments

Colibri – chat platform built on the AT Protocol for communities big and small

https://colibri.social/
72•todotask2•2h ago•26 comments

Fermented foods shaped human biology

https://press.asimov.com/articles/culture-shift
33•mailyk•6d ago•21 comments

Moving from GitHub to Codeberg, for lazy people

https://unterwaditzer.net/2025/codeberg.html
418•jslakro•6h ago•212 comments

OpenTelemetry profiles enters public alpha

https://opentelemetry.io/blog/2026/profiles-alpha/
90•tanelpoder•3h ago•11 comments

HyperAgents: Self-referential self-improving agents

https://github.com/facebookresearch/hyperagents
58•andyg_blog•2d ago•21 comments

Show HN: Turbolite – a SQLite VFS serving sub-250ms cold JOIN queries from S3

https://github.com/russellromney/turbolite
21•russellthehippo•1h ago•6 comments

Stripe Projects: Provision and manage services from the CLI

https://projects.dev/
65•piinbinary•3h ago•16 comments

How much precision can you squeeze out of a table?

https://www.johndcook.com/blog/2026/03/26/table-precision/
5•nomemory•13m ago•1 comments

Personal Encyclopedias

https://whoami.wiki/blog/personal-encyclopedias
732•jrmyphlmn•1d ago•147 comments

From zero to a RAG system: successes and failures

https://en.andros.dev/blog/aa31d744/from-zero-to-a-rag-system-successes-and-failures/
237•andros•2d ago•75 comments

My home network observes bedtime with OpenBSD and pf

https://ratfactor.com/openbsd/pf-gateway-bedtime
81•ibobev•3d ago•26 comments

CERN to host Europe's flagship open access publishing platform

https://home.cern/news/news/cern/cern-host-europes-flagship-open-access-publishing-platform
4•JohnHammersley•30m ago•0 comments

Running Tesla Model 3's computer on my desk using parts from crashed cars

https://bugs.xdavidhu.me/tesla/2026/03/23/running-tesla-model-3s-computer-on-my-desk-using-parts-...
814•driesdep•22h ago•283 comments

Show HN: Layerleak – Like Trufflehog, but for Docker Hub

https://github.com/Brumbelow/layerleak
4•brumbelow•34m ago•1 comments

End of "Chat Control": EU parliament stops mass surveillance

https://www.patrick-breyer.de/en/end-of-chat-control-eu-parliament-stops-mass-surveillance-in-vot...
444•amarcheschi•7h ago•231 comments

Interoperability Can Save the Open Web (2023)

https://spectrum.ieee.org/doctorow-interoperability
149•janandonly•5h ago•44 comments

Taming LLMs: Using Executable Oracles to Prevent Bad Code

https://john.regehr.org/writing/zero_dof_programming.html
11•mad44•2h ago•1 comments

Building a Blog with Elixir and Phoenix

https://jola.dev/posts/building-a-blog-with-elixir-and-phoenix
41•shintoist•2h ago•2 comments

Obsolete Sounds

https://citiesandmemory.com/obsolete-sounds/
188•benbreen•16h ago•35 comments

Show HN: Orloj – agent infrastructure as code (YAML and GitOps)

https://github.com/OrlojHQ/orloj
10•An0n_Jon•14h ago•6 comments

Light on Glass: Why do you start making a game engine?

https://analogdreamdev.substack.com/p/light-on-glass
32•atan2•3d ago•15 comments

Shell Tricks That Make Life Easier (and Save Your Sanity)

https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
433•zdw•19h ago•212 comments

Ask HN: Running legacy IE/ActiveX clients without local admin rights?

4•Servant-of-Inos•3d ago•4 comments

Olympic Committee bars transgender athletes from women’s events

https://www.nytimes.com/2026/03/26/world/olympics/ioc-transgender-athletes-ban.html
104•RestlessMind•5h ago•244 comments

Swift 6.3

https://www.swift.org/blog/swift-6.3-released/
283•ingve•12h ago•186 comments