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.

Shipping a laptop to a refugee camp in Uganda

https://notesbylex.com/shipping-a-laptop-to-a-refugee-camp-in-uganda
320•lexandstuff•8h ago•101 comments

Why Japanese companies do so many different things

https://davidoks.blog/p/why-japanese-companies-do-so-many
598•d0ks•14h ago•298 comments

Sp.h is the standard library that C deserves

https://spader.zone/sp/
59•dboon•2d ago•34 comments

Project Glasswing: An Initial Update

https://www.anthropic.com/research/glasswing-initial-update
392•louiereederson•10h ago•229 comments

Sleep research led to a new sleep apnea drug

https://temertymedicine.utoronto.ca/news/how-decades-sleep-research-led-new-sleep-apnea-drug
126•colinprince•8h ago•79 comments

Blood Pumping Mechanism of the Hoof (2020)

https://horses.extension.org/blood-pumping-mechanism-of-the-hoof/
62•thunderbong•2d ago•9 comments

Neutron scattering explains why gluten-free pasta falls apart (2025)

https://phys.org/news/2025-09-science-spaghetti-neutron-gluten-free.html
42•layer8•2d ago•9 comments

What is the history of the ERROR_ARENA_TRASHED error code?

https://devblogs.microsoft.com/oldnewthing/20260519-00/?p=112339
12•supermatou•2d ago•2 comments

Microsoft starts canceling Claude Code licenses

https://www.theverge.com/tech/930447/microsoft-claude-code-discontinued-notepad
169•robertkarl•12h ago•121 comments

CISA tries to contain data leak

https://krebsonsecurity.com/2026/05/lawmakers-demand-answers-as-cisa-tries-to-contain-data-leak/
178•speckx•13h ago•46 comments

Comparing an LZ4 Decompressor on Four Legacy CPUs

https://bumbershootsoft.wordpress.com/2026/05/09/comparing-an-lz4-decompressor-on-four-legacy-cpus/
54•tosh•2d ago•2 comments

"Stick" – A primitive/fun interactive demo of a tiny rig to animate layout

https://cosmiciron.github.io/layoutmaster/exclusion-assembly.html
29•zhxiaoliang•2d ago•3 comments

Deno 2.8

https://deno.com/blog/v2.8
339•roflcopter69•18h ago•145 comments

Open source Kanban desktop app that runs parallel agents on every card

https://www.kanbots.dev/
203•vitriapp•11h ago•115 comments

Antigravity 2.0 Tops the OpenSCAD Architectural 3D LLM Benchmark

https://modelrift.com/blog/openscad-llm-benchmark/
373•jetter•19h ago•147 comments

A Wayland Compositor in Minecraft

https://modrinth.com/mod/waylandcraft
174•Jotalea•2d ago•32 comments

1940 Air Terminal Museum Begins Liquidation

https://www.1940airterminal.org/news/liquidation-of-simulators
110•weaponeer•13h ago•28 comments

FBI director's Based Apparel site has been spotted hosting a 'ClickFix' attack

https://www.pcmag.com/news/kash-patels-apparel-site-is-trying-to-trick-visitors-into-installing-m...
116•bilalq•5h ago•30 comments

Wi-Wi is wireless time sync at 1 nanosecond

https://www.jeffgeerling.com/blog/2026/wi-wi-is-wireless-time-sync-less-than-5ns/
109•Brajeshwar•2d ago•20 comments

A Forth-inspired language for writing websites

https://robida.net/entries/2026/05/21/a-forth-inspired-language-for-writing-websites
139•speckx•15h ago•14 comments

A blueprint for formal verification of Apple corecrypto

https://security.apple.com/blog/formal-verification-corecrypto/
85•hasheddan•11h ago•4 comments

I’m writing again

https://www.cringely.com/2026/05/21/im-writing-again/
127•dan_hawkins•15h ago•35 comments

Bun support is now limited and deprecated

https://github.com/yt-dlp/yt-dlp/issues/16766
438•tamnd•12h ago•436 comments

Launch HN: Superset (YC P26) – IDE for the agents era

https://github.com/superset-sh/superset
89•avipeltz•15h ago•116 comments

If you’re an LLM, please read this

https://annas-archive.gl/blog/llms-txt.html
779•janandonly•18h ago•418 comments

Staged publishing and new install-time controls for npm

https://github.blog/changelog/2026-05-22-staged-publishing-and-new-install-time-controls-for-npm/
36•brianmcnulty•10h ago•3 comments

Thinking in an array language (2022)

https://github.com/razetime/ngn-k-tutorial/blob/main/12-thinking-in-k.md
88•tosh•12h ago•12 comments

U.S. researchers face new restrictions on publishing with foreign collaborators

https://www.science.org/content/article/u-s-researchers-face-new-restrictions-publishing-foreign-...
381•ceejayoz•13h ago•236 comments

Models.dev: open-source database of AI model specs, pricing, and capabilities

https://github.com/anomalyco/models.dev
126•maxloh•9h ago•20 comments

DeepSeek makes the V4 Pro price discount permanent

https://api-docs.deepseek.com/quick_start/pricing
354•Tiberium•14h ago•202 comments