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.

Old and new apps, via modern coding agents by Terry Tao

https://terrytao.wordpress.com/2026/07/11/old-and-new-apps-via-modern-coding-agents/
273•subset•5h ago•74 comments

How to Read More Books

https://scotto.me/blog/2026-07-12-how-to-read-more-books/
61•silcoon•1h ago•26 comments

A no-brainer for protecting your brain

https://www.economist.com/leaders/2026/07/09/a-no-brainer-for-protecting-your-brain
44•saikatsg•1h ago•25 comments

Don't You Mean Extinct?

https://fabiensanglard.net/extinct/index.html
35•zdw•1h ago•12 comments

Understanding the Odin Programming Language

https://odinbook.com/
97•AlexeyBrin•5h ago•34 comments

Website is served from a 200KB binary

https://200kb.freelang.dev/
3•keepamovin•9m ago•0 comments

Why study Diophantine equations?

https://hidden-phenomena.com/articles/modular
17•mb1699•1h ago•1 comments

The power of collaboration: How we can reduce traffic congestion

https://research.google/blog/the-power-of-collaboration-how-we-can-reduce-traffic-congestion/
13•raahelb•1h ago•6 comments

Show HN: Shirei, cross-platform GUI framework in native Go

https://github.com/hasenj/go-shirei/
6•hsn915•13m ago•0 comments

AI Boosts Research Careers but Flattens Scientific Discovery

https://spectrum.ieee.org/ai-science-research-flattens-discovery
87•zaikunzhang•3h ago•71 comments

Ghostel.el: Terminal emulator powered by libghostty

https://dakra.github.io/ghostel/
147•signa11•8h ago•25 comments

Unauthenticated RCE in Motorola's MR2600 Router

https://mrbruh.com/motorola/
56•MrBruh•5h ago•17 comments

Vint Cerf, a “father of the Internet”, is retiring

https://techcrunch.com/2026/06/30/the-father-of-the-internet-is-finally-retiring/
228•compiler-guy•2d ago•130 comments

Gina Gallery of International Naive Art

https://www.ginagallery.com/
25•o4c•3h ago•11 comments

Autoresearch, Claude and Constrained Optimization

https://www.elliotcsmith.com/autoresearch-claude-and-constrained-optimization/
7•gmays•2h ago•2 comments

Satteri: A Markdown pipeline forged in Rust for the JavaScript world

https://satteri.bruits.org/
28•nateb2022•4d ago•5 comments

Lessons from the Vasa Shipwreck

https://www.ft.com/content/200a6c44-9b66-4af3-82eb-98acb53898e4
19•bookofjoe•3d ago•16 comments

Ditching Zotero for a Text File

https://atthis.link/blog/2026/57207.html
42•speckx•5d ago•28 comments

Show HN: Mindwalk – Replay coding-agent sessions on a 3D map of your codebase

https://github.com/cosmtrek/mindwalk
133•cosmtrek•11h ago•54 comments

Mesh LLM: distributed AI computing on iroh

https://www.iroh.computer/blog/mesh-llm
313•tionis•18h ago•72 comments

Protobuf-py: Protobuf for Python, without compromises

https://buf.build/blog/protobuf-py
113•ming13•4d ago•29 comments

Morphometrics: Introduction to the Analysis of Shape

https://www.geol.umd.edu/~tholtz/G331/lectures/331biomech.html
6•num42•1w ago•0 comments

TK, or the secret to effortless writing (2024)

https://atthis.link/blog/2024/49629.html
14•Tomte•1h ago•6 comments

Nvidia, CoreWeave, and Nebius: Inside the Circular Financing of the GPU Boom

https://io-fund.com/ai-stocks/nvidia-coreweave-nebius-circular-financing-gpu-boom
342•adletbalzhanov•23h ago•150 comments

An agent in 100 lines of Lisp

https://thebeach.dev/posts/lisp-agent/
213•jamiebeach•4d ago•65 comments

Show HN: Skillscript – A declarative, sandboxed language for tool orchestration

https://github.com/sshwarts/skillscript
8•sshwarts•3h ago•7 comments

Xbox 'OG' Adventures

https://mamoniem.com/xbox-og-adventures/
34•davikr•5d ago•5 comments

RISCBoy is an open-source portable games console, designed from scratch

https://github.com/Wren6991/RISCBoy
192•mariuz•19h ago•28 comments

Handsum: An LQIP Image File Format

https://nigeltao.github.io/blog/2026/handsum.html
39•dmit•4d ago•6 comments

An explanation of our search results

https://web.archive.org/web/20040612082405/https://www.google.com/explanation.html
7•abj908•1h ago•2 comments