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.

Actively exploited sandbox RCE in all Chromium versions

https://nvd.nist.gov/vuln/detail/cve-2026-85046
248•negura•4h ago•140 comments

Formalizing Fermat's Last Theorem

https://www.anthropic.com/research/formalizing-fermats-last-theorem
500•jlebar•7h ago•319 comments

Discovery of a new OpenAI agent message board

https://collusion.wiki/
1492•moultano•14h ago•1191 comments

Artificial Analysis Intelligence Index v4.2

https://artificialanalysis.ai/articles/artificial-analysis-intelligence-index-v4-2
49•nojs•2h ago•15 comments

Statichost.eu – European static site hosting

https://www.statichost.eu/
175•p4bl0•5h ago•55 comments

GPT-6 Astra on OpenRouter

https://openrouter.ai/openai/gpt-6-astra
126•Topfi•4h ago•66 comments

Shutting down our public encrypted DNS

https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-i...
255•mywacaday•7h ago•101 comments

Can AI design circuit boards yet?

https://eebench.org/blog/can-ai-design-circuit-boards-yet/
169•iopapa•6h ago•109 comments

Portal by Spotify cut my Claude Code token usage by 90%

https://engineering.atspotify.com/2026/9/portal-by-spotify-cut-my-claude-code-token-usage-by-90
40•cebert•2h ago•10 comments

Reversing MikroTik's Silent Patch: The RouterOS 7.23.4 Fix They Wouldn't Explain

https://npratley.net/reversing-mikrotiks-silent-patch-the-routeros-7-23-4-fix-they-wouldnt-explain/
18•ytch•2h ago•4 comments

Can guitar frets perform multiplication?

https://www.charlespetzold.com/blog/2026/09/Can-Guitar-Frets-Perform-Multiplication.html
31•wibbily•3h ago•7 comments

RSA-260 Factorized

https://twitter.com/penlume/status/2095372672356212876
64•samyok•1d ago•26 comments

Show HN: Open-Source eInk Bike Computer

https://opentrailpaper.com
237•stingrae•8h ago•80 comments

An open DNS recursive service for free security and high privacy

https://quad9.net/
64•mooreds•6h ago•14 comments

Government Rails Site Hit Hours After CVE Patch

https://rietta.com/blog/ruby-on-rails-cve-exploited-hours-after-patch/
75•rietta•7h ago•21 comments

Fermat's Last Theorem in Lean 4

https://github.com/anthropics/fermats-last-theorem
67•aaraujo002•7h ago•15 comments

Record-High 89% in U.S. Say Government Corruption Widespread

https://news.gallup.com/poll/713933/record-high-say-government-corruption-widespread.aspx
200•karakoram•4h ago•136 comments

Show HN: Moadim.io – A scheduler for agents

https://moadim.io/
11•tupe12334•2h ago•5 comments

When declaring an incident becomes everyone's favorite workaround

https://greatcircle.com/blog/2026/08/11/declaring-incidents-for-side-effects/
10•bobbiechen•4d ago•1 comments

The Rust React Compiler is now native in Vite

https://blog.master.dev/react-now-rusted-all-the-way-out/
115•acusti•8h ago•22 comments

IBM Bob

https://bob.ibm.com/
228•artpar•13h ago•261 comments

ExactTex. A gradually-typed superset of LaTeX

https://github.com/camilochs/exacttex
14•camilochs•3d ago•1 comments

Decompiler Explorer

https://dogbolt.org
36•tripdout•3d ago•1 comments

Icons as a Service

https://nravic.com/blog/images/
21•nravic•4h ago•0 comments

Updates on HEIR, the Homomorphic Encryption Compiler Project

https://www.jeremykun.com/2026/09/04/updates-on-heir-homomorphic-encryption/
24•turtleyacht•4h ago•0 comments

Connecting every app to every other app

https://blog.val.town/connectors
10•Chidiebere229•3h ago•0 comments

deSEC – Free Secure DNS

https://desec.io/
112•gurjeet•10h ago•41 comments

How to Create a Tor Exit Node (2015)

https://madpsy.uk/how-to-create-a-tor-exit-node/
43•Eridanus2•5h ago•18 comments

Adult Film Producer Unmasks Prolific 'John DOE' Torrent Pirate as Meta Executive

https://torrentfreak.com/adult-film-producer-unmasks-prolific-john-doe-torrent-pirate-as-meta-exe...
354•speckx•9h ago•211 comments

“Next-token predictor” is the wrong mental model for LLMs

https://gmcgoldr.github.io/2026/09/04/llm-next-token-predictors.html
86•garrinm•9h ago•179 comments