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.

Prelude 9B open European model

https://openeurollm.eu/blog/prelude-announcement
508•magru•3h ago•118 comments

NixOS 26.11

https://nixos.org/blog/announcements/2026/nixos-2611/
158•lostmsu•1h ago•62 comments

How Far Behind Are Open-Weight Models?

https://sebastianraschka.com/blog/2026/how-far-behind-are-open-weight-models.html
362•ModelForge•4h ago•297 comments

Rex is now available to everyone

https://www.superlogical.com/updates/rex-available-to-everyone
409•kylebarron•3h ago•166 comments

Post-quantum key exchange in Tailscale v1.106

https://tailscale.com/blog/pqc-key-exchange
157•tatersolid•2h ago•27 comments

Laravel for COBOL

https://github.com/pihedy/laravel-cobol
306•choult•4h ago•104 comments

MiniMax-M4, an open-weight, natively multimodal Mixture-of-Experts (MoE) model

https://github.com/MiniMax-AI/MiniMax-M4
333•cmrdporcupine•5h ago•109 comments

Cloudflare will be fully post-quantum in 2027

https://blog.cloudflare.com/project-quantum-leap/
664•jupenur•8h ago•371 comments

Vitalik Buterin 2024: How to hard-fork to save most funds in a quantum emergency

https://ethresear.ch/t/how-to-hard-fork-to-save-most-users-funds-in-a-quantum-emergency/18901
43•olaird25•1h ago•8 comments

Man Hooks Up His 1994 Jeep Cherokee to ChatGPT

https://www.thedrive.com/news/man-hooks-up-his-1994-jeep-cherokee-to-chatgpt-and-the-results-are-...
90•thehoff•1d ago•61 comments

Unmodified 748B DeepSeek-v4.1-Flash on one RTX 4090

https://axel-labs.com/research/deepseek-v4-1-flash-on-one-rtx-4090
17•bobbitybobob•46m ago•8 comments

Launching S3 Wormhole

https://www.daemonology.net/blog/2026-12-02-Launching-S3-Wormhole.html
122•lewww•1d ago•33 comments

Steller's sea cow: First historical extinction of a marine mammal at human hands

https://www.nhm.ac.uk/discover/stellers-sea-cow-first-historical-extinction-of-marine-mammal-at-h...
117•zeristor•2d ago•35 comments

Fingerprinting Chess Players by Their Move Timings

https://healeycodes.com/fingerprinting-chess-players-by-their-move-timings
22•healeycodes•5h ago•7 comments

Flux 3.1 Image

https://bfl.ai/blog/flux-3-1
40•leumon•2h ago•6 comments

Show HN: ArkType 3.0 – Set-theoretic precompiled TS validator

https://arktype.io/docs/blog/3.0
25•ssalbdivad•4h ago•2 comments

Has Substack Stalled?

https://nymag.com/intelligencer/article/substack-hamish-mckenzie-emily-sundberg-max-stein.html
15•cainxinth•2d ago•8 comments

All software sucks (2007)

https://harmful.cat-v.org/software/
156•archargelod•8h ago•179 comments

Show HN: ArchLang – floor plans as code, compiled to SVG/DXF/PDF

https://playground.archlang.uk/
155•chanmeng•3d ago•49 comments

This Lady Is Hitting Every Shop in NYC (2024)

https://annekadet.substack.com/p/locavore
61•NaOH•3d ago•32 comments

What Could Object Pascal Look Like in 2030?

https://blogs.remobjects.com/2026/12/02/a-vision-for-pascal-2030-at-ekon/
48•carteragecat•7h ago•26 comments

Show HN: Nixorium – NixOS fleet management, in daily use in my school's labs

https://github.com/giovantenne/nixorium
102•zener79•7h ago•36 comments

Mistral Crash Dynamics, aka Crashtral

https://mistral.ai/news/mistral-crash-dynamics/
100•acossta•7h ago•7 comments

I wish we’d stop talking about how we’re going to cure cancer

https://www.science.org/content/blog-post/stop-it-just-stop-it
1187•surprisetalk•8h ago•703 comments

Bayer's 'Feed a Bee' campaign was used to fight bee protections

https://www.grilled.media/feed-a-bee/
448•randycupertino•6h ago•142 comments

Show HN: misa77 – Up to 3x faster decompression than zstd, with better ratios

https://github.com/welcome-to-the-sunny-side/misa77/tree/main
236•nonadhocproblem•13h ago•72 comments

Transferring Human Thoughts into Qwen

https://ruxytrace.com/research/thought-transfer/
183•pioborgelt•7h ago•102 comments

Adobe Acrobat Pro 2020 perpetual license no longer supported

https://community.adobe.com/questions-9/adobe-acrobat-pro-2020-perpetual-license-won-t-active-sin...
237•JamesHist•5h ago•158 comments

Critical 21-year-old Linux flaw lets hackers bypass firewall rules

https://www.bleepingcomputer.com/news/security/critical-21-year-old-linux-flaw-lets-hackers-bypas...
15•ectospheno•1h ago•0 comments

Show HN: Simulating a 1975 dungeon board game to fix its class balance

https://github.com/someben/dungeon-bang
103•someben•2d ago•42 comments