frontpage.
newsnewestaskshowjobs

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.

The "$60 Gaming PC" – AMD BC-250 (2025)

https://devquasar.com/hardware/the-60-gaming-pc-amd-bc-250/
47•networked•1h ago•12 comments

There's No Limit to How Bad Code Can Get

https://zachkehs.com/blog/theres_no_limit_to_how_bad_code_can_get/
8•zkehs•29m ago•1 comments

Actively exploited sandbox RCE in all Chromium versions

https://nvd.nist.gov/vuln/detail/cve-2026-85046
619•negura•16h ago•346 comments

Discovery of a new OpenAI agent message board

https://collusion.wiki/
1853•moultano•1d ago•1416 comments

Nitter has more working instances than before the takedowns

https://codeberg.org/mv12star/shitter/wiki/Instances
389•Cider9986•14h ago•155 comments

Global warming will exceed 1.5-degree limit, UN says

https://www.pbs.org/newshour/science/global-warming-will-exceed-1-5-degree-limit-un-says-in-repor...
55•ijidak•1h ago•18 comments

Formalizing Fermat's Last Theorem

https://www.anthropic.com/research/formalizing-fermats-last-theorem
668•jlebar•19h ago•422 comments

Terpstra Keyboard

http://terpstrakeyboard.com/
30•cl3misch•4h ago•10 comments

Pentagon rescinds new testosterone screening policy without explanation

https://arstechnica.com/health/2026/09/pentagon-releases-then-quickly-removes-testosterone-screen...
73•ndsipa_pomu•1h ago•53 comments

.gitignore Everything by Default

https://packagemain.tech/p/gitignore-everything-by-default
8•der_gopher•1h ago•8 comments

Netherlands pulls gold out of the US for fears of 'geopolitical unrest'

https://www.abc.net.au/news/2026-09-04/why-the-netherlands-moved-its-gold-from-us-and-canada/1071...
182•daniel_iversen•4h ago•114 comments

AI handles incidents, engineers lose touch with their systems

https://www.sylvainkalache.com/blog/ai-handles-incidents-engineers-lose-touch-with-their-systems
250•sylvainkalache•6h ago•213 comments

Statichost.eu – European static site hosting

https://www.statichost.eu/
362•p4bl0•18h ago•166 comments

A Million Falcons Went Missing. Here’s How They Were Found

https://www.nationalgeographic.com/animals/article/falcons-migration-angola-falcopolis
10•bryanrasmussen•2d ago•1 comments

Meet the Ig Nobel Prize Winners

https://arstechnica.com/science/2026/09/meet-the-2026-ig-nobel-prize-winners/
13•mkl•39m ago•1 comments

Git hosting that never leaves Europe

https://pushin.eu
156•sevenseacat•8h ago•88 comments

Kale: A Transformation-Safe Spreadsheet System

https://arxiv.org/abs/2608.26345
38•zdw•4d ago•13 comments

Can AI design circuit boards yet?

https://eebench.org/blog/can-ai-design-circuit-boards-yet/
299•iopapa•18h ago•178 comments

A bizarre Commodore 64 peripheral, a mime, and some pretty bad ads

https://buttondown.com/suchbadtechads/archive/spartan-and-the-mime/
5•rfarley04•2h ago•1 comments

GPT-6 Astra on OpenRouter

https://openrouter.ai/openai/gpt-6-astra
263•Topfi•17h ago•175 comments

Claude's new system prompt doesn't want to reproduce song lyrics

https://simonwillison.net/2026/Sep/2/claudes-new-system-prompt/
11•Bluestein•4h ago•2 comments

Portal by Spotify cut my Claude Code token usage by 90%

https://engineering.atspotify.com/2026/9/portal-by-spotify-cut-my-claude-code-token-usage-by-90
184•cebert•15h ago•96 comments

Ask HN: Resources to get good at soldering?

171•tosmatos•3d ago•101 comments

Show HN: Open-Source eInk Bike Computer

https://opentrailpaper.com
330•stingrae•21h ago•109 comments

Git Submodules as a Package Manager

https://nesbitt.io/2026/09/01/git-submodules-as-a-package-manager.html
70•ErenayDev•4d ago•14 comments

Shutting down our public encrypted DNS

https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-i...
385•mywacaday•19h ago•182 comments

IBM Bob

https://bob.ibm.com/
299•artpar•1d ago•312 comments

Pointing at the error: compiler-style diagnostics in uutils coreutils

https://uutils.org/blog/2026-08-error-diagnostics/
32•ingve•3d ago•3 comments

Can guitar frets perform multiplication?

https://www.charlespetzold.com/blog/2026/09/Can-Guitar-Frets-Perform-Multiplication.html
104•wibbily•16h ago•29 comments

Fermat's Last Theorem in Lean 4

https://github.com/anthropics/fermats-last-theorem
129•aaraujo002•19h ago•26 comments