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.

Anthropic acquires Stainless

https://www.anthropic.com/news/anthropic-acquires-stainless
188•tomeraberbach•2h ago•121 comments

Haiku OS runs on M1 Macs now

https://discuss.haiku-os.org/t/my-haiku-arm64-progress/19044?page=2
72•tekkertje•1h ago•29 comments

We stopped AI bot spam in our GitHub repo using Git's –author flag

https://archestra.ai/blog/only-responsible-ai
291•ildari•4h ago•137 comments

Show HN: Files.md – Open-source alternative to Obsidian

https://github.com/zakirullin/files.md
390•zakirullin•5h ago•207 comments

Elon Musk has lost his lawsuit against Sam Altman and OpenAI

https://techcrunch.com/2026/05/18/elon-musk-has-lost-his-lawsuit-against-sam-altman-and-openai/
372•nycdatasci•1h ago•173 comments

The Quiet Renovation at Bitwarden

https://blog.ppb1701.com/the-quiet-renovation-at-bitwarden
325•DaSHacka•1d ago•148 comments

Agora-1: The Multi-Agent World Model

https://odyssey.ml/introducing-agora-1
14•olivercameron•49m ago•1 comments

The Fil-C Optimized Calling Convention

https://fil-c.org/calling_convention
50•pizlonator•2d ago•6 comments

Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

https://modal.com/blog/truly-serverless-gpus
25•charles_irl•1h ago•6 comments

Iran starts Bitcoin-backed ship insurance for Hormuz strait

https://www.bloomberg.com/news/articles/2026-05-18/iran-starts-bitcoin-backed-shipping-insurance-...
90•srameshc•2h ago•129 comments

Project Glasswing: what Mythos showed us

https://blog.cloudflare.com/cyber-frontier-models/
193•Fysi•5h ago•83 comments

Two computers, one monitor, zero fiddling (2025)

https://alexplescan.com/posts/2025/08/16/kvm/
85•ankitg12•2d ago•57 comments

What Is Date:Italy?

http://aesthetikx.info/blog/date_italy.html
84•jollyjerry•2d ago•33 comments

Voice AI Systems Are Vulnerable to Hidden Audio Attacks

https://spectrum.ieee.org/voice-ai-audio-attacks
79•SVI•7h ago•23 comments

Haiku OS runs on M1 Macs now

https://www.osnews.com/story/144985/haiku-os-runs-on-m1-macs-now/
25•speckx•1h ago•4 comments

Stratum: System-Hardware Co-Design with 3D-Stackable DRAM for Efficient Moe

https://dl.acm.org/doi/10.1145/3725843.3756043
7•rbanffy•3d ago•1 comments

I 3D Printed Origami [video]

https://www.youtube.com/watch?v=FNVBK7-h9Fs
21•Teever•2d ago•4 comments

Qwen 3.7 Preview

https://twitter.com/Alibaba_Qwen/status/2056403591464984753
117•theanonymousone•3h ago•45 comments

Learn Harness Engineering

https://walkinglabs.github.io/learn-harness-engineering/en/
74•redbell•7h ago•6 comments

The Aperiodic Table

https://blog.jgc.org/2026/05/the-aperiodic-table.html
65•jgrahamc•3d ago•30 comments

It is time to give up the dualism introduced by the debate on consciousness

https://www.noemamag.com/there-is-no-hard-problem-of-consciousness/
250•ahalbert4•16h ago•627 comments

Show HN: InsForge – Open-source Heroku for coding agents

https://github.com/InsForge/InsForge
19•mrcoldbrew•3h ago•3 comments

Garry Tan, the CEO of YC, accused me of unethical reporting

https://radleybalko.substack.com/p/truth-power-and-honest-journalism
252•gok•4h ago•26 comments

'We mould trees to grow into the shape of chairs'

https://www.bbc.co.uk/news/articles/cvg0yy3gp71o
181•bauc•6h ago•46 comments

Actually, democracy dies in H.R.

https://www.nytimes.com/2026/05/18/world/americas/actually-democracy-dies-in-hr.html
237•mitchbob•5h ago•166 comments

Linux security mailing list 'almost unmanageable'

https://www.theregister.com/security/2026/05/18/linus-torvalds-says-ai-powered-bug-hunters-have-m...
175•jonbaer•7h ago•85 comments

Strange crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
161•jumploops•2d ago•74 comments

1024000^2 Blocks, 2B2T Minecraft Server World Download Project, and Discoveries

https://github.com/2b2tplace/1m_release
108•exploraz•5h ago•71 comments

Iran will impose fees on subsea internet cables in Strait of Hormuz

https://www.cnn.com/2026/05/17/middleeast/iran-hormuz-undersea-cables-intl
79•ck2•1h ago•53 comments

When Kierkegaard Got Cancelled

https://www.plough.com/en/topics/faith/discipleship/when-kierkegaard-got-cancelled
62•bookofjoe•7h ago•26 comments