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•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•12mo 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.

The text mode lie: why modern TUIs are a nightmare for accessibility

https://xogium.me/the-text-mode-lie-why-modern-tuis-are-a-nightmare-for-accessibility
72•SpyCoder77•1h ago•29 comments

Agentic Coding Is a Trap

https://larsfaye.com/articles/agentic-coding-is-a-trap
97•ayoisaiah•2h ago•66 comments

Let's Buy Spirit Air

https://letsbuyspiritair.com/
76•bjhess•1h ago•44 comments

BYOMesh – New LoRa mesh radio offers 100x the bandwidth

https://partyon.xyz/@nullagent/116499715071759135
248•nullagent•7h ago•80 comments

DeepClaude – Claude Code agent loop with DeepSeek V4 Pro, 17x cheaper

https://github.com/aattaran/deepclaude
151•alattaran•3h ago•65 comments

The 'Hidden' Costs of Great Abstractions

https://jdgr.net/the-hidden-costs-of-great-abstractions
45•jdgr•2h ago•10 comments

Southwest Headquarters Tour

https://katherinemichel.github.io/blog/travel/southwest-headquarters-tour-2026.html
179•KatiMichel•8h ago•53 comments

US–Indian space mission maps extreme subsidence in Mexico City

https://phys.org/news/2026-04-usindian-space-mission-extreme-subsidence.html
84•leopoldj•2d ago•38 comments

A desktop made for one

https://isene.org/2026/05/Audience-of-One.html
228•xngbuilds•9h ago•92 comments

OpenAI's o1 correctly diagnosed 67% of ER patients vs. 50-55% by triage doctors

https://www.theguardian.com/technology/2026/apr/30/ai-outperforms-doctors-in-harvard-trial-of-eme...
271•donsupreme•1d ago•228 comments

Tar files made in macOS generate "xattr" errors when expanded in Linux

https://aruljohn.com/blog/macos-created-tar-files-linux-errors/
30•heresie-dabord•3d ago•21 comments

Using "underdrawings" for accurate text and numbers

https://samcollins.blog/underdrawings/
18•samcollins•2d ago•3 comments

New statue in London, attributed to Banksy, of a suited man, blinded by a flag

https://www.smithsonianmag.com/smart-news/attributed-to-banksy-a-new-statue-of-a-suited-man-blind...
262•dryadin•6h ago•261 comments

Introduction to Atom

https://validator.w3.org/feed/docs/atom.html
21•susam•3h ago•6 comments

Mercedes-Benz commits to bringing back physical buttons

https://www.drive.com.au/news/mercedes-benz-commits-to-bringing-back-phycial-buttons/
600•teleforce•10h ago•347 comments

Bad Connection: Global telecom exploitation by covert surveillance actors

https://citizenlab.ca/research/uncovering-global-telecom-exploitation-by-covert-surveillance-actors/
91•miohtama•9h ago•7 comments

Text-to-CAD

https://github.com/earthtojake/text-to-cad
73•softservo•2d ago•25 comments

LLMs Are Not a Higher Level of Abstraction

https://www.lelanthran.com/chap15/content.html
36•lelanthran•7h ago•36 comments

I recreated the Apple Lisa computer inside an FPGA [video]

https://www.youtube.com/watch?v=8jNQDcpHc68
68•cyrc•7h ago•10 comments

Security through obscurity is not bad

https://mobeigi.com/blog/security/security-through-obscurity-is-not-bad/
115•mobeigi•10h ago•131 comments

Denuvo has been cracked in all single-player games it previously protected

https://www.tomshardware.com/video-games/pc-gaming/denuvo-has-been-bypassed-in-all-single-player-...
222•oceansky•5d ago•140 comments

Make your own microforest (2025)

https://ambrook.com/offrange/environment/a-forest-in-your-pocket
61•bookofjoe•5h ago•14 comments

I built my own hair electrolysis machine

https://www.scd31.com/posts/diy-hair-electrolysis-machine
176•y1n0•4d ago•45 comments

Lost in translation: The linguistic challenges facing N. Korean defectors (2025)

https://www.dailynk.com/english/lost-in-translation-the-linguistic-challenges-facing-n-korean-def...
30•spzb•2d ago•20 comments

Why TUIs Are Back

https://wiki.alcidesfonseca.com/blog/why-tuis-are-back/
250•rickcarlino•6h ago•280 comments

What is Z-Angle Memory and why is Intel developing it?

https://www.hpcwire.com/2026/02/05/what-is-z-angle-memory-and-why-is-intel-developing-it/
81•rbanffy•2d ago•35 comments

Automatic Brightness in Plasma

https://zamundaaa.github.io/wayland,display/2026/04/24/automatic-brightness.html
15•speckx•2d ago•4 comments

Metal Gear Solid 2's source code has been leaked on 4chan

https://www.thegamer.com/mgs2-hd-edition-source-code-massive-leak/
223•rishabhd•8h ago•92 comments

Show HN: Apple's SHARP running in the browser via ONNX runtime web

https://github.com/bring-shrubbery/ml-sharp-web
157•bring-shrubbery•16h ago•39 comments

How far behind is each major Chromium browser?

https://chromium-drift.pages.dev/
161•skaul•8h ago•57 comments