#hyperscan — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #hyperscan, aggregated by home.social.
-
regexp — большие гонки
Так или иначе сталкиваться с регулярными выражениями приходилось большинству разработчиков. Мое первое знакомство произошло с реализацией regex в STL std::regexp . Чаще всего регулярки используются в проверке входных данных, что-то вроде проверки корректности введенного пользователем URL, адреса IPv4, адреса IPv6, телефонного номера и при этом скорость выполнения операции regex не сильно влияет на время отклика от приложения. Но, что если вам приходится проверять сотни, тысячи или даже десятки тысяч правил и все это на постоянно меняющихся наборах входных данных в реальном времени? В этой ситуации вам не просто нужен быстрый алгоритм, вам понадобится лучший из них, вам понадобиться чемпион! Участвовать в заезде!
-
@timbray I wonder how close the match is to #Hyperscan. That’s Intel’s high-perf regex engine, which disallows backreferences, lookarounds and capture groups, much like I-Regex.
https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-hyperscan.html
If you want more fodder for considering which regexes would work in your spec, they have a corpus of thousands available.
Hyperscan does allow `.`, `\s`, `\d` and so on, so you’re even stricter!
-
Project idea: add incremental regex scanning to Hyperscan
Big idea: allow re-scanning an input when a piece of it changes, without actually re-scanning the entire thing.
This would allow faster scanning of delta-encoded file formats (like git packfiles); perhaps dramatically faster.
I think this could be hacked together on top of Hyperscan's existing "streaming" scanning support of more of the internals were exposed. (Whether the added overhead would be faster than simply re-scanning the entire input remains to be seen.)
-
I kicked off my blog with a post about writing regex for GitHub Secret Scanning's custom patterns (which you get if you pay for Advanced Security):
https://aegilops.github.io/posts/regex-for-secret-scanning/
#GitHub #SecretScanning #SecureCoding #DevSecOps #regex #HyperScan