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.

Malware infects Android-based automotive head unit firmware

https://securelist.com/android-head-unit-malware/121106/
78•campuscodi•1h ago•31 comments

My favorite nonfiction books about cults, scams, and schemes

https://bookdna.com/best-books/nonfiction-about-cults-scams-and-schemes
27•bwb•1h ago•2 comments

Sydney Marathon medal mistakenly depicts Munich stadium

https://www.bbc.com/news/articles/cvg92y1wzn8o
82•epestr•4h ago•51 comments

To become a better writer, read as much as you can

https://nappertime.com/the-golden-rule-of-becoming-a-better-writer/
302•andsoitis•11h ago•197 comments

Things I want in a modern relational query language

https://sporks.space/2026/08/19/things-i-want-in-a-modern-relational-query-language/
8•zdw•20h ago•1 comments

The End of an Athlon

http://www.os2museum.com/wp/the-end-of-an-athlon/
139•userbinator•9h ago•54 comments

Show HN: Live 3D satellite tracker and the declassified Pentagon UFO archive

https://skylens.yantraai.app/
35•skylensspace•5h ago•13 comments

I gave Qwen 3.8 27B a reverse-engineering job and it finished in 30 minutes

https://www.xda-developers.com/qwen-3-8-27b-reverse-engineering-job-frontier-model/
146•raybb•4h ago•74 comments

MartyPC is a cross-platform emulator of early PCs written in Rust

https://martypc.net/
154•boilerupnc•11h ago•55 comments

JIT Compiling Code in 5μs

https://malisper.me/jit-compiling-code-in-5-us/
120•zX41ZdbW•8h ago•72 comments

Death to px, long live ch

https://shkspr.mobi/blog/2026/08/death-to-px-long-live-ch/
18•Brajeshwar•55m ago•7 comments

Why your local LLM feels dumber than it is

https://forum.level1techs.com/t/why-your-local-llm-feels-dumber-than-it-is/253917
412•felineflock•20h ago•168 comments

The Art and Beauty of Blade Runner (2015)

https://nappertime.com/the-art-of-and-beauty-of-blade-runner/
132•cocacola1•13h ago•67 comments

Fast and Hard Code

https://lucumr.pocoo.org/2026/8/22/fast-hard-code/
78•tosh•9h ago•42 comments

Hister – A private, full content search index that you control

https://hister.org/
416•auraham•4d ago•92 comments

Thinking in Python

https://thinkinginpython.com/
244•pjacotg•20h ago•47 comments

ElevenLabs, TwelveLabs, ThirteenLabs

https://quantumi.sh/public/labs.html
435•jemoka•23h ago•129 comments

typ.ing

https://typ.ing/
317•bookofjoe•4d ago•100 comments

Scrap (2006)

https://twitter.com/moxie/status/2091218652133732491
386•tosh•20h ago•208 comments

RF Cafe

https://www.rfcafe.com/
225•gregsadetsky•4d ago•44 comments

NanoGPT Speedrun Frontier

https://www.primeintellect.ai/research/nanogpt-speedrun
126•stared•16h ago•31 comments

New MCP Roadmap

https://blog.modelcontextprotocol.io/posts/mcp-roadmap/
240•pentagrama•1d ago•142 comments

Slovakia finds Russian backdoor in traffic speed cameras

https://risky.biz/risky-bulletin-slovakia-finds-russian-backdoor-in-traffic-speed-cameras/
4•dredmorbius•13m ago•0 comments

Authoritarianism of Code

https://zedshaw.com/blog/2020-10-07-authoritarianism-of-code/
4•wqlander•15m ago•0 comments

Risk of transmission of amyloid β pathology via transfused blood products

https://doi.org/10.1016/S0140-6736(26)00767-1
20•sbulaev•8h ago•1 comments

Iranian hackers shut down UK power plant for 4 days

https://www.telegraph.co.uk/news/2026/08/22/iranian-hackers-shut-down-uk-power-plant/
51•giuliomagnifico•4h ago•28 comments

How a Texas student blew the whistle on a rogue AI hacking attempt

https://www.reuters.com/world/how-texas-student-blew-whistle-rogue-ai-hacking-attempt-2026-08-20/
185•olalonde•2d ago•96 comments

A Friendly Introduction to Racket

https://geometridae.bearblog.dev/a-friendly-introduction-to-racket/
252•signa11•1d ago•134 comments

ATProto spaces: A new extension to ATProto that enables non-public data

https://atproto.com/blog/atproto-spaces-alpha
159•grappler•2d ago•25 comments

NetBSD and my life (2005)

https://mail-index.netbsd.org/netbsd-advocacy/2005/09/10/0000.html
139•gnyeki•19h ago•30 comments