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.

Virginia bans sale of geolocation data

https://www.hunton.com/privacy-and-cybersecurity-law-blog/virginia-bans-sale-of-geolocation-data
438•toomuchtodo•4h ago•78 comments

An American Privacy Emergency

https://scottaaronson.blog/?p=9902
100•flowercalled•1h ago•10 comments

crustc: entirety of `rustc`, translated to C

https://github.com/FractalFir/crustc
119•Philpax•2h ago•24 comments

Reality has a surprising amount of detail (2017)

https://johnsalvatier.org/blog/2017/reality-has-a-surprising-amount-of-detail
129•vinhnx•5d ago•44 comments

Exapunks (2018)

https://www.zachtronics.com/exapunks/
217•yu3zhou4•6h ago•77 comments

Mystery identity of 'Green Boots' climber is finally solved after DNA test

https://www.dailymail.com/news/article-15943905/Mystery-identity-Green-Boots-climber-macabre-land...
45•FireBeyond•2h ago•17 comments

GitHub is proud to announce that you can now obtain your public repo on CD-ROM

https://forms.cloud.microsoft/pages/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR6G-c11n8yFDlQmk4B-Q...
24•throwaway2027•1h ago•19 comments

Since Linux 6.9, LUKS suspend stopped wiping disk-encryption keys from memory

https://mathstodon.xyz/@iblech/116769502749142438
396•IngoBlechschmid•9h ago•187 comments

Podman v6.0.0

https://blog.podman.io/2026/07/introducing-podman-v6-0-0/
387•soheilpro•10h ago•149 comments

PeerTube is a free, decentralized and federated video platform

https://github.com/Chocobozzz/PeerTube
508•doener•14h ago•227 comments

"An AI Job Apocalypse?" – Goldman Sachs Report [pdf]

https://www.goldmansachs.com/static-libs/pdf-redirect/prod/index.html?path=/pdfs/insights/goldman...
15•aanet•1h ago•14 comments

Right to Local Intelligence

https://righttointelligence.org/
15•thoughtpeddler•1h ago•4 comments

EFF letter to FTC on X consent order (2 July 2026) [pdf]

https://cdn.arstechnica.net/wp-content/uploads/2026/07/EFF-letter-to-FTC-on-X-consent-order-7-2-2...
102•Terretta•5h ago•26 comments

How to ask for help from people who don't know you

https://pradyuprasad.com/writings/how-to-ask-for-help/
382•FigurativeVoid•11h ago•62 comments

This is my attempt to get Vulkan going on NetBSD

https://github.com/segaboy/vulkan-netbsd
81•segaboy81•6h ago•18 comments

Postgres transactions are a distributed systems superpower

https://www.dbos.dev/blog/co-locating-workflow-state-with-your-data
106•KraftyOne•6h ago•50 comments

Show HN: Gitstock–Transform you GitHub commit history into K-line and animations

https://gitstock.org/
6•dares2573•2d ago•1 comments

Superpowers 6

https://blog.fsck.com/2026/06/15/Superpowers-6/
69•seahorseemoji•2d ago•31 comments

Lightning Memory-Mapped Database Manager (LMDB) 1.0

http://www.lmdb.tech/doc/
59•radiator•5h ago•37 comments

Show HN: Inkwell – An RSS reader for e-ink devices

https://kendal.codeberg.page/inkwell/
21•imkendal•9h ago•3 comments

FoundationDB's Flow – Bringing Actor-Based Concurrency to C++11

https://apple.github.io/foundationdb/flow.html
25•sourdecor•10h ago•4 comments

Great Salt Lake Tracker – Grow the Flow

https://growtheflowutah.org/laketracker/
59•cfowles•5h ago•17 comments

Show HN: Pieces – Social network for people

https://try.piecesof.me/
26•domo__knows•1d ago•18 comments

Claude-real-video - any LLM can watch a video

https://github.com/HUANGCHIHHUNGLeo/claude-real-video
75•cortexosmain•6h ago•26 comments

Immich 3.0

https://github.com/immich-app/immich/discussions/29439
186•hashier•11h ago•81 comments

The short leash AI coding method for beating Fable

https://blog.okturtles.org/2026/07/short-leash-ai-method/
59•Riseed•6h ago•62 comments

Apricot Computers: An underrated British brand

https://dfarq.homeip.net/apricot-computers-an-underrated-british-brand/
17•giuliomagnifico•1d ago•6 comments

JEP 539: Strict Field Initialization in the JVM moved to preview

https://openjdk.org/jeps/539
55•za3faran•6h ago•17 comments

A Special Wireless-Free Nikon Camera Is Publicly Available for the First Time

https://petapixel.com/2026/06/24/a-special-wireless-free-nikon-camera-is-publicly-available-for-t...
11•HardwareLust•1w ago•10 comments

Hazel (YC W24) Is Hiring for Our Largest Government Contract

https://www.ycombinator.com/companies/hazel-2/jobs/3epPWgu-full-stack-engineer-ts-sci
1•augustschen•12h ago