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.

They’re made out of weights

https://maxleiter.com/blog/weights
627•MaxLeiter•9h ago•234 comments

Elixir v1.20: Now a gradually typed language

https://elixir-lang.org/blog/2026/06/03/elixir-v1-20-0-released/
748•cloud8421•13h ago•270 comments

Failing grades soar with AI usage, dwindling math skills in Berkeley CS classes

https://www.dailycal.org/news/campus/academics/failing-grades-soar-as-professors-see-greater-ai-u...
264•littlexsparkee•8h ago•206 comments

Gemma 4 12B: A unified, encoder-free multimodal model

https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemma-4-12b/
823•rvz•16h ago•323 comments

I built a vulnerable app and spent $1,500 seeing if LLMs could hack it

https://kasra.blog/blog/i-spent-1500-seeing-if-llms-could-hack-my-app/
199•jc4p•8h ago•81 comments

Under Notre Dame, a 'dig of the century' unearths 1,700 years of history

https://apnews.com/article/notre-dame-dig-treasures-paris-archaeology-roman-dae41f792c1402faf32a8...
18•cobbzilla•1d ago•0 comments

The ways we contain Claude across products

https://www.anthropic.com/engineering/how-we-contain-claude
119•jbredeche•8h ago•52 comments

Artificial intelligence is not conscious – Ted Chiang

https://www.theatlantic.com/philosophy/2026/06/no-artificial-intelligence-is-not-conscious/687378/
420•lordleft•15h ago•736 comments

I was recently diagnosed with anti-NMDA receptor encephalitis

https://burntsushi.net/encephalitis/
605•Tomte•18h ago•185 comments

Uber's $1,500/month AI limit is a useful signal for AI tool pricing

https://simonwillison.net/2026/Jun/3/uber-caps-usage/
477•pdyc•20h ago•591 comments

Learn SQL Once, Use It for 30 Years

https://fagnerbrack.com/learn-sql-once-use-it-for-30-years-9aceb0bdee03
79•karakoram•3d ago•44 comments

DaVinci Resolve 21

https://www.blackmagicdesign.com/products/davinciresolve/whatsnew
453•pentagrama•18h ago•203 comments

Meteor Explodes over Massachusetts

https://www.nbcboston.com/news/local/meteor-explodes-over-massachusetts-what-we-know-and-where-it...
108•1970-01-01•2d ago•53 comments

CP/M-86 & MS-DOS Cross Development Environment

https://github.com/tsupplis/cpm86-crossdev
32•elvis70•3d ago•2 comments

ESP32-S31

https://www.espressif.com/en/products/socs/esp32-s31
294•volemo•16h ago•157 comments

A Man Who Reads Books for a Living

https://lithub.com/the-man-who-reads-books-for-a-living-one-every-two-days/
115•gmays•12h ago•86 comments

A Post-Quantum Future for Let's Encrypt

https://letsencrypt.org/2026/06/03/pq-certs
260•SGran•17h ago•141 comments

Ableton Extensions SDK

https://www.ableton.com/en/live/extensions/
118•bennett_dev•12h ago•42 comments

Gooey: A GPU-accelerated UI framework for Zig

https://github.com/duanebester/gooey
177•ksec•15h ago•67 comments

Journey to JPEG XL: open-source experiments shaped the future of image coding

https://opensource.googleblog.com/2026/06/journey-to-jpeg-xl-how-open-source-experiments-shaped-t...
80•ledoge•11h ago•45 comments

Mathematicians issue warning as AI rapidly gains ground

https://www.science.org/content/article/mathematicians-issue-warning-ai-rapidly-gains-ground
231•pseudolus•22h ago•269 comments

Dumbphone 2

https://dumb.co/
38•skogstokig•8h ago•35 comments

Launch HN: Hyper (YC P26) – Company brain to power agentic development

66•shalinshah•15h ago•58 comments

A Mathematician's Lament (2002) [pdf]

https://worrydream.com/refs/Lockhart_2002_-_A_Mathematician%27s_Lament.pdf
77•xeonmc•11h ago•5 comments

U.S. to dismantle system tracking Atlantic currents that are at risk of collapse

https://e360.yale.edu/digest/trump-ooi-amoc
468•rguiscard•8h ago•304 comments

Patching my guitar amp's firmware

https://mforney.org/blog/2026-05-28-patching-my-guitar-amps-firmware.html
80•birdculture•3d ago•14 comments

PlayStation Architecture

https://www.copetti.org/writings/consoles/playstation/
302•gregsadetsky•22h ago•60 comments

Self-hosted dev sandboxes with preview URLs (Docker, Go, no K8s)

https://github.com/tastyeffectco/sandboxes
88•tastyeffectco•13h ago•24 comments

Every Byte Matters

https://fzakaria.com/2026/06/01/every-byte-matters
249•ingve•21h ago•122 comments

The Capacity of HotHands to Facilitate High-Altitude Research (2023) [pdf]

https://www.colorado.edu/center/spacegrant/sites/default/files/attached-files/B3_RRCC_BringingThe...
5•radeeyate•3d ago•0 comments