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

Magnifica Humanitas

https://www.vatican.va/content/leo-xiv/en/encyclicals/documents/20260515-magnifica-humanitas.html
691•theletterf•7h ago•296 comments

C extensions, portability, and alternative compilers

https://lemon.rip/w/6-c-extensions-compilers/
66•xngbuilds•2h ago•15 comments

Launch HN: Chert (YC P26) – Twilio for iMessage

https://www.trychert.com
19•garygao•2h ago•61 comments

Uber’s COO says it’s getting harder to justify money spent on tokenmaxxing

https://www.businessinsider.com/uber-coo-andrew-macdonald-ai-token-spending-harder-justify-2026-5
38•_____k•29m ago•21 comments

Netherlands Seizes 800 Servers, Arrests 2 for Aiding Cyberattacks

https://krebsonsecurity.com/2026/05/netherlands-seizes-800-servers-arrests-2-for-aiding-cyberatta...
140•jruohonen•3h ago•24 comments

RentFlow (YC S24) Is Hiring

https://www.ycombinator.com/companies/rentflow/jobs/V2yneIE-senior-ai-ml-lead
1•AMaurin•14m ago

IBM Spins Off the First Pure-Play Quantum Chip Foundry

https://futurumgroup.com/insights/2-billion-chips-act-investment-in-quantum-bets-on-ibms-300mm-su...
85•rbanffy•7h ago•26 comments

Leave Me Behind

http://androidessence.com/leave-me-behind/
255•mooreds•5h ago•181 comments

Microsoft pulls plug on plans for 244-acre data center in Caledonia (2025)

https://www.tmj4.com/news/racine-county/microsoft-pulls-plug-on-plans-for-244-acre-data-center-in...
91•cdrnsf•4h ago•66 comments

Didgeridoo playing as alternative treatment for obstructive sleep apnoea (2006)

https://pmc.ncbi.nlm.nih.gov/articles/PMC1360393/
249•kelseyfrog•2d ago•117 comments

Gnutella: A Protocol Outliving the World That Created It

https://rickcarlino.com/notes/p2p/gnutella-explanation.html
82•rickcarlino•3d ago•23 comments

I manage teams without a single call

https://orchidfiles.com/build-without-calls/
27•theorchid•5h ago•18 comments

Show HN: Audiomass – a free, open-source multitrack audio editor for the web

https://audiomass.co/?multitrack=1
454•pantelisk•1d ago•103 comments

He Lost It at the Movies

https://www.theideasletter.org/essay/he-lost-it-at-the-movies/
9•tintinnabula•4d ago•0 comments

The physicists who convinced Fermilab to send Brazil's emails

https://buttondown.com/blog/brazil-fermilab-email
31•maguay•4d ago•12 comments

DeepSeek reasonix, DeepSeek native coding agent with high caching and low cost

https://esengine.github.io/DeepSeek-Reasonix/
642•Alifatisk•1d ago•265 comments

2026 HIPAA Security Rule Update

https://medcurity.com/hipaa-security-rule-2026-update/
62•mooreds•3h ago•50 comments

Show HN: Geomatic – a command-driven geometry studio enabled with autodiff

https://www.tinyvolt.com/geomatic
52•nivter•8h ago•13 comments

Migrating from Go to Rust

https://corrode.dev/learn/migration-guides/go-to-rust/
395•jabits•22h ago•389 comments

Bytecode VMs in surprising places (2024)

https://dubroy.com/blog/bytecode-vms-in-surprising-places/
95•azhenley•3d ago•31 comments

The Cost of Safetyism

https://stevemagness.substack.com/p/the-cost-of-safetyism
45•obscurette•2h ago•31 comments

AI errno(2) values

https://www.netmeister.org/blog/ai-errno.html
77•zdw•3d ago•14 comments

White Rabbit – sub-nanosecond synchronization for large distributed systems

https://ohwr.org/projects/white-rabbit/
157•michaelsbradley•2d ago•35 comments

Notes about reading messages with the Python email packages

https://utcc.utoronto.ca/~cks/space/blog/python/EmailPackagesNotes
41•ankitg12•5d ago•1 comments

I spent 50 hours drawing a line graph

https://www.dougmacdowell.com/50-hours-to-draw-some-lines.html
616•dougdude3339•4d ago•98 comments

A fundamental principle of aeronautical engineering has been overturned

https://www.wired.com/story/a-fundamental-principle-of-aeronautical-engineering-has-been-overturned/
209•littlexsparkee•22h ago•107 comments

Bug 1950764: Work Around Crash on Intel Raptor Lake CPU

https://phabricator.services.mozilla.com/D301917
145•luu•2d ago•47 comments

Jira Is Turing-Complete

https://seriot.ch/computation/jira.html
265•vinhnx•13h ago•120 comments

Microsoft open-sources “the earliest DOS source code discovered to date”

https://arstechnica.com/gadgets/2026/04/microsoft-open-sources-the-earliest-dos-source-code-disco...
499•DamnInteresting•1d ago•183 comments

Search engines alternatives now that Google isn't Google anymore

https://techcrunch.com/2026/05/21/six-search-engines-worth-trying-now-that-google-isnt-really-goo...
463•elorant•4h ago•432 comments