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.

Show HN: Getting GLM 5.2 running on my slow computer

https://github.com/JustVugg/colibri
323•vforno•16h ago•85 comments

GPT-5.6

https://openai.com/index/gpt-5-6/
1007•logickkk1•7h ago•752 comments

EU Parliament greenlights Chat Control 1.0

https://www.patrick-breyer.de/en/eu-parliament-greenlights-chat-control-1-0-breyer-our-children-l...
955•rapnie•13h ago•463 comments

Show HN: 18 Words

https://18words.com/
796•pompomsheep•11h ago•282 comments

Train sim created by just one person is being called the best ever made

https://kotaku.com/a-train-sim-created-by-just-one-person-is-being-called-the-best-ever-made-2000...
236•oumua_don17•4d ago•88 comments

Interview with Mitchell Hashimoto about Ghostty and Zig

https://alexalejandre.com/programming/interview-with-mitchell-hashimoto/
87•veqq•7h ago•31 comments

Hy3

https://hy.tencent.com/research/hy3
363•andai•9h ago•77 comments

Postgres rewritten in Rust, now passing 100% of the Postgres regression tests

https://github.com/malisper/pgrust
328•SweetSoftPillow•18h ago•351 comments

No leap second will be introduced at the end of December 2026

https://datacenter.iers.org/data/latestVersion/bulletinC.txt
224•ChrisArchitect•10h ago•178 comments

A road to Lisp: Why Lisp

https://scotto.me/blog/2026-07-09-why-lisp/
101•silcoon•11h ago•97 comments

Launch HN: Context.dev (YC S26) – API to get structured data from any website

https://www.context.dev
68•TheYahiaBakour•9h ago•51 comments

The glass backbone: Why the Army's logistics will break in the next war

https://mwi.westpoint.edu/the-glass-backbone-why-the-armys-logistics-will-break-in-the-next-war/
269•baud147258•11h ago•369 comments

Girls just wanna have fast MPMC queues with bounded waiting

https://nahla.dev/blog/waitfree_queue/
124•EvgeniyZh•3d ago•27 comments

A possible future for Damn Interesting

https://www.damninteresting.com/a-possible-future/
217•mzur•9h ago•24 comments

Meta reuses old RAM in new servers with custom bridge chip

https://www.theregister.com/systems/2026/06/29/zuck-saves-meta-bucks-by-reusing-memory-from-old-s...
294•ihsw•6d ago•212 comments

Patterncollider: Generate and explore quasiperiodic tiling patterns

https://github.com/aatishb/patterncollider
15•tobr•3d ago•1 comments

Muse Spark 1.1

https://ai.meta.com/blog/introducing-muse-spark-meta-model-api/
312•ot•10h ago•170 comments

My Story of 3D Realms / Apogee Part I (2020)

https://joesiegler.blog/2020/11/my-story-of-apogee-3dr/
8•Michelangelo11•1w ago•0 comments

TLS certificates for internal services done right

https://tuxnet.dev/posts/tls-for-internal-services/
125•mrl5•9h ago•90 comments

SimPolitics: America’s quest to solve politics with computers

https://mitpress.mit.edu/9780262053198/simpolitics/
77•mckelveyf•10h ago•11 comments

Wildcard (YC W25) Is Hiring a Founding Engineer

https://www.ycombinator.com/companies/wildcard/jobs/ZSLVaaU-founding-engineer
1•kaushikmahorker•7h ago

Buried Apple feature turns an iPhone into the perfect kids' dumb phone

https://www.wired.com/story/this-buried-apple-feature-turns-an-iphone-into-the-perfect-kids-dumb-...
254•PotatoNinja•3d ago•157 comments

GLM 5.2 is nearly as accurate as a human book keeper

https://toot-books.pages.dev/blog/glm-5-2-vat-benchmark
170•adamkurkiewicz•6h ago•107 comments

Opinionated and easy Pi.dev configuration

https://lazypi.org/
101•lwhsiao•9h ago•58 comments

Show HN: Rubiks Cube Solver

https://speedcube.com.br/
13•wozzp•3h ago•4 comments

ChatGPT Work

https://openai.com/index/chatgpt-for-your-most-ambitious-work/
320•Tiberium•7h ago•157 comments

Almost Always Unsigned

https://graphitemaster.github.io/aau/
48•gavide•1d ago•58 comments

AI content is everywhere on social media, especially LinkedIn

https://www.pangram.com/blog/ai-in-your-feed
177•mukmuk•8h ago•155 comments

How to Start a Ruby Meetup

https://guides.rubyevents.org/meetups/
60•mooreds•6h ago•14 comments

Show HN: I mapped 8.5M research papers into an interactive atlas

https://tomesphere.com/atlas
58•leonickson•22h ago•22 comments