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.

UniFi 5G

https://blog.ui.com/article/introducing-unifi-5g
20•janandonly•1h ago•7 comments

Netflix’s AV1 Journey: From Android to TVs and Beyond

https://netflixtechblog.com/av1-now-powering-30-of-netflix-streaming-02f592242d80
343•CharlesW•8h ago•155 comments

BMW PHEV: Safety fuse replacement is extremely expensive

https://evclinic.eu/2025/12/04/2021-phev-bmw-ibmucp-21f37e-post-crash-recovery-when-eu-engineerin...
213•mikelabatt•7h ago•157 comments

I have been writing a niche history blog for 15 years

https://resobscura.substack.com/p/why-i-have-been-writing-a-niche-history
77•benbreen•13h ago•13 comments

Show HN: Tacopy – Tail Call Optimization for Python

https://github.com/raaidrt/tacopy
22•raaid-rt•5d ago•1 comments

Trick users and bypass warnings – Modern SVG Clickjacking attacks

https://lyra.horse/blog/2025/12/svg-clickjacking/
150•spartanatreyu•8h ago•26 comments

After 40 years of adventure games, Ron Gilbert pivots to outrunning Death

https://arstechnica.com/gaming/2025/12/after-40-years-of-adventure-games-ron-gilbert-pivots-to-ou...
54•mikhael•3d ago•17 comments

Rats Snatching Bats Out of the Air and Eating Them–Researchers Got It on Video

https://www.smithsonianmag.com/smart-news/rats-are-snatching-bats-out-of-the-air-and-eating-them-...
34•bookofjoe•3h ago•5 comments

NeurIPS 2025 Best Paper Awards

https://blog.neurips.cc/2025/11/26/announcing-the-neurips-2025-best-paper-awards/
83•ivansavz•6h ago•13 comments

Transparent leadership beats servant leadership

https://entropicthoughts.com/transparent-leadership-beats-servant-leadership
417•ibobev•18h ago•196 comments

At IT School with Apple Lisa

https://blisscast.wordpress.com/2024/06/04/apple-lisa-gui-wonderland-3/
8•fabiojava•1w ago•0 comments

CUDA-l2: Surpassing cuBLAS performance for matrix multiplication through RL

https://github.com/deepreinforce-ai/CUDA-L2
101•dzign•11h ago•11 comments

Multivox: Volumetric Display

https://github.com/AncientJames/multivox
263•jk_tech•15h ago•36 comments

How elites could shape mass preferences as AI reduces persuasion costs

https://arxiv.org/abs/2512.04047
550•50kIters•23h ago•526 comments

StardustOS: Library operating system for building light-weight Unikernels

https://github.com/StardustOS
61•transpute•9h ago•4 comments

Warner Bros Begins Exclusive Deal Talks With Netflix

https://www.bloomberg.com/news/articles/2025-12-05/warner-bros-is-said-to-begin-exclusive-deal-ta...
28•mfiguiere•4h ago•72 comments

CSS now has an if() conditional function

https://caniuse.com/?search=if
103•aanthonymax•5d ago•45 comments

The Ofcom Files, Part 4: Ofcom Rides Again

https://prestonbyrne.com/2025/12/04/the-ofcom-files-part-4-ofcom-rides-again/
67•parliament32•7h ago•21 comments

Fast trigram based code search

https://github.com/sourcegraph/zoekt
21•cv_h•4h ago•1 comments

State Department to deny visas to fact checkers and others, citing 'censorship'

https://www.npr.org/2025/12/04/nx-s1-5633444/trump-content-moderation-visas-censorship
97•seattle_spring•3h ago•40 comments

Why are 38 percent of Stanford students saying they're disabled?

https://reason.com/2025/12/04/why-are-38-percent-of-stanford-students-saying-theyre-disabled/
606•delichon•14h ago•828 comments

State of AI: An Empirical 100T Token Study with OpenRouter

https://openrouter.ai/state-of-ai
172•anjneymidha•9h ago•75 comments

What's the deal with Euler's identity?

https://lcamtuf.substack.com/p/whats-the-deal-with-eulers-identity
15•surprisetalk•5d ago•10 comments

Thoughts on Go vs. Rust vs. Zig

https://sinclairtarget.com/blog/2025/08/thoughts-on-go-vs.-rust-vs.-zig/
318•yurivish•10h ago•375 comments

Fighting the age-gated internet

https://www.wired.com/story/age-verification-is-sweeping-the-us-activists-are-fighting-back/
208•geox•18h ago•183 comments

I ignore the spotlight as a staff engineer

https://lalitm.com/software-engineering-outside-the-spotlight/
467•todsacerdoti•20h ago•216 comments

Blogging in 2025: Screaming into the Void

https://askmike.org/articles/blogging-in-2025-screaming-into-the-void/
42•askmike•5h ago•24 comments

Show HN: Onlyrecipe 2.0 – I added all features HN requested – 4 years later

https://onlyrecipeapp.com/?url=https://www.allrecipes.com/turkish-pasta-recipe-8754903
155•AwkwardPanda•17h ago•127 comments

What is better: a lookup table or an enum type?

https://www.cybertec-postgresql.com/en/lookup-table-or-enum-type/
31•todsacerdoti•8h ago•12 comments

Django 6

https://docs.djangoproject.com/en/6.0/releases/6.0/
312•wilhelmklopp•11h ago•145 comments