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

Comments

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

A Decade of Slug

https://terathon.com/blog/decade-slug.html
315•mwkaufma•3h ago•24 comments

Python 3.15's JIT is now back on track

https://fidget-spinner.github.io/posts/jit-on-track.html
178•guidoiaquinti•3h ago•59 comments

Get Shit Done: A Meta-Prompting, Context Engineering and Spec-Driven Dev System

https://github.com/gsd-build/get-shit-done
104•stefankuehnel•2h ago•48 comments

Microsoft's 'unhackable' Xbox One has been hacked by 'Bliss'

https://www.tomshardware.com/video-games/console-gaming/microsofts-unhackable-xbox-one-has-been-h...
445•crtasm•7h ago•173 comments

It Took Me 30 Years to Solve This VFX Problem – Green Screen Problem [video]

https://www.youtube.com/watch?v=3Ploi723hg4
113•yincrash•4d ago•47 comments

Warranty Void If Regenerated

https://nearzero.software/p/warranty-void-if-regenerated
30•Stwerner•1h ago•4 comments

Kagi Small Web

https://kagi.com/smallweb/
657•trueduke•12h ago•187 comments

Launch HN: Kita (YC W26) – Automate credit review in emerging markets

10•rheamalhotra1•2h ago•0 comments

Chrome extension adjusts video speed based on how fast the speaker is talking

https://github.com/ywong137/speech-speed
48•MrBuddyCasino•4d ago•12 comments

Edge.js: Run Node apps inside a WebAssembly sandbox

https://wasmer.io/posts/edgejs-safe-nodejs-using-wasm-sandbox
64•syrusakbary•4h ago•20 comments

Node.js needs a virtual file system

https://blog.platformatic.dev/why-nodejs-needs-a-virtual-file-system
210•voctor•8h ago•159 comments

Torturing Rustc by Emulating HKTs

https://www.harudagondi.space/blog/torturing-rustc-by-emulating-hkts/
29•g0xA52A2A•3d ago•3 comments

'The Secret Agent': Exploring a Vibrant, yet Violent Brazil (2025)

https://theasc.com/articles/the-secret-agent-cinematography
107•tambourine_man•6h ago•45 comments

Unsloth Studio

https://unsloth.ai/docs/new/studio
92•brainless•7h ago•24 comments

Meta Horizon Worlds on Meta Quest is being discontinued

https://communityforums.atmeta.com/blog/AnnouncementsBlog/updates-to-your-meta-quest-experience-i...
120•par•3h ago•124 comments

Illinois Introducing Operating System Account Age Bill

https://www.ilga.gov/Legislation/BillStatus?DocTypeID=HB&DocNum=5511
204•terminalbraid•4h ago•288 comments

Spice Data (YC S19) Is Hiring a Product Specialist

https://www.ycombinator.com/companies/spice-data/jobs/P0e9MKz-product-specialist-new-grad
1•richard_pepper•5h ago

Java 26 is here

https://hanno.codes/2026/03/17/java-26-is-here/
117•mfiguiere•3h ago•83 comments

Ryugu asteroid samples contain all DNA and RNA building blocks

https://phys.org/news/2026-03-ryugu-asteroid-samples-dna-rna.html
151•bookofjoe•10h ago•90 comments

Meta and TikTok let harmful content rise to drove engagement, say whistleblowers

https://www.bbc.com/news/articles/cqj9kgxqjwjo
107•1vuio0pswjnm7•2h ago•53 comments

OpenSUSE Kalpa

https://kalpadesktop.org/
117•ogogmad•8h ago•72 comments

Show HN: Crust – A CLI framework for TypeScript and Bun

https://github.com/chenxin-yan/crust
56•jellyotsiro•17h ago•23 comments

Honda is killing its EVs

https://techcrunch.com/2026/03/14/honda-is-killing-its-evs-and-any-chance-of-competing-in-the-fut...
131•sylvainkalache•2d ago•214 comments

Finding a CPU Design Bug in the Xbox 360 (2018)

https://randomascii.wordpress.com/2018/01/07/finding-a-cpu-design-bug-in-the-xbox-360/
143•mariuz•4d ago•45 comments

Show HN: Horizon – GPU-accelerated infinite-canvas terminal in Rust

https://github.com/peters/horizon
31•petersunde•4h ago•14 comments

FFmpeg 8.1

https://ffmpeg.org/index.html#pr8.1
324•gyan•7h ago•49 comments

Toward automated verification of unreviewed AI-generated code

https://peterlavigne.com/writing/verifying-ai-generated-code
74•peterlavigne•1d ago•66 comments

Reverse-engineering Viktor and making it open source

https://matijacniacki.com/blog/openviktor
146•zggf•14h ago•62 comments

The Plumbing of Everyday Magic

https://plumbing-of-everyday-magic.hyperclay.com/
34•hannahilea•4d ago•2 comments

Show HN: Antfly: Distributed, Multimodal Search and Memory and Graphs in Go

https://github.com/antflydb/antfly
74•kingcauchy•6h ago•27 comments