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

Comments

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

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
1127•rd•8h ago•780 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
660•tosh•12h ago•326 comments

Why I Write (1946)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/why-i-write/
4•RyanShook•18m ago•0 comments

Show HN: Tolaria – Open-source macOS app to manage Markdown knowledge bases

https://github.com/refactoringhq/tolaria
115•lucaronin•4h ago•35 comments

Meta tells staff it will cut 10% of jobs

https://www.bloomberg.com/news/articles/2026-04-23/meta-tells-staff-it-will-cut-10-of-jobs-in-pus...
400•Vaslo•7h ago•373 comments

MeshCore development team splits over trademark dispute and AI-generated code

https://blog.meshcore.io/2026/04/23/the-split
160•wielebny•9h ago•96 comments

TorchTPU: Running PyTorch Natively on TPUs at Google Scale

https://developers.googleblog.com/torchtpu-running-pytorch-natively-on-tpus-at-google-scale/
67•mji•5h ago•2 comments

I am building a cloud

https://crawshaw.io/blog/building-a-cloud
1009•bumbledraven•22h ago•495 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
589•mfiguiere•8h ago•449 comments

My phone replaced a brass plug

https://drobinin.com/posts/my-phone-replaced-a-brass-plug/
88•valzevul•10h ago•14 comments

Show HN: Agent Vault – Open-source credential proxy and vault for agents

https://github.com/Infisical/agent-vault
80•dangtony98•1d ago•28 comments

Your hex editor should color-code bytes

https://simonomi.dev/blog/color-code-your-bytes/
515•tobr•2d ago•143 comments

UK Biobank health data keeps ending up on GitHub

https://biobank.rocher.lc
77•Cynddl•12h ago•20 comments

Astronomers find the edge of the Milky Way

https://skyandtelescope.org/astronomy-news/astronomers-find-the-edge-of-the-milky-way/
88•bookofjoe•8h ago•13 comments

A programmable watch you can actually wear

https://www.hackster.io/news/a-diy-watch-you-can-actually-wear-8f91c2dac682
144•sarusso•2d ago•76 comments

Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite

https://github.com/russellromney/honker
238•russellthehippo•14h ago•58 comments

Incident with multple GitHub services

https://www.githubstatus.com/incidents/myrbk7jvvs6p
214•bwannasek•10h ago•106 comments

Used La Marzocco machines are coveted by cafe owners and collectors

https://www.nytimes.com/2026/04/20/dining/la-marzocco-espresso-machine.html
38•mitchbob•2d ago•70 comments

French government agency confirms breach as hacker offers to sell data

https://www.bleepingcomputer.com/news/security/french-govt-agency-confirms-breach-as-hacker-offer...
361•robtherobber•10h ago•122 comments

I spent years trying to make CSS states predictable

https://tenphi.me/blog/why-i-spent-years-trying-to-make-css-states-predictable/
53•tenphi•14h ago•15 comments

Advanced Packaging Limits Come into Focus

https://semiengineering.com/advanced-packaging-limits-come-into-focus/
31•PaulHoule•2d ago•5 comments

Girl, 10, finds rare Mexican axolotl under Welsh bridge

https://www.bbc.com/news/articles/c9d4zgnqpqeo
182•codezero•7h ago•146 comments

Arch Linux Now Has a Bit-for-Bit Reproducible Docker Image

https://antiz.fr/blog/archlinux-now-has-a-reproducible-docker-image/
314•maxloh•1d ago•106 comments

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
2150•Kaibeezy•1d ago•737 comments

Writing a C Compiler, in Zig (2025)

https://ar-ms.me/thoughts/c-compiler-1-zig/
140•tosh•17h ago•41 comments

Using the internet like it's 1999

https://joshblais.com/blog/using-the-internet-like-its-1999/
103•joshuablais•6h ago•68 comments

Palantir employees are starting to wonder if they're the bad guys

https://www.wired.com/story/palantir-employees-are-starting-to-wonder-if-theyre-the-bad-guys/
768•pavel_lishin•9h ago•521 comments

Isopods of the world

https://isopod.site/
156•debesyla•3d ago•57 comments

WireGuard for Windows Reaches v1.0

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009580.html
114•zx2c4•2d ago•7 comments

A Renaissance gambling dispute spawned probability theory

https://www.scientificamerican.com/article/how-a-renaissance-gambling-dispute-spawned-probability...
100•sohkamyung•2d ago•15 comments