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.

DeepSeek reasonix, DeepSeek native coding agent with high caching and low cost

https://esengine.github.io/DeepSeek-Reasonix/
110•Alifatisk•3h ago•64 comments

Usborne 1980s Computer Books

https://usborne.com/us/books/computer-and-coding-books
10•ngram•41m ago•4 comments

Mastering Dyalog APL

https://mastering.dyalog.com/README.html
81•tosh•4h ago•17 comments

Constraint Decay: The Fragility of LLM Agents in Back End Code Generation

https://arxiv.org/abs/2605.06445
44•wek•3h ago•23 comments

Childhood Computing

https://susam.net/childhood-computing.html
84•blenderob•4h ago•45 comments

I spent 50 hours drawing a line graph

https://www.dougmacdowell.com/50-hours-to-draw-some-lines.html
245•dougdude3339•3d ago•41 comments

I keep bouncing off the Scheme language

https://www.sicpers.info/2026/05/i-keep-bouncing-off-the-scheme-language/
65•ingve•2d ago•25 comments

Microsoft open-sources "the earliest DOS source code discovered to date"

https://arstechnica.com/gadgets/2026/04/microsoft-open-sources-the-earliest-dos-source-code-disco...
357•DamnInteresting•15h ago•113 comments

Perceptual Image Codec: What Matters in Practical Learned Image Compression

https://apple.github.io/ml-pico/
30•ksec•4h ago•7 comments

Omarchy Is Not A Distro

https://abyss.fish/your_dotfiles_are_not_a_distro
30•j3s•1h ago•8 comments

'AI washing': firms are scrambling to rebrand themselves as tech-focused

https://www.theguardian.com/technology/2026/may/24/ai-washing-pr-firms-scrambling-rebrand
24•Brajeshwar•1h ago•13 comments

DeepSeek to Make Permanent 75% Discount on Flagship AI Model

https://www.bloomberg.com/news/articles/2026-05-23/deepseek-to-make-permanent-75-discount-on-flag...
64•moh_maya•2h ago•64 comments

Scammers are abusing an internal Microsoft account to send spam links

https://techcrunch.com/2026/05/21/scammers-are-abusing-an-internal-microsoft-account-to-send-spam/
211•spike021•15h ago•113 comments

Wake up! 16b

https://hellmood.111mb.de/wake_up_16b_writeup.html
339•MaximilianEmel•15h ago•24 comments

Swap tables, flash-friendly swap, swap_ops, and more

https://lwn.net/SubscriberLink/1072657/394b87abd7cc215e/
46•mkesper•4d ago•0 comments

Silk: Open-source cooperative fiber scheduler

https://github.com/ClickHouse/silk
78•animetyan•3d ago•11 comments

Curly braces: An evolution of Unix and C

https://thalia.dev/blog/unix-braces/
12•thaliaarchi•3d ago•1 comments

Predicting the 2026 Bristol Bay and Kodiak Salmon Runs

https://www.salmonfinder.com/2026/05/13/bristol-bay-kodiak-predictions-2026
5•mooreds•2d ago•2 comments

The C64 Dead Test Font

https://www.masswerk.at/nowgobang/2026/c64-dead-test-font
98•masswerk•12h ago•17 comments

No Juniors Today, No Seniors in 2031

https://www.fbritoferreira.com/blog/no-juniors-today-no-seniors-in-2031/
12•fbritoferreira•42m ago•9 comments

Alexander Grothendieck Revolutionized 20th-Century Mathematics

https://www.quantamagazine.org/how-alexander-grothendieck-revolutionized-20th-century-mathematics...
98•anujbans•13h ago•22 comments

Time to talk about my writerdeck

https://veronicaexplains.net/my-first-writerdeck/
423•hggh•21h ago•249 comments

Converting an Integer to a Decimal String in Under Two Nanoseconds

https://onlinelibrary.wiley.com/doi/10.1002/spe.70079
87•mpweiher•5d ago•42 comments

Why is Vivado 2026.1 dropping Linux support for free tier?

https://adaptivesupport.amd.com/s/question/0D5Pd00001YQLdMKAX/why-is-vivado-20261-dropping-linux-...
257•zdw•12h ago•142 comments

On The <dl> (2021)

https://benmyers.dev/blog/on-the-dl/
416•ravenical•1d ago•124 comments

Artificial egg hatched 26 healthy chickens

https://www.nationalgeographic.com/science/article/artificial-egg-colossal-chickens-moa-dodo
40•BaudouinVH•3d ago•64 comments

When (if ever) it's appropriate to make jokes before the US Supreme Court

https://www.scotusblog.com/2026/05/when-if-ever-its-appropriate-to-make-jokes-take-selfies-or-cur...
9•mooreds•37m ago•0 comments

Show HN: Git-based front-end interface for Hugo

https://github.com/arashthr/hugo-flow
24•arashThr•3d ago•6 comments

Greg Brockman interview [video]

https://fs.blog/knowledge-project-podcast/greg-brockman/
127•prakashqwerty•7h ago•106 comments

My two-part desk setup (2025)

https://arslan.io/2025/11/18/my-two-part-desk-setup/
326•James72689•3d ago•200 comments