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.

Project Gutenberg – keeps getting better

https://www.gutenberg.org/
203•JSeiko•1h ago•61 comments

A 0-click exploit chain for the Pixel 10

https://projectzero.google/2026/05/pixel-10-exploit.html
199•happyhardcore•4h ago•84 comments

We don't know why Malawi is poor

https://newsletter.deenamousa.com/p/we-dont-know-why-malawi-is-poor
28•alphabetatango•47m ago•25 comments

Image-blaster: Creates 3D environments, SFX, and meshes from a single image

https://github.com/neilsonnn/image-blaster
29•MattRogish•2h ago•3 comments

O(x)Caml in Space

https://gazagnaire.org/blog/2026-05-14-borealis.html
192•yminsky•6h ago•37 comments

I designed a nibble-oriented CPU in Verilog to build a scientific calculator

https://github.com/gdevic/FPGA-Calculator
7•gdevic•28m ago•0 comments

Hightouch (YC S19) Is Hiring

https://hightouch.com/careers
1•joshwget•43m ago

I built Zenith: a live local-first fixed viewport planetarium

https://smorgasb.org/zenith-tech/
33•surprisetalk•1h ago•3 comments

Explore Wikipedia Like a Windows XP Desktop

https://explorer.samismith.com/
380•smusamashah•8h ago•98 comments

ASCII by Jason Scott

https://ascii.textfiles.com/
76•bookofjoe•3h ago•13 comments

Show HN: Watch a neural net learn to play Snake

https://ppo.gradexp.xyz/
39•c1b•1d ago•6 comments

High dimensional geometry is transforming the MRI industry (2017) [pdf]

https://www.ams.org/government/DonohoPresentation06-28-17Final.pdf
53•nill0•4h ago•13 comments

Radicle: Sovereign {code forge} built on Git

https://radicle.dev/
149•KolmogorovComp•5h ago•38 comments

A new book on Steve Jobs at NeXT

https://spectrum.ieee.org/steve-jobs-next-computer
117•rbanffy•7h ago•99 comments

Removing the modem and GPS from my 2024 RAV4 hybrid

https://arkadiyt.com/2026/05/13/removing-the-modem-and-gps-from-my-rav4/
1008•arkadiyt•1d ago•533 comments

Aperio Lang

https://aperio-lang.github.io/aperio/introduction.html
7•mmcclure•31m ago•0 comments

Amazon workers under pressure to up their AI usage are making up tasks

https://www.fastcompany.com/91541586/amazon-workers-pressured-to-up-ai-use-extraneous-tasks
190•hackernj•4h ago•170 comments

U.S. DOJ demands Apple and Google unmask over 100k users of car-tinkering app

https://macdailynews.com/2026/05/15/u-s-doj-demands-apple-and-google-unmask-over-100000-users-of-...
12•tencentshill•15m ago•0 comments

OpenAI is connecting ChatGPT to bank accounts via Plaid

https://firethering.com/chatgpt-bank-account-plaid-openai/
51•steveharing1•1h ago•75 comments

A few words on DS4

https://antirez.com/news/165
394•caust1c•19h ago•161 comments

Trade Dollars with other startups. Book it as revenue

https://www.revswap.ai/
151•tormeh•4h ago•107 comments

NanoTDB – Golang Append-Only Time Series DB

https://github.com/aymanhs/nanotdb
37•aymanhs72•7h ago•5 comments

The sigmoids won't save you

https://www.astralcodexten.com/p/the-sigmoids-wont-save-you
49•Tomte•6h ago•63 comments

Ask HN: How to be SOC2 Type 2 compliant as a solo-entreprenuer?

73•sochix•10h ago•74 comments

Details of the Daring Airdrop at Tristan Da Cunha

https://www.tristandc.com/government/news-2026-05-11-airdrop.php
226•kspacewalk2•13h ago•87 comments

RTX 5090 and M4 MacBook Air: Can It Game?

https://scottjg.com/posts/2026-05-05-egpu-mac-gaming/
664•allenleee•1d ago•159 comments

Building ML framework with Rust and Category Theory

https://hghalebi.github.io/category_theory_transformer_rs/
83•adamnemecek•1d ago•17 comments

We are retiring our bug bounty program

https://turso.tech/blog/the-wonders-of-ai
313•tjek•4h ago•232 comments

First public macOS kernel memory corruption exploit on Apple M5

https://blog.calif.io/p/first-public-kernel-memory-corruption
421•quadrige•23h ago•112 comments

Codex is now in the ChatGPT mobile app

https://openai.com/index/work-with-codex-from-anywhere/
436•mikeevans•21h ago•222 comments