AI 资讯
The bloom filter trick that turned 170 object-storage reads into one (2.6s → 89ms)
We tried to speed up random trace_id lookups with a bloom filter and found it sped some queries up 29× while making others slower, and which one you get depends entirely on how your IDs are generated. TL;DR: Looking up a random trace_id across 170 index files in object storage took 2,584ms. Tantivy prunes files by min/max term, but a random 16-byte ID is scattered across the whole 128-bit space, so every file's range is [0, 2¹²⁸], nothing prunes, and all 170 files get opened. On object storage every one of those is a network round trip, and that's where the 2.6s goes. A bloom filter is the obvious fix. The non-obvious part is where you put it. Per-file blooms = 170 small reads, which object storage punishes hardest, so it barely beats doing nothing. The trick: every file's bloom uses the same block count, so a query value maps to the same block index in every file. Store blooms block-major instead of file-major, and "block 7 across all 170 files" becomes one contiguous 5,440-byte row. One range request, 170 checks, ~170× fewer round trips. Lookup dropped to 89ms. But this makes time-ordered IDs slower. A UUIDv7 already range-prunes for free in 154ms; the bloom layer adds ~42ms and Tantivy still does its 154ms on the survivor, netting ~196ms of pure overhead. UUIDv4 wins by 29×, UUIDv7 loses by 1.3×. So we don't auto-detect fields to bloom (sampling would guess wrong half the time). Operators opt in per field, only when all three hold: high cardinality, random distribution, many files per hour. One design choice I'd defend: every bloom failure mode degrades to "keep the file." It can be slow; it can never drop a row. We wrote up the full thing with diagrams and the SBBF details on our blog , happy to take questions here. Disclaimer: I am one of the maintainers at OpenObserve (open-source observability, written in Rust) and the writer is our founding engineer. This is our own benchmark, single querier, S3 backend, no disk cache. Happy to share the test setup so anyone
AI 资讯
Blaise v0.10.0: Native Back End, Threads and Incremental Compilation
submitted by /u/mariuz [link] [留言]
开源项目
In Defense of YAML :: Posit Open Source
submitted by /u/Successful_Bowl2564 [link] [留言]
开发者
System Dynamics Course | Chapter 16: Discrete-Time and Sampled-Data System Dynamics
Used 5 different programming language for this course. GitHub repository link: https://github.com/mohammadijoo/Control_and_Robotics_Tutorials submitted by /u/abolfazl1363 [link] [留言]
产品设计
Hot path optimization. When float division beats integer division
I've started a series of short blog posts about hot path optimizations. This first one covers a counterintuitive optimization: replacing integer division ( IDIVQ ) with floating-point division ( DIVSD ). submitted by /u/watman12 [link] [留言]
AI 资讯
one last peek 👀🍵 docs, a demo, and a goodbye for now
Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is...
开源项目
Native Elm (the real kind this time) · cekrem.github.io
submitted by /u/cekrem [link] [留言]
开发者
The perfect background music for Vibecoding...
While vibecoding, you sometimes need some background music. But music can also be a massive...
AI 资讯
Same Weights, Same Prompt, Different Triage Level
I ran a 4-bit medical-triage model on a laptop GPU and on a CPU. For one patient, the GPU said urgent and the CPU said emergency. Same model file, same prompt, same input. Here's the mechanism and why "validated on hardware X" doesn't mean what you'd hope. I've been building Aegis-MD , a local-first emergency-department triage console. You hand it a structured clinical picture: chief complaint, vitals, age, pain score, a few risk modifiers, and it returns an urgency category on the Australasian Triage Scale (ATS 1–5), where ATS-1 means resuscitate now and ATS-5 means this can wait two hours . The whole thing runs on-device: a quantized MedGemma 4B served through Ollama, a small RAG layer over open guidelines, and a deterministic rule-based floor underneath the model. I never set out to write about floating-point arithmetic. But while running my evaluation set across two machines, I hit a result that stopped me, and the explanation turned out to be more interesting and more current than the textbook answer most people reach for. The setup, and why a 4-bit model Two things about Aegis-MD's design matter for this story. First, it's local by design. Triage data is about as sensitive as data gets, so nothing leaves the machine. The trade-off is that I'm running a small, heavily quantized model: MedGemma 1.5 4B at Q4_K_XL , about 3.4 GB rather than a frontier API. Four-bit weights are the price of running offline on consumer hardware. Second, I tested on two configurations on purpose. The intended deployment is local GPU inference (an RTX 5070 Ti Mobile, 12 GB). But the public demo runs CPU-only on Cloud Run, because GPU instances need a paid quota I don't have. So I ran the same evaluation against both: the GPU build and the CPU build, same model, same code, same prompts. The eval is 17 hand-written cases spanning all five ATS levels, cardiac arrest down to a medical-certificate request. (Seventeen is a smoke test, not a validation; I won't quote a percentage off a sampl
AI 资讯
I Built a Tool That Finds Package Equivalents Across Programming Languages
TL;DR: I built PackagePal — paste in any package from any language, pick your target language, and AI instantly finds the equivalent. No more Googling "what's the Node.js version of Python's requests ?" The Problem That Drove Me Crazy You know that moment when you're migrating a project — or just jumping between ecosystems — and you hit a wall trying to find the right package? I do. Every time. # You're used to this in Python import requests response = requests . get ( " https://api.example.com/data " ) And you move to Node.js and think: "Okay, what do I use here? axios? node-fetch? got? undici?" So you Google it. You find a Stack Overflow thread from 2019. Half the answers recommend packages that are now deprecated. You open 6 tabs. 20 minutes later you're still not sure which one is the current best choice. This wasn't a once-in-a-while thing for me. It happened constantly — switching between Python, JavaScript, Go, and Ruby on different projects. I was wasting real hours on a problem that felt completely solvable. So I built PackagePal . What PackagePal Does PackagePal uses AI to understand what a package actually does — its purpose, not just its name — and finds the best equivalent in whatever language you're moving to. The key insight: this isn't a lookup table. A simple mapping of requests → axios misses context. What if you're using requests for its session management? Or its retry logic? PackagePal surfaces options and explains why each one is a good match. Example searches people use it for: Python's pandas → JavaScript Ruby's devise → Node.js Go's cobra → Python JavaScript's lodash → Go Just type the package, pick the target language, and get results in seconds. 👉 Try it: packagepal.dev How I Built It Tech Stack 🤖 AI: Gemini Pro — handles the semantic understanding of what a package does and why an alternative matches ⚛️ Frontend: React + TypeScript ⚙️ Backend: Node.js + TypeScript on Google Cloud ⚡ Caching: Redis — so repeat searches (e.g., "requests → No
开发者
The Day I Decided Never to Learn Python
submitted by /u/Active-Fuel-49 [link] [留言]
AI 资讯
Opening a cloned repo is no longer safe
Solid breakdown of the Miasma worm — one commit, same dropper wired into 7 config files across VS Code, Claude Code, Gemini, Cursor, npm, Composer, and Bundler. No malicious dep needed, just clone + open. Nobody reviews these files in PRs. https://safedep.io/config-files-that-run-code/ Anyone actually treating dotfile diffs as code? submitted by /u/No_Plan_3442 [link] [留言]
AI 资讯
Perl 🐪 Weekly #776 - Learning Perl
Originally published at Perl Weekly 776 Hi there, Recently, I came across an article, The Day I Decided Never to Learn Python by Randal L. Schwartz . Well, Randal doesn't need an introduction. He took us back to 2001 , the same era when I first started learning Perl in 1999. He was a major guiding force during my early programming days. Last week, I joined a live session by Gabor focussed on FalkorDB . It was fun watching him code and talk while I sat back as a silent spectator. You can learn a lot just by watching how he approaches coding. It reminded me of many years ago when I did pair programming with him and submitted a pull request to the Dancer2 project. Those were the golden days, when I had so much energy and time. That being said, I am still actively learning Perl and discovering how to do new things with it. These concepts may not be new to everyone, but they are new to me. For example, I recently played with GraphQL for the first time, and I've also been experimenting with RAG and JSON-RPC . I have shared my recent experiments down below. The process of learning never stops. A few days ago, I noticed an update for HTTP::Message v7.02 . Since it was released by Olaf Alders , I was curious to see what had changed. It turned to be something, I hadn't realised for all these years. While I am well-acquainted with HTTP methods like GET, POST, and PUT, I didn't know "0" could actually be a valid HTTP method name if you wanted it to be. This release added support for exactly that, thanks to contributor, Karen Etheridge . Amidst all of this, I am still trying to find time for my upcoming book on DBIx::Class . I recently shared a blog post demonstrating the power of DBIC components, and I am trying my best not to lose focus. You might find that this edition is full of my own personal posts, as there was unfortunately very little community news to report this week. Regardless, I hope you enjoy the rest of the newsletter. -- Your editor: Mohammad Sajid Anwar. Announ
AI 资讯
My company packaged 12 years of my experience into an AI Skill, then laid me off. When it crashed, the CTO called at 5x my salary.
A story about knowledge extraction, Kafka consumer rebalance, and what happens when a company...
开发者
The 20 Best Vibe Coding Tools in 2026 (Honest Reviews, Real Pricing)
The way developers write software has genuinely changed. Not incrementally — fundamentally. A year...
AI 资讯
Building a spaced repetition system that adapts to user pace in real-time (Kotlin/Compose)
I built a flashcard app for interview prep and wanted to share some of the more interesting technical problems I ran into. The app has 1500+ questions across DSA and System Design, and the core challenge was: how do you order cards intelligently without it feeling robotic? Problem 1: Slot Assignment for Spaced Repetition Standard SR (like Anki) just shows the most overdue card next. That works for vocabulary but feels terrible for algorithms because you get 3 Hard questions in a row and want to quit. My approach: generate a target difficulty pattern (Easy, Medium, Easy, Medium, Hard, repeat) based on a 40/40/20 distribution, then assign due cards to matching-difficulty slots. Most-overdue cards get placed first within their tier. Unseen cards fill remaining slots. This means a Hard card that's overdue still lands in a Hard slot, not position 1. You get difficulty variety while still seeing overdue cards at the right time. fun assignSlots(pool: List<Question>, dueCards: List<ProgressEntity>): List<Question> { val pattern = generatePattern(size = pool.size, distribution = "40/40/20") val dueByDifficulty = dueCards.groupBy { it.difficulty } val result = Array<Question?>(pattern.size) { null } // Place due cards in matching slots, most overdue first for ((difficulty, cards) in dueByDifficulty) { val sorted = cards.sortedBy { it.nextReviewDate } val availableSlots = pattern.indices.filter { pattern[it] == difficulty && result[it] == null } sorted.zip(availableSlots).forEach { (card, slot) -> result[slot] = findQuestion(card, pool) } } // Fill remaining with unseen // ... } Problem 2: Re-ranking after every swipe without jank After each swipe, the deck needs to re-rank. But the top visible card (position 0) is already animating into view, so you can't move it. Solution: lock position 0, re-rank positions 1+, then check for constraint violations across the boundary (e.g., if locked card is Hard and new position 1 is also Hard, swap position 1 with the first non-Hard card d
AI 资讯
Tab Vacuum - click once to remove every duplicate Chrome tab and auto-group the rest by website
I had 4 Chrome windows with ~80 tabs each, mostly duplicates of the same Stack Overflow page. Tried OneTab (saves to a list - not what I wanted) and Workona (cloud sync, overkill). So I wrote ~50 lines of vanilla JS. Click the toolbar icon → every duplicate tab across every window is removed (matched by URL) → survivors merge into one window → remaining tabs auto-group by hostname (collapsed). Two permissions: tabs, tabGroups. No background activity, no server, no analytics. Whole source is in the README so you can audit it before installing. Chrome Web Store: https://chromewebstore.google.com/detail/tab-vacuum/apdjhdjcejehjiomcolfgfgjhaedoieb GitHub: https://github.com/mayhsundar/tab-vacuum Please give your comments submitted by /u/mayhsundar [link] [留言]
AI 资讯
Migrating a Real App to Swift 6: Data Races, a Dependency I Had to Evict, and the Compiler That Wouldn't Let Me Lie
Let me start with a confession: I have been writing concurrent code since the only tool in the box was a mutex and a prayer. After a decade of Swift I feel suspicion of any code that touches two threads and claims to be fine. So when Swift 6 showed up promising to prove my concurrency correct at compile time, I had two reactions at once. The grizzled half of me said "sure, kid." The other half — the half that has spent actual weekends chasing a heisenbug that only reproduced on a customer's M1 under sync load — said "...please. Please be real." This is the story of moving Ditto Edge Studio — a SwiftUI debug-and-query tool for the Ditto edge database — to Swift 6's strict concurrency mode. It's a real app: SQLCipher persistence, an embedded MCP server, a SpriteKit presence graph, live sync over Bluetooth and WebSocket. Not a to-do list. The kind of app where concurrency bugs hide in the cracks and wait for a demo. Spoiler: it was worth it. It was also more work than the WWDC talk implied, and the most valuable thing the compiler did happened in the one place I told it to stop looking. Let me show you. First, the Wall: A Dependency That Wasn't Coming to Swift 6 Here's the thing nobody warns you about. Swift 6 language mode isn't really a per-file setting. Your code can be immaculate — every actor isolated, every Sendable accounted for — and you'll still be stuck, because one dependency that isn't Swift 6-ready can hold your entire module hostage. Mine was a code editor. I'd been using a popular SwiftUI editor package for the DQL query editor, and it transitively pulled in a syntax-highlighting library. Both were lovely. Both were also written for a more innocent time, and neither was going to compile under Swift 6 strict concurrency without upstream changes that weren't happening on my timeline. I had the usual three options, and I want to be honest about how tempting the cowardly ones were: Pin the dependency and leave the whole app at Swift 5. Free today, expensive
AI 资讯
I Wrote 50 Claude Code Prompts and Used Them for a Week -- Here's What Actually Works
Last week I did something dumb: I sat down and wrote 50 Claude Code prompts in one sitting. Halfway through I was sure most of them would never get used. But I finished, pushed them to GitHub, and made myself use them for an entire week -- no ad-hoc prompting allowed. The result surprised me. Some skills were life-changing. Others were useless. Here is the honest breakdown. The Methodology I categorized the 50 skills into 5 types: Analysis (12), Generation (14), Debugging (8), Planning (10), Maintenance (6). Rule: every time I hit a task, I must use a skill file or admit I did not have one. The 7 That Actually Saved Me Hours 1. Code Review Assistant (saved ~3h) This was the biggest surprise. I usually review PRs by gut feel -- scan the diff, look for obvious bugs, approve. The Code Review skill forced me to be systematic: On a 400-line PR it caught 2 security issues I would have missed. That alone justified the experiment. 2. Bug Investigator (saved ~2h) Instead of pasting errors and asking "why?", this skill forces you to provide: error message, file context, hypothesis. 3. Dependency Audit (saved ~1h) Scanned a 3-year old Node project. Found 2 CVEs, 8 unused devDependencies (21 MB). 4. Auto Commit Messages (saved ~30m) Saves 2 minutes per commit. Over 15 commits in a week that is 30 minutes. 5. Test Generator (saved ~2h) Generates 5-8 test cases per function in seconds. 6. Refactoring Planner (saved ~1h) Reads the function, identifies extraction candidates, outputs a dependency-ordered plan. 7. Performance Audit (saved ~30m) Found an unoptimized 3 MB hero image and a render-blocking script. The Ones I Never Touched About 8 out of 50 were "not this week" -- Database Migrations, API Documentation, CI/CD Pipeline. What I Learned The ROI is in the analysis skills. Code review, bug investigation, dependency audit -- these are high-judgment tasks where Claude thoroughness beats speed. Skills are habit, not technology. The hardest part was not writing the prompts -- it w
AI 资讯
Owning Your Dependencies
A lot of supply-chain attacks have taken place in the last year. Altough I don't think NeoVim itself has been mentioned so far, I was concerned about my setup, especially the one on my office laptop. I think this is a good opportunity to learn how to write plugins ourselves, but I also know that writing everything on my own is not ideal. At this rate, might as well write my own kernel and operating system because sudo pacman -Syu also carries supply-chain risks. What are the ways which you are dealing with this? submitted by /u/Full-Ad4541 [link] [留言]