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.

Railway Blocked by Google Cloud

https://status.railway.com/?date=20260519
267•aarondf•3h ago•116 comments

Gemini 3.5 Flash

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-5/
641•spectraldrift•10h ago•474 comments

Ben Welsh made an index of all FiveThirtyEight articles on the Internet Archive

https://fivethirtyeightindex.com/
54•ChocMontePy•2h ago•13 comments

I’ve built a virtual museum with nearly every operating system you can think of

https://virtualosmuseum.org/
641•andreww591•12h ago•148 comments

Google changes its search box

https://blog.google/products-and-platforms/products/search/search-io-2026/
416•berkeleyjunk•9h ago•587 comments

Remove–AI–Watermarks – CLI and library for removing AI watermarks from images

https://github.com/wiltodelta/remove-ai-watermarks
155•janalsncm•5h ago•99 comments

OpenAI Adopts Google's SynthID Watermark for AI Images with Verification Tool

https://openai.com/index/advancing-content-provenance/
220•smooke•8h ago•123 comments

Show HN: Forge – Guardrails take an 8B model from 53% to 99% on agentic tasks

https://github.com/antoinezambelli/forge
324•zambelli•15h ago•123 comments

The Mercury logic programming system

https://github.com/Mercury-Language/mercury
40•Antibabelic•1d ago•5 comments

Mistral AI acquires Emmi AI

https://www.emmi.ai/news/mistral-ai-acquires-emmi-ai
189•doener•8h ago•49 comments

Apple unveils new accessibility features

https://www.apple.com/newsroom/2026/05/apple-unveils-new-accessibility-features-and-updates-with-...
625•interpol_p•15h ago•322 comments

GitHub is investigating unauthorized access to their internal repositories

https://twitter.com/github/status/2056884788179726685
212•splenditer•3h ago•58 comments

Minnesota becomes first state to ban prediction markets

https://www.npr.org/2026/05/19/nx-s1-5821265/minnesota-ban-prediction-markets
542•ortusdux•8h ago•162 comments

Gemini CLI will stop working from June 18, 2026

https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/
97•primaprashant•9h ago•33 comments

Museum of Imaginary Musical Instruments

https://imaginaryinstruments.org/
14•bookofjoe•2d ago•1 comments

I’ve joined Anthropic

https://twitter.com/karpathy/status/2056753169888334312
1222•dmarcos•12h ago•508 comments

Growing Neural Cellular Automata

https://distill.pub/2020/growing-ca/
83•pulkitsh1234•2d ago•9 comments

Lisp in Web-Based Applications (2001)

https://sep.turbifycdn.com/ty/cdn/paulgraham/bbnexcerpts.txt
55•bschne•1d ago•3 comments

CISA Admin Leaked AWS GovCloud Keys on GitHub

https://krebsonsecurity.com/2026/05/cisa-admin-leaked-aws-govcloud-keys-on-github/
420•LelouBil•20h ago•170 comments

The two oldest printing presses

https://museumplantinmoretus.be/en/worlds-two-oldest-printing-presses
27•janpot•1d ago•7 comments

Tool mapping 90 companies in the photonics and CPO supply chain

https://leonardo-boquillon.com/photonic-cop-supply-chain
31•lboquillon•2d ago•2 comments

HTML-in-Canvas Demos

https://github.com/GoogleChromeLabs/css-web-ui-demos/blob/main/html-in-canvas/awesome-html-in-can...
12•simonpure•4h ago•0 comments

Why is almost everyone right-handed? A new study connects it to bipedalism

https://www.ox.ac.uk/news/2026-05-15-why-is-almost-everyone-right-handed-the-answer-may-lie-in-ho...
104•gmays•13h ago•159 comments

Copy Fail, Dirty Frag, and Fragnesia kernel vulnerabilities

https://www.gentoo.org/news/2026/05/19/copy-fail-fragnesia-vulnerabilities.html
115•akhuettel•12h ago•42 comments

Disney erased FiveThirtyEight

https://www.natesilver.net/p/disney-erased-fivethirtyeight
360•7777777phil•9h ago•198 comments

Dumb ways for an open source project to die

https://nesbitt.io/2026/05/19/dumb-ways-for-an-open-source-project-to-die.html
166•chmaynard•8h ago•105 comments

Unusual uses of OEIS sequences on GitHub

https://www.jeremykun.com/shortform/2026-04-13-0700/
20•surprisetalk•1d ago•1 comments

Intro to TLA+ for the LLM Era: Prompt Your Way to Victory

https://emptysqua.re/blog/intro-to-tla-plus-for-the-llm-era/
121•zdw•2d ago•27 comments

The TTY Demystified (2008)

https://www.linusakesson.net/programming/tty/index.php
49•20after4•9h ago•8 comments

Hanoi’s humble beer glass and the memory of a nation

https://sundaylongread.com/2026/05/15/hanois-humble-beer-glass-and-the-memory-of-a-nation/
133•NaOH•1d ago•39 comments