frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•8mo ago

Comments

yxhuvud•8mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•8mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•8mo 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•8mo 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•8mo 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•8mo 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.

Apple Is Fighting for TSMC Capacity as Nvidia Takes Center Stage

https://www.culpium.com/p/exclusiveapple-is-fighting-for-tsmc
111•speckx•1h ago•77 comments

25 Years of Wikipedia

https://wikipedia25.org
76•easton•2h ago•38 comments

Show HN: TinyCity – A tiny city SIM for MicroPython (Thumby micro console)

https://github.com/chrisdiana/TinyCity
40•inflam52•1h ago•2 comments

The URL shortener that makes your links look as suspicious as possible

https://creepylink.com/
606•dreadsword•12h ago•119 comments

OBS Studio 32.1.0 Beta 1 available

https://github.com/obsproject/obs-studio/releases/tag/32.1.0-beta1
30•Sean-Der•1h ago•5 comments

Claude Cowork exfiltrates files

https://www.promptarmor.com/resources/claude-cowork-exfiltrates-files
774•takira•19h ago•341 comments

The 3D Software Rendering Technology of 1998's Thief: The Dark Project (2019)

https://nothings.org/gamedev/thief_rendering.html
55•suioir•5h ago•23 comments

Impeccable Style

https://impeccable.style
57•noemit•3d ago•30 comments

The Palantir app helping ICE raids in Minneapolis

https://www.404media.co/elite-the-palantir-app-ice-uses-to-find-neighborhoods-to-raid/
229•fajmccain•1h ago•149 comments

Programming, Evolved: Lessons and Observations

https://github.com/kulesh/dotfiles/blob/main/dev/dev/docs/programming-evolved.md
17•dnw•2h ago•7 comments

Z80 Mem­ber­ship Card

https://sunrise-ev.com/z80.htm
71•exvi•3d ago•20 comments

Investing with GIFs: A Visual Guide

https://www.ft.com/content/9b1ff0b8-a1e8-4869-8d61-620c5ed32d35
7•7777777phil•5d ago•3 comments

Jiga (YC W21) Is Hiring Full Stack Engineers

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

Ask HN: How are you doing RAG locally?

272•tmaly•1d ago•116 comments

Raspberry Pi's New AI Hat Adds 8GB of RAM for Local LLMs

https://www.jeffgeerling.com/blog/2026/raspberry-pi-ai-hat-2/
193•ingve•7h ago•146 comments

Ask HN: Share your personal website

731•susam•22h ago•2002 comments

The 500k-ton typo: Why data center copper math doesn't add up

https://investinglive.com/news/the-500000-ton-typo-why-data-center-copper-math-doesnt-add-up-2026...
66•thebeardisred•3h ago•90 comments

Show HN: MailPilot – Freedom to go anywhere while your agents work

28•keepamovin•8h ago•34 comments

San Remo Pasta Measurer

https://www.toxel.com/tech/2025/09/17/san-remo-pasta-measurer/
37•surprisetalk•5d ago•28 comments

Scaling long-running autonomous coding

https://cursor.com/blog/scaling-agents
241•samwillis•17h ago•149 comments

French Court Orders Popular VPNs to Block More Pirate Sites, Despite Opposition

https://torrentfreak.com/french-court-orders-popular-vpns-to-block-more-pirate-sites-despite-oppo...
68•iamnothere•2h ago•47 comments

I spent a year on Linux and forgot to miss Windows

https://www.theverge.com/features/861968/year-using-linux
23•speckx•1h ago•21 comments

Ask HN: What did you find out or explore today?

155•blahaj•22h ago•261 comments

Crafting Interpreters

https://craftinginterpreters.com/
176•tosh•17h ago•41 comments

The State of OpenSSL for pyca/cryptography

https://cryptography.io/en/latest/statements/state-of-openssl/
179•SGran•18h ago•43 comments

Bubblewrap: A nimble way to prevent agents from accessing your .env files

https://patrickmccanna.net/a-better-way-to-limit-claude-code-and-other-coding-agents-access-to-se...
141•0o_MrPatrick_o0•14h ago•110 comments

Find a pub that needs you

https://www.ismypubfucked.com/
347•thinkingemote•1d ago•320 comments

New Safari developer tools provide insight into CSS Grid Lanes

https://webkit.org/blog/17746/new-safari-developer-tools-provide-insight-into-css-grid-lanes/
104•feross•15h ago•55 comments

European military personnel arrive in Greenland as Trump says US needs island

https://www.bbc.com/news/articles/cd0ydjvxpejo
14•vinni2•17m ago•15 comments

Show HN: Sparrow-1 – Audio-native model for human-level turn-taking without ASR

https://www.tavus.io/post/sparrow-1-human-level-conversational-timing-in-real-time-voice
94•code_brian•22h ago•22 comments