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.

China's open-weights AI strategy is winning

https://werd.io/american-ai-is-locked-down-and-proprietary-its-losing/
538•benwerd•5h ago•454 comments

Hacker wipes Romania's land registry database

https://news.risky.biz/risky-bulletin-hacker-wipes-romanias-entire-land-registry-database/
447•speckx•5h ago•240 comments

Kimi Work

https://www.kimi.com/products/kimi-work
92•ms7892•2h ago•45 comments

Hyprland 0.55 announced the switch to Lua for its config files

https://hypr.land/news/update55/
65•matesz•1h ago•43 comments

Jelly UI: Soft-body physics for native HTML form controls

https://jelly-ui.com/
105•baldvinmar•2h ago•38 comments

How we measured AI writing across arXiv, and where the measurement breaks

https://unslop.run/blog/measuring-ai-writing-on-arxiv
143•dopamine_daddy•2h ago•101 comments

Corners Don't Look Like That: Regarding Screenspace Ambient Occlusion (2012)

https://nothings.org/gamedev/ssao/
115•firephox•4h ago•43 comments

Airport Simulator

https://airport.apunen.com/
508•apunen•8h ago•110 comments

Nativ: Run frontier open models locally on your Mac

https://blaizzy.github.io/nativ/
23•aratahikaru5•1h ago•5 comments

Firefox Merges Support for Vulkan Video Decoding

https://github.com/search
180•DemiGuru•5h ago•41 comments

Perfection Is Not Over-Engineering

https://var0.xyz/posts/perfection-is-not-over-engineering.html
132•var0xyz•5h ago•59 comments

Launch HN: Bloomy (YC S26) – AI-powered mastery learning for K-12

27•alexsouthmayd•2h ago•59 comments

An Empirical Study: AI Agent Rules Need Context and Layered Enforcement

https://eunomia.dev/blog/2026/07/15/ebpf-ai-agent-policy-enforcement/
13•matt_d•1h ago•1 comments

We're Squandering LEDs' Potential to Save Our Night Skies

https://spectrum.ieee.org/led-light-pollution
163•defrost•6h ago•114 comments

Cross sectioning insects in an electron microscope with a femtosecond laser [video]

https://www.youtube.com/watch?v=NwhVJ7cv9B4
35•surprisetalk•3h ago•2 comments

Ziggity – A terminal UI for Git, written in Zig

https://github.com/simoarpe/ziggity
39•TheSorcerer•3h ago•25 comments

The Voice of Google

https://www.newyorker.com/culture/the-weekend-essay/the-voice-of-google
86•littlexsparkee•4h ago•36 comments

Shinjuku Station in 3D

https://satoshi7190.github.io/Shinjuku-indoor-threejs-demo/
83•Gecko4072•5h ago•16 comments

Exploit brokers pay $500k for WordPress RCEs. I found one with GPT5.6 and $25

https://slcyber.io/research-center/exploit-brokers-pay-500000-for-a-wordpress-rce-i-found-one-wit...
345•infosecau•11h ago•196 comments

The drivers behind software delivery inefficiency

https://dl.acm.org/doi/10.1145/3800646.3800650
13•qaprof•1h ago•2 comments

That post never existed. Stop listening to that thing

https://rachelbythebay.com/w/2026/05/05/404/
70•wglb•1h ago•50 comments

What I Learned from Reimplementing 40 Multi-Agent LLM Papers

https://medium.com/@Koukyosyumei/what-i-learned-from-reimplementing-40-multi-agent-llm-papers-bd6...
12•syumei•4d ago•3 comments

The EU is about to sell our most sensitive data to the US for visa-free travel

https://edri.org/our-work/the-eu-is-about-to-sell-our-most-sensitive-data-to-the-us-for-visa-free...
416•rapnie•7h ago•232 comments

I Stopped "Creating Content"

https://refactoringenglish.com/blog/why-i-stopped-creating-content/
89•mtlynch•3h ago•67 comments

Controlling Reasoning Effort in LLMs

https://magazine.sebastianraschka.com/p/controlling-reasoning-effort-in-llms
40•ibobev•4h ago•2 comments

Safety and alignment in an era of long-horizon models

https://openai.com/index/safety-alignment-long-horizon-models/
5•Wingy•44m ago•0 comments

Kimi K3, Qwen 3.8, and Anthropic's (Potential) Unravelling

https://www.emergingtrajectories.com/lh/frontier-lab-economics/
190•cl42•4h ago•193 comments

Agent swarms and the new model economics

https://cursor.com/blog/agent-swarm-model-economics
10•jlaneve•1h ago•2 comments

Inertia-1: An Open Exploration to a Unified Motion Foundation Model

https://yang-ai-lab.github.io/Inertia-1/
42•hasheddan•6h ago•1 comments

NYC Subway Signals: A Complete Guide

https://www.nycsubway.org/wiki/Subway_Signals%3A_A_Complete_Guide
31•at1as•4h ago•7 comments