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

Comments

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

I built Timeframe, our family e-paper dashboard

https://hawksley.org/2026/02/17/timeframe.html
462•saeedesmaili•4h ago•134 comments

Google restricting Google AI Pro/Ultra subscribers for using OpenClaw

https://discuss.ai.google.dev/t/account-restricted-without-warning-google-ai-ultra-oauth-via-open...
39•srigi•52m ago•13 comments

Loops is a federated, open-source TikTok

https://joinloops.org/
157•Gooblebrai•5h ago•90 comments

Using New Bridges of FreeBSD 15

https://blog.feld.me/posts/2026/02/using-new-bridges-freebsd-15/
20•vermaden•1h ago•4 comments

Algolia Hacker News Search GitHub Project Archived

https://github.com/algolia/hn-search
47•maguszin•2h ago•12 comments

Show HN: CIA World Factbook Archive (1990–2025), searchable and exportable

https://cia-factbook-archive.fly.dev/
56•MilkMp•3h ago•17 comments

Attention Media ≠ Social Networks

https://susam.net/attention-media-vs-social-networks.html
517•susam•11h ago•220 comments

Keybee: A Keyboard Designed for Smartphones

https://keybeekeyboard.com/
23•surprisetalk•3d ago•15 comments

Six Math Essentials

https://terrytao.wordpress.com/2026/02/16/six-math-essentials/
70•digital55•4h ago•4 comments

Show HN: Local-First Linux MicroVMs for macOS

https://shuru.run
96•harshdoesdev•5h ago•32 comments

Fix your tools

https://ochagavia.nl/blog/fix-your-tools/
175•vinhnx•7h ago•65 comments

Linuxulator on FreeBSD Feels Like Magic

https://hayzam.com/blog/02-linuxulator-is-awesome/
65•vermaden•5h ago•24 comments

Browse Code by Meaning

https://haskellforall.com/2026/02/browse-code-by-meaning
7•romac•5d ago•0 comments

Hello Worg, the Org-Mode Community

https://orgmode.org/worg/
71•dargscisyhp•6h ago•17 comments

What is a database transaction?

https://planetscale.com/blog/database-transactions
194•0x54MUR41•11h ago•51 comments

Fresh File Explorer – VS Code extension for navigating recent work

https://github.com/FreHu/vscode-fresh-file-explorer
60•frehu•5h ago•19 comments

Emulated Windows 3.11 in the Browser

https://pieter.com/
51•jalev•6h ago•22 comments

Xweather Live – Interactive global vector weather map

https://live.xweather.com/
122•unstyledcontent•8h ago•32 comments

Music Discovery

https://www.secondtrack.co/
33•eriatarka•2h ago•30 comments

The Tears of Donald Knuth

https://cacm.acm.org/opinion/the-tears-of-donald-knuth/
22•todsacerdoti•4h ago•6 comments

Git's Magic Files

https://nesbitt.io/2026/02/05/git-magic-files.html
104•chmaynard•9h ago•28 comments

Show HN: 3D Mahjong, Built in CSS

https://voxjong.com
89•rofko•8h ago•43 comments

Show HN: Warn Firehose – Every US layoff notice in one searchable database

https://warnfirehose.com
9•sendkamal•28m ago•1 comments

The Geometry of Tostitos Scoops

https://chip-tech-rob.zocomputer.io/
22•kousun12•4h ago•1 comments

Zuckerberg's "Fix" for Child Safety Could End Anonymous Internet Access for All

https://reclaimthenet.org/zuckerberg-instagram-age-verification-trial
22•aestetix•43m ago•11 comments

Black-White Array: fast, ordered and based on with O(log N) memory allocations

https://github.com/dronnix/bwarr
13•platzhirsch•4h ago•2 comments

Back to FreeBSD: Part 1

https://hypha.pub/back-to-freebsd-part-1
197•enz•16h ago•94 comments

In World Without BlackBerry, Physical Keyboards on Phones Are Making a Comeback

https://www.cnet.com/tech/mobile/in-a-world-without-blackberry-physical-keyboards-on-phones-are-m...
39•thunderbong•3h ago•28 comments

Procedural Tron

https://www.tripgeo.com/huntforredoctangles
9•tripgeo•2d ago•5 comments

Global Intelligence Crisis

https://www.citriniresearch.com/p/2028gic
111•tin7in•3h ago•97 comments