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.

LLMs are eroding my software engineering career and I don't know what to do

https://human-in-the-loop.bearblog.dev/llms-are-eroding-my-software-engineering-career-and-i-dont...
70•poisonfountain•25m ago•28 comments

The 29th International Obfuscated C Code Contest (IOCCC) 2025 Winners

https://www.ioccc.org/2025/
244•matt_d•7h ago•57 comments

Win16 Memory Management

http://www.os2museum.com/wp/win16-memory-management/
67•supermatou•2d ago•33 comments

Yon – a topos-oriented language with a content-addressed lattice heap

https://yon-lang.org/
10•amenn•2d ago•0 comments

Speculative KV coding: losslessly compressing KV cache by up to ~4×

https://fergusfinn.com/blog/kv-entropy-coder/
79•kkm•2d ago•12 comments

The Secret Life of Circuits with lcamtuf / Michał Zalewski (Audio Interview)

https://theamphour.com/725-the-secret-life-of-circuits-with-lcamtuf-michal-zalewski/
21•ChrisGammell•2d ago•2 comments

Valve P2P networking broken for more than 2 months

https://github.com/ValveSoftware/GameNetworkingSockets/issues/398
209•babuskov•9h ago•94 comments

9 Mothers (YC P26) Is Hiring

https://9mothers.com/careers
1•ukd1•1h ago

My Software North Star

https://kristoff.it/blog/north-star/
123•kristoff_it•3d ago•67 comments

Scientists ejected from diabetes conference for distributing journal reprints

https://arstechnica.com/science/2026/06/scientists-ejected-from-diabetes-conference-for-distribut...
176•BerislavLopac•3h ago•94 comments

Field of clones: How horse replicas came to dominate polo

https://knowablemagazine.org/content/article/technology/2026/cloned-polo-horses
111•gscott•10h ago•50 comments

Show HN: Kyushu – A self-hostable WASM sandbox for JavaScript workers

https://kyushu.dev/
6•le_chuck•5h ago•8 comments

Public Domain Image Archive

https://pdimagearchive.org/
156•davidbarker•12h ago•23 comments

Ntsc-rs – open-source video emulation of analog TV and VHS artifacts

https://ntsc.rs/
364•gregsadetsky•17h ago•105 comments

Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering

https://arxiv.org/abs/2601.14470
122•Anon84•11h ago•55 comments

Symbolica 2.0: Programmable Symbols for Python and Rust

https://symbolica.io/posts/symbolica_2_0_release/
102•mmastrac•1d ago•9 comments

Harness engineering: Leveraging Codex in an agent-first world

https://openai.com/index/harness-engineering/
234•pramodbiligiri•1d ago•152 comments

How Liminalism Became the Defining Aesthetic of Our Time

https://hyperallergic.com/how-liminalism-became-the-defining-aesthetic-of-our-time/
97•zeech•11h ago•51 comments

How Long Does It Take for a QQuickItem to Become Visible?

https://www.kdab.com/how-long-does-it-take-for-an-item-to-become-visible/
4•jandeboevrie•2d ago•0 comments

Biohub releases a world model of protein biology

https://biohub.org/news/world-model-of-protein-biology/
100•gmays•3d ago•15 comments

Efficient and Training-Free Single-Image Diffusion Models

https://arxiv.org/abs/2606.04299
15•yorwba•3h ago•0 comments

Introducing Boron Buckyballs: Theory that B80 cages can’t be made is disproved

https://cen.acs.org/materials/nanomaterials/buckyballs-boron-buckminster-fullerene-nanomaterials/...
98•crescit_eundo•2d ago•25 comments

Moving beyond fork() + exec()

https://lwn.net/SubscriberLink/1076018/16f01bbbb8e0d1f0/
318•jwilk•22h ago•301 comments

Nvidia is proposing a beast of a CPU system for Windows PCs

https://twitter.com/lemire/status/2062880075117113739
301•tosh•1d ago•494 comments

Google to pay SpaceX $920M a month for compute capacity at xAI data centers

https://www.cnbc.com/2026/06/05/google-to-pay-spacex-920-million-a-month-for-xai-compute-capacity...
269•toephu2•1d ago•856 comments

Games Between Programs: The Ruliology of Competition

https://writings.stephenwolfram.com/2026/06/games-between-programs-the-ruliology-of-competition/
16•surprisetalk•2d ago•1 comments

Zeroserve: A zero-config web server you can script with eBPF

https://su3.io/posts/introducing-zeroserve
246•losfair•22h ago•57 comments

Arithmetic Without Numbers – How LLMs Do Math

https://alvaro-videla.com/llm-arithmetic-internals/article_interactive/article.html
45•old_sound•2d ago•13 comments

Meta confirms 1000s of Instagram accounts were hacked by abusing its AI chatbot

https://this.weekinsecurity.com/meta-confirms-thousands-of-instagram-accounts-were-hacked-by-abus...
635•speckx•18h ago•229 comments

Sem: New primitive for code understanding – not LSPs, but entities on top of Git

https://ataraxy-labs.github.io/sem/
141•rohanucla•17h ago•49 comments