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.

US Court of Appeals: TOS may be updated by email, use can imply consent [pdf]

https://cdn.ca9.uscourts.gov/datastore/memoranda/2026/03/03/25-403.pdf
244•dryadin•5h ago•157 comments

Fontcrafter: Turn Your Handwriting into a Real Font

https://arcade.pirillo.com/fontcrafter.html
93•rendx•2h ago•40 comments

Ireland shuts last coal plant, becomes 15th coal-free country in Europe (2025)

https://www.pv-magazine.com/2025/06/20/ireland-coal-free-ends-coal-power-generation-moneypoint/
143•robin_reala•2h ago•33 comments

Unlocking Python's Cores:Energy Implications of Removing the GIL

https://arxiv.org/abs/2603.04782
34•runningmike•3d ago•17 comments

Agent Safehouse – macOS-native sandboxing for local agents

https://agent-safehouse.dev/
629•atombender•15h ago•151 comments

Microscopes can see video on a laserdisc

https://www.youtube.com/watch?v=qZuR-772cks
485•zdw•1d ago•63 comments

PCB devboard the size of a USB-C plug

https://github.com/Dieu-de-l-elec/AngstromIO-devboard
195•zachlatta•1d ago•41 comments

Ask HN: What Are You Working On? (March 2026)

176•david927•12h ago•653 comments

Every single board computer I tested in 2025

https://bret.dk/every-single-board-computer-i-tested-in-2025/
179•speckx•3d ago•59 comments

FrameBook

https://fb.edoo.gg
452•todsacerdoti•21h ago•76 comments

My Homelab Setup

https://bryananthonio.com/blog/my-homelab-setup/
258•photon_collider•19h ago•168 comments

I love email (2023)

https://blog.xoria.org/email/
41•surprisetalk•3d ago•17 comments

Linux Internals: How /proc/self/mem writes to unwritable memory (2021)

https://offlinemark.com/an-obscure-quirk-of-proc/
92•medbar•13h ago•20 comments

Artificial-life: A simple (300 lines of code) reproduction of Computational Life

https://github.com/Rabrg/artificial-life
125•tosh•15h ago•14 comments

We should revisit literate programming in the agent era

https://silly.business/blog/we-should-revisit-literate-programming-in-the-agent-era/
255•horseradish•16h ago•173 comments

We Stopped Using the Mathematics That Works

https://gfrm.in/posts/why-decision-theory-lost/index.html
11•slygent•3h ago•3 comments

How the Sriracha guys screwed over their supplier

https://old.reddit.com/r/KitchenConfidential/comments/1ro61g2/how_the_sriracha_guys_screwed_over_...
244•thunderbong•8h ago•81 comments

I made a programming language with M&Ms

https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/
93•tosh•18h ago•35 comments

Why can't you tune your guitar? (2019)

https://www.ethanhein.com/wp/2019/why-cant-you-tune-your-guitar/
222•digitallogic•4d ago•153 comments

Living human brain cells play DOOM on a CL1 [video]

https://www.youtube.com/watch?v=yRV8fSw6HaE
205•kevinak•21h ago•204 comments

My “grand vision” for Rust

https://blog.yoshuawuyts.com/a-grand-vision-for-rust/
210•todsacerdoti•4d ago•203 comments

Segagaga Has Been Translated into English

https://www.thedreamcastjunkyard.co.uk/2026/02/segagaga-has-finally-been-translated.html
4•nanna•1d ago•0 comments

Show HN: Mcp2cli – One CLI for every API, 96-99% fewer tokens than native MCP

https://github.com/knowsuchagency/mcp2cli
99•knowsuchagency•7h ago•66 comments

Ask HN: How to be alone?

515•sillysaurusx•1d ago•371 comments

Z80 Sans – a disassembler in a font (2024)

https://github.com/nevesnunes/z80-sans
125•pabs3•4d ago•12 comments

Nvidia backs AI data center startup Nscale as it hits $14.6B valuation

https://www.cnbc.com/2026/03/09/nscale-ai-data-center-nvidia-raise.html
12•voxadam•1h ago•6 comments

The death of social media is the renaissance of RSS (2025)

https://www.smartlab.at/rss-revival-life-after-social-media/
170•jruohonen•7h ago•107 comments

WSL Manager

https://github.com/bostrot/wsl2-distro-manager
112•gballan•18h ago•59 comments

The legendary Mojave Phone Booth is back (2013)

https://dailydot.com/mojave-phone-booth-back-number
37•1970-01-01•2d ago•8 comments

Pushing and Pulling: Three reactivity algorithms

https://jonathan-frere.com/posts/reactivity-algorithms/
104•frogulis•1d ago•18 comments