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•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.

NPM packages from RedHat have been compromised

https://github.com/RedHatInsights/javascript-clients/issues/492
149•kurmiashish•31m ago•55 comments

A 10 year old Xeon is all you need

https://point.free/blog/gemma-4-on-a-2016-xeon/
377•cafkafk•7h ago•162 comments

When AI Crosses the Line: The Matplotlib Incident

https://members.sigmazero.cc/posts/when-ai-crosses-159174096?postId=when-ai-crosses-159174096
87•sigmazero•1h ago•64 comments

Launch HN: Expanse (YC P26) – Unlock Wasted GPU Capacity

8•ismaeel_bashir•57m ago•0 comments

Sysadmining Like It's 2009

https://lambdacreate.com/posts/sysadmining-like-its-2009
3•yacin•11m ago•0 comments

Tracing HTTP Requests with Go's net/HTTP/httptrace

https://blainsmith.com/articles/httptrace-with-go/
104•speckx•3d ago•6 comments

Cessation of public development of Kefir C compiler

https://kefir.protopopov.lv/posts/announce2.html
87•f311a•5h ago•27 comments

Only 17% of all 64-bit Integers are products of two 32-bit integers

https://lemire.me/blog/2026/05/22/only-17-of-all-64-bit-integers-are-products-of-two-32-bit-integ...
45•sebg•3d ago•8 comments

Chuwi Minibook X

https://tylercipriani.com/blog/2026/05/28/chuwi-minibook-x/
336•thcipriani•15h ago•259 comments

Movwin: My (Unpublished) TUI Framework

https://movq.de/blog/postings/2026-05-29/0/POSTING-en.html
21•zdw•2d ago•2 comments

Benchmarking SurrealDB 3.x vs. Postgres, Mongo, Neo4j and Redis (With Fsync)

https://surrealdb.com/blog/surrealdb-3-x-by-the-numbers
55•itsezc•2d ago•11 comments

Cloudflare Turnstile requiring fingerprintable WebGL

https://hacktivis.me/articles/cloudflare-turnstile-webgl-fingerprinting
729•HypnoticOcelot•23h ago•418 comments

The SLAX Scripting Language: An Alternate Syntax for XSLT

http://juniper.github.io/libslax/slax-manual.html
22•thefilmore•2d ago•9 comments

Decades of Effort Restore Steelhead and Salmon Passage on Alameda Creek

https://www.fisheries.noaa.gov/feature-story/decades-effort-restore-steelhead-and-salmon-passage-...
174•rawgabbit•2d ago•29 comments

Nvidia Cosmos 3

https://developer.nvidia.com/blog/develop-physical-ai-reasoning-world-and-action-models-with-nvid...
13•tosh•29m ago•0 comments

Blorp Language

https://blorp-lang.org/
47•croottree•6h ago•18 comments

1-Bit Bonsai Image 4B Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
426•modinfo•22h ago•180 comments

Dav2d

https://jbkempf.com/blog/2026/dav2d/
518•captain_bender•1d ago•191 comments

ChatGPT for Google Sheets exfiltrates workbooks

https://www.promptarmor.com/resources/gpt-for-google-sheets-data-exfiltration
270•hackerBanana•17h ago•97 comments

The Genius of the Barn Owl's Feathers

https://thereader.mitpress.mit.edu/the-genius-of-the-barn-owls-feathers/
63•EA-3167•3d ago•15 comments

Using Git's rerere feature to escape recurring conflict hell

https://gist.github.com/skipcloud/f1033afb4fa5681d69fa63458cc95928
31•ankitg12•6h ago•7 comments

United Airlines 767 returns to Newark after Bluetooth name sparks alert

https://simpleflying.com/united-airlines-767-returns-newark-bluetooth-name-alert/
389•Eridanus2•1d ago•788 comments

Rubin Tracks Skyscraper-Size Asteroids and Failed Supernovas

https://www.quantamagazine.org/rubin-tracks-skyscraper-size-asteroids-failed-supernovas-and-inter...
44•adm4•9h ago•10 comments

Meta launches Instagram, Facebook, and WhatsApp subscriptions

https://techcrunch.com/2026/05/27/meta-officially-launches-instagram-facebook-and-whatsapp-subscr...
254•tambourine_man•20h ago•437 comments

The four programming questions from my 1994 Microsoft internship interview (2023)

https://www.computerenhance.com/p/the-four-programming-questions-from
171•tosh•4d ago•76 comments

New Beam Spring Keyboards

https://www.modelfkeyboards.com/product/beam-spring-b104-keyboard/
115•recursivedoubts•3d ago•77 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
227•Brajeshwar•3d ago•65 comments

Unix in East Germany (GDR) (1990)

https://groups.google.com/g/comp.unix.wizards/c/QX_dxElrVNs
98•downbad_•2d ago•24 comments

What if remote working, not AI, is to blame for weak junior hiring?

https://www.ft.com/content/2205e2d0-50dc-4e80-9bf7-78d0272276c0
221•uxhacker•2d ago•299 comments

Finding success in industry as a chip designer

https://spectrum.ieee.org/chip-design-academic-vs-industry
54•jnord•3d ago•6 comments