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.

Mea Culpa – Dark Hours

https://blog.terrygodier.com/2026/08/09/mea-culpa-dark-hours.html
149•satvikpendem•1h ago•60 comments

Show HN: A Project Oberon System version running on RISC-V instead of RISC-5

https://github.com/rochus-keller/OberonSystem/tree/op2-rv32
31•Rochus•2h ago•6 comments

There Are Magic Hexagons of Every Order

https://gukov.dev/math/2026/08/02/new-magic-hexagons.html
119•gukoff•7h ago•20 comments

Uber SubmitQueue: a high-performance speculative merge queue

https://github.com/uber/submitqueue/
40•handfuloflight•1w ago•12 comments

The Alpha 21264 CPU: NT's Greatest RISC (1998)

https://halfhill.com/byte/1998-12_alpha.html
44•Lammy•4h ago•24 comments

My server is a phone now

https://seg6.space/posts/phone-server/
420•seg6•16h ago•191 comments

Microsoft Word for Windows 1.1a, Native X64 Port

https://github.com/jmarshall23/msword
115•BruceEel•9h ago•53 comments

The Grid That Doubles the Strength of the Ground

https://practical.engineering/blog/2026/8/4/the-grid-that-doubles-the-strength-of-the-ground
78•michaefe•4d ago•14 comments

Os8088: A powerful Mac-like OS for the IBM XT, 286, 386

https://os8088.com/
213•jggonz•15h ago•133 comments

Switching to electric stoves can dramatically cut indoor air pollution

https://news.stanford.edu/stories/2025/12/gas-propane-stoves-nitrogen-dioxide-exposure-health-ris...
22•Doriell•3h ago•17 comments

Fastmail offers EU data region

https://www.fastmail.com/blog/fastmail-offers-eu-data-region/
466•groomlake•23h ago•270 comments

John C. Lilly on solid state intelligence and the elimination of man (1978)

https://kibotronics.net/unlisted/lilly-machines/
4•Kiboneu•1h ago•1 comments

Honey, I shrunk the embeddings: Matryoshka vs. PCA

https://dylancastillo.co/posts/matryoshka-vs-pca
8•dcastm•6d ago•1 comments

Improving Heuristics for A* Pathfinding

https://www.redblobgames.com/pathfinding/heuristics/differential.html
307•bobbiechen•1w ago•32 comments

Dithered QR Codes

https://www.andrewt.net/dithered-qr-codes/wtf/
293•jmusall•16h ago•30 comments

Shopify replaced Redis with MySQL for inventory reservations–and it scaled

https://shopify.engineering/scaling-inventory-reservations
278•adletbalzhanov•16h ago•180 comments

Protopia

https://kevinkelly.substack.com/p/protopia
38•surprisetalk•5d ago•31 comments

Reviving a four year old reMarkable 2

https://oskrim.github.io/hardware/2026/08/09/remarkable-over-ssh.html
68•tremguy•3h ago•53 comments

The original URL for this prediction will no longer be available in 11 years (2011)

http://longbets.org/601/
178•doubletwoyou•10h ago•83 comments

TheoremDB – A public workspace for machine mathematics

https://theoremdb.org/
66•frozenseven•13h ago•8 comments

Making difficulty curves in games

http://www.davetech.co.uk/difficultycurves
145•hakkikonu•4d ago•62 comments

Unexpected events and prosocial behavior: the Batman effect (2025)

https://www.nature.com/articles/s44184-025-00171-5
75•davidbarker•6d ago•24 comments

Stylized GGX Shading

https://alexandrelamure.github.io/graphics-posts/stylized-ggx-shading.html
43•ibobev•5d ago•0 comments

Open-source interactive map for the Aug 12 total solar eclipse

https://eclipsefan.org/?v=2&t=max&layers=eclipse%2Cbesselian%2Cumbra-live%2Cshadow-3d%2Ccloud-pro...
176•MarcoDewey•19h ago•55 comments

Should you stop cracking your knuckles?

https://www.bbc.com/future/article/20260807-should-i-stop-cracking-my-knuckles
87•tchalla•16h ago•92 comments

Show HN: Airy – Free, fast, and simple voice content creation

https://airy.so
14•login588•5h ago•8 comments

CSS: The bomb inside your inbox

https://portswigger.net/research/css-the-bomb-inside-your-inbox
57•ashurandi•4h ago•18 comments

70% of AI revenue comes from OpenAI and Anthropic

https://www.youtube.com/watch?v=68X8yEatepQ
24•johnbarron•3h ago•3 comments

The Dynamics of the Egg

https://www.the-hinternet.com/p/the-dynamics-of-the-egg
8•Caiero•4d ago•0 comments

Building a local positioning system to track runners using Ultra-Wideband

https://zeus.ugent.be/blog/25-26/12urenloop-uwb/
98•robinpdev•1w ago•8 comments