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•1y ago

Comments

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

Uber wants to turn its drivers into a sensor grid for self-driving companies

https://techcrunch.com/2026/05/01/uber-wants-to-turn-its-millions-of-drivers-into-a-sensor-grid-f...
50•nickvec•2h ago•57 comments

Inventions for battery reuse and recycling increase more than 7-fold in last 10y

https://www.epo.org/en/news-events/news/inventions-battery-reuse-and-recycling-increase-more-seve...
30•JeanKage•2d ago•2 comments

Barman – Backup and Recovery Manager for PostgreSQL

https://github.com/EnterpriseDB/barman
82•nateb2022•3d ago•14 comments

How fast is a macOS VM, and how small could it be?

https://eclecticlight.co/2026/05/02/how-fast-is-a-macos-vm-and-how-small-could-it-be/
178•moosia•8h ago•66 comments

Why does it take so long to release black fan versions?

https://www.noctua.at/en/expertise/blog/how-can-it-take-so-long-to-release-black-fan-versions
583•buildbot•13h ago•247 comments

AI Self-preferencing in Algorithmic Hiring: Empirical Evidence and Insights

https://arxiv.org/abs/2509.00462
292•laurex•2h ago•138 comments

Refusal in Language Models Is Mediated by a Single Direction

https://arxiv.org/abs/2406.11717
40•fagnerbrack•4h ago•14 comments

Ask HN: Is the Job Market Actually Bad?

21•idontwantthis•51m ago•22 comments

Why are there both TMP and TEMP environment variables? (2015)

https://devblogs.microsoft.com/oldnewthing/20150417-00/?p=44213
154•ankitg12•9h ago•74 comments

America's Expanding Domestic Surveillance

https://www.wsj.com/articles/americas-expanding-domestic-surveillance-08b73187
90•Brajeshwar•2h ago•43 comments

Open Design: Use Your Coding Agent as a Design Engine

https://github.com/nexu-io/open-design
117•steveharing1•5h ago•71 comments

Dotcl: Common Lisp Implementation on .NET

https://github.com/dotcl/dotcl
118•reikonomusha•2d ago•21 comments

Zugzwang

https://en.wikipedia.org/wiki/Zugzwang
60•Qem•2h ago•29 comments

Ti-84 Evo

https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-evo
538•thatxliner•21h ago•440 comments

Show HN: Pollen – distributed WASM runtime, no control plane, single binary

https://github.com/sambigeara/pollen
71•sambigeara•2d ago•36 comments

Show HN: DAC – open-source dashboard as code tool for agents and humans

https://github.com/bruin-data/dac
76•karakanb•3d ago•22 comments

Artemis II Photo Timeline

https://artemistimeline.com/#artemis-ii-walkout-nhq202604010003
305•geerlingguy•2d ago•25 comments

New research suggests people can communicate and practice skills while dreaming

https://www.newyorker.com/culture/annals-of-inquiry/its-possible-to-learn-in-our-sleep-should-we
417•XzetaU8•1d ago•244 comments

Show HN: Mljar Studio – local AI data analyst that saves analysis as notebooks

https://mljar.com/
53•pplonski86•7h ago•11 comments

DeepSeek V4–almost on the frontier, a fraction of the price

https://simonwillison.net/2026/Apr/24/deepseek-v4/
374•indigodaddy•1d ago•239 comments

Craig Venter of Human Genome Project Dies at 79

https://www.economist.com/obituary/2026/05/01/craig-venter-raced-to-decode-the-human-genome
46•bookofjoe•5h ago•10 comments

To Restore an Island Paradise, Add Fungi

https://e360.yale.edu/digest/atoll-islands-sea-level-rise-fungi
117•Brajeshwar•3d ago•32 comments

Roblox shares plummet 18% as child safety measures weigh on bookings

https://www.cnbc.com/2026/05/01/roblox-rblx-stock-child-safety-earnings.html
7•1vuio0pswjnm7•51m ago•0 comments

Show HN: Browser-based light pollution simulator using real photometric data

https://iesna.eu/?wasm=skyglow_demo
34•holg•8h ago•11 comments

SFO Gate Explorer

https://www.flysfo.com/passengers/services/gate-explorer
30•CaliforniaKarl•2d ago•31 comments

Show HN: Filling PDF forms with AI using client-side tool calling

https://copilot.simplepdf.com/?share=a7d00ad073c75a75d493228e6ff7b11eb3f2d945b6175913e87898ec96ca...
42•nip•9h ago•21 comments

An unknown Sega Saturn project has come to light after 29 years

https://32bits.substack.com/p/under-the-microscope-pyramid-unreleased
82•bbayles•5h ago•2 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/rEWfZ6R-senior-forward-deployed-engineer
1•OBrien_1107•13h ago

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

186•proberts•1d ago•233 comments

Ask.com has closed

https://www.ask.com/
404•supermdguy•13h ago•206 comments