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.

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

https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemma-4-12b/
424•rvz•3h ago•148 comments

I was recently diagnosed with anti-NMDA receptor encephalitis

https://burntsushi.net/encephalitis/
217•Tomte•5h ago•42 comments

Elixir v1.20 released: now a gradually typed language

https://elixir-lang.org/blog/2026/06/03/elixir-v1-20-0-released/
26•cloud8421•18m ago•1 comments

ESP32-S31

https://www.espressif.com/en/products/socs/esp32-s31
171•volemo•3h ago•81 comments

DaVinci Resolve 21

https://www.blackmagicdesign.com/products/davinciresolve/whatsnew
260•pentagrama•5h ago•131 comments

Gooey: A GPU-accelerated UI framework for Zig

https://github.com/duanebester/gooey
53•ksec•2h ago•7 comments

Hacking your PC using your speaker without ever touching it

https://blog.nns.ee/2026/06/03/katana-badusb/
531•xx_ns•8h ago•91 comments

Stop Killing Games

https://jxself.org/stop-killing-games.shtml
24•amcclure•2d ago•5 comments

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

24•shalinshah•1h ago•18 comments

A Post-Quantum Future for Let's Encrypt

https://letsencrypt.org/2026/06/03/pq-certs
142•SGran•4h ago•76 comments

Skyvern (YC S23) Is Hiring Open-Source Loving DevRel Engineers

https://www.ycombinator.com/companies/skyvern/jobs/1qRTlVx-founding-developer-marketing-open-sour...
1•suchintan•2h ago

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

https://simonwillison.net/2026/Jun/3/uber-caps-usage/
131•pdyc•6h ago•154 comments

Angular v22

https://blog.angular.dev/announcing-angular-v22-c52bb83a4664
42•Klaster_1•2h ago•17 comments

Fluid Simulation for Dummies

https://www.mikeash.com/pyblog/fluid-simulation-for-dummies.html
39•sebg•4d ago•10 comments

MacBook Neo Is So Popular That Apple Doubled Production

https://www.macrumors.com/2026/06/03/macbook-neo-production-doubled-says-kuo/
137•tosh•2h ago•105 comments

Embryos shape their limbs: a key discovery of "genetic brakes"

https://nouvelles.umontreal.ca/en/article/2026/06/02/how-embryos-shape-their-limbs-a-key-discover...
13•gmays•1h ago•0 comments

Bot vs human traffic

https://radar.cloudflare.com/traffic#bot-vs-human
97•jmsflknr•1h ago•40 comments

Every Byte Matters

https://fzakaria.com/2026/06/01/every-byte-matters
198•ingve•8h ago•99 comments

Meta workers can opt out of being tracked at work up to 30 min

https://www.bbc.com/news/articles/c93x0k194yno
545•reconnecting•6h ago•512 comments

PlayStation Architecture

https://www.copetti.org/writings/consoles/playstation/
198•gregsadetsky•8h ago•40 comments

Rootshell: A new E2EE email service hosted in Iceland

https://rootshell.is
4•sc0rt•22m ago•1 comments

What I've learned about the trombone

http://bryanhu.com/blog/posts/what-ive-learned-about-the-trombone/
66•bookofjoe•8h ago•55 comments

Mathematicians issue warning as AI rapidly gains ground

https://www.science.org/content/article/mathematicians-issue-warning-ai-rapidly-gains-ground
83•pseudolus•9h ago•117 comments

1-Click GitHub Token Stealing via a VSCode Bug

https://blog.ammaraskar.com/github-token-stealing/
612•ammar2•1d ago•95 comments

Show HN: Rscrypto, pure-Rust crypto with industry leading public benches

https://github.com/loadingalias/rscrypto
18•LoadingALIAS•2h ago•6 comments

32GB of DDR5 now costs $375 – AI shortage continues to squeeze PC building

https://www.tomshardware.com/pc-components/ddr5/32gb-of-ddr5-now-costs-usd375-minimum-ai-shortage...
302•papersail•6h ago•282 comments

Show HN: Edsger – A handwritten Clojure REPL for the reMarkable 2

https://handwritten.danieljanus.pl/2026-06-01-edsger.html
211•nathell•1d ago•28 comments

Nabokov's pale fire: the lost 'father of all hypertext demos'? (2011)

https://dl.acm.org/doi/pdf/10.1145/1995966.1996008
104•aragonite•2d ago•24 comments

Show HN: Nutrepedia – nutrition info in 29 locales built with Clojure and Htmx

https://nutrepedia.com/en-us/
35•llovan•2h ago•17 comments

How turkey hacked the hair-transplant industry

https://www.wired.com/story/how-turkey-hacked-the-hair-transplant-industry/
78•joozio•2d ago•109 comments