今日已更新 168 条资讯 | 累计 21034 条内容
关于我们

标签:#programming

找到 1391 篇相关文章

AI 资讯

Making numpy-ts as fast as native

I started working on numpy-ts last year and began serious performance optimization in February. These are some of the challenges and lessons from this project. Some/all might be obvious - lmk what you think! Disclaimer: numpy-ts was written with some AI assistance. Please read my AI disclosure for more details. submitted by /u/dupontcyborg [link] [留言]

2026-06-09 原文 →
AI 资讯

Storing cryptographic hashes on the blockchain for dataset integrity

This article covers a technique my team and I use to work on versioned datasets across organizations (team A works on features, team B) works on other features. It's been invaluable for us since we don't have a shared infrastructure, so we can always verify the latest version by storing the latest hash on-chain. It could be useful in other ways where integrity or immutability is paramount, like versions of models, model weights, etc. No need to share access to a central key management server and everyone can validate it simply. submitted by /u/Nice-Dragonfly-4823 [link] [留言]

2026-06-09 原文 →
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

2026-06-08 原文 →
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

2026-06-08 原文 →
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

2026-06-08 原文 →
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] [留言]

2026-06-08 原文 →
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

2026-06-08 原文 →