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.

Inkling: Our Open-Weights Model

https://thinkingmachines.ai/news/introducing-inkling/
660•vimarsh6739•7h ago•165 comments

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
103•gnyeki•2h ago•39 comments

Grok Build is open source

https://github.com/xai-org/grok-build
243•skp1995•5h ago•291 comments

Metal-Organic Frameworks, Chemistry's New Miracle Materials (2018)

https://chemistry.berkeley.edu/news/meet-metal-organic-frameworks-chemistry%E2%80%99s-new-miracle...
35•andsoitis•2h ago•7 comments

Governments, companies, nonprofits should invest in free, open source AI [pdf]

https://www.siegelendowment.org/wp-content/uploads/2026/07/fortune-david-siegel-open-source-ai.pdf
76•bilsbie•4h ago•28 comments

LLM Networking with MikroTik

https://blog.greg.technology/2026/07/14/llm-networking-with-mikrotik.html
43•gregsadetsky•3h ago•8 comments

Stripe and Advent have made a joint offer to acquire PayPal – sources

https://www.reuters.com/business/finance/stripe-advent-offer-buy-paypal-more-than-53-billion-sour...
334•rvz•21h ago•205 comments

Nul Characters in Strings in SQLite

https://sqlite.org/nulinstr.html
28•basilikum•2h ago•2 comments

The Anti-Mac User Interface (1996)

https://www.nngroup.com/articles/anti-mac-interface/
48•ninglor•2h ago•13 comments

Running Gemma 4 26B at 5 tokens/sec on a 13-year-old Xeon with no GPU

https://www.neomindlabs.com/2026/06/08/running-gemma-4-26b-at-5-tokens-sec-on-a-13-year-old-xeon-...
227•neomindryan•9h ago•150 comments

Duskers, the scary command line game, is getting a sequel

https://elbowgreasegames.substack.com/p/misfits-attic-announces-duskers-20
90•spacemarine1•5h ago•16 comments

Show HN: One More Letter

https://playonemoreletter.com/
21•hmate9•2h ago•18 comments

Command Line Interface Guidelines

https://clig.dev/
60•subset•3d ago•8 comments

Book prizes don't work how you think

https://rebeccamakkai.substack.com/p/book-prizes-dont-work-how-you-think
62•samclemens•1d ago•35 comments

Brainless: Shadcn components that look like Claude Code, Codex and Grok

https://brainless.swerdlow.dev
86•benswerd•5h ago•17 comments

Voxatron

https://www.lexaloffle.com/voxatron.php
58•lsferreira42•5h ago•19 comments

Prioritize mental health, and why communication is so important

https://ramones.dev/posts/mental-health/
289•ramon156•14h ago•249 comments

Mysteries of Telegram Data Centers (2022)

https://dev.moe/en/3025
240•theanonymousone•12h ago•131 comments

Show HN: Firefox in WebAssembly

https://developer.puter.com/labs/firefox-wasm/
124•coolelectronics•4h ago•69 comments

Collection of Digital Clock Designs

https://clocks.dev
173•levmiseri•8h ago•36 comments

Job queues are deceptively tricky

https://typesanitizer.com/blog/job-queues.html
11•ingve•1d ago•2 comments

Designing APIs for Agents

https://www.freestyle.sh/blog/opinion/designing-apis-for-agents
47•benswerd•2d ago•21 comments

Artie (YC S23) Is Hiring Software Engineers

https://jobs.ashbyhq.com/artie
1•tang8330•8h ago

P2P local file transfer based on WebRTC

https://pairdrop.net/
28•halb•3h ago•13 comments

MITS: Rockets, Calculators, and Personal Computers

https://www.abortretry.fail/p/micro-instrumentation-and-telemetry
31•BirAdam•2d ago•2 comments

Show HN: misa77 - a codec that decodes 2x faster than LZ4 (at better ratios)

https://github.com/welcome-to-the-sunny-side/misa77
131•nonadhocproblem•9h ago•40 comments

Show HN: E-- – A language you dial between English and Python

https://github.com/frmoded/e--
9•OdedF•5d ago•10 comments

Towards a harness that can do anything

https://eardatasci.github.io/c/ambiance/index.html
170•evakhoury•11h ago•85 comments

Free Remote Desktop Without Servers

https://github.com/Teylersf/freeremotedesk
3•pruufsocial•1h ago•1 comments

Today I Rescued 7,234 Old GIFs

https://danq.me/2026/07/10/rescuing-7234-gifs/
98•birdculture•3d ago•10 comments