frontpage.
newsnewestaskshowjobs

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

Rocketlab acquires Iridium

https://investors.rocketlabcorp.com/news-releases/news-release-details/rocket-lab-acquire-iridium...
153•everfrustrated•2h ago•83 comments

WATaBoy: JIT-Ing Game Boy Instructions to WASM Beats a Native Interpreter

https://humphri.es/blog/WATaBoy/
73•energeticbark•2h ago•8 comments

A native graphical shell for SSH

https://probablymarcus.com/blocks/2026/06/28/native-graphical-shell-for-SSH.html
33•mrcslws•1h ago•14 comments

What happens when you run a CUDA kernel?

https://fergusfinn.com/blog/what-happens-when-you-run-a-gpu-kernel/
106•mezark•3h ago•7 comments

Building Principia for Windows XP

https://voxelmanip.se/2026/06/28/building-principia-for-windows-xp/
79•LorenDB•3h ago•16 comments

Sandia National Labs SA3000 8085 CPU

https://www.cpushack.com/2026/06/03/sandia-national-labs-sa3000-8085-cpu/
112•rbanffy•6h ago•31 comments

HackerRank open sourced its ATS. My resume scored 90/100. Oh wait 74. No – 88

https://danunparsed.com/p/hackerrank-open-source-ats
829•sambellll•15h ago•355 comments

Venetian Bridge Brawls in 17th and 18th Century Art

https://publicdomainreview.org/collection/venice-bridge-fights/
20•pepys•3d ago•6 comments

European ISPs Want Rightsholders Held Accountable for Overblocking Damage

https://torrentfreak.com/european-isps-want-rightsholders-held-accountable-for-overblocking-damage/
51•Brajeshwar•55m ago•6 comments

Mag 7 starting to underperform [pdf]

https://www.apollo.com/content/dam/apolloaem/pdf/daily-spark/2026/jun/28/062826-Mag7.pdf
134•mooreds•2h ago•100 comments

Tidal AI Policy

https://tidal.com/ai-policy
203•hn8726•3h ago•231 comments

US Supreme Court rules geofence warrants require constitutional protections

https://www.theguardian.com/us-news/2026/jun/29/supreme-court-geofence-warrants-case-decision
50•cdrnsf•1h ago•9 comments

Instagram is incorporating users' photos in ads for Meta Glasses

https://twitter.com/i/status/2071277885646868536
177•notRobot•3h ago•75 comments

Decker Fantasy Camp 2026

https://itch.io/jam/decker-fantasy-camp-2026
15•RodgerTheGreat•2d ago•2 comments

CachyOS June 2026 Release

https://cachyos.org/blog/2606-june-release/
65•simonpure•3h ago•37 comments

Pollen tried to remove my article and Google is assisting with it

https://blog.pragmaticengineer.com/pollen-tried-to-remove-my-article-about-callum-negus-fancey-an...
701•taubek•7h ago•95 comments

Samsung, SK Hynix, Micron Sued in US over Memory Price Fixing

https://en.sedaily.com/international/2026/06/29/samsung-sk-hynix-micron-sued-in-us-over-memory-pr...
165•donohoe•5h ago•86 comments

The CEO of Mullvad is the main financer of the Swedish Örebro party

https://det.social/@lostgen/116820546568940358
156•Risse•6h ago•445 comments

The Return of Aspect Oriented Programming

https://thomaswc.com/blog/the_return_of_aop.html
16•thomaswc•3d ago•3 comments

Halvar's Guide to Entrepreneurship

https://thomasdullien.github.io/guides/entrepreneurship/
124•nekitamo•4d ago•37 comments

Studio Canal Movies purchased on PlayStation Store removed without refund

https://www.playstation.com/en-gb/legal/psvideocontent/
127•kugelblitz•3h ago•70 comments

Type-checked non-empty strings

https://exploring-better-ways.bellroy.com/haskell-koan-type-checked-non-empty-strings.html
38•surprisetalk•3d ago•17 comments

Rebuilding the Computer Room

https://alexwlchan.net/2026/computer-room/
56•ingve•5h ago•29 comments

NUMA: Cores, memory, and the distance between them

https://edera.dev/stories/numa-part-1-cores-memory-and-the-distance-between-them
100•sys_call•5d ago•19 comments

How we made WINDOW JOIN parallel and vectorized

https://questdb.com/blog/window-join-parallel-vectorized/
23•tosh•4d ago•2 comments

Microsoft Needs Windows Lite

https://philipbohun.com/blog/0011.html
54•pbohun•1h ago•64 comments

Dissecting Apple's Sparse Image Format (ASIF)

https://schamper.dev/dissecting-apples-sparse-image-format-asif/
137•supermatou•1d ago•20 comments

Age verification is just a precursor to automated attribution of speech

https://nonogra.ph/age-verification-is-just-a-precursor-to-attribution-of-speech-06-29-2026
859•arkhiver•13h ago•511 comments

HamsterOS: A graphical desktop OS that fits on a 1.44MB floppy

https://hackaday.com/2026/06/29/hamsteros-crams-complete-graphical-desktop-onto-1-44-mb-floppy/
11•logickkk1•58m ago•3 comments

We found a bug in the hyper HTTP library

https://blog.cloudflare.com/hyper-bug/
144•Pop_-•4d ago•65 comments