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.

Sleep regularity is a stronger predictor of mortality risk than sleep duration

https://academic.oup.com/sleep/article/47/1/zsad253/7280269
156•bilsbie•1h ago•60 comments

Prioritize mental health, and why communication is so important

https://ramones.dev/posts/mental-health/
46•ramon156•1h ago•17 comments

Jurassic Park computers in excruciating detail

https://fabiensanglard.net/jurrasic_park_computers/index.html
619•vinhnx•10h ago•149 comments

DSLs Enable Reliable Use of LLMs

https://martinfowler.com/articles/llm-and-dsls.html
55•SirOibaf•3h ago•28 comments

Telegram Serverless

https://core.telegram.org/bots/serverless
46•soheilpro•3h ago•32 comments

Weathergotchi – an open-source climate Tamagotchi

https://github.com/Michael-Manning/E-Paper-Climate-Logger
30•luanmuniz•2h ago•11 comments

Show HN: For 10 World Cups, my model's 2 favorites had the champion every time

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7013338
20•fabioricardo7•1h ago•25 comments

Societal Impacts: Claude's values across models and languages

https://www.anthropic.com/research/claude-values-models-languages
21•taubek•2h ago•16 comments

Jiga (YC W21) is hiring the best people to make manufacturing great again

https://jiga.io/about-us/
1•grmmph•1h ago

A Trip to 90s Kansai: Exploring the XD FirstClass Network BBS

https://cdrom.ca/games/2026/05/30/xd.html
24•zetamax•1d ago•0 comments

Bonsai 27B: A 27B-Class model that runs on a phone

https://prismml.com/news/bonsai-27b
645•xenova•19h ago•228 comments

Vancouver PD website features Quick Escape button that wipes itself from history

https://vpd.ca/
314•LookAtThatBacon•13h ago•125 comments

Neverclick: Desktop application for performing mouse actions with your keyboard

https://github.com/LazoVelko/neverclick
32•thunderbong•3d ago•33 comments

Latent Space as a New Medium

https://kevinkelly.substack.com/p/latent-space-as-a-new-medium
17•thm•1d ago•1 comments

TS-2026-009: Insecure argument handling in Tailscale SSH permitted root access

https://tailscale.com/security-bulletins
183•jervant•12h ago•105 comments

SpaceX bond worth 10% less than issue price – heading for junk bond status

https://www.ft.com/content/3a023b95-66c3-41e1-b0ce-df752a499541
17•youngtaff•22m ago•4 comments

The Tower Keeps Rising

https://lucumr.pocoo.org/2026/7/13/the-tower-keeps-rising/
510•cdrnsf•20h ago•235 comments

Using Go for Mobile Apps

https://www.davidsobsessions.com/p/one-year-of-gomobile/
12•theHocineSaad•3h ago•1 comments

Who's running all those tiny RPKI servers?

https://blog.apnic.net/2026/07/15/whos-running-all-those-tiny-rpki-servers/
56•enz•6h ago•7 comments

Combinatorial Games in Lean

https://github.com/vihdzp/combinatorial-games
24•wertyk•3d ago•3 comments

How I use HTMX with Go

https://www.alexedwards.net/blog/how-i-use-htmx-with-go
286•gnabgib•17h ago•87 comments

Dependabot version updates introduce default package cooldown

https://github.blog/changelog/2026-07-14-dependabot-version-updates-introduce-default-package-coo...
196•woodruffw•16h ago•124 comments

Cursor 0day: When Full Disclosure Becomes the Only Protection Left

https://mindgard.ai/blog/cursor-0day-when-full-disclosure-becomes-the-only-protection-left
409•Synthetic7346•19h ago•191 comments

I tricked Claude into leaking your deepest, darkest secrets

https://www.ayush.digital/blog/the-memory-heist
461•macleginn•6h ago•217 comments

How to stop Claude from saying load-bearing

https://jola.dev/posts/how-to-stop-claude-from-saying-load-bearing
567•shintoist•1d ago•581 comments

Microsoft has released software updates to plug at least 570 security holes

https://krebsonsecurity.com/2026/07/microsoft-patches-a-record-570-security-flaws/
161•robin_reala•15h ago•101 comments

Filmgrab: Films A-Z

https://film-grab.com/movies-a-z/
5•hopelessluca•1h ago•5 comments

I'm a USB-C Maximalist

https://shkspr.mobi/blog/2026/07/im-a-usb-c-maximalist/
316•speckx•22h ago•412 comments

Andon (manufacturing)

https://en.wikipedia.org/wiki/Andon_(manufacturing)
63•tony•3d ago•24 comments

The kids with phones are alright

https://heatherburns.tech/2026/07/08/the-kids-with-phones-are-alright/
235•JumpCrisscross•4d ago•307 comments