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

Comments

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

How NASA built Artemis II’s fault-tolerant computer

https://cacm.acm.org/news/how-nasa-built-artemis-iis-fault-tolerant-computer/
210•speckx•14h ago•75 comments

Apple's New iPhone Update Is Restricting Internet Freedom in the UK

https://bigbrotherwatch.org.uk/blog/apples-new-iphone-update-is-restricting-internet-freedom-in-t...
132•josephcsible•4h ago•50 comments

Native Instant Space Switching on macOS

https://arhan.sh/blog/native-instant-space-switching-on-macos/
404•PaulHoule•9h ago•191 comments

The Raft Consensus Algorithm Explained Through "Mean Girls"

https://www.cockroachlabs.com/blog/raft-is-so-fetch/
33•vermilingua•2h ago•3 comments

Generative art over the years

https://blog.veitheller.de/Generative_art_over_the_years.html
74•evakhoury•2d ago•20 comments

Hip-hop pioneer, Afrika Bambaataa, dies aged 68

https://www.bbc.co.uk/news/articles/c2evppm30p7o
50•mellosouls•1h ago•8 comments

Principles of Mechanical Sympathy

https://martinfowler.com/articles/mechanical-sympathy-principles.html
21•zdw•2d ago•0 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/Ktc6m6o-ai-agent-engineer
1•OBrien_1107•53m ago

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
177•rickcarlino•9h ago•33 comments

RAM Has a Design Flaw from 1966. I Bypassed It [video]

https://www.youtube.com/watch?v=KKbgulTp3FE
114•surprisetalk•2d ago•16 comments

PicoZ80 – Drop-In Z80 Replacement

https://eaw.app/picoz80/
169•rickcarlino•10h ago•30 comments

Reverse engineering Gemini's SynthID detection

https://github.com/aloshdenny/reverse-SynthID
127•_tk_•9h ago•47 comments

Unfolder for Mac – A 3D model unfolding tool for creating papercraft

https://www.unfolder.app/
179•codazoda•12h ago•36 comments

Research-Driven Agents: When an agent reads before it codes

https://blog.skypilot.co/research-driven-agents/
159•hopechong•12h ago•48 comments

Old laptops in a colo as low cost servers

https://colaptop.pages.dev/
201•argentum47•11h ago•113 comments

Moving from WordPress to Jekyll (and static site generators in general)

https://www.demandsphere.com/blog/rebuilding-demandsphere-with-jekyll-and-claude-code/
63•rgrieselhuber•8h ago•33 comments

Hegel, a universal property-based testing protocol and family of PBT libraries

https://hegel.dev
95•PaulHoule•10h ago•30 comments

An AI robot in my home

https://allevato.me/2026/04/07/an-ai-robot-in-my-home
25•kukanani•2d ago•9 comments

Many African families spend fortunes burying their dead

https://davidoks.blog/p/how-funerals-keep-africa-poor
175•powera•7h ago•156 comments

LLM plays an 8-bit Commander X16 game using structured "smart senses"

https://pvp-ai.russell-harper.com
15•russellharper•1d ago•0 comments

Show HN: I built a Cargo-like build tool for C/C++

https://github.com/randerson112/craft
135•randerson_112•13h ago•119 comments

A WebGPU implementation of Augmented Vertex Block Descent

https://github.com/jure/webphysics
135•juretriglav•17h ago•16 comments

Show HN: Druids – Build your own software factory

https://github.com/fulcrumresearch/druids
43•etherio•1d ago•7 comments

Kagi Product Tips – Customize Your Search Results with URL Redirects

https://blog.kagi.com/tips/redirects
31•treetalker•8h ago•1 comments

Microsoft is employing dark patterns to goad users into paying for storage?

https://lzon.ca/posts/other/microsoft-user-abuse/
289•jpmitchell•8h ago•156 comments

LittleSnitch for Linux

https://obdev.at/products/littlesnitch-linux/index.html
1291•pluc•1d ago•417 comments

Show HN: Rust based eBook library for Python, with MIT license

https://github.com/arc53/fast-ebook
14•larry-the-agent•7h ago•0 comments

EFF is leaving X

https://www.eff.org/deeplinks/2026/04/eff-leaving-x
1248•gregsadetsky•12h ago•1057 comments

Launch HN: Relvy (YC F24) – On-call runbooks, automated

https://www.relvy.ai
43•behat•17h ago•23 comments

Microsoft PhotoDNA scanning problem

https://www.elevenforum.com/t/microsoft-photodna-scanning-problem-it-is-comical-now.45961/
93•darkzek•4h ago•37 comments