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.

MAI-Cyber 1

https://microsoft.ai/news/introducing-mai-cyber-1-flash-inside-mdash/
147•migmartri•2h ago•56 comments

Kimi-K3 on HuggingFace

https://huggingface.co/moonshotai/Kimi-K3
1119•nateb2022•12h ago•447 comments

Watching Go's new garbage collector move through the heap

https://theconsensus.dev/p/2026/07/19/observing-gos-garbage-collector-old-and-new.html
22•matheusmoreira•2d ago•0 comments

Glue bonds to nonstick surfaces and wipes clean with ethanol

https://cen.acs.org/materials/adhesives/glue-bonds-nonstick-surfaces-wipes-clean/104/web/2026/07
85•gmays•4d ago•38 comments

Decathlon Germany adds Wero payment option to decathlon.de website

https://www.sgieurope.com/e-commerce/decathlon-germany-launches-wero-payment-on-its-website/12239...
128•doener•2h ago•106 comments

The computer that helped win World War II

https://spectrum.ieee.org/colossus-computer-ieee-milestone
92•baruchel•4d ago•45 comments

Self-contained highly-portable Python distributions

https://gregoryszorc.com/docs/python-build-standalone/main/
8•jcbhmr•18m ago•0 comments

Show HN: FeyNoBg – Automatic background removal model and training library

https://usefeyn.com/blog/feynobg/
34•snyy•2h ago•12 comments

Exploiting Volvo/Eicher's fleet platform to gain control over all users/vehicles

https://eaton-works.com/2026/07/27/my-eicher-hack/
46•EatonZ•3h ago•7 comments

UpCodes (YC S17) is hiring remote AE's to help make buildings cheaper

https://up.codes/careers?utm_source=HN
1•Old_Thrashbarg•1h ago

Removing React.js from the codebase and adapting Htmx for UI interactivity (2023)

https://misago-project.org/t/removing-reactjs-from-the-codebase-and-adapting-htmx-for-ui-interact...
173•Ralfp•9h ago•122 comments

Exercise works for depression. So why isn't it treated like real medicine?

https://bigthink.com/mind-behavior/exercise-works-for-depression-so-why-isnt-it-treated-like-real...
29•LouisLazaris•34m ago•27 comments

Jensen Huang's first-ever post on X is in defense of open access to AI models

https://www.pcgamer.com/software/ai/jensen-huangs-first-ever-post-on-x-is-in-defense-of-open-acce...
33•01-_-•1h ago•12 comments

Bytecode-to-Source Mapping

https://tidefield.dev/bytecode-to-source-mapping/
4•evakhoury•36m ago•0 comments

Libsm64: Mario 64 as a library for use in external game engines

https://github.com/libsm64/libsm64
132•klaussilveira•8h ago•16 comments

Paged Out #9 [pdf]

https://pagedout.institute/download/PagedOut_009.pdf
70•laurensr•4h ago•10 comments

Judge Rejects Google's Attempt to DMCA Its Way Out of Being Scraped

https://www.techdirt.com/2026/07/27/judge-rejects-googles-attempt-to-dmca-its-way-out-of-being-sc...
17•cdrnsf•46m ago•2 comments

If Scrubs Hurt, Your ZFS Design Is Broken

https://klarasystems.com/articles/if-scrubs-hurt-your-zfs-design-is-broken/
11•assimpleaspossi•4d ago•2 comments

Show HN: Infrawrench – a tool to manage cloud and svcs with workflows and chat

https://infrawrench.com
11•astrid__•2h ago•0 comments

How is the Bun Rewrite in Rust going?

https://lockwood.dev/ai/2026/07/27/how-is-the-bun-rewrite-in-rust-going.html
363•tomlockwood•7h ago•278 comments

First Robotic Satellite Servicer Launched

https://www.nrl.navy.mil/Media/News/Article/4551871/robotic-servicing-of-geosynchronous-satellite...
56•GlenTheMachine•3d ago•27 comments

Should you wash your solar panels?

https://incoherency.co.uk/blog/stories/should-you-wash-your-solar-panels.html
173•surprisetalk•5h ago•150 comments

Modern email can be built from borrowed parts

https://en.andros.dev/blog/d7ed8b07/modern-email-can-be-built-from-borrowed-parts/
127•andros•10h ago•63 comments

Kimi-K3 Technical Report [pdf]

https://github.com/MoonshotAI/Kimi-K3/blob/main/k3_tech_report.pdf
324•vinhnx•3h ago•125 comments

VLC for Unity now supported on Linux

https://code.videolan.org/videolan/vlc-unity
115•martz•9h ago•36 comments

Towards a Theory of Bugs: The Ruliology of the Unexpected

https://writings.stephenwolfram.com/2026/07/towards-a-theory-of-bugs-the-ruliology-of-the-unexpec...
48•nsoonhui•3d ago•23 comments

Shay Locomotives

https://www.shaylocomotives.com/
60•Rygian•9h ago•16 comments

The Birth of the American 12-string Guitar (2013)

https://www.harpguitars.net/history/grunewald/12-string.htm
64•bilegeek•8h ago•36 comments

AI companies spend record sums on Washington lobbying

https://www.ft.com/content/d8a5f95e-3b6d-463a-a848-c9ef8e2394db
216•1vuio0pswjnm7•4h ago•114 comments

Elevated errors on Claude Opus 5

https://status.claude.com/incidents/mfdtrknpxghq
82•croemer•7h ago•59 comments