frontpage.
newsnewestaskshowjobs

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.

StreetComplete: Fixing OpenStreetMap, one tiny quest at a time

https://streetcomplete.app/
591•kls0e•8h ago•135 comments

Local, CPU-Friendly, High-Quality TTS (Text-to-Speech) with Kokoro

https://ariya.io/2026/03/local-cpu-friendly-high-quality-tts-text-to-speech-with-kokoro/
95•speckx•2h ago•18 comments

All Cars Sold in the EU Now Require a Camera Aimed at Your Face

https://allaboutcookies.org/eu-mandatory-distracted-driver-system
16•nickslaughter02•10m ago•7 comments

Chat Control 1.0 and 2.0 Explained

https://fightchatcontrol.eu/chat-control-overview
273•gasull•6h ago•85 comments

AI Meets Cryptography 1: What AI Found in Cloudflare's Circl

https://blog.zksecurity.xyz/posts/circl-bugs/
45•duha•2h ago•5 comments

l: A new runtime for k and q

https://lv1.sh/
64•skruger•2h ago•37 comments

Herdr: One terminal to rule them all

https://herdr.dev/
39•handfuloflight•5d ago•22 comments

A better way to tie gym shorts (or any drawstring) [video]

https://www.youtube.com/watch?v=3R0Lp86GEBk
399•surprisetalk•8h ago•147 comments

30papers.com – Ilya's 30 essential ML papers, in a beginner friendly format

https://30papers.com/
235•notmcrowley•5h ago•38 comments

Jim's TrueType QR Code Font

https://github.com/jimparis/qr-font
93•arantius•4h ago•10 comments

Show HN: Davit, a Apple Containers UI

https://davit.app
53•xinit•2h ago•9 comments

Show HN: Rowboat – Open-source, local-first alternative to Claude Desktop

https://github.com/rowboatlabs/rowboat
35•segmenta•4h ago•9 comments

Notes on Software Quality

https://anthonyhobday.com/blog/20260410
38•speckx•2h ago•21 comments

Fixing analog audio on the $2.58 HDMI-to-VGA adapter

https://nyanpasu64.gitlab.io/blog/hdmi-vga-dac-audio/
46•zdw•2d ago•17 comments

Why we built yet another Postgres connection pooler

https://pgdog.dev/blog/why-yet-another-connection-pooler
85•levkk•5h ago•16 comments

Automating AI Away

https://replicated.live/blog/away
71•gritzko•5h ago•37 comments

Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens

https://github.com/kklimuk/docx-cli
24•kirillklimuk•2h ago•10 comments

Camera with transparent display launches for the equivalent of $29

https://www.notebookcheck.net/Camera-with-transparent-display-launches-for-the-equivalent-of-29.1...
10•yread•4d ago•2 comments

MacSurf 1.68 – NetSurf on OS 9 Released

https://github.com/mplsllc/macsurf/releases/tag/v1.86
55•mplsllc•4h ago•8 comments

Astro 7.0

https://astro.build/blog/astro-7/
130•saikatsg•2h ago•34 comments

Chat Control passed first round in EU Parliament

https://www.heise.de/en/news/Showdown-in-Strasbourg-The-unexpected-return-of-Chat-Control-1-0-113...
460•miroljub•5h ago•200 comments

China sentences official to death for taking $325M in bribes

https://www.bbc.com/news/articles/c33y0n1v1xjo
203•randycupertino•4h ago•221 comments

Computational Balloon Twisting: The Theory of Balloon Polyhedra [pdf]

https://cccg.ca/proceedings/2008/paper34full.pdf
24•luu•5d ago•0 comments

9 Mothers (YC P26) Is Hiring in Austin, TX

https://9mothers.com/careers
1•ukd1•9h ago

Why skilled workers come to Germany and then leave again

https://www.dw.com/en/germany-migrants-skilled-workers-integration-labor-market-bureaucracy-langu...
112•theanonymousone•10h ago•245 comments

98% isn't much

https://whynothugo.nl/journal/2026/07/03/98-isnt-very-much/
424•speckx•8h ago•272 comments

Microsoft fire idTech team at Id software

https://gamefromscratch.com/microsoft-fire-idtech-team-at-id-software/
418•bauc•5h ago•410 comments

The revenge of the philosophy majors

https://www.nytimes.com/2026/07/05/business/philosophy-majors-ai-jobs.html
108•benbreen•6h ago•167 comments

GitHub Freno: cooperative, highly available throttler service

https://github.com/github/freno
31•nateb2022•1d ago•0 comments

Show HN: Halo – open-source, tamper-evident runtime evidence for AI agents

https://github.com/bkuan001/halo-record
12•brian_kuan•6h ago•7 comments