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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

All elementary functions from a single binary operator

https://arxiv.org/abs/2603.21852
383•pizza•7h ago•102 comments

The Economics of Software Teams: Why Most Engineering Orgs Are Flying Blind

https://www.viktorcessan.com/the-economics-of-software-teams/
134•kiyanwang•4h ago•66 comments

Taking on CUDA with ROCm: 'One Step After Another'

https://www.eetimes.com/taking-on-cuda-with-rocm-one-step-after-another/
164•mindcrime•11h ago•120 comments

DIY Soft Drinks

https://blinry.org/diy-soft-drinks/
444•_Microft•17h ago•124 comments

Bring Back Idiomatic Design (2023)

https://essays.johnloeber.com/p/4-bring-back-idiomatic-design
558•phil294•21h ago•314 comments

Show HN: boringBar – a taskbar-style dock replacement for macOS

https://boringbar.app/
367•a-ve•16h ago•201 comments

Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

https://arxiv.org/abs/2604.07902
75•mpweiher•1d ago•9 comments

A perfectable programming language

https://alok.github.io/lean-pages/perfectable-lean/
127•yuppiemephisto•12h ago•44 comments

Most people can't juggle one ball

https://www.lesswrong.com/posts/jTGbKKGqs5EdyYoRc/most-people-can-t-juggle-one-ball
358•surprisetalk•3d ago•113 comments

Ask HN: What Are You Working On? (April 2026)

222•david927•17h ago•690 comments

I gave every train in New York an instrument

https://www.trainjazz.com/
280•joshuawolk•2d ago•52 comments

Show HN: Oberon System 3 runs natively on Raspberry Pi 3 (with ready SD card)

https://github.com/rochus-keller/OberonSystem3Native/releases
196•Rochus•20h ago•47 comments

Tell HN: Docker pull fails in Spain due to football Cloudflare block

896•littlecranky67•21h ago•334 comments

We have a 99% email reputation, but Gmail disagrees

https://blogfontawesome.wpcomstaging.com/we-have-a-99-email-reputation-gmail-disagrees/
253•em-bee•21h ago•230 comments

Apple's accidental moat: How the "AI Loser" may end up winning

https://adlrocha.substack.com/p/adlrocha-how-the-ai-loser-may-end
183•walterbell•6h ago•185 comments

Is math big or small?

https://chessapig.github.io/talks/Big-Small
40•robinhouston•1d ago•13 comments

A Canonical Generalization of OBDD

https://arxiv.org/abs/2604.05537
14•luu•5h ago•6 comments

Exploiting the most prominent AI agent benchmarks

https://rdi.berkeley.edu/blog/trustworthy-benchmarks-cont/
524•Anon84•1d ago•132 comments

Caffeine, cocaine, and painkillers detected in sharks from The Bahamas

https://www.sciencedirect.com/science/article/abs/pii/S0269749126001880
11•LostMyLogin•1h ago•2 comments

Google removes "Doki Doki Literature Club" from Google Play

https://bsky.app/profile/serenityforge.com/post/3mj3r4nbiws2t
453•super256•13h ago•227 comments

JVM Options Explorer

https://chriswhocodes.com/vm-options-explorer.html
194•0x54MUR41•23h ago•86 comments

Seven countries now generate nearly all their electricity from renewables (2024)

https://www.the-independent.com/tech/renewable-energy-solar-nepal-bhutan-iceland-b2533699.html
578•mpweiher•20h ago•343 comments

How long-distance couples use digital games to facilitate intimacy (2025)

https://arxiv.org/abs/2505.09509
97•radeeyate•17h ago•30 comments

Phyphox – Physical Experiments Using a Smartphone

https://phyphox.org/
216•_Microft•1d ago•34 comments

Uncharted island soon to appear on nautical charts

https://www.awi.de/en/about-us/service/press/single-view/unkartierte-insel-demnaechst-auf-seekart...
85•tannhaeuser•13h ago•43 comments

Pro Max 5x quota exhausted in 1.5 hours despite moderate usage

https://github.com/anthropics/claude-code/issues/45756
636•cmaster11•20h ago•569 comments

Haunt, the 70s text adventure game, is now playable on a website

https://haunt.madebywindmill.com
56•jscalo•6h ago•18 comments

I ran Gemma 4 as a local model in Codex CLI

https://blog.danielvaughan.com/i-ran-gemma-4-as-a-local-model-in-codex-cli-7fda754dc0d4
60•dvaughan•13h ago•23 comments

The peril of laziness lost

https://bcantrill.dtrace.org/2026/04/12/the-peril-of-laziness-lost/
390•gpm•14h ago•128 comments

A Tour of Oodi

https://blinry.org/oodi/
138•zdw•3d ago•42 comments