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.

John Deere owners will get the right to repair equipment under FTC settlement

https://apnews.com/article/john-deere-right-to-repair-agriculture-equipment-cb7514ffedb95c130a976...
949•djoldman•12h ago•185 comments

Bonnie Tyler, singer of Total Eclipse of the Heart, dies aged 75

https://www.bbc.com/news/articles/cg5pd9z2487o
37•theanonymousone•1h ago•7 comments

Spider venom kills varroa mites without harming honeybees

https://connectsci.au/news/news-parent/9703/Spider-venom-kills-varroa-mites-without-harming
168•Jedd•6h ago•67 comments

Meta reuses old RAM in new servers with custom bridge chip

https://www.networkworld.com/article/4192827/meta-reuses-old-ram-in-new-servers-with-custom-bridg...
86•ihsw•5d ago•27 comments

Why developers are ditching GitHub for Codeberg and self-hosting alternatives

https://www.howtogeek.com/why-developers-are-ditching-github-for-codeberg-and-self-hosting-altern...
180•Gedxx•3h ago•134 comments

In-browser programmable robot simulator

https://bittlex-sim.petoi.com/
36•lijay•5d ago•0 comments

I Built the Only 2026 WWII Jeep

https://www.theautopian.com/i-bet-my-company-on-an-impossible-jeep-build-then-a-miracle-happened/
64•martey•2d ago•12 comments

My Thoughts on the Bun Rust Rewrite

https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html
196•kristoff_it•2h ago•124 comments

Why is there smoke from the boiler room? – Botanical Garden using Home Assistant

https://vooijs.eu/posts/why-is-there-smoke-from-the-boiler-room/
5•Baardappel•2d ago•0 comments

Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

https://nexte.st/
126•nateb2022•3d ago•31 comments

How Donkey Kong Toppled Atari

https://dfarq.homeip.net/how-donkey-kong-toppled-atari/
40•giuliomagnifico•6h ago•12 comments

The Field Equation, living shader geometry folded into a breathing object

https://sand-morph.up.railway.app/the-field-equation
12•echohive42•1w ago•1 comments

EU Parliament greenlights Chat Control 1.0 – Breyer: "Our children lose out"

https://www.patrick-breyer.de/en/eu-parliament-greenlights-chat-control-1-0-breyer-our-children-l...
74•rapnie•55m ago•44 comments

Separating signal from noise in coding evaluations

https://openai.com/index/separating-signal-from-noise-coding-evaluations/
224•sk4rekr0w•14h ago•81 comments

Cloudflare Drop

https://www.cloudflare.com/drop/
459•coloneltcb•16h ago•252 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/P646Yw6-founding-account-executive
1•OBrien_1107•4h ago

Benchmarking coding agents on Databricks' multi-million line codebase

https://www.databricks.com/blog/benchmarking-coding-agents-databricks-multi-million-line-codebase
108•tanelpoder•14h ago•43 comments

Show HN: Microsoft releases Flint, a visualization language for AI agents

https://microsoft.github.io/flint-chart/#/
306•chenglong-hn•18h ago•113 comments

Grok 4.5

https://x.ai/news/grok-4-5
672•BoumTAC•17h ago•1073 comments

Show HN: Yamanote.fun – A complete soundscape for Tokyo's Yamanote line

https://www.yamanote.fun/
195•madebymagnolia•1d ago•44 comments

Turning a pile of documents into a searchable useable knowledge base

https://github.com/linuxrebel/DocuBrowser
155•linuxrebe1•15h ago•35 comments

Unicode's transliteration rules are Turing-complete

https://seriot.ch/computation/uts35/
110•beefburger•1d ago•29 comments

Rewriting Bun in Rust

https://bun.com/blog/bun-in-rust
639•afturner•14h ago•377 comments

New Sweden: the US's long-lost 'secret' colony

https://www.bbc.com/travel/article/20260629-new-sweden-the-uss-long-lost-secret-colony
137•bookofjoe•16h ago•48 comments

Patching MechCommander's "left arm bug" for fun and profit

https://mhloppy.com/2026/05/mechcommander-weapons-left-arm-bug-fix/
76•Narann•3d ago•23 comments

Chatto is now open source

https://www.hmans.dev/blog/chatto-is-open-source
999•speckx•20h ago•272 comments

3D Airplane tracker on Mercator map

https://github.com/jamalrfordii-arch/Vanguard-Map
21•Lawyer24•4d ago•3 comments

Decoding the obfuscated bash script on a Uniqlo t-shirt

https://tris.sherliker.net/blog/obfuscated-self-evaluating-bash-script-by-cdn-akamai-being-suppli...
1396•speerer•1d ago•219 comments

Apache Shiro security framework releases 3.0.0

https://shiro.apache.org/blog/2026/06/apache-shiro-300-released.html
40•lprimak•2d ago•6 comments

TypeScript 7

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
649•DanRosenwasser•19h ago•258 comments