CORS: What is it protecting?
is it a browser or server security? submitted by /u/AdvertisingFancy7011 [link] [留言]
找到 1357 篇相关文章
is it a browser or server security? submitted by /u/AdvertisingFancy7011 [link] [留言]
The Agent Skills open standard today, and the 2026 research on agents that write their own skills. TL;DR: In late 2025, "Agent Skills" became a thing — a dead-simple way to teach an AI agent a task: a folder with a SKILL.md file (some instructions in Markdown). It's already an open standard. The wild part is what's coming next: agents that write their own skills. I built a demo where an agent solves a task the hard way once, saves a real SKILL.md , and then reuses it — cutting its total effort almost in half. ~130 lines, no API key. First, what's a "skill"? If you've used Claude Code or similar tools lately, you've probably seen SKILL.md files. The idea is refreshingly low-tech. A "skill" is just a folder with a Markdown file that says how to do something : --- name : csv-to-markdown description : Turn comma-separated text into a Markdown table. Use when the input looks like CSV and the user wants a table. --- # CSV to Markdown ## Instructions Split the text into rows on newlines and columns on commas. Make the first row the header, add a `---` divider row, then format every row as `| a | b | c |`. That's it. No SDK, no config. Anthropic introduced this in October 2025 and then published it as an open standard ( agentskills.io ) in December 2025, so the same skill folder now works across ~30+ different agent tools (Claude Code, Cursor, Copilot, and more). The full rules are short ( agentskills.io/specification ): the only required fields are name (1–64 chars, lowercase-with-hyphens, and it must match the folder name) and description (≤1024 chars, saying what it does and when to use it ). Everything else — license , metadata , compatibility , allowed-tools — is optional. That's the whole spec. The SKILL.md files my demo writes follow it to the letter, so they'd load unmodified in any compatible CLI. The clever trick: progressive disclosure Here's the smart part. If you just dumped 50 skills' worth of instructions into the agent's context, you'd fill it up and leave n
Active inference: curiosity emerges for free from minimizing surprise — 48% vs 100% on a foraging task. TL;DR: Most AI agents chase rewards — they pick whatever action scores the most points. I tried a different, brain-inspired goal: avoid surprises . Something neat happened — the agent became curious without being told to. It goes looking for information before acting, and that takes it from 48% to 100% on a simple task. ~100 lines. Two different ways to make decisions Most AI agents are "reward chasers." Give them points for doing well, and they'll pick whatever action they expect to score highest. Simple and effective. There's another idea from brain science: instead of chasing points, try to avoid being surprised — act so the world matches what you expected. It sounds almost too simple, but it leads to a surprising bonus: when you're trying not to be surprised, going and finding out what you don't know becomes valuable all by itself. In other words, curiosity isn't something you have to bolt on. It comes for free. This is called active inference , and in 2026 it jumped from neuroscience into AI as a serious approach ( here's a 2026 paper ). Here's the smallest demo that makes it click. The 10-second version The task: a reward is hidden behind either the LEFT door or the RIGHT door (50/50). There's also a hint you can check that tells you which door — if you bother to look. ❌ Reward-chaser ✅ Curious agent What it cares about getting the reward, right now getting the reward + not being unsure What it does guesses a door checks the hint first, then opens the right door Success (400 tries) 48% 100% Nobody told the second agent "go check the hint." It did it on its own, because being unsure bothered it. How it works Before acting, the agent scores each option on two things: Does this get me closer to the reward? Does this make me less unsure about what's going on? value_of_checking_the_hint = how_unsure_am_i # high when it's a total coin-flip value_of_just_guessing =
Theory of Mind and the Sally-Anne false-belief test, in ~60 lines of Python. TL;DR: There's a famous test that kids pass around age 4. It checks whether you understand that other people can believe things that aren't true. I built two AI agents: one that only knows "what's actually happening" (fails, like a toddler) and one that keeps track of what each person believes (passes). It's ~110 lines, and it's the foundation for agents that can actually work together . The test Sally puts her marble in the basket , then leaves the room. While she's gone, Anne moves the marble to the box . Sally comes back. Where will she look for her marble? If you said basket , nice — you just used something called "theory of mind." Sally never saw the marble move, so in her head it's still in the basket. What's actually true (it's in the box) and what Sally believes (it's in the basket) are two different things, and you kept them separate without even thinking about it. A 3-year-old says "box" — they can't yet separate what they know from what Sally knows. A 4-year-old says "basket." It's one of the most famous tests in child psychology, and in 2026 it's become a real test for AI agents too. The 10-second version ❌ Agent with no "theory of mind" ✅ Agent that models other minds What it tracks only what's actually true what each person believes, separately Where will Sally look? "box" "basket" Result FAIL (only knows reality) PASS How it works (the whole trick) The only difference between the two agents is one rule: a person's belief only updates when that person is actually in the room to see it happen. def someone_moves_the_marble ( new_place , who_is_watching ): for person in who_is_watching : # only people in the room beliefs [ person ] = new_place # update THEIR mental picture So when Anne moves the marble while Sally is out, only Anne's mental picture updates. Sally's is frozen at "basket." Ask the simple agent and it just reports reality ("box"). Ask the smarter agent and it answer
A sleep-like phase that consolidates noisy daily experience into durable memory — 75% vs 100% recall. TL;DR: There's a wave of 2026 research giving AI a "sleep" phase — time spent not answering questions, just tidying up what it learned that day. I built a 90-line demo of the idea. The agent that "sleeps" remembers 100% of what it learned. The exact same agent without sleep remembers only 75% and gets confused by bad info. Runs on a laptop. The memory problem every AI app hits If you've built anything with an LLM, you know the pain: the model only "remembers" what's in its current context window. Once the conversation gets long enough, the oldest stuff scrolls off the top and is just... gone. Forgotten. The usual fix is "make the context window bigger." But that's like fixing a messy desk by buying a bigger desk. It's expensive, and the model still gets worse as you cram more in (a real, measured effect — more text in the window can actually lower accuracy). Your brain doesn't work this way. You don't remember every sentence anyone said today. While you sleep, your brain replays the day, keeps the important bits as long-term memory, and dumps the rest. That's how you remember "I like coffee" without remembering every single cup. A couple of 2026 papers ask the obvious question: Do Language Models Need Sleep? Their answer: giving an AI a quiet "offline" phase to consolidate memories makes it remember better. So I built the simplest version that shows why. The 10-second version ❌ Agent with no sleep ✅ Agent that sleeps How it remembers keeps only the last N messages saves a tidy summary every night After 30 noisy days 75% recall 100% recall Tricked by bad info? yes no — it goes with what it saw most often Same experiences, same noise, same memory test. The only difference is whether the agent sleeps. How it works Each "day," the agent hears facts like Alice → drinks → coffee . To make it realistic, about 1 in 5 facts is wrong (people misremember, logs have errors). Th
A tiny Darwin Gödel Machine that edits itself and keeps only changes that verifiably score higher. TL;DR: I built a small program that improves itself . It looks at the tasks it's failing, edits its own code to fix them, and keeps a change only if the change actually makes it score better on a test. It goes from passing 1 of 8 tasks to 8 of 8 — and nobody wrote those fixes but the program itself. It runs on a laptop in under a second. No fancy hardware, no API key. The old dream: software that improves itself Normally, software only gets better when we make it better. You write code, you find a bug, you fix it, you ship again. The program never improves on its own. People have wanted "software that improves itself" for decades. The classic version (called a "Gödel Machine") had one rule that made it impossible to build: before the program could change a line of its own code, it had to mathematically prove the change would help. Proving that about real code is basically impossible, so the idea never worked. In 2025, researchers found a way around it with the Darwin Gödel Machine . They dropped the "prove it first" rule and replaced it with something every engineer already trusts: Try the change. Run the tests. If the score went up, keep it. If not, throw it away. That's it. It's basically how we all work — make an edit, run the test suite, keep what passes. The twist is that the program is the one making the edits. In the real paper, this let an AI coding assistant improve its own tooling and jump from solving 20% to 50% of a hard benchmark of real GitHub issues. I wanted to actually see this happen, so I built the tiniest version I could. The 10-second version Start After improving itself What it can do only uppercase learned 6 more skills on its own Test score 🔴 1 / 8 🟢 8 / 8 Who wrote the fixes? — the program did Start: ███░░░░░░░░░░░░░░░░░░░░░ 1/8 (only knows: uppercase) +reverse ██████░░░░░░░░░░░░ 2/8 +dedup_csv █████████░░░░░░░░░ 3/8 +sum_csv ████████████░░░░░░
I run an AI system that maintains itself on a schedule. One of its routines is supposed to do a job twice a week and save the result to a file. The scheduler swore it ran. Twice. lastRunAt right there - timestamped, green, smug. The file? Didn't exist. Not "saved in the wrong folder" - didn't exist anywhere. Here's the thing nobody warns you about when you wire up autonomous agents: "it ran" and "it worked" are different claims, and most of your dashboards only check the first one. The trap A scheduler firing a job tells you a process started . It tells you nothing about whether the job did the thing. My routine started, hit an early error reading a file that didn't exist yet, and just... ended. No crash. No red anywhere. It "ran." It produced nothing. For days. If I'd trusted the green checkmark, I'd still think it was fine. How I found it I stopped reading the status and went to the disk. Three checks, in order: Does the output actually exist? Not "did it run" - does the artifact it's supposed to produce exist, right now, where it claims to put it? If yes - is it fresh and non-empty? A stale or empty file is a silent failure wearing a costume. If no - read the raw run log. Not the summary. The actual transcript of what the agent did, tool call by tool call. That third check is where the truth was hiding. The summary said the routine was "episodic." The transcript said something blunter: it tried to read its own memory file, got "file does not exist," and never recovered to create it. Zero write calls the entire run. It never even tried to save anything. "Episodic" and "dies before it writes" lead to completely different fixes. The summary would've sent me down the wrong one. Steal these If you run anything autonomous: "Ran" is not "worked." Health is the artifact: it exists, it's fresh, it's not empty. Not a green dot from the thing that launched it. Described is not executed. What the spec says a routine does is a hypothesis. What's on disk is the fact. When they
Series: AI, Ego & Regret — Bonus Chapter Editor's Note: While compiling the old series for the...
submitted by /u/Cultural_Wheel_6936 [link] [留言]
In the landscape of modern programming, delimiters serve as the essential scaffolding that organizes logic and defines structure. Among these, curly braces—often referred to as braces or squiggly brackets—occupy a unique position. While they are ubiquitous, they are frequently the source of developer frustration and logic errors. A common pitfall for many programmers is the tendency to treat all delimiters as interchangeable, leading to a fundamental misunder身 of how a compiler or interpreter parses a script. Confusion often arises when developers conflate the purpose of curly braces with those of parentheses or square brackets. For instance, in many languages, curly braces denote a scope or a code block, whereas square brackets handle indexing. However, the nuances become even more complex when examining specific environments like R, where the semantic meaning of a symbol can shift depending on the context—moving from defining a function to facilitating list extraction. Understanding the specific curly braces semantics is not merely an academic exercise in syntax; it is a practical necessity for writing clean, maintainable code. When a developer understands why a brace is used, they can more easily debug nested structures and communicate intent to their teammates. Grasping these distinctions reduces the cognitive load required to read complex scripts and prevents the subtle bugs that emerge when syntax is used incorrectly. Curly Braces vs. Other Delimiters: Semantic Roles in R and Beyond To master programming syntax, one must move beyond recognizing symbols and begin understanding their semantic intent. While many developers treat curly braces as just another set of punctuation, their role is fundamentally distinct from parentheses and square brackets. Understanding the nuance of curly braces semantics is essential for writing logic that is both functional and readable. The Primary Role: Defining Code Blocks In most procedural and object-oriented languages (such as
Hello Devs 👋 AI coding assistants have changed the way many teams build software. Tasks like generating components, creating tests, writing boilerplate, or handling repetitive refactors can now happen in minutes instead of hours. The productivity gain is real and that part is easy to notice. What becomes interesting after using these tools for a while is that a different bottleneck starts appearing. Code generation becomes faster, but the review process often stays the same. Teams can generate hundreds of lines of code within minutes, but someone still has to answer important questions: Does this actually solve the requirement? Are edge cases covered? Will this introduce side effects? Does it align with existing patterns? The speed of writing code has changed. The need for confidence has not. That is where I think the conversation around AI-assisted development is starting to shift. The challenge is becoming less about generating code and more about making sure the generated code is actually safe to ship. The Problem With Reviewing AI-Generated Code Like Regular Code Imagine asking an AI coding assistant to implement coupon validation for premium users. Add coupon validation for premium users and create tests A few seconds later you get: if ( user . isPremium ){ applyCoupon (); } Nothing immediately looks wrong. The code is clean, there are no syntax issues, tests may pass, and the implementation appears complete. But pull request reviews usually go beyond reading diffs. Reviewers start asking questions such as: What happens if the coupon has expired? Does this affect payment calculations? Should audit logs be updated? Are there services depending on this behavior? This is where AI-generated code becomes interesting. It can often be functionally correct while still missing important implementation details. Research around larger AI-generated projects has also shown that functional correctness does not necessarily translate into maintainable system design. Teams stil
Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback. A single honeybee has exactly one move: find nectar, fly it home. Impressive aviation. Add a few thousand more bees and something strange happens. Now they're making honey, cooling the hive, and defending the colony against threats ten thousand times their size, with no Jira board, no standup, and nobody handing out tickets. That jump from "can fetch nectar" to "runs a self-regulating honey factory" is the best mental model I've found for multi-agent AI systems . So let's steal it xD First, what even is an "agent"? Before we throw thousands of them at a problem, it's worth pinning down what one actually is. An AI agent is an autonomous system that performs tasks on behalf of a user (or another system) by designing its own workflow and using available tools . Three things decide how good an agent actually is: The LLM powering it i.e the brain. Its tools which is the hands. The reasoning framework is how it turns tool outputs into the next decision. A single agent is fine. It's our lone bee, and it can do real work. But ask it to research a topic, run heavy calculations, scrape five websites, and write the summary, and you start to feel the ceiling. Multi-agent systems: bees, but for compute A multi-agent system keeps each agent autonomous but lets them cooperate and coordinate inside a structure . The magic isn't any single agent, it's the choreography between them (claude which is famous for that). And there are a few classic ways to choreograph it. 1. The decentralized network (a.k.a. "everyone's a peer") Every agent can talk to every other agent. They share information and resources, and they all operate with the same authority . No boss. Just message-passing. This is your agent network . It's great for emergent, collaborative problem-solv
submitted by /u/Double_Ad641 [link] [留言]
submitted by /u/bowbahdoe [link] [留言]
Time zones are one of those topics that look simple until you ship something and a user in another country sees the wrong time. Here are the traps I keep seeing, and how to reason about them in 2026. UTC is not a time zone, and GMT is not UTC UTC (Coordinated Universal Time) is a time standard, not a region. GMT is a time zone that happens to share the same offset as UTC most of the year. For storage and math, always think in UTC. Treat GMT as just another named zone. Rule 1: store timestamps in UTC Store every instant as UTC (or an epoch value). Convert to a local zone only at the edges, when you display to a user. If you store local times, you will eventually lose the offset and never recover the true instant. Rule 2: an offset is not a zone +09:00 tells you the offset right now. It does not tell you the zone, because zones change offset across the year due to daylight saving time. Store the IANA zone name (like America/New_York ), not just the offset. The offset is derived from the zone plus the date. Rule 3: DST is where it hurts The same wall-clock time can happen twice (fall back) or never (spring forward). Scheduling "9am every day" is a zone-aware operation, not an offset-aware one. Libraries like the built-in Intl.DateTimeFormat and Temporal (now widely available) handle this correctly if you give them a zone name. new Intl . DateTimeFormat ( ' en-US ' , { timeZone : ' Asia/Tokyo ' , dateStyle : ' short ' , timeStyle : ' short ' , }). format ( new Date ()); Rule 4: scheduling across teams is an overlap problem For a distributed team, the useful question is not "what time is it there" but "when do our working hours overlap". That is a set-intersection over each person's 9-to-5 expressed in UTC. A tool for the human side When I just need to eyeball overlaps and pick a meeting time without writing code, I use the free tool I built: ZonePlan , a time zone meeting planner and live world clock. If you want the practical playbook for picking meeting times, I wrote
One of the biggest realizations I've had over the last year wasn't about software. It was about focus. When I first started building KiwiEngine, I wanted it to power everything. Business software. CRMs. Inventory systems. Scheduling platforms. Accounting tools. SaaS products. If someone could build it, I wanted KiwiEngine to support it. Technically, I still do. But something changed. I realized there is a difference between building software that can solve every problem and trying to solve every problem yourself. Those aren't the same thing. The Architecture Never Changed KiwiEngine is still designed to power business applications. Nothing about the architecture changed. The modules. The APIs. The philosophy. The engine remains general-purpose. What changed was my focus. Build What You Understand I started asking myself a simple question. Who do I actually understand? Not as a developer. As a creator. The answer wasn't accountants. It wasn't HR departments. It wasn't inventory managers. The answer was musicians. Artists. Game developers. Creators. Builders. Those are the people whose problems I experience every day. Those are the workflows I naturally understand. Open Source Changes The Equation One of the beautiful things about open source is that I don't have to build every application. I can build the engine. I can document it. I can share the philosophy. Someone else can build the CRM. Someone else can build the scheduling platform. Someone else can build the accounting software. Meanwhile, I can focus on building the creative tools I genuinely want to use. The Best Proving Ground Today, KiwiEngine's proving ground is becoming: Artist websites EPKs Music production tools Digital storefronts Creative workflows Game development Media platforms Not because they're the only things KiwiEngine can build. Because they're the things I care deeply enough to refine every day. And I think that creates better software than chasing every possible market ever could.
submitted by /u/suhcoR [link] [留言]
The main website of the language https://mojolang.org/ displays an announcement bar that says "Mojo will be open source soon! Join us at ModCon '26 for an update." submitted by /u/baldierot [link] [留言]
A few years back I was a junior dev on a car financing product, and I got handed the deal jacket. A deal jacket is the full picture of a deal. How much the buyer puts down, what the car is worth, the terms, all of it packaged up and sent to a bank so the bank can come back with a yes or a no. The flow I had to build would send that package to one bank, wait about a minute for an answer, check whether the offer that came back was any good, and if it wasn't, send the whole thing to the next bank. A pipeline. Under the hood it was a recursive call with state managed in between, talking to Route One on the other side. It kept breaking. I wrote it, tested it, read the logs, fixed one thing, watched it break somewhere else. Day three, day four, still broken. Then on the fourth day I hit send in Postman one more time, watched the logs roll past, and it just worked. The approval came back clean. I jumped out of my chair. I was loud enough that the whole room looked over, and the two guys who knew what I'd been stuck on for four days were already grinning, because they knew exactly what had just happened. That feeling is the whole reason I'm writing this. Not the code. The feeling. The joy had two parts, and I only saw the second one once it was gone The first part is obvious. It's the problem solving. The thing fought back for four days and then it didn't, and I had beaten it. You chase a bug through the logs, you argue with it, and at some point it gives. That is a real high and every engineer knows it. The second part is quieter. I built that. Me. Back then if I shipped something, even a plain HTML page, it was mine end to end. I had to learn HTML before I could build the page, so the page was proof that I had learned. You could point at the thing and say that came out of my head and my hands, and nobody could take that from you. So the joy was solving the problem, and it was owning what you solved. That second part is the one that broke. Same problem, four years apart Ta
Package managers aren't as interchangeable as they seem. This post digs into the real differences in how npm, Yarn, pnpm, Bun, and Deno handle dependencies under the hood and why that matters when things break in practice. submitted by /u/OtherwisePush6424 [link] [留言]