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.

Incident Report: May 19, 2026 – GCP Account Suspension

https://blog.railway.com/p/incident-report-may-19-2026-gcp-account-outage
105•0xedb•9h ago•35 comments

SBCL: the ultimate assembly code breadboard (2014)

https://pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/
63•yacin•2h ago•3 comments

Qwen3.7-Max: The Agent Frontier

https://qwen.ai/blog?id=qwen3.7
430•kevinsimper•7h ago•162 comments

Saying Goodbye to Asm.js

https://spidermonkey.dev/blog/2026/05/20/saying-goodbye-to-asmjs.html
199•eqrion•6h ago•91 comments

How fast is N tokens per second really?

https://mikeveerman.github.io/tokenspeed/
36•hexagr•2d ago•7 comments

Map of Metal

https://mapofmetal.com/
298•robin_reala•7h ago•101 comments

Apparently Google hates us now

https://twitter.com/pokemoncentral/status/2057123807404638250
175•zeitg3ist•1h ago•64 comments

Meta blocks human rights accounts from reaching audiences in Saudi Arabia, UAE

https://www.alqst.org/ar/posts/1190
715•giuliomagnifico•5h ago•306 comments

Google's AI is being manipulated. The search giant is quietly fighting back

https://www.bbc.com/future/article/20260519-google-tackles-attempts-to-hack-its-ai-results
149•tigerlily•7h ago•100 comments

Victory: Tennessee man jailed 37 days for Trump meme wins $835,000 settlement

https://www.fire.org/news/victory-tennessee-man-jailed-37-days-trump-meme-wins-835000-settlement-...
421•ceejayoz•3h ago•243 comments

Testing distributed systems with AI agents

https://github.com/shenli/distributed-system-testing
43•shenli3514•3h ago•4 comments

Everything in C is undefined behavior

https://blog.habets.se/2026/05/Everything-in-C-is-undefined-behavior.html
412•lycopodiopsida•11h ago•562 comments

Formal Verification Gates for AI Coding Loops

https://reubenbrooks.dev/blog/structural-backpressure-beats-smarter-agents/
42•pyrex41•2h ago•5 comments

Ask HN: Shouldn't Google need to give a public statement about Railway incident?

41•srameshc•1h ago•20 comments

Stable Audio 3

https://arxiv.org/abs/2605.17991
41•guardienaveugle•2h ago•6 comments

Show HN: Lance – image/video generation and understanding in one model

https://github.com/bytedance/Lance
18•cleardusk•2h ago•3 comments

Gemini 3.5 Flash

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-5/
920•spectraldrift•1d ago•626 comments

Show HN: Hocuspocus 4 – self-hosted Yjs collaboration backend

https://github.com/ueberdosis/hocuspocus
9•philipisik•3h ago•2 comments

When Fast Fourier Transform Meets Transformer for Image Restoration (2024)

https://github.com/deng-ai-lab/SFHformer
52•teleforce•2d ago•6 comments

FiveThirtyEight articles on the Internet Archive

https://fivethirtyeightindex.com/
339•ChocMontePy•16h ago•77 comments

After Town Bans Flock, Councilmember Crashes Out, Proposes Internet, Phone Ban

https://www.404media.co/after-town-bans-flock-councilmember-crashes-out-proposes-internet-and-pho...
55•cdrnsf•1h ago•39 comments

Autoregressive next token prediction and KV Cache in transformers

https://medium.com/advanced-deep-learning/autoregressive-next-token-prediction-kv-cache-in-transf...
29•coarchitect•2d ago•0 comments

Japan is gripped by mass allergies. A 1950s project is to blame

https://www.bbc.com/future/article/20260515-the-1950s-blunder-which-causes-mass-hay-fever-in-japan
291•ranit•16h ago•140 comments

Handling the great code forge fragmentation

https://www.alexselimov.com/posts/forge_fragmentation/
10•mooreds•3d ago•6 comments

Goodbye Visa and Mastercard: 130M Europeans switching to sovereign payment

https://www.lesnumeriques.com/banque-en-ligne/adieu-visa-et-mastercard-130-millions-d-europeens-b...
734•healsdata•4h ago•596 comments

Smartmedia Card Spec Opened, available free (2000)

https://www.edn.com/smartmedia-card-interface-spec-opened-available-for-free/#google_vignette
17•brudgers•2d ago•7 comments

I Don't Vibe Code

https://jacobharr.is/personal/i-dont-vibe-code
28•birdculture•1h ago•11 comments

Show HN: Forge – Guardrails take an 8B model from 53% to 99% on agentic tasks

https://github.com/antoinezambelli/forge
621•zambelli•1d ago•225 comments

Infomaniak transitions to a foundation model to protect user data privacy

https://news.infomaniak.com/en/infomaniak-foundation-sovereign-cloud/
146•darktoto•12h ago•40 comments

Google changes its search box

https://blog.google/products-and-platforms/products/search/search-io-2026/
649•berkeleyjunk•23h ago•885 comments