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•7mo ago

Comments

yxhuvud•7mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•7mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•7mo 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•7mo 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•7mo 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•7mo 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.

Gut bacteria from amphibians and reptiles achieve tumor elimination in mice

https://www.jaist.ac.jp/english/whatsnew/press/2025/12/17-1.html
194•Xunxi•5h ago•44 comments

Gemini 3 Flash: Frontier intelligence built for speed

https://blog.google/products/gemini/gemini-3-flash/
832•meetpateltech•11h ago•440 comments

OBS Studio Gets a New Renderer

https://obsproject.com/blog/obs-studio-gets-a-new-renderer
158•aizk•7h ago•31 comments

Coursera to combine with Udemy

https://investor.coursera.com/news/news-details/2025/Coursera-to-Combine-with-Udemy-to-Empower-th...
449•throwaway019254•15h ago•269 comments

I got hacked: My Hetzner server started mining Monero

https://blog.jakesaunders.dev/my-server-started-mining-monero-this-morning/
231•jakelsaunders94•7h ago•177 comments

Explaining the Widening Divides in US Midlife Mortality: Is There a Smoking Gun?

https://www.nber.org/papers/w34553
42•bikenaga•4h ago•39 comments

TikTok unlawfully tracks shopping habits and use of dating apps?

https://noyb.eu/en/tiktok-unlawfully-tracks-your-shopping-habits-and-your-use-dating-apps
125•doener•3h ago•58 comments

Working quickly is more important than it seems (2015)

https://jsomers.net/blog/speed-matters
74•bschne•2d ago•36 comments

AWS CEO says replacing junior devs with AI is 'one of the dumbest ideas'

https://www.finalroundai.com/blog/aws-ceo-ai-cannot-replace-junior-developers
810•birdculture•11h ago•441 comments

Ask HN: Those making $500/month on side projects in 2025 – Show and tell

54•cvbox•2h ago•5 comments

My payment agent is named George, not stripe-agent

https://blog.kestrelsnest.social/posts/2025-12-14-why-my-payment-agent-is-named-george-not-stripe...
44•fortyseven•3d ago•30 comments

Don MacKinnon: Why Simplicity Beats Cleverness in Software Design [audio]

https://maintainable.fm/episodes/don-mackinnon-why-simplicity-beats-cleverness-in-software-design
8•mooreds•2d ago•0 comments

A Safer Container Ecosystem with Docker: Free Docker Hardened Images

https://www.docker.com/blog/docker-hardened-images-for-every-developer/
289•anttiharju•11h ago•60 comments

Tell HN: HN was down

501•uyzstvqs•11h ago•287 comments

Show HN: High-Performance Wavelet Matrix for Python, Implemented in Rust

https://pypi.org/project/wavelet-matrix/
73•math-hiyoko•8h ago•0 comments

The Number That Turned Sideways

https://zuriby.github.io/math.github.io/the-number-that-turned-sideways.html
30•tzury•4d ago•11 comments

Developers can now submit apps to ChatGPT

https://openai.com/index/developers-can-now-submit-apps-to-chatgpt/
93•tananaev•5h ago•57 comments

Zmij: Faster floating point double-to-string conversion

https://vitaut.net/posts/2025/faster-dtoa/
103•fanf2•3d ago•10 comments

How SQLite is tested

https://sqlite.org/testing.html
249•whatisabcdefgh•10h ago•65 comments

Fast SEQUENCE iteration in Common Lisp

https://world-playground-deceit.net/blog/2025/12/fast-sequence-iteration-in-common-lisp.html
39•BoingBoomTschak•4d ago•7 comments

Inside PostHog: SSRF, ClickHouse SQL Escape and Default Postgres Creds to RCE

https://mdisec.com/inside-posthog-how-ssrf-a-clickhouse-sql-escaping-0day-and-default-postgresql-...
79•arwt•7h ago•22 comments

Launch HN: Kenobi (YC W22) – Personalize your website for every visitor

36•sarreph•11h ago•50 comments

Show HN: I built a fast RSS reader in Zig

https://github.com/superstarryeyes/hys
28•superstarryeyes•1d ago•10 comments

Cloudflare Radar 2025 Year in Review

https://radar.cloudflare.com/year-in-review/2025
63•ksec•6h ago•24 comments

The World of OCR (C. 1960) [video]

https://www.youtube.com/watch?v=SekWFCZVLUk
18•indolering•3d ago•1 comments

Flick (YC F25) Is Hiring Founding Engineer to Build Figma for AI Filmmaking

https://www.ycombinator.com/companies/flick/jobs/Tdu6FH6-founding-frontend-engineer
1•rayruiwang•11h ago

A look back: LANPAR, the first spreadsheet

https://technicallywewrite.com/2025/12/16/lanpar
16•rbanffy•6h ago•1 comments

Learning Fortran (2024)

https://uncenter.dev/posts/learning-fortran/
68•lioeters•14h ago•59 comments

Pornhub extorted after hackers steal Premium member activity data

https://www.bleepingcomputer.com/news/security/pornhub-extorted-after-hackers-steal-premium-membe...
122•coloneltcb•8h ago•59 comments

A16z-backed Doublespeed hacked, revealing what its AI-generated accounts promote

https://www.404media.co/hack-reveals-the-a16z-backed-phone-farm-flooding-tiktok-with-ai-influencers/
223•grahamlee•10h ago•123 comments