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.

The End of an Era

https://hughhowey.com/the-end-of-an-era/
48•harscoat•48m ago•19 comments

DeepSeek V4 Flash 0731 Intelligence, Performance and Price Analysis

https://artificialanalysis.ai/models/deepseek-v4-flash-ga
106•theanonymousone•4h ago•33 comments

The session you cannot take with you

https://earendil.com/posts/session-portability/
492•apitman•8h ago•128 comments

JEP 401: Value Objects (Preview) merged to OpenJDK master

https://github.com/openjdk/jdk/pull/31120
157•mfiguiere•8h ago•82 comments

IMAX vs. IMAX 70mm: The difference between these two cinema formats

https://www.engadget.com/2220571/differences-between-imax-70mm/
26•ksec•5d ago•20 comments

Google fixed more Chrome bugs in June than over the past two years, thanks to AI

https://blog.google/security/chrome-stronger-with-every-update/
165•Garbage•5h ago•183 comments

Tasklet (YC P26) Is Hiring a Customer Success Engineer

https://tasklet.ai/careers/customer-success-engineer
1•mayop100•39m ago

DeepSeek-V4-Flash Update

https://api-docs.deepseek.com/updates/
384•dnhkng•6h ago•196 comments

Stacked PRs are now live on GitHub

https://github.blog/changelog/2026-07-30-stacked-pull-requests-are-now-in-public-preview/
692•tomzorz•20h ago•240 comments

How A Gang of Thieves Pulled Off a Multimillion-Dollar Data Center Heist

https://www.nytimes.com/2026/07/12/magazine/data-center-heist.html
15•chirau•5d ago•4 comments

Gemini Robotics 2 brings whole body intelligence to robots

https://deepmind.google/blog/gemini-robotics-2-brings-whole-body-intelligence-to-robots/
580•ai2027•21h ago•465 comments

I flagged two research papers for fake authors and both were accepted as orals

https://geospatialml.com/posts/reviewing-ai-slop/
228•volumes94•14h ago•105 comments

Show HN: Gander, an Android file viewer that asks for no permissions at all

https://github.com/mokshablr/gander
102•mokshablr•6h ago•50 comments

The Religion of Speed

https://graybeard.ing/the-religion-of-speed/
197•MobiusHorizons•12h ago•90 comments

The mean means nothing: data visualization to debug a latency problem

https://fzakaria.com/2026/07/27/the-mean-means-nothing
60•fanf2•2d ago•12 comments

Read this before you buy that TV streaming stick

https://krebsonsecurity.com/2026/07/read-this-before-you-buy-that-tv-streaming-stick/
743•speckx•19h ago•446 comments

Ruby Central's Destructive Legacy

https://andre.arko.net/2026/07/30/ruby-centrals-destructive-legacy/
6•4d66ba06•29m ago•2 comments

Where USB Memory Sticks are Born (2013)

https://www.bunniestudios.com/blog/2013/where-usb-memory-sticks-are-born/
67•jacquesm•3d ago•3 comments

The Economic Benefit of Refactoring

https://martinfowler.com/articles/exploring-gen-ai/refactoring-economic-benefit.html
249•javaeeeee•21h ago•109 comments

Simulating TCP loss and congestion in browser using Go/WASM

https://ccsim.fly.dev
36•dilyevsky•2d ago•1 comments

GCC steering committee announces AI policy

https://lwn.net/Articles/1086041/
308•arto•1d ago•353 comments

Bad Apple but It's Traceroute

https://jssfr.de/2026-07-27-bad-apple-but-traceroute.html
134•jssfr•3d ago•43 comments

Memo-1: A 6502 computer built from scratch, using a Minitel as its terminal

https://github.com/MemoireMorte/Memo-1
87•sciences44•2d ago•12 comments

The lost civic life of movie rental stores

https://thereader.mitpress.mit.edu/the-lost-civic-life-of-movie-rental-stores/
186•facundo_olano•22h ago•242 comments

Premier league bans gambling sponsors

https://www.footyheadlines.com/2646571793/betting-ban-takes-effect-no-more-gambling-sponsors-in-t...
55•paoliniluis•12h ago•9 comments

UEFA and its national associations will not participate in FIFA competitions

https://www.uefa.com/news-media/news/02a7-213a92896eb0-54dfbf454e3b-1000--statement-on-behalf-of-...
1101•dickfickling•17h ago•594 comments

CodePen 2.0

https://chriscoyier.net/2026/07/30/codepen-2-0/
173•robin_reala•18h ago•49 comments

The AI Aesthetic

https://blog.jim-nielsen.com/2026/ai-aesthetic/
329•montroser•13h ago•149 comments

Rune 1.1: adds Python, an Emacs editor, a symbol index and is now free

https://rune.build/blog/rune-1-1-release
89•ernestrc•14h ago•39 comments

Show HN: Distilling DeepSeek into GPT-OSS doesn't transfer censorship. Try it

https://www.ctgt.ai/research/distillation-censorship-transfer
137•cgorlla•18h ago•68 comments