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.

Qwen3.6-Max-Preview: Smarter, Sharper, Still Evolving

https://qwen.ai/blog?id=qwen3.6-max-preview
198•mfiguiere•2h ago•113 comments

Deezer says 44% of songs uploaded to its platform daily are AI-generated

https://techcrunch.com/2026/04/20/deezer-says-44-of-songs-uploaded-to-its-platform-daily-are-ai-g...
51•FiddlerClamp•1h ago•30 comments

Atlassian Enables Default Data Collection to Train AI

https://letsdatascience.com/news/atlassian-enables-default-data-collection-to-train-ai-f71343d8
258•kevcampb•4h ago•64 comments

GitHub's Fake Star Economy

https://awesomeagents.ai/news/github-fake-stars-investigation/
481•Liriel•8h ago•265 comments

ggsql: A Grammar of Graphics for SQL

https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/
169•thomasp85•3h ago•42 comments

All phones sold in the EU to have replaceable batteries from 2027

https://www.theolivepress.es/spain-news/2026/04/20/eu-to-force-replaceable-batteries-in-phones-an...
499•ramonga•3h ago•335 comments

10 years ago, someone wrote a test for servo that included an expiry in 2026

https://mastodon.social/@jdm_/116429380667467307
91•luu•21h ago•57 comments

M 7.4 earthquake – 100 km ENE of Miyako, Japan

https://earthquake.usgs.gov/earthquakes/eventpage/us6000sri7/
179•Someone•6h ago•75 comments

Sauna effect on heart rate

https://tryterra.co/research/sauna-effect-on-heart-rate
228•kyriakosel•3h ago•132 comments

WebUSB Extension for Firefox

https://github.com/ArcaneNibble/awawausb
93•tuananh•4h ago•69 comments

Chernobyl's last wedding: The couple who married as a nuclear disaster unfolded

https://www.bbc.com/news/articles/c0q92lx8q75o
13•1659447091•1d ago•1 comments

Kimi K2.6: Advancing Open-Source Coding

https://www.kimi.com/blog/kimi-k2-6
132•meetpateltech•1h ago•44 comments

Palantir Wants to Reinstate the Draft

https://reason.com/2026/04/20/this-big-tech-firm-wants-to-reinstate-the-draft/
39•tcp_handshaker•25m ago•11 comments

OpenClaw isn't fooling me. I remember MS-DOS

https://www.flyingpenguin.com/build-an-openclaw-free-secure-always-on-local-ai-agent/
183•feigewalnuss•8h ago•221 comments

I prompted ChatGPT, Claude, Perplexity, and Gemini and watched my Nginx logs

https://surfacedby.com/blog/nginx-logs-ai-traffic-vs-referral-traffic
71•startages•1h ago•12 comments

Ask HN: How to solve the cold start problem for a two-sided marketplace?

77•alegd•3h ago•78 comments

I'm never buying another Kindle, and neither should you

https://www.androidauthority.com/amazon-kindle-2026-3657863/
44•mikhael•1h ago•26 comments

Focused microwaves allow 3D printers to fuse circuits onto almost anything

https://newatlas.com/electronics/meta-nfc-focused-microwaves-circuits/
108•breve•2d ago•19 comments

NSA is using Anthropic's Mythos despite blacklist

https://www.axios.com/2026/04/19/nsa-anthropic-mythos-pentagon
334•Palmik•6h ago•250 comments

Up to 8M Bees Are Living in an Underground Network Beneath This Cemetery

https://www.discovermagazine.com/up-to-8-million-bees-are-living-in-an-underground-network-beneat...
139•janandonly•2d ago•22 comments

What if database branching was easy?

https://xata.io/blog/what-if-database-branching-was-easy
51•tee-es-gee•2d ago•30 comments

IPC medley: message-queue peeking, io_uring, and bus1

https://lwn.net/Articles/1065490/
22•signa11•3d ago•0 comments

SDF Public Access Unix System

https://sdf.org/?ssh
149•neehao•1d ago•72 comments

I Made the "Next-Level" Camera and I love it

https://thelibre.news/i-made-the-next-level-camera-and-i-love-it/
175•ndr•3d ago•60 comments

Show HN: Alien – Self-hosting with remote management (written in Rust)

12•alongub•1h ago•0 comments

Claude Token Counter, now with model comparisons

https://simonwillison.net/2026/Apr/20/claude-token-counts/
180•twapi•15h ago•72 comments

Zero-copy protobuf and ConnectRPC for Rust

https://medium.com/@iainmcgin/zero-copy-protobuf-and-connectrpc-for-rust-69bda8ac0f02
113•PaulHoule•3d ago•31 comments

NASA Artemis Posters

https://www.nasa.gov/gallery/artemis/
77•bookofjoe•4h ago•9 comments

Kimi K2.6: Advancing Open-Source Coding

https://twitter.com/Kimi_Moonshot/status/2046249571882500354
32•nekofneko•1h ago•1 comments

Epicycles All the Way Down (2025)

https://www.strangeloopcanon.com/p/epicycles-all-the-way-down
27•surprisetalk•4d ago•13 comments