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•11mo ago

Comments

yxhuvud•11mo ago
Eww, pretending to support utf8 matchers while not supporting them at all was not pretty to see.
gitroom•11mo ago
Honestly that part bugs me, fake support is worse than no support imo
kayodelycaon•11mo 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•11mo 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•11mo 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•11mo 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.

DaVinci Resolve releases Photo Editor

https://www.blackmagicdesign.com/products/davinciresolve/photo
203•thebiblelover7•2h ago•47 comments

A new spam policy for "back button hijacking"

https://developers.google.com/search/blog/2026/04/back-button-hijacking
112•zdw•2h ago•57 comments

Someone bought 30 WordPress plugins and planted a backdoor in all of them

https://anchor.host/someone-bought-30-wordpress-plugins-and-planted-a-backdoor-in-all-of-them/
813•speckx•11h ago•231 comments

GitHub Stacked PRs

https://github.github.com/gh-stack/
575•ezekg•8h ago•322 comments

Lean proved this program correct; then I found a bug

https://kirancodes.me/posts/log-who-watches-the-watchers.html
171•bumbledraven•4h ago•89 comments

WiiFin – Jellyfin Client for Nintendo Wii

https://github.com/fabienmillet/WiiFin
108•throwawayk7h•5h ago•44 comments

I shipped a transaction bug, so I built a linter

https://leonh.fr/posts/go-transaction-linter/
22•leonhfr•3d ago•1 comments

Design and implementation of DuckDB internals

https://duckdb.org/library/design-and-implementation-of-duckdb-internals/
71•mpweiher•3d ago•6 comments

Nothing Ever Happens: Polymarket bot that always buys No on non-sports markets

https://github.com/sterlingcrispin/nothing-ever-happens
386•m-hodges•13h ago•204 comments

Hacker compromises A16Z-backed phone farm, calling them the 'antichrist'

https://www.404media.co/hacker-compromises-a16z-backed-phone-farm-tries-to-post-memes-calling-a16...
72•wibbily•1h ago•15 comments

US appeals court declares 158-year-old home distilling ban unconstitutional

https://nypost.com/2026/04/11/us-news/us-appeals-court-declares-158-year-old-home-distilling-ban-...
349•t-3•15h ago•246 comments

Rust Threads on the GPU

https://www.vectorware.com/blog/threads-on-gpu/
24•PaulHoule•4d ago•10 comments

Write less code, be more responsible

https://blog.orhun.dev/code-responsibly/
55•orhunp_•2d ago•33 comments

Make tmux pretty and usable (2024)

https://hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
342•speckx•14h ago•214 comments

Anastasia (1997) live action reference material

https://lostmediawiki.com/Anastasia_(partially_found_live-action_reference_material_for_Don_Bluth...
4•hyperific•3d ago•0 comments

How to make Firefox builds 17% faster

https://blog.farre.se/posts/2026/04/10/caching-webidl-codegen/
150•mbitsnbites•10h ago•25 comments

The AI revolution in math has arrived

https://www.quantamagazine.org/the-ai-revolution-in-math-has-arrived-20260413/
69•sonabinu•5h ago•33 comments

Building a CLI for all of Cloudflare

https://blog.cloudflare.com/cf-cli-local-explorer/
282•soheilpro•13h ago•91 comments

Air Powered Segment Display? [video]

https://www.youtube.com/watch?v=E1BLGpE5zH0
76•ProfDreamer•2d ago•9 comments

Android now stops you sharing your location in photos

https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/
326•edent•17h ago•285 comments

GAIA – Open-source framework for building AI agents that run on local hardware

https://amd-gaia.ai/docs
113•galaxyLogic•9h ago•28 comments

Tool to explore regularly sampled time series

https://github.com/rajivsam/tseda
11•rsva•3d ago•0 comments

I just want simple S3

https://blog.feld.me/posts/2026/04/i-just-want-simple-s3/
128•g0xA52A2A•2d ago•75 comments

Show HN: Ithihāsas – a character explorer for Hindu epics, built in a few hours

https://www.ithihasas.in
135•cvrajeesh•10h ago•33 comments

What we learned building a Rust runtime for TypeScript

https://encore.dev/blog/rust-runtime
54•vinhnx•2d ago•12 comments

Tracking down a 25% Regression on LLVM RISC-V

https://blog.kaving.me/blog/tracking-down-a-25-regression-on-llvm-risc-v/
106•luu•1d ago•21 comments

N-Day-Bench – Can LLMs find real vulnerabilities in real codebases?

https://ndaybench.winfunc.com
50•mufeedvh•7h ago•12 comments

New Orleans's Car-Crash Conspiracy

https://www.newyorker.com/magazine/2026/04/20/the-car-crash-conspiracy
98•Geekette•11h ago•55 comments

Visualizing CPU Pipelining (2024)

https://timmastny.com/blog/visualizing-cpu-pipelining/
75•flipacholas•10h ago•10 comments

The Journal of C Language Translation

http://jclt.iecc.com/
10•kristianp•4h ago•1 comments