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

标签:#RAM

找到 2551 篇相关文章

AI 资讯

Giving a fleet of AI agents one shared memory — when each agent runs a different model

Most agent frameworks give each agent its own context window and call it memory. That works right up until you run more than one agent, and then it quietly becomes the most expensive design decision in the system. We run a fleet where different agents are deliberately backed by different models — one family handles long-form drafting, another handles structured extraction, a couple run on a local path with no external inference at all. Routing by capability is the easy part. The hard part is that an agent which learns something has learned it alone . This is a writeup of what broke, and the design we ended up with. The failure mode The symptom shows up as repeated work. An extraction agent determines that a particular vendor's invoices put the tax line above the subtotal. Useful. Two days later a different agent — different model, different prompt, same pipeline — hits the same vendor and re-derives it from scratch. Then a third does it again. Nothing is wrong . Every agent behaves correctly. The system as a whole just has no way to accumulate anything, because knowledge lives inside whichever context window happened to be open at the time. You are paying inference costs to rediscover facts you already own. The naive fix is to pass more history. That fails for a specific reason worth naming: context windows are per-invocation and per-model. A 200k window on one model does not help an agent running a different model with a 32k window, and neither survives the session ending. You cannot solve a persistence problem with a bigger buffer. What "unified memory" has to mean Once you accept that memory has to live outside the agents, the requirements get concrete: Model-agnostic storage. If memory is stored as one model's embeddings, you have coupled your memory layer to a vendor. Swapping models later means reindexing everything. Written by one agent, readable by all. Otherwise you have per-agent memory again, with extra steps. Attributable. When memory is wrong — and it w

2026-08-12 原文 →
开发者

Squeak 6.1 (a modern Smalltalk programming environment implemented in itself) was released!

After more than 4 years of work, our community has put together a big bouquet of new capabilities and improvements: A new tree browser for navigating and organizing classes Objectland, bringing back and extending the colorful world of examples from Squeak 3 Plenty of new features, bugfixes, and speed-ups for programming tools, the Morphic UI framework, and the rest of the system Original announcement on Fosstodon: https://fosstodon.org/@squeak/117071273007117118 submitted by /u/LinqLover [link] [留言]

2026-08-12 原文 →
AI 资讯

OOP Object-Oriented Programming

Advantages of using OOP: Is faster and easier to execute. Provides a clear structure for the programs. Helps to keep code DRY "Don't Repeat Yourself" and makes code easier to maintain, modify, and debug. Makes it possible to create fully reusable applications with less code and shorter development time. Define a Class: A class is defined by using the class keyword, followed by the name of the class and a pair of curly braces {} . All its properties and methods go inside the braces. Delegation: Delegation means that you use an object of another class as an instance variable. We can create multiple objects from a class. Each object has all the variables and functions defined in the class. An object of a class is made using the new keyword. Note: The $this keyword refers to the current class and is only available inside methods. __construct() function: Automatically runs at the beginning of the class. __destruct() function: Automatically runs at the end of the class. Encapsulation: The wrapping up of data and methods is a protection mechanism for the variables and functions inside the class. Access Modifier: Public: Variables or functions can be accessed from everywhere. Private: Variables or functions can ONLY be accessed inside the class. Protected: Variables or functions can be accessed inside the class and by child classes that extend from the parent class. Constants: It can’t be changed once it is declared. Declared inside a class with the const keyword. It is recommended to name the constants in all uppercase letters . Access outside the class by using the class name followed by the scope resolution operator :: . Access a constant inside the class by using the self keyword. Static Functions and Variables: Static functions or variables can be called directly - without creating an instance of the class first. Static functions or variables are declared with the static keyword. To access a static function or variable, use the class name , double colon :: , and the fu

2026-08-12 原文 →
AI 资讯

Are we still reading code?

People are starting to coin the term ADLC or Agentic Development Lifecycle. A lot of this seems to be combining two things: Day-to-day software engineering has completely changed from a process perspective Bottlenecks in the traditional SDLC are starting to show I don't think we need yet another acronym, but let's talk about how things are changing in general and what some of the bottlenecks are. We don't work on a single task anymore One of the overarching changes, leading to an explosion in lines of code, merge requests and more, is that the cost of software engineering has dramatically decreased. So much so that all of us can now do the job of multiple engineers without hiring them. As part of this change, our daily workflows have changed completely. We no longer open an IDE and work on a single task, start to finish. Instead, our roles have become a lot more exploratory and, quite frankly, fun. My workflow, for example, has shifted towards opening multiple chat sessions, often separate threads on the same topic. I get to spar like some sort of boxer with AI over a few variations of how I've been looking at the same problem. After a while, I'll start to narrow that down to one or two threads containing the desired architecture or strategy to solve the goal. From that point, I'm running this smaller set of agents end-to-end with validation criteria until a passing merge request is opened for each. Running this same process in parallel across 3-4 topics leads to 8-10 merge requests within a day . And because this process has become so easy, these merge requests are often meaty. Not just one-liners. Previously, you'd dedicate your day to working on a particular problem over a longer horizon, whereas now the amount of output (whether it's valuable output or not) has dramatically increased. If you frame software engineering as problem solving, where most problems contain local minima, not absolute minima (a metaphor about gradient descent) , then the really fun part i

2026-08-11 原文 →
AI 资讯

Monotonic Stack: The Matrix of Array Problems

The Quest Begins (The "Why") I still remember the first time I faced the “Next Greater Element” interview question. The array looked innocent enough, but every brute‑force attempt felt like I was hammering a nail with a sponge— O(n²) time, nested loops, and a sinking feeling that I was missing something elegant. I spent an hour sketching out the problem on a whiteboard, muttering, “There has to be a way to look ahead without looking back every single time.” That frustration is a rite of passage for many developers. We’re taught to think in terms of scanning left‑to‑right, but some array puzzles scream for a different perspective: we need to remember what we’ve seen in a way that lets us answer questions about the future elements instantly. Enter the monotonic stack—a deceptively simple data structure that turns those scary “look‑ahead” problems into straight‑line walks. The Revelation (The Insight) So what’s the secret sauce? A monotonic stack is just a stack that maintains its elements in strictly increasing or strictly decreasing order. Why does that help? Consider the Next Greater Element problem: for each index i , we want the first element to its right that’s larger than arr[i] . If we walk from left to right and keep a stack of indices whose next greater element we haven’t found yet, the stack will naturally be decreasing in value. Why decreasing? Imagine the stack holds indices [i₁, i₂, …, i_k] where arr[i₁] > arr[i₂] > … > arr[i_k] . When we encounter a new value arr[j] , any element on the stack that is smaller than arr[j] has just found its next greater element—namely arr[j] . We pop those indices, record the answer, and stop when we hit a value that’s not smaller (or the stack empties). Then we push j onto the stack. Because each index is pushed once and popped at most once , the total work is linear: O(n) . No nested loops, no repeated scans—just a single pass with a stack that does the heavy lifting. The same invariant works for other “first bigger/smal

2026-08-11 原文 →
AI 资讯

Processes vs Threads

📺 Prefer to watch? 90-second YouTube Short · 💬 Telegram Originally published on software-engineer-blog.com . You run code concurrently all the time. But "concurrent" hides a critical choice: are you spawning separate processes or threads inside the same process? That choice decides whether one crash takes down your entire system or stays contained, and whether you're copying data between isolated worlds or racing to read the same memory. Mental model: A process is its own house; threads are roommates sharing one. Processes: Isolation at the Cost of Weight When you start a process, the operating system hands it its own private address space. That address space is walled off. Your process can't touch another process's memory—the OS enforces it at the CPU level. If your process crashes, it corrupts only its own memory. The kernel cleans it up. Every other process keeps running untouched. This is why browsers put each tab in its own process. One tab runs malicious JavaScript, spins into an infinite loop, or has a memory leak—that tab's process dies. The rest of your browser lives. You close the dead tab and open a new one. Your other tabs don't even hiccup. But isolation isn't free. Each process carries: Its own copy of the heap, stack, and memory pages Its own file descriptor table, open sockets, and kernel resources OS overhead to track and protect it Spawning a process is expensive—milliseconds on modern hardware, but measurably heavier than a thread. And if two processes need to share data, they can't just read the same memory. One process must copy data into a pipe or socket, send it across, and the other process must copy it out and into its own memory. That's overhead on every exchange. Threads: Speed and Sharing, With a Trap Threads live inside a single process and share that process's entire memory. The kernel doesn't wall them off from each other. When you spawn a thread, you're not duplicating the heap, the file descriptors, or the kernel state—you're just cr

2026-08-11 原文 →
AI 资讯

Budoucnost

AI jako partner, ne kalkulačka: člověk a AI při řešení Project Euler #185 srpna 2026 Co se stane, když člověk nepoužije umělou inteligenci pouze jako nástroj, který má dodat hotovou odpověď, ale jako partnera při řešení problému? Dnes jsme to vyzkoušeli na konkrétním problému z Project Euleru. Nechtěli jsme vytvořit nový algoritmus. Chtěli jsme zjistit, jak může vypadat skutečná spolupráce člověka a AI při hledání řešení. Experiment Vybrali jsme Project Euler #185 – Number Mind. Úloha obsahuje 22 šestnáctimístných sekvencí. U každé je uvedeno, kolik číslic je na správné pozici. Úkolem je najít unikátní šestnáctimístnou sekvenci, která splňuje všechna tato omezení. Na začátku jsme si stanovili jednoduché pravidlo: Nechceme pouze získat výsledek. Chceme společně hledat cestu k němu. První problém Naše první společná zkouška nedopadla podle očekávání. Ukázalo se, že jsme si pro experiment nezvolili ideální problém a postup. Místo toho, abychom se snažili chybu zakrýt, označili jsme první pokus jako neúspěšný a změnili postup. To se ukázalo jako důležitá součást experimentu. Chyba nebyla důvodem ukončit spolupráci. Byla informací pro další krok. Project Euler #185 U samotného problému jsme postupovali bez předem připraveného algoritmu. AI začala pracovat s kandidáty a jednotlivými řádky. Člověk průběžně sledoval strukturu problému a hledal jiný pohled. V určitém okamžiku přišel klíčový návrh: «„Nehledejme jen to, co je správně. Hledejme miny – čísla, která se nám nehodí.“» Tím se změnila orientace řešení. Místo hledání správných možností jsme začali systematicky vyřazovat možnosti, které nemohou být správné. Co přinesl člověk a co AI? Martin přinesl především: intuitivní pozorování, změnu perspektivy, rozhodování o směru dalšího řešení, pochybnosti a kontrolu jednotlivých kroků, myšlenku „min“. AI přinesla: rychlé zpracování velkého množství kombinací, strukturování hypotéz, systematické porovnávání, práci s omezeními, závěrečné ověření. Role se přitom během řešení nemě

2026-08-11 原文 →
AI 资讯

I Built a Concurrent Resource Scheduler in Go Using Sharded Priority Heaps

Support on GitHub: github.com/phero20/concurrent-resource-scheduler (Give it a star if you find it useful!) View Docs: pkg.go.dev/github.com/phero20/concurrent-resource-scheduler What happens when thousands of concurrent requests compete for a small pool of reusable resources? You can put a mutex around a slice and hope for the best. Or you can design the scheduler around concurrency from the beginning. I chose the second option. I built Concurrent Resource Scheduler (CRS) , a domain-agnostic Go library for selecting, prioritizing, routing, and maintaining reusable resources under heavy concurrent load. The core idea is simple: MANY CONCURRENT REQUESTS │ ▼ ┌───────────────────┐ │ Resource Scheduler│ └─────────┬─────────┘ │ ┌──────────────┼──────────────┐ │ │ │ ▼ ▼ ▼ Priority Acquire State Heap Strategy Management │ │ │ └──────────────┼──────────────┘ │ ▼ BEST AVAILABLE RESOURCE But making that work correctly under concurrency is where things get interesting. CRS is designed for use cases such as: LLM/API gateways API key pools proxy rotation database replicas GPU workers backend pools worker resources connection pools rate-limited providers reusable compute resources The scheduler itself does not know what a resource means. It only knows: "I have resources. I need to safely maintain them, prioritize them, and return an appropriate one to a concurrent caller." Table of Contents The Problem The Naive Approach Why a Global Mutex Becomes a Problem The Core Idea Behind CRS Architecture at a Glance Sharded Priority Heaps Why Sharding Helps The O(1) Lookup Map Priority and Acquire Are Different Problems Acquire Strategies Round Robin Weighted Acquire Adaptive Acquire Affinity Routing Shared vs Exclusive Acquisition Resource Lifecycle Atomic State Transitions The Inactive Store Batch Operations Updates Without Destroying Heap Ordering Cooldowns Asynchronous Events Observability Prometheus Integration Concurrency Model Complexity Testing the Library Race Detector Validation

2026-08-11 原文 →
AI 资讯

Where are all the good-looking T-shirts for developers?

Whenever I look for T-shirts aimed at people who work in tech, I always find the same things: programming jokes, code snippets, or programming language logos. I wish there were T-shirts with a stronger streetwear aesthetic, good design, and subtle references to technology,pieces that stand out for their style first, not just their theme. Does anyone else feel the same? What kind of T-shirt would you actually buy and wear? If you know any brands with this kind of approach, drop them in the comments. submitted by /u/Snoo-53620 [link] [留言]

2026-08-11 原文 →