Urgent.News

What's breaking now, across thousands of outlets.

Tech

regex-engine: محرّك regex من الصفر بلغة Rust، بلا backtracking

التعابير النمطية (regular expressions) من الأدوات التي نستعملها دون أن نسأل كيف تعمل. ثم يأتي يوم يلتقي فيه نمط مثل (a+)+$ بمُدخل طويل، فتتجمّد خدمة كاملة. لهذا العطل اسم: catastrophic backtracking (التراجع الكارثي)، وهو ليس قانونًا من قوانين الطبيعة. مصدره طريقة واحدة لتنفيذ الـ regex. وهناك طريقة أخرى، أقدم ومبنية على الآليات (automata)، تعمل في زمن خطي بالنسبة للمُدخل مهما كان النمط. شرح Russ…

Original Arabic Read in English

محرّك التعابير النمطية (regex-engine) هو تنفيذ من الصفر بلغة Rust لخوارزمية التعابير النمطية الأساسية بدون تراجع كارثي. تم تطويره لتجنب عدم القدرة على معالجة أنماط معقدة مثل (a+)+$ في مداخل طويلة. بدلاً من ذلك، يعمل محرّك regex-engine باستخدام آليات (automata) ومنهجية خطية للمداخل بغض النظر عن تعقيد النمط. هذا المقال يشرح كيف تم بناء هذا المحرّك بأربع مراحل: parser، Thompson NFA، Pike VM، و lazy DFA. يستخدم هذا المحرّك طريقة التحليل الرسمي للمدخل بدون الرجوع إلى الخلف، وبالتالي لا يواجه مشكلة التراجع الكارثي.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Other reports of this story

Every outlet that reported this, and when →

Read the original at dev.to →

More in Tech

How I Keep a Short-Drama Directory Searchable Without Inventing Data

Search directories become unreliable when the source data changes faster than the pages built from it. I ran into that problem while building ShortDramaBuzz, an independent directory for short-form…

  • ShortDramaBuzz maintains searchable directory by treating each catalog as an adapter.
  • Daily refreshes paired with checks for duplicate IDs, stale snapshots, and broken links.
  • Public methodology documented to build trust and ensure provenance.

A Wallet Is Not a Risk Score: Why Blockchain AML Needs Context, Not Just Labels

AMLdark · Screen TRC20 USDT addresses for free Live AML screening for Tron-based USDT addresses against OFAC designations, Tether's freeze list and darknet datasets. Free tier included.

  • Blockchain addresses are evidence, not complete risk assessments
  • Risk labels hide specific reasons for transaction risk
  • Contextual analysis is crucial for informed AML decision-making

How to Convert MOV to MP4 With FFmpeg: Stream-Copy When the Codec Already Matches, and Re-Encode Only When It Doesn't

Short answer: to turn a QuickTime .mov into an .mp4 , start with -c copy . If the file is already H.264 video plus AAC audio, stream copy remuxes the packets, the first-frame RGB24 md5 stays the same…

  • Use -c copy to remux MOV to MP4 when codec matches H.264 and AAC.
  • Re-encode needed for ProRes or unsupported codecs in MP4 container.
  • pytest confirms reproducibility of conversion process.

More from Thursday 19 November →