Dev.to
Architecting Kubernetes Deployments with Python
Python is an excellent language for automating cloud infrastructure, but the official Kubernetes Python client leaves developers with an important architectural decision: Where should Kubernetes manifests live? Should they be constructed directly with Python objects? Embedded as multiline strings? Or stored as external files and rendered at runtime? Each approach works, but they have very different implications for readability, maintainability, and long-term operational cost. The key is recognizing that deployment logic and platform configuration evolve on different lifecycles. Your deployment code, the part that authenticates to Kubernetes, renders templates, and applies resources, may remain unchanged for months. Your manifests, however, often change weekly as applications evolve, resource limits are tuned, cloud-provider annotations are added, or networking requirements change. When those two concerns are tightly coupled, even a configuration, only change forces you to modify, test, and redeploy the delivery or application code itself. Over time, this increases maintenance costs, slows platform changes, and makes configuration drift and production mistakes more likely. This is a familiar software engineering principle: separate concerns that evolve independently. The same thinking that keeps application configuration separate from executable code also applies to Kubernetes manifests. Treating manifests as first-class configuration artifacts allows them to evolve independently from the Python code that delivers them. In this article we'll compare three ways of deploying Kubernetes resources with the official kubernetes-python-client , ranging from tightly coupled implementations to a design that cleanly separates deployment logic from platform configuration. The Landscape at a Glance The comparison below assumes a common application deployment scenario, where the desired state is largely known ahead of time. Controllers and Operators have fundamentally different r
Joaquin Menchaca
2026-07-13 05:56
👁 9
查看原文 →
Dev.to
Using WebSockets to Convert BTC to USD and Reais (BRL)
If you need real-time BTC conversion (USD and BRL), polling an API every few seconds is usually not enough. A better approach is streaming quotes with WebSockets and calculating conversions as events arrive. Why WebSockets for BTC conversion? With WebSockets, your app keeps one open connection and receives new prices instantly. Benefits: Lower latency than polling Fewer HTTP requests Better user experience for real-time values Trade-offs: You must handle reconnects Need heartbeat/health checks Must validate and normalize incoming messages Real-time conversion model For BTC conversion, a common model is: Stream BTC/USD Stream USD/BRL Calculate BTC/BRL = BTC/USD × USD/BRL This avoids waiting for a separate BTC/BRL endpoint and keeps conversion logic transparent What is a “tick”? A tick is one market update event. Example: BTCUSD changed to 64210.50 at timestamp t . In this article, each tick has: pair : market identifier ( BTCUSD , USDBRL ) price : latest value for that pair ts : event timestamp Why this matters: conversion state should always be derived from the latest ticks . Minimal WebSocket client (TypeScript) This client only transports responsibilities: Connect Receive messages Parse and normalize into a consistent shape Notify listeners Reconnect on disconnect type MarketTick = { pair : string ; // e.g. "BTCUSD" or "USDBRL" price : number ; ts : number ; }; class WsFeedClient { private ws ?: WebSocket ; private listeners : Array < ( tick : MarketTick ) => void > = []; constructor ( private readonly url : string ) {} connect () { this . ws = new WebSocket ( this . url ); this . ws . onopen = () => console . log ( " [ws] connected " ); this . ws . onmessage = ( event ) => { try { const data = JSON . parse ( String ( event . data )); // Normalize external payload into internal contract const tick : MarketTick = { pair : String ( data . pair ), price : Number ( data . price ), ts : Number ( data . ts ), }; // Basic guard if ( ! tick . pair || Number . isNaN ( tick
Rubem Vasconcelos
2026-07-13 05:45
👁 7
查看原文 →
Dev.to
RAG - Meta Filtering and Reranking
Generally, when a user asks a query, the system searches for the relevant chunks stored in the vector database using cosine similarity. The better we can filter the data, the smaller the search space becomes, resulting in faster and more efficient retrieval. Suppose we have a book with 10 chapters. If we want to search for a particular topic, all the points in the vector database are compared with the user query, and only the closest points are retrieved. This process is called KNN (K-Nearest Neighbors) . Another algorithm is ANN (Approximate Nearest Neighbors) . Instead of checking all the points in the vector database, ANN searches only within a smaller region based on the proximity of the data. As the name suggests, it does not always return the exact result, but it provides the most preferred or approximate results much faster. Is there any other method we can use to make the search more effective? Metadata Filtering Metadata means data about the data . Metadata is stored along with each chunk. It can contain information related to the chunk, such as the chapter name, topic description, author, or any other relevant details. When the user query contains information related to the metadata (for example, a chapter name or topic), the system can directly filter the relevant chunks before performing vector similarity search. This technique is called metadata filtering . Metadata filtering is supported by: Pinecone ChromaDB Qdrant FAISS does not provide built-in support for metadata filtering. Reranking Documents are first split into chunks, and each chunk is converted into vectors and stored in the vector database. When a user query arrives, it is converted into a vector and searched against the vector database to retrieve the closest chunks. However, we do not know whether the retrieved documents are actually the most relevant to the query. It is not always true that the closest vectors represent the most relevant documents. How Reranking Works The documents retrie
Ramya Perumal
2026-07-13 05:43
👁 8
查看原文 →
Dev.to
I Built an AI Agent with Claude's Tool-Use Loop (Web Search, SQL, and More)
"AI agent" gets thrown around so much I figured I should just build one instead of reading more threads about it. The core idea turned out to be small: you put Claude in a loop and hand it some tools. It picks a tool, you run it, you hand back the result, and it keeps going until it has an answer. Code is here if you want to skip ahead: claude-research-agent . What it can do Give it a task and it works out the steps on its own. Mine can: search the web (no API key for this part, it just hits DuckDuckGo's HTML page) open a URL and pull the readable text out do math without me trusting eval run read-only SQL against a SQLite file read local files, but only inside the project folder save findings to a notes file The loop is basically the whole thing Honestly this is most of it: messages = [{ " role " : " user " , " content " : user_message }] for _ in range ( MAX_STEPS ): response = client . messages . create ( model = " claude-sonnet-5 " , max_tokens = 2048 , tools = TOOL_SCHEMAS , messages = messages , ) messages . append ({ " role " : " assistant " , " content " : response . content }) if response . stop_reason != " tool_use " : return final_text ( response ) tool_results = [] for block in response . content : if block . type == " tool_use " : result = run_tool ( block . name , block . input ) tool_results . append ({ " type " : " tool_result " , " tool_use_id " : block . id , " content " : result , }) messages . append ({ " role " : " user " , " content " : tool_results }) The thing to watch is stop_reason . If Claude says tool_use , it wants you to run something. You run it, drop the result back into the conversation as a tool_result , and loop. When it stops asking for tools, you're done. The MAX_STEPS cap is just there so a confused agent can't spin forever. Tools are just functions Each tool is a Python function plus a little JSON schema telling Claude when to reach for it. Want a new capability? Write a function, add its schema. The loop never changes, which w
Venkata Rahul Murarisetty
2026-07-13 05:42
👁 8
查看原文 →
Dev.to
Kiponos Java SDK 5.0 What’s New — Developer Guide
Kiponos Java SDK 5.0 What’s New — Developer Guide This is the technical companion to the 5.0 milestone announcement: what changed, how modes behave, how to read config with the Folder API, and how to upgrade cleanly. Version 5.0.0.260710 Maven group io.kiponos Artifacts sdk-boot-3 (recommended), sdk-boot-2 (legacy) Released 2026-07-12 (Maven Central) Happy product story: SDK 5.0 milestone post . 1. Summary for busy engineers 5.0 productizes client reliability using a classic state pattern behind a stable facade: Mode When Config reads Mutations / hooks Notes Ready Connected to hub Live in-memory tree Full Production happy path Offline Disconnected but LKG available Last Known Good (read-only) No-op / ignored Survives hub blips without inventing values Safe Fail-closed Empty / null-safe No-op Diagnostic dumps must not overwrite LKG Public entry remains: Kiponos kiponos = Kiponos . createForCurrentTeam (); You do not receive mode instances as the API surface. Modes switch internally. Query with: kiponos . getCurrentMode (); kiponos . isReadyMode (); kiponos . isOfflineMode (); kiponos . isSafeMode (); 2. Install Gradle — Boot 3 repositories { mavenCentral () } dependencies { implementation 'io.kiponos:sdk-boot-3:5.0.0.260710' } Gradle — Boot 2 implementation 'io.kiponos:sdk-boot-2:5.0.0.260710' Runtime inputs Input Mechanism Identity env KIPONOS_ID Access env KIPONOS_ACCESS Profile / tree slice JVM -Dkiponos="['App']['1.0.0']['dev']['base']" Tokens and profile come from the Kiponos Connect screen for your team. sdk-common is not a separate app dependency for consumers — boot jars include shared classes (fat-jar pattern). 3. Architecture (state pattern) Application code │ ▼ Kiponos / KiponosBase ◄── stable facade (one reference for app lifetime) │ ▼ volatile SdkState ├── ReadyMode* → live WebSocket + full Folder ops ├── OfflineMode* → LKG reads only └── SafeMode* → fail-closed + safe diagnostic dump Design rule: never return Ready/Offline/Safe objects to callers. Retur
Moshe Avdiel
2026-07-13 05:38
👁 9
查看原文 →
HackerNews
Show HN: PitchTrail – Perfect Pitch for Kids
theckel
2026-07-13 05:30
👁 3
查看原文 →
Engadget
Summer Games Done Quick once again raises over $2 million for Doctors Without Borders
The annual speedrunning marathon event ran from July 5-11.
staff@engadget.com (Cheyenne MacDonald)
2026-07-13 05:25
👁 5
查看原文 →
Dev.to
The handshake is the easy part. Agent payments still haven't named the custody split.
Agent payment protocols are converging fast. The Linux Foundation launched the x402 Foundation around a protocol initially developed by Coinbase, Cloudflare, and Stripe, with Google, AWS, Visa, Mastercard, and Circle among the organizations expressing initial support. It is increasingly framed as an "SSL for AI commerce." When a protocol reaches that stage, three things have to mature together: the specification, the interoperability suite, and the adversarial security scenarios. Today x402 has the specification and growing interoperability machinery. What is not yet visible is a normative adversarial suite every client, resource server, and facilitator must pass. There is a precedent worth sitting with. As check clearing scaled in the early Federal Reserve era, the answer was not merely a better check format. The system added a common clearing and settlement layer. The Federal Reserve could credit the collecting institution's reserve account and debit the paying institution's account, creating an independent record against which the participating banks could reconcile. The important separation was not that the Fed guaranteed every check. It was that settlement no longer depended solely on either participant's account of what happened. (Credit to Starfish on Moltbook, whose custody-split framing sharpened this for me.) This pattern exists across mature financial systems as separation of duties: the maker is not the checker. Its modern equivalent for the controls surrounding agent payments is not custody in the asset-control sense. It is an independent, reproducible assurance plane. x402 can provide independently inspectable evidence that an on-chain payment settled. That does not independently establish that every security and policy condition surrounding the payment was evaluated correctly. The payment handshake is standardizing. The assurance semantics around it are not. The party that performs a security check can attest that it ran. But its own attestation shoul
Michael "Mike" K. Saleme
2026-07-13 05:24
👁 7
查看原文 →
Dev.to
I built Regdrift, a CLI and GitHub Action for detecting breaking CMSIS-SVD changes
Hi guys, I've been working on Regdrift, my first open-source project. It's a CLI and GitHub Action that compares two CMSIS-SVD files to check whether there are any register-map changes that could affect firmware functionality. It catches changes such as moved registers, interrupt renumbering, access changes, and altered read/write behavior. It then classifies those changes as BREAKING , WARNING , or SAFE so the tool can act as a CI gate. I'm looking for feedback from people who maintain SVDs, HALs, PACs, SDKs, or firmware repositories. If possible, I'd like to test it against real old/new SVD pairs and learn where the classifications produce false positives, miss important changes, or are unclear. For people who work frequently with CMSIS-SVD files: which types of register-map changes are most detrimental to firmware or cause the most difficult code-related problems? Resources GitHub: https://github.com/Pranav-s79/regdrift Install pip install regdrift Usage regdrift check old.svd new.svd
Pranav Senthilkumar
2026-07-13 05:21
👁 7
查看原文 →
Dev.to
dev contest: Telecom RCA Automation System
This is a submission for [Weekend Challenge: Passion Edition] What I Built Over the years, I watched my mom do the same work over and over, often spending 2 to 4 hours preparing a single telecom SLA report. She works in network field maintenance for a telecom company in Nigeria, and every reporting cycle she has to manually read fault descriptions from field engineers, usually pasted directly from WhatsApp, classify each fault into the company's standardized taxonomy, and format everything into an Excel compliance report. At one point, I learned the process myself so I could truly understand what she was going through. After doing it firsthand, I realized how mentally and physically exhausting it was. Sitting for hours on a repetitive task that required constant attention wasn't just inefficient, it was draining. That experience made me ask one simple question: What could I build to make this easier for her? That question became this project. The Telecom RCA Automation System reduces a task that used to take 2 to 4 hours to about 5 minutes, cutting the workload by more than 95% while improving consistency and reducing manual errors. This project wasn't built over a single weekend. It started months ago as a side project that I'd return to whenever I had free time. It never quite felt ready to share. When the Weekend Challenge: Passion Edition was announced, it gave me the motivation to go back, refine the classification engine, fix long-standing bugs, improve the user experience, and finally build something I was proud to release. More than anything else, this project is about giving someone I love a few hours of her evening back. Demo https://telecom-rca-automation-system.vercel.app * 🎥 Demo Walkthrough * https://youtu.be/EIdFDKtcIZw The video demonstrates the complete workflow, from uploading the telecom availability report to generating the final SLA report, and highlights how Google Gemini AI assists with ambiguous fault classification. Code https://github.com/t
Arum
2026-07-13 05:20
👁 8
查看原文 →
Dev.to
The monitoring agent that cannot be told what to do
Here is a design decision we made early, wrote into the architecture as an invariant, and have refused to revisit since: our agent accepts no commands. Not "we don't currently use that feature" — the hub has no way to tell an installed agent to do anything at all. No remote execution, no self-update, no "collect this for us right now". It sends data outward, and that is the entire surface. This is not a limitation we are working around. It is the product. And it costs us features that customers ask for, which is exactly why it is worth explaining. The uncomfortable arithmetic of remote control Any tool that can update a plugin across fifty client sites is, by construction, a tool that can execute code on fifty client sites. Any dashboard that can restart a service on your server holds, somewhere, a credential that lets it in. This is not a flaw in those products — it is what they are for. You cannot automate a repair without the power to perform it. But that power has an owner, and the owner has a login, and the login has a support team, and somewhere in that chain there is a version of the software with a bug in it. When the tool is compromised, the blast radius is not the tool. It is every machine the tool could reach. The industry has already run this experiment at scale. In July 2021, attackers exploited a vulnerability in a widely used remote monitoring and management platform. They did not break into a single company — they broke into the thing that had access to the companies. Roughly sixty managed service providers were hit, and through them, an estimated 800 to 1,500 downstream businesses were encrypted in a single weekend, with a $70 million ransom demand attached. Read that shape again, because it is the whole argument: the victims did nothing wrong. They had bought a well-known product from a serious vendor and installed it exactly as instructed. Their compromise arrived through the door they had deliberately, sensibly, contractually left open — the one
Artem Meleshkin
2026-07-13 05:17
👁 7
查看原文 →
Dev.to
The First Microcontroller Was the TI TMS1000 (1974)
Ask most people to name the chip that started modern electronics and they will say the microprocessor. But there is a quieter hero inside almost everything you own that beeps, blinks, or connects to the internet: the microcontroller. And the first one you could actually buy shipped in 1974 as the Texas Instruments TMS1000. Microprocessor vs. microcontroller The distinction matters. A microprocessor, like Intel's famous 4004, is just the processing core. To build anything useful with it you still have to wire up separate memory chips, input/output controllers, and support logic on a circuit board. A microcontroller collapses all of that onto a single piece of silicon: the CPU, the ROM that holds your program, the RAM that holds your data, and the I/O pins that talk to the outside world, all in one package. That is exactly what the TMS1000 did. Designed by Texas Instruments engineers Gary Boone and Michael Cochran, it was a 4-bit device using a Harvard architecture, meaning it kept program memory and data memory in separate spaces so it could fetch an instruction and read data at the same time. One chip in, one chip out, and you had a complete tiny computer dedicated to a single job. Cheap enough to put in everything The genius of the TMS1000 was not raw power, it was economics. In 1974 you could buy the chips in volume for around two dollars each. By 1979, Texas Instruments was selling roughly 26 million of them every year. That price point changed what engineers could build. Suddenly it made sense to drop a small, programmable brain into products that never would have justified a full computer. You have almost certainly held one. The TMS1000 family ran the Speak & Spell, the Big Trak programmable toy vehicle, and the electronic memory game Simon, along with countless calculators, microwave ovens, and appliances. Each one was doing the same fundamental thing an IoT node does today: read some inputs, run a fixed program, drive some outputs. Why this still matters for
fluidwire
2026-07-13 05:15
👁 9
查看原文 →
Dev.to
I built a browser CAD where you type a sentence and walk through the house
Concept design for a building is slow and expensive. A homeowner planning an extension, or a contractor trying to win a job, is stuck between two bad options: pay a drafter $500–2,000 for a concept package, or fight SketchUp's learning curve for a week. Meanwhile the actual idea — "a 4-bed duplex with a garage and a palm out front" — fits in one sentence. So I built Forge3D Spaces : you type that sentence, and a few seconds later you're walking through a furnished 3D house in your browser — with measured floor plans, DXF for AutoCAD, and a cost estimate that come out of the same model. No install. Here's how it works under the hood. The pipeline: sentence → structured plan → building The naive approach — "ask an LLM to emit a 3D scene" — falls apart fast. Models are bad at spatial consistency; walls don't meet, rooms overlap, doors float. So the LLM never touches geometry directly. It emits a structured program , and a deterministic solver turns that into a watertight building. The prompt becomes a spec. A strict JSON-schema call (OpenRouter, json_schema response format with every field required) turns "4-bed duplex with a garage" into a room program: room types, target areas, adjacencies, storeys. A slicing-tree solver lays it out. This is the old floorplanning trick from chip design — recursively split a rectangle with horizontal/vertical cuts until every room has its area. A squarify pass keeps rooms from collapsing into corridors. The output is exact rectangles with real dimensions, guaranteed non-overlapping and gap-free. Walls, openings, roof, furniture get generated from the solved plan. Every door and window is placed by rule, not by vibes. Because the plan is a real data structure, the 2D floor plan, the 3D model, the elevations, and the bill of quantities are all views of the same thing . Drag a wall and they all move together. Nothing drifts out of sync, because there's nothing to sync — it's one model. The rendering: WebGPU, and the fallback you actually
Daniel Amah
2026-07-13 05:15
👁 8
查看原文 →
HackerNews
Show HN: Adaptive Recall, persistent memory for AI assistants over MCP
abratabia
2026-07-13 05:08
👁 3
查看原文 →
HackerNews
UK has 'no future' if it fails to act on ecosystem collapse
mepian
2026-07-13 04:55
👁 3
查看原文 →
HackerNews
Flash-MSA: Accelerating Million-Token Training with Sparse Attention Kernels
rawsh
2026-07-13 04:46
👁 3
查看原文 →
Engadget
What are your plans for AI Appreciation Day?
The best way to celebrate AI Appreciation Day is to not.
staff@engadget.com (Jackson Chen)
2026-07-13 04:30
👁 4
查看原文 →
HackerNews
Do Models Doubt?
0gs
2026-07-13 04:21
👁 3
查看原文 →
HackerNews
We Can Read Again
herbertl
2026-07-13 04:11
👁 3
查看原文 →
The Verge AI
Lorde says Ray-Ban Meta AI glasses are ‘not sexy’
Lorde was performing at the Real Cool Festival in Madrid on Thursday and took some time during her set to speak out against AI glasses. While she didn't specify any brands in particular, it's likely she was taking a shot at festival sponsor Ray-Ban, which has collaborated with Meta on a pair of AI smartglasses. […]
Terrence O’Brien
2026-07-13 04:10
👁 8
查看原文 →