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.

For first time, a cell built from scratch grows and divides

https://www.quantamagazine.org/for-the-first-time-a-cell-built-from-scratch-grows-and-divides-202...
624•defrost•7h ago•214 comments

ZCode

https://zcode.z.ai/en
10•chvid•1m ago•0 comments

Show HN: Searchable directory of 22k+ products from worker-owned co-ops

https://www.workerowned.info/
42•IESAI_ski•1h ago•9 comments

What to learn to be a graphics programmer

https://blog.demofox.org/2026/07/01/what-to-learn-to-be-a-graphics-programmer/
166•atan2•4h ago•74 comments

FFmpeg 9.1's new AAC encoder

https://hydrogenaudio.org/index.php/topic,129691.0.html
212•ledoge•7h ago•75 comments

Physical disc production ending in Jan 2028 for new games on PlayStation

https://blog.playstation.com/2026/07/01/physical-disc-production-ending-in-january-2028-for-new-g...
488•Tiberium•9h ago•547 comments

Box3D, an open source 3D physics engine

https://box2d.org/posts/2026/06/announcing-box3d/
365•makepanic•9h ago•81 comments

Proliferate (YC S25) Is Hiring

https://www.ycombinator.com/companies/proliferate/jobs/mMHvKR9-founding-product-engineer
1•pablo24602•1h ago

Ask HN: Who is hiring? (July 2026)

128•whoishiring•7h ago•143 comments

Internal Combustion Engine (2021)

https://ciechanow.ski/internal-combustion-engine/
246•StefanBatory•9h ago•55 comments

Fable 5 Is Back

https://twitter.com/claudeai/status/2072402636813607381
210•mfiguiere•2h ago•178 comments

Monetization Gateway: Charge for any resource behind Cloudflare via x402

https://blog.cloudflare.com/monetization-gateway/
213•soheilpro•8h ago•126 comments

How We Made IPFS Content Publishing 10x Faster

https://probelab.io/blog/optimistic-provide/
122•dennis-tra•6h ago•35 comments

Launch HN: Parsewise (YC P25) – Reason Across Documents with an API

43•gergelycsegzi•8h ago•42 comments

Ask HN: Who wants to be hired? (July 2026)

91•whoishiring•7h ago•210 comments

One KW wind turbine without civil engineering

https://www.windtowatt.com/index-en.html
25•skywal_l•1h ago•19 comments

I Left Harry's All-Night Hamburgers

https://escapepod.org/2013/09/14/ep413-why-i-left-harrys-all-night-hamburgers/
12•rbanffy•49m ago•2 comments

Most rewrites serve the engineer, not the business

https://anatoliybabushka.com/blog/when-to-rewrite-working-code.html
39•bbsnly•3h ago•31 comments

The Apple Disk II Controller Card

https://www.bigmessowires.com/2021/11/12/the-amazing-disk-ii-controller-card/
13•stmw•2d ago•1 comments

Mortality associated with non-optimal ambient temperatures from 2000 to 2019

https://www.researchgate.net/publication/353058947_Global_regional_and_national_burden_of_mortali...
39•simonebrunozzi•4h ago•9 comments

Hanami 3.0: In Full Bloom

https://hanakai.org/blog/2026/06/30/hanami-3-0-in-full-bloom
52•PuercoPop•4h ago•12 comments

Weave Robotics launches Isaac 1, a $7,999 home robot with Fall 2026 deliveries

https://www.weaverobotics.com/isaac-1
32•ryanmerket•3h ago•57 comments

1-Bit Pixel Art Emojis

https://hypertalking.com/2023/05/15/1-bit-pixel-art-emojis/
124•surprisetalk•6d ago•18 comments

A complete ClickHouse OLAP engine, compiled to WebAssembly

https://wasm.chdb.io/
46•porridgeraisin•4h ago•6 comments

Show HN: GolemUI – Declarative Form Engine

https://golemui.com
30•wtfdeveloper•6h ago•50 comments

Japan has 41% of the 100-year companies – secrets of 1,447-year survival

https://www.j-times.org/en/media/articles/japan-shinise-1400-years-2026/
3•indynz•39m ago•1 comments

Fable open sourced NanoClaw's agent factory. It cost $800

https://twitter.com/Gavriel_Cohen/status/2072432348805669139
12•benocodes•23m ago•5 comments

Generating Images with a 2025 Android

https://www.duration.ai/blog/generating-images-with-a-2025-android
16•sudb•1d ago•0 comments

Sony Deletes 551 Movies PlayStation Owners Paid For

https://reclaimthenet.org/sony-deletes-551-studiocanal-movies-playstation-owners-paid-for
455•bilsbie•7h ago•203 comments

Building Gin: Simple over Easy

https://manualmeida.dev/articles/gin-simple-over-easy/
53•manucorporat•4h ago•18 comments