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.

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

https://creepylink.com/
79•dreadsword•1h ago•22 comments

Claude Cowork Exfiltrates Files

https://www.promptarmor.com/resources/claude-cowork-exfiltrates-files
552•takira•9h ago•233 comments

Furiosa: 3.5x efficiency over H100s

https://furiosa.ai/blog/introducing-rngd-server-efficient-ai-inference-at-data-center-scale
113•written-beyond•4h ago•58 comments

Ask HN: What is the best way to provide continuous context to models?

22•nemath•3h ago•9 comments

Scaling long-running autonomous coding

https://cursor.com/blog/scaling-agents
155•samwillis•6h ago•78 comments

Ask HN: Share your personal website

482•susam•12h ago•1435 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
8•code_brian•11h ago•1 comments

You need a kitchen slide rule

https://entropicthoughts.com/kitchen-slide-rule
28•aebtebeten•1d ago•33 comments

Ask HN: Weird archive.today behavior?

34•rabinovich•6h ago•10 comments

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

21•blahaj•11h ago•10 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...
45•0o_MrPatrick_o0•3h ago•39 comments

The State of OpenSSL for pyca/cryptography

https://cryptography.io/en/latest/statements/state-of-openssl/
101•SGran•7h ago•18 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/
6•feross•4h ago•1 comments

Why some clothes shrink in the wash and how to unshrink them

https://www.swinburne.edu.au/news/2025/08/why-some-clothes-shrink-in-the-wash-and-how-to-unshrink...
472•OptionOfT•4d ago•248 comments

Show HN: WebTiles – create a tiny 250x250 website with neighbors around you

https://webtiles.kicya.net/
145•dimden•5d ago•21 comments

Ask HN: How are you doing RAG locally?

40•tmaly•14h ago•12 comments

Sun Position Calculator

https://drajmarsh.bitbucket.io/earthsun.html
81•sanbor•7h ago•16 comments

ChromaDB Explorer

https://www.chroma-explorer.com/
46•arsentjev•6h ago•2 comments

SparkFun Officially Dropping AdaFruit due to CoC Violation

https://www.sparkfun.com/official-response
422•yaleman•14h ago•424 comments

MIT Whirlwind I: A High-Speed Electronic Digital Computer (1951)

https://dome.mit.edu/bitstream/handle/1721.3/40245/MC665_r12_R-209.pdf?sequence=1&isAllowed=y
9•stmw•5d ago•2 comments

Generate QR Codes with Pure SQL in PostgreSQL

https://tanelpoder.com/posts/generate-qr-code-with-pure-sql-in-postgres/
65•tanelpoder•4d ago•5 comments

Find a pub that needs you

https://www.ismypubfucked.com/
237•thinkingemote•13h ago•193 comments

I Designed a Custom Protocol for My App

https://blog.roj.dev/how-i-designed-a-custom-protocol-for-my-app
3•_roj•2d ago•0 comments

How can I build a simple pulse generator to demonstrate transmission lines

https://electronics.stackexchange.com/questions/764155/how-can-i-build-a-simple-pulse-generator-t...
26•alphabetter•5d ago•6 comments

Ask HN: Distributed SQL engine for ultra-wide tables

7•synsqlbythesea•7h ago•6 comments

Roam 50GB is now Roam 100GB

https://starlink.com/support/article/58c9c8b7-474e-246f-7e3c-06db3221d34d
263•bahmboo•13h ago•309 comments

Upgrading DrizzleORM logging with AsyncLocalStorage

https://numeric.substack.com/p/upgrading-drizzleorm-logging-with
4•bihla•9h ago•1 comments

Crafting Interpreters

https://craftinginterpreters.com/
48•tosh•6h ago•7 comments

Show HN: Webctl – Browser automation for agents based on CLI instead of MCP

https://github.com/cosinusalpha/webctl
76•cosinusalpha•14h ago•23 comments

Show HN: Liberty – Hardware-bound secret manager (no more .env files)

3•deciphergit•23h ago•0 comments