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.

Hitachi launches CO2 heat pump water heaters with solar-friendly tariff controls

https://www.pv-magazine.com/2026/09/07/hitachi-launches-co2-heat-pump-water-heaters-with-solar-fr...
129•thelastgallon•23h ago•94 comments

Show HN: The same nine streaming subscriptions cost $702/year more than in 2021

https://honestlyranked.com/guides/streaming-price-increases/
303•honestlyranked•4h ago•262 comments

Shopify moves back to Native from React Native

https://shopify.engineering/back-to-native
13•fnthawar2•14m ago•1 comments

Rust Is Tier-1 Language at Microsoft

https://rustfoundation.org/media/guest-post-rust-is-tier-1-language-at-microsoft/
27•mmastrac•45m ago•7 comments

Tell HN: OpenAI keeps re-enabling the 'allow training' setting

88•jacquesm•44m ago•27 comments

What algorithm did Windows XP use to choose your initial user picture?

https://devblogs.microsoft.com/oldnewthing/20260909-00/?p=112683
202•soheilpro•5h ago•103 comments

List of references on Sony websites to players "owning" their digital games

https://consumerrights.wiki/w/Sony_PlayStation_digital_game_ownership_lawsuit
105•haunter•2h ago•21 comments

Show HN: I couldn't afford interview prep, so I built a free alternative

https://learningto.co/
6•cdnsteve•14m ago•2 comments

Amazon pilots ad services in ChatGPT

https://www.marketingdive.com/news/amazon-pilots-ad-services-in-chatgpt-what-marketers-need-to-kn...
6•thm•11m ago•0 comments

Who People Talk to When They're Struggling

https://www.graphsaboutreligion.com/p/who-do-you-talk-to-when-youre-struggling
25•toomuchtodo•1h ago•13 comments

iPhone Duo

https://www.apple.com/iphone-duo/
1296•thecosmicfrog•20h ago•2253 comments

Stockfish 19

https://stockfishchess.org/blog/2026/stockfish-19/
150•atiedebee•2d ago•100 comments

DeepSeek v4.1 Flash

https://twitter.com/deepseek_ai/status/2097930608790167907
648•Liwink•8h ago•348 comments

Bending Spoons buying Miro for $1.355B

https://investors.bendingspoons.com/newsroom/bending-spoons-agrees-to-acquire-miro
14•andygcook•24m ago•3 comments

To write non-fiction, draw the trunk, then the rest of the tree

https://devz.cl/posts/how-to-write/
17•DanielVZ•1d ago•1 comments

Another researcher says OpenAI trained on conversations, then claimed breakthrou

https://bsky.app/profile/did:plc:ckaz32jwl6t2cno6fmuw2nhn/post/3mv4mt4ikss2d
127•ColinWright•1h ago•50 comments

Show HN: What if the speed of light was 5 km/h?

https://rivendell.dmitrybrant.com/relativity/
476•dmitrybrant•12h ago•201 comments

Liesegang Rings

https://chillphysicsenjoyer.substack.com/p/liesegang-rings
14•surprisetalk•1d ago•1 comments

Shopify acquires Tailwind

https://tailwindcss.com/blog/tailwind-is-joining-shopify
1094•EdwinHoksberg•1d ago•422 comments

Discrete Dipole Approximation Code Ddscat 7.2 (2012)

https://arxiv.org/abs/1202.3424
4•doener•4d ago•0 comments

What do Visa and Mastercard do? An intro to card networks

https://tautology.town/2026/06/01/card-networks.html
597•evakhoury•1d ago•363 comments

Object storage is all you need

https://www.tigrisdata.com/blog/object-storage-all-need/
44•jpsaccount•1d ago•27 comments

Thanks to Siri Recaps, your Apple Watch is always listening

https://www.techradar.com/health-fitness/smartwatches/thanks-to-siri-recaps-your-apple-watch-is-a...
106•geox•3h ago•70 comments

Larger Pacific Striped Octopus

https://en.wikipedia.org/wiki/Larger_Pacific_striped_octopus
102•olalonde•1d ago•50 comments

Growing proof that autonomous cars save lives

https://spectrum.ieee.org/are-self-driving-cars-safe
396•bookofjoe•21h ago•687 comments

Show HN: Art – draw one stroke, let symmetry complete it

https://mrdee.in/mandala/
38•cyb0rg0•4d ago•19 comments

No Man's Sky Cosmos

https://www.nomanssky.com/cosmos-update/
422•Limb•22h ago•425 comments

GPT-6 Astra, looped transformers, and hidden reasoning

https://magazine.sebastianraschka.com/p/gpt-6-astra-looped-transformers-and
475•ModelForge•23h ago•155 comments

Samsung Debuts zHBM Prototype, Stacking Memory Directly on AI Accelerators

https://www.thelec.net/news/articleView.html?idxno=12835
42•peter_d_sherman•3d ago•8 comments

AirPods 5

https://www.apple.com/newsroom/2026/09/apple-introduces-airpods-5-with-best-in-class-open-ear-act...
491•awad•20h ago•418 comments