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.

OnePlus halts operations in USA and Europe

https://community.oneplus.com/thread/2170715118587871237
247•pilililo2•4h ago•137 comments

Goes-19 weather satellite enters Safe Hold mode

https://www.spaceweather.gov/news/goes-19-safe-hold
27•yabones•52m ago•7 comments

Let's Build PlanetScale from Scratch: Infrastructure

https://onatm.dev/2026/07/16/homescale-part-1/
58•onatm•2h ago•8 comments

Show HN: AI Law Tracker – one audited API for US, EU and global AI law

https://ai-law-tracker.com
11•asm28208•31m ago•4 comments

How to spend 15 years perfecting a product

https://refactoring.guru/email/gbb-rollout2
16•neochief•41m ago•2 comments

Show HN: I've built a words game based on binary search

https://hilogame.cc/
15•ludovicianul•1h ago•13 comments

Ente – Opening Our Books

https://ente.com/open/
85•Sherex•3h ago•25 comments

The lost joy of music piracy

https://www.pigeonsandplanes.com/read/music-piracy-what-cd-oink-nine-inch-nails-streaming
536•mcgin•9h ago•344 comments

Where are YC founders now? OpenAI and Anthropic, mostly

https://joinedanthropic.com
175•ohong•6h ago•84 comments

Sony Deletes a Bunch More Movies from the Accounts of People Who 'Bought' Them

https://www.techdirt.com/2026/07/15/sony-deletes-a-bunch-more-movies-from-the-accounts-of-people-...
92•nekusar•2h ago•38 comments

Inkling: Our Open-Weights Model

https://thinkingmachines.ai/news/introducing-inkling/
1100•vimarsh6739•20h ago•272 comments

Teen hackers who live streamed cyber-attack on TfL jailed

https://www.bbc.com/news/articles/c4gyg0y6yg2o
20•neversaydie•2h ago•7 comments

The Act and the Outcome of Creation

https://www.ssp.sh/blog/on-creation/
18•zazuke•2h ago•1 comments

A Beautiful Theory Falls to Ugly Data

https://marginalrevolution.com/marginalrevolution/2026/05/a-beautiful-theory-falls-to-ugly-data.html
55•paulpauper•3d ago•34 comments

The LLM Critics Are Right. I Use LLMs Anyway

https://www.theocharis.dev/blog/llm-critics-are-right-i-use-llms-anyway/
91•JeremyTheo•2h ago•95 comments

Track your workout from the iPhone Lock Screen

https://musklr.com/blog/2026/iphone-lock-screen-workout-tracking-live-activity/
22•badgag•3h ago•17 comments

1,300 Beautiful Wildlife Illustrations from the 19th Century Now Restored

https://www.openculture.com/2026/07/explore-1300-beautiful-wildlife-illustrations-from-the-19th-c...
160•gslin•11h ago•30 comments

Teardown: A Generic 7-Port USB 3.0 Hub That Wasn't

https://goughlui.com/2026/07/09/teardown-a-generic-7-port-usb-3-0-hub-that-wasnt/
131•speckx•3d ago•55 comments

Show HN: We hid a backdoor in an LLM – $51,200 on finding it

https://protora.vulcora.se/challenge
3•telaia396•48m ago•2 comments

Panel meter calculator with floating point

https://lcamtuf.substack.com/p/panel-meter-calculator-with-floating
16•surprisetalk•3d ago•0 comments

Let's build a simple interpreter for APL – part 1

https://mathspp.com/blog/lsbasi-apl-part1
21•mpweiher•6d ago•0 comments

Grok Build is open source

https://github.com/xai-org/grok-build
520•skp1995•17h ago•555 comments

Governments, companies, nonprofits should invest in free, open source AI [pdf]

https://www.siegelendowment.org/wp-content/uploads/2026/07/fortune-david-siegel-open-source-ai.pdf
243•bilsbie•17h ago•88 comments

If you want to create a button from scratch, you must first create the universe

https://madcampos.dev/blog/2026/07/accessibility-from-scratch/
191•treve•10h ago•92 comments

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
316•gnyeki•15h ago•146 comments

Introduction to KizunaShelf: A shelf for everything you love

https://mudkip.me/2026/07/16/Introduction-to-KizunaShelf/
9•mudkipme•1h ago•1 comments

World-War-Ⅱ-era telephone line still in use in Upper Tanana Valley Alaska (2021)

https://www.sketchesofalaska.com/2021/03/world-war-ii-era-telephone-line-still.html
8•Lammy•5d ago•1 comments

Bluesky Trademarks ATProto

https://atproto.com/blog/at-protocol-trademark
151•chaosharmonic•13h ago•92 comments

Reynard: A real Firefox web browser for iOS 13 or later

https://github.com/minh-ton/reynard-browser
106•AbuAssar•9h ago•27 comments

I also filed the corners off my MacBook

https://www.brt.fyi/posts/mac-book-filing/
258•maxbrt•1d ago•152 comments