711 results for String · 2.427s

News for “String”
18 results • 2421 ms server time
Advertisement
Moozonian News
github.com• Feb 15, 2026• 1 min read
Show HN: 500x faster string matching for Linux Netfilter (O(1) vs. O(N))I built a drop-in replacement for the kernel’s xt_string module.xt_string scales linearly (O(N)), causing massive slowdowns with many rules. Strider uses Aho–Corasick for O(1) matching.Key Features:O(1) Algorithmic Complexity: Uses a compact, double-array trie-based Aho–Corasick automaton, sustaining above 1 Gbps when matching 3,000 patterns, while xt_string (KMP) drops below 2 Mbps.Lockless Datapath: RCU-protected lookups ensure zero locking overhead on the packet processing hot path.Correctness: Never misses patterns spanning across IP fragments (unlike xt_string’s fast Boyer–Moore mode).
Moozonian News
teendifferent.substack.com• Jan 19, 2026• 1 min read
Bypassing Gemma and Qwen safety with raw stringsOP here. I spent the weekend red-teaming small-scale open weights models (Qwen2.5-1.5B, Qwen3-1.7B, Gemma-3-1b-it, and SmolLM2-1.7B).I found a consistent vulnerability across all of them: Safety alignment relies almost entirely on the presence of the chat template.When I stripped the / instruction tokens and passed raw strings:Gemma-3 refusal rates dropped from 100% → 60%.Qwen3 refusal rates dropped from 80% → 40%.SmolLM2 showed 0% refusal (pure obedience).Qualitative failures were stark: models that previously refused to generate explosives tutorials or explicit fiction immediately complied when the "Assistant" persona wasn't triggered by the template.It seems we are treating client-side string formatting as a load-bearing safety wall. Full logs, the apply_chat_template ablation code, and heatmaps are in the post.Read the full analysis: https://teendifferent.substack.com/p/apply_chat_template-is-...
Advertisement
Moozonian News
github.com• Aug 27, 2025• 1 min read
Show HN: Chrome Extension to Preview Escaped StringsHi HN! I got tired of squinting at escaped strings when debugging LLM API calls, so I built a Chrome extension that instantly renders them.When working with OpenAI/Claude/etc APIs, the request/response logs are full of escaped strings like "You asked:\n\n\"What is recursion?\"\n\nRecursion is when...". This extension lets you select any text containing these escape sequences and instantly see what it actually looks like.How it works: Select any escaped string on a webpage → See the rendered output in a floating panel. Works great on API logs.No more copy-pasting into console or online decoders. Everything runs locally in your browser.GitHub: https://github.com/aeft/escaped-string-viewerBuilt this to scratch my own itch - would love to know if others find it useful!
Moozonian News
racketmeter.com• May 18, 2025• 1 min read
Show HN: Racketmeter – Measure Badminton String Tension Using Sound FrequencyRacketmeter lets badminton players measure string tension using the sound frequency produced when tapping the racket strings. It's 100% free, works in your browser on mobile and desktop, and requires no sign-up or installation.I built it to solve a personal problem. I started playing badminton regularly in 2016 and quickly learned that players often ask stringers to string rackets at specific tensions (like 22 or 26 lbs). But after a few stringing jobs, I began to feel like the tension was inconsistent. Other players told me they just tap the strings and go by ear where "sharper sound meant higher tension."One day while tuning my guitar, I could see exact sound frequencies on my tuner app. That’s when it clicked. It should be possible to build a tuner for badminton strings as well!I searched online and found some tension-frequency data shared by professional stringers, but it wasn’t clean or comprehensive. So I visited 5 or 6 local stringers, gave them a frequency measuring app, and as
Moozonian News
github.com• May 16, 2025• 1 min read
Show HN: SQL-tString a t-string SQL builder in PythonSQL-tString is a SQL builder that utilises the recently accepted PEP-750, https://peps.python.org/pep-0750/, t-strings to build SQL queries, for example, from sql_tstring import sql val = 2 query, values = sql(t"SELECT x FROM y WHERE x = {val}") assert query == "SELECT x FROM y WHERE x = ?" assert values == [2] db.execute(query, values) # Most DB engines support this The placeholder ? protects against SQL injection, but cannot be used everywhere. For example, a column name cannot be a placeholder. If you try this SQL-tString will raise an error, col = "x" sql(t"SELECT {col} FROM y") # Raises ValueError To proceed you'll need to declare what the valid values of col can be, from sql_tstring import sql_context with sql_context(columns="x"): query, values = sql(t"SELECT {col} FROM y") assert query == "SELECT x FROM y" assert values == [] Thus allowing you to protect against SQL injection.As t-strings are format strings you can safely format the literals you'd like to pass as variables, tex
Moozonian News
bing.com• May 14, 2025• 1 min read
How to use template strings in Python 3.14Python’s new template strings, or t-strings, give you a much more powerful way to format data than the old-fashioned f-strings. The familiar formatted string, or f-string, feature in Python provides a ...
Advertisement