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.

Asus Bike Booster

https://www.asus.com/accessories/bike-booster/asus-oxiis/oxiis-intelligent-bike-booster/
92•wiradikusuma•3d ago•35 comments

Asynchronous I/O in DuckDB: Work, Thread, Work

https://duckdb.org/2026/07/31/asynchronous-io
18•pdet•5d ago•2 comments

Semaglutide linked to lower predicted dementia risk

https://alz-journals.onlinelibrary.wiley.com/doi/10.1002/dad2.70432
355•randycupertino•10h ago•250 comments

Show HN: Mic Drop, a real-time multiplayer karaoke game

https://www.micdrop.gg/
9•johnsillings•1h ago•2 comments

Cultivating a state of mind where new ideas are born (2023)

https://www.henrikkarlsson.xyz/p/good-ideas
85•felixbraun•5h ago•25 comments

Tea5767-Radio-Tuner

https://github.com/turtushig22-blip/tea5767-radio-tuner
22•turtushig22•2h ago•0 comments

AI in drug discovery – what it is, where we stand and the path forward

https://www.science.org/content/blog-post/so-how-ai-drug-discovery-doing-really
98•AnodicElegy•7h ago•48 comments

It's How You Ask: Gender-Associated Linguistic Bias in LLMs

https://arxiv.org/abs/2608.13328
3•sbulaev•14m ago•0 comments

At-home test for infected ticks could improve Lyme Disease diagnosis

https://www.smithsonianmag.com/innovation/the-first-at-home-test-for-infected-ticks-could-improve...
216•gmays•12h ago•78 comments

Abdominal fat predicts heart disease risk better than BMI

https://www.acc.org/about-acc/press-releases/2026/08/11/14/59/abdominal-fat-predicts-heart-diseas...
165•theanonymousone•5h ago•123 comments

Super El Niño Keeps Growing as New Forecasts Reach Record Territory Ahead Winter

https://www.severe-weather.eu/long-range-2/super-el-nino-growth-accelerating-to-record-strength-f...
92•dgellow•7h ago•40 comments

RISC-V: They Should Have Known Better

https://dmitry.gr/?r=06.%20Thoughts&proj=12.%20RV
237•dmitrygr•1d ago•305 comments

Tracking down a Zsh history data loss bug

https://michael.stapelberg.ch/posts/2026-08-09-zsh-history-truncation-bug/
38•ingve•4h ago•10 comments

Auto-research with codex: How I achieved a 232x Faster Kernel

https://sankalp.bearblog.dev/autoresearch/
395•tosh•15h ago•88 comments

AI has access to a vastly larger working memory than the human brain

https://davidepiffer.com/p/ai-isnt-outthinking-mathematicians
421•rzk•8h ago•373 comments

A fortuitous decade as an indie software developer

https://lapcatsoftware.com/articles/2026/8/3.html
32•frizlab•5d ago•3 comments

Show HN: I built a native app for coding agents with Rust and GPUI

https://waku.sh
7•0x142857•1h ago•2 comments

A spectre is haunting Unicode

https://www.dampfkraft.com/ghost-characters.html
179•sensanaty•11h ago•57 comments

Voltair (YC W26) Is Hiring a Test Flight Engineer

https://www.ycombinator.com/companies/voltair/jobs/sSOD2Ox-flight-test-engineer
1•wweissbluth•7h ago

Tess's Android Wayland Compositor

https://github.com/wmww/tawc
52•schmorptron•7h ago•5 comments

SugarTrack – an offline Android logbook for blood sugar (no account, no cloud)

https://sugartrack-beta.vercel.app/
22•hunzaboy•3h ago•6 comments

Big Pickle on SWE Atlas – Codebase QnA

https://github.com/PhillipChaffee/big-pickle-swe-atlas
4•phillipchaffee•2h ago•0 comments

Bede Liu, a digital signal processing pioneer, has died

https://spectrum.ieee.org/digital-signal-processing
61•Jimmc414•4h ago•3 comments

Working with AI feels more like leadership than coding

https://allen.bargi.org/notes/working-with-ai-feels-like-leadership/
271•allenb•15h ago•176 comments

Show HN: Eigendrum - Draw any shape and hear what it sounds like as a drum

https://baselashraf81.github.io/eigendrum/
210•BaselAshraf81•5d ago•96 comments

The Wow signal was a strong narrowband radio signal detected on August 15, 1977

https://en.wikipedia.org/wiki/Wow!_signal
68•firefax•4h ago•17 comments

Pizza Box Project Stack

https://cblgh.org/posts/2026-07-31-pizza-box-project-stack/
34•surprisetalk•4d ago•4 comments

The mathematical beauty of hyperbezier curves

https://linebender.org/blog/hyperbezier/
190•raphlinus•6d ago•38 comments

An image can overflow

https://master.dev/blog/something-nobody-told-you-about-the-image-element-it-can-overflow/
19•ibobev•4d ago•7 comments

Decoding smell: Study reveals how odor signals shapeshift in the wind

https://www.colorado.edu/today/2026/08/10/decoding-smell-study-reveals-how-odor-signals-shapeshif...
4•hhs•3h ago•0 comments