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.

Bug Blindness

https://danluu.com/bug-blind/
105•davidmckenna•3h ago•37 comments

FreeCORE TrueNAS Core – Continued

https://freecore.org/
47•sashk•2h ago•20 comments

RISC-V is now officially supported by CPython

https://blog.python.org/2026/08/riscv-now-officially-supported/
54•lumpa•5d ago•6 comments

Hy4 preview

https://www.tencent.com/tencent-releases-and-open-sources-tencent-hy4-preview/
225•shenli3514•8h ago•134 comments

Algorithmic Rent-Pricing Litigation Expands Under New State and Local Laws

https://www.morganlewis.com/pubs/2026/08/algorithmic-rent-pricing-litigation-expands-under-new-st...
10•toomuchtodo•1h ago•1 comments

Tether: iMessage, SMS, etc. on Linux

https://zackbartel.com/blog/2026/08/tether/
384•zackb•5d ago•163 comments

Nancy Grace Roman Space Telescope

https://science.nasa.gov/mission/roman-space-telescope/
151•JumpCrisscross•12h ago•68 comments

Show HN: I missed the moving blocks, so I built a real Linux disk defragmenter

https://github.com/gbin/defragger
19•gbin•4d ago•7 comments

Lawmakers added $1 to car insurance policies. That money paid for Flock cameras

https://www.texastribune.org/2026/08/28/texas-flock-cameras-auto-insurance-fee-mvcpa-grants/
167•DeepLogin•4h ago•72 comments

Calibrate Before You Accelerate: Bias Toward Action in a New Role

https://tucker.wales/writing/bias-towards-action/
129•tuckerwales•10h ago•53 comments

Is it safe to call print in a Python signal handler?

https://iafisher.com/2026/08/sigprint
26•hellerve•3d ago•4 comments

SQLite as a Document Database (2020)

https://dgl.cx/2020/06/sqlite-json-support
184•lioeters•5d ago•47 comments

Functional State Machines in Rust: Typestate and Newtype Patterns

https://dl.acm.org/doi/10.1145/3830438.3830958
59•matt_d•8h ago•20 comments

Benchmarking Pocket-Scale Inference

https://artificialanalysis.ai/hardware-inference-stack/mobile-phones
5•sys42590•2d ago•0 comments

Domain-Driven Agents

https://coldtake.dev/blog/domain-driven-agents
67•AlarQ•8h ago•12 comments

EVE Online moves to Python 3

https://www.eveonline.com/news/view/the-move-to-python-3-begins
321•TylerJaacks•4d ago•168 comments

Glacier Mice

https://en.wikipedia.org/wiki/Glacier_mice
271•ostacke•5d ago•51 comments

Benjamin Franklin's Alter Egos Gave Him the Most Freedom

https://www.smithsonianmag.com/history/among-all-great-things-benjamin-franklin-invented-discover...
5•cisc•2h ago•0 comments

DHS is using obscure law to snoop on journalists, non-profits, unions

https://www.theguardian.com/us-news/2026/aug/29/trump-dhs-1509-summons-records-journalists-nonpro...
346•firefax•9h ago•59 comments

Good Culture Is the Biggest Productivity Hack, Not AI

https://newsletter.eng-leadership.com/p/good-culture-is-the-biggest-productivity
289•gpi•10h ago•67 comments

Samsung's Processing-in-Memory (PIM)

https://chipsandcheese.com/p/hot-chips-2026-samsungs-processing
249•ingve•21h ago•95 comments

Boot a Virtual iPhone via Apple's Virtualization.framework

https://github.com/Lakr233/vphone-cli
390•hentrep•1d ago•103 comments

Sleepwalker: Passive Backdoor with Its Own Command Language

https://r136a1.dev/2026/08/24/sleepwalker-a-passive-backdoor-with-its-own-command-language/
60•defrost•5d ago•8 comments

Trees for a Changing Climate and Resilient Urban Forest (2022)

https://www.coolboulder.org/news/trees-for-a-changing-climate-resilient-urban-forest
37•mooreds•11h ago•5 comments

Indirect Calling of Nested Functions on GCC Without Executable Stack

https://uecker.codeberg.page/2026-08-29.html
70•uecker•13h ago•45 comments

Recovering Corrupt Zip Files

https://www.construct.net/en/blogs/ashleys-blog-2/recovering-corrupt-zip-files-1895
37•AshleysBrain•3d ago•16 comments

Quantifying Colour

https://ekunazanu.foo/lab/quantifying-colour/
77•vismit2000•12h ago•7 comments

Creating the Aetheryte Radio

https://haz.ee/posts/aetheryte-radio.html
71•wonger_•1d ago•14 comments

Show HN: Typebase – A single-folder back end you write in TypeScript

https://typebase.io
101•andrewww-dev•3d ago•26 comments

Defrag98: Windows 98 Disk Defragmenter Simulator Online

https://defrag98.com
105•throw0101a•4h ago•60 comments