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.

2D Vehicles

https://patkerr.co.uk/2d-vehicles/
201•Michelangelo11•3d ago•47 comments

Why DuckDB 2.0 is faster

https://motherduck.com/blog/why-duckdb-20-is-faster/
68•tosh•3h ago•20 comments

Knuth reward check

https://www.thomas-huehn.com/knuth-reward-check/
109•Curiositry•5h ago•40 comments

The Lightbulb Computer

https://lightbulbcomputer.com/
90•oskarth•17h ago•15 comments

Recent AI models struggled to match a human algorithmic innovation

https://epoch.ai/publications/innovationeval
38•merksittich•23h ago•28 comments

Talorys – A self-hosted personal AI agent on Cloudflare's free tier

https://github.com/rociiu/talorys
211•rociiu•10h ago•109 comments

Nvidia in talks to acquire US 'open' model startup Reflection AI

https://www.ft.com/content/052610c5-22b4-4dd4-932e-b7f9f0628b6a
74•arkj•2h ago•44 comments

Mxc: Microsoft Execution Containers version 1.0.0

https://blogs.windows.com/windowsdeveloper/2026/10/07/microsoft-execution-containers-policy-drive...
131•smokel•1d ago•28 comments

Nix wrote half of my debugger

https://fzakaria.com/2026/10/07/nix-wrote-half-of-my-debugger
36•ingve•1d ago•3 comments

Apple/macOS removed from official Unix registry

https://www.opengroup.org//openbrand/register/
210•john_alan•10h ago•194 comments

Grieving the loss of details

https://purplesyringa.moe/blog/grieving-the-loss-of-details/
265•signa11•4d ago•210 comments

REA Reverse – Engineer Anything

https://rea.tools/
650•modinfo•20h ago•277 comments

How strong is the strong interaction?

https://cerncourier.com/how-strong-is-the-strong-interaction/
32•EA-3167•21h ago•5 comments

Telegram Desktop vulnerability allowed any user's file to be stolen

https://beaksec.github.io/posts/telegram-desktop-one-click-account-takeover/
379•g-b-r•18h ago•214 comments

Triple-A Minesweeper

https://minesweeper.mikelacher.com/
1325•robin_reala•1d ago•264 comments

OpenSCAD the Programmers Solid 3D CAD Modeller

https://openscad.org/
63•b-man•3d ago•54 comments

Rampart: Browser native on-device PII radaction

https://ndstudio.gov/posts/say-hello-to-rampart
54•nateb2022•1d ago•22 comments

Bitwarden Dual License Model

https://community.bitwarden.com/t/published-version-update-in-app-stores/102750
301•Cider9986•6h ago•226 comments

Unikernels were hard. key word: were

https://ghuntley.com/unikernels/
41•ghuntley•6h ago•17 comments

I would like the value of my home to rise, while my property taxes fall

https://conversableeconomist.com/2026/09/28/i-would-like-the-value-of-my-home-to-rise-while-my-pr...
169•colinprince•7h ago•393 comments

How Protein Took over the World

https://www.ft.com/content/e26574cf-94cc-40d9-921e-5c7417fc5dbd
41•thm•5h ago•81 comments

Chip-hex:cost-benefit, energy efficiency and hexagonal

https://github.com/lzprograma/Chip-Hexa
3•Engineercom•1d ago•1 comments

Whooping Cranes Learned to Migrate by Following Costumed Pilots

https://theverifiedpost.com/article/whooping-cranes-ultralight-costumed-pilots-operation-migration
43•kgolubic•1d ago•6 comments

50MB operating system can resurrect your old PC

https://www.makeuseof.com/this-50mb-operating-system-can-resurrect-your-old-pc/
12•makerdiety•1h ago•1 comments

PVX-001: open-source Covid-19 vaccine starts Phase 1 trial

https://chronicles.popvax.com/p/popvax-goes-clinical
100•jajoosam•6h ago•17 comments

Eye of Sauron: Long-Range Hidden Spy Camera Detection (2024)

https://www.usenix.org/conference/usenixsecurity24/presentation/zhang-qibo
286•ortusdux•3d ago•67 comments

Chernobyl particles reveal unexpectedly stable nuclear fuel after 40 years

https://phys.org/news/2026-10-chernobyl-particles-reveal-unexpectedly-stable.html
113•geox•3d ago•40 comments

`123456' password used in Danish CPR data breach

https://cphpost.dk/2026-10-10/news/round-up/123456-password-used-in-massive-danish-cpr-data-breach/
362•baal80spam•11h ago•188 comments

Takeshi's Castle

https://en.wikipedia.org/wiki/Takeshi%27s_Castle
45•tosh•2h ago•20 comments

Noto means "no tofu": fixing dotted circles in Myanmar text

https://www.datocms.com/blog/handling-less-common-scripts
51•steffoz•4d ago•30 comments