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

标签:#p

找到 12357 篇相关文章

AI 资讯

Your cron expression can be valid and still never run

Your cron expression can be valid and still never run A cron parser can answer one question— does this have five fields and legal tokens? —while your scheduler needs a different answer: will this job ever run, and will it run when I intended? That gap is where silent cron failures live. A schedule can be syntactically valid, return no parser error, and still be impossible, surprisingly broad, or operationally noisy. Here is a small semantic checklist you can run before deploying a schedule. 1. Check the calendar, not only the grammar Consider: 0 0 30 2 * This has the right five-field shape: minute, hour, day of month, month, day of week. But February has no day 30. A syntax-only validator can label it valid, while a calendar-aware validator should tell you that its approximate frequency is never. That distinction is important in CI: treat a parse error as a broken input, but treat an impossible calendar match as a review failure. Both deserve attention, but they need different messages. The same idea applies to leap days. 0 0 29 2 * is meaningful, but it does not fire in non-leap years. Whether that is correct depends on the job; the validator should surface the edge case instead of silently deciding for you. 2. Be explicit about day-of-month/day-of-week semantics This expression is a classic source of surprises: 0 0 1,15 * 1 Many traditional cron implementations treat a restricted day-of-month and a restricted day-of-week as an OR , not an AND. In that model, the job runs on the 1st, the 15th, or Monday. Someone reading the expression as “the 1st or 15th when it is Monday” will get a different schedule. This is not a universal rule across every scheduler, so check the documentation for the runtime that will execute the job. The useful validation behavior is to warn whenever both fields are restricted and force the author to choose the intended semantics. For example, a lightweight pre-deployment check can start like this: function semanticWarnings ( expression ) {

2026-08-02 原文 →
AI 资讯

May the Force Be With Your Algorithm: Speeding Up Problem Solving Under Pressure

The Quest Begins (The "Why") I still remember my first technical interview like it was yesterday. The recruiter slid a whiteboard marker across the table, smiled, and said, “Here’s a classic: given an array of integers and a target sum, return the indices of the two numbers that add up to the target.” My heart started racing. I could feel the sweat forming on my palms as I stared at the empty board, my mind looping over the same terrible idea: check every pair . I started scribbling a nested loop, O(n²) time, and immediately realized that if the array had even a few thousand elements, I’d be stuck there forever. The interviewer’s eyes flicked to the clock, and I could almost hear the Imperial March playing in my head— the pressure was real . I needed a way to cut through the noise, fast, or I’d be that candidate who “just didn’t get it”. That moment sparked a question that’s haunted me ever since: how do top coders stay calm, spot the shortcut, and turn a seemingly impossible problem into a few lines of clean code under pressure? The Revelation (The Insight) After that interview (and a few too many late‑night debugging sessions), I dove into the mental toolkit that separates the “just‑get‑it‑done” crowd from the folks who seem to solve puzzles while sipping coffee. The breakthrough wasn’t a new library or a fancy language feature—it was a simple shift in perspective: Instead of asking “how can I compare every element to every other element?” ask “what do I need to know about each element to instantly know if its partner exists?” In the Two‑Sum problem, the partner of a number x is simply target – x . If I could remember, in O(1) time, whether I’ve already seen that partner, I could solve the whole thing in a single pass. That’s the “aha!” moment: store what you’ve seen so far in a hash map (or set) and look for the complement as you go . It feels like discovering the One Ring in a junkyard—once you see it, everything else falls into place. The beauty is that this pa

2026-08-02 原文 →
AI 资讯

SEO for a $2.99 product: what 28 days of Search Console data taught me

I'm building PetSignal — a browser-based AI that reads dog and cat body language from a photo and flags stress signals (whale eye, freezing, lip curl) before they escalate. It's a solo project, the core purchase is a $2.99 credit pack, and that one number dictates the entire growth strategy. Here's the math that rules everything: at a ~$3-10 one-time AOV, paid ads can never work. US pet-niche CPC runs $0.5-2; even at optimistic conversion rates you're paying $50+ to acquire a $3 customer. So the product lives or dies on organic search. That constraint turned out to be a gift — it forced me to treat SEO as an engineering discipline with real feedback loops instead of a checklist. Twenty-eight days of Search Console data later: 230 clicks, 15,953 impressions, and impressions in the second half up 105% over the first. Small numbers, real slope. These are the five things the data actually taught me. 1. Symptom pages beat product pages — but not the way I expected My content engine is ~35 "symptom pages": Dog Opening and Closing Mouth Repeatedly , Cat Whale Eye , Cat Breathing Fast . Each one answers a moment of owner anxiety that ends with a photo the owner has already taken — which is exactly what the product analyzes. The surprise: one page carries 54% of all clicks. Not the homepage, not the tool pages — a page about dogs opening and closing their mouths. Meanwhile my four "commercial" analyzer pages have CTRs of 6-9% (site average: 1.8%) but almost no impressions. The lesson: content pages find demand, commercial pages convert it, and internal links are the pipe between them. I spent a day rebalancing internal links after realizing my refund policy — sitemap priority 0.4 — carried roughly twice as many site-wide links as any commercial page, while the general-purpose analyzer had exactly zero editorial links pointing at it. 2. Every page is data, not HTML All 35 symptom pages live in one TypeScript file as structured objects: title, quickAnswer, sections, tables, re

2026-08-02 原文 →
AI 资讯

I Built the Same Escrow on Two Chains. The Architectures Couldn't Be More Different.

I maintain a non-custodial escrow protocol that runs on two blockchains: Base, an Ethereum L2, and TON, the chain behind Telegram. Same product, same core logic on paper: lock funds, deliver work, release on approval, handle disputes. I expected the second implementation to be a port. It wasn't. The two chains disagree so fundamentally about how a contract should be structured that writing the same feature twice forced me to rethink what "the same" even means. This post is about those differences, the design decisions each model pushed me toward, and what I'd tell anyone about to make the same jump. Light on code, heavy on the reasoning. The interesting part was never the syntax. The two mental models The single most important difference is not the language. It's the execution model underneath. On Base , a contract is an object with shared state. You write Solidity, and it behaves like a class instance sitting in memory that everyone calls into. A user calls a function, the function reads and writes contract storage synchronously, and either the whole thing succeeds or it reverts atomically. All my escrows live in one contract, in one big mapping, and every call reaches straight into that shared state. On TON , a contract is an actor that receives messages. You write Tact, and it behaves like an isolated process with a mailbox. You don't call a function; you send a message, and the contract handles it in its own turn. There is no synchronous cross-contract call in the EVM sense. Interaction between contracts is asynchronous message passing, and you design around that or you fight it the whole way. The shape of the entry point tells the whole story. On Base, an external caller invokes a named function: function approveWork(uint256 _contractId) external validContract(_contractId) nonReentrant whenNotPaused { // reads and writes shared contract storage, synchronously } On TON, nothing "calls" the contract. A message arrives, and a handler consumes it in the actor's own

2026-08-02 原文 →
AI 资讯

How I Stopped Losing Track of Claude Code and Codex Sessions

Using one coding agent is simple. Using several across multiple projects is where the real mess begins. I often had Claude Code and Codex running side by side. One agent was working, another was waiting for approval, and yesterday’s useful session was buried under a different path, branch, or terminal window. The agents were capable. My workspace was not. That frustration led me to build Termexo , a local-first Windows workbench for coding agents. The problem was not the model The hardest part was no longer generating code. It was keeping track of context: Which agent is still working? Which one needs my approval? Where did I leave yesterday’s session? Which project, path, and branch did that terminal belong to? Which model profile was active? A pile of terminal windows can answer all of those questions—but only if you remember everything yourself. What I wanted instead I wanted one recoverable workspace where I could: run Claude Code and Codex in real PTY terminals; arrange terminals in custom grids; see when an agent needs attention; search and resume native sessions; restore a workspace after restarting the app; switch Claude-compatible model profiles without rebuilding environment variables; keep API keys in Windows Credential Manager. That became Termexo. Why keep the native CLI? Termexo does not replace Claude Code or Codex with a custom chat interface. The real CLI remains visible and usable. That matters because the terminal is still the source of truth. Existing commands, hooks, approvals, keyboard shortcuts, and session behavior continue to work. Termexo focuses on the coordination layer around those tools. A workspace should be recoverable A useful coding-agent session should not disappear just because the app restarted or a terminal was closed. Termexo treats terminals, layouts, projects, and native agent sessions as parts of the same workspace. The goal is simple: when you return, you should be able to understand what was happening and continue without

2026-08-02 原文 →
AI 资讯

Node.js Runs TypeScript Now: Field Notes on Native Type Stripping

Headline: Node.js executes TypeScript files directly — node script.ts works with no loader, no ts-node, and no build step — by stripping type annotations at load time. Type stripping is on by default since Node.js 23.6 and ships in the 22.18 LTS release, but it only covers erasable syntax: I enforce that with TypeScript 5.8's erasableSyntaxOnly flag, moved type checking to tsc --noEmit in CI, and left my decorator-heavy NestJS services on their existing build. Key takeaways Node.js runs .ts files natively by replacing type annotations with whitespace, a mechanism called type stripping. It is enabled by default since Node.js 23.6 and in the 22.18 LTS release; on Node 22.6–22.17 it sits behind --experimental-strip-types . Type stripping handles only erasable syntax. enum , namespace with runtime code, and constructor parameter properties need the separate --experimental-transform-types flag. Node.js never type-checks and never reads tsconfig.json . The type checker is still tsc --noEmit , run in CI or a pre-commit hook. TypeScript 5.8's erasableSyntaxOnly compiler option turns every non-erasable construct into a compile error, which guarantees a file Node.js can run. Relative imports must spell out the .ts extension, and Node.js refuses to strip types inside node_modules — published packages still ship JavaScript. Can Node.js run TypeScript without a build step? Yes, for most application code. Node.js 22.6 introduced type stripping behind the --experimental-strip-types flag, Node.js 23.6 turned it on by default, and the 22.18 release brought the default-on behavior to the LTS line. On Node.js 24 — the current LTS and my daily runtime — node script.ts simply executes. // hello.ts const greet = ( name : string ): string => `Hello, ${ name } ` ; console . log ( greet ( ' Node 24 ' )); console . log ( process . features . typescript ); // 'strip' The mechanism matters. In strip mode Node.js replaces every type annotation with whitespace instead of compiling the file, so l

2026-08-02 原文 →
AI 资讯

Claude Code in CI: Running Agentic Code Review, Test Generation, and Auto-Fix on Every Pull Request

Claude Code in CI: Running Agentic Code Review, Test Generation, and Auto-Fix on Every Pull Request This article was written with the assistance of AI, under human supervision and review. Why Agentic Code Review in CI Changes Everything Most CI failures waste hours on manual intervention because traditional bots flag problems but never fix them. Developers open a pull request, the linter fails, tests break, and someone must context-switch from their current work to diagnose and patch the issue. This context-switching compounds across teams until the cost of maintaining CI hygiene exceeds the value it provides. Claude Code running in auto mode solves this by operating as an autonomous agent inside the CI pipeline. When a pull request triggers the workflow, Claude Code reviews the diff, generates missing tests, attempts to fix failures, and posts structured feedback as review comments—all without human intervention. The developer receives actionable fixes instead of error logs. This distinction is critical. Traditional CI bots detect and report. Agentic CI detects, repairs, and documents. The ROI appears in two places: reduced time-to-merge for routine issues and preserved cognitive capacity for architectural decisions that actually require human judgment. Key Takeaways Claude Code in auto mode runs unattended in CI pipelines with a safety classifier blocking dangerous commands before execution. Agentic CI performs code review, test generation, and auto-fix in a single workflow—eliminating the manual context-switch loop. Production deployments require cost controls (token budgets per PR), scoped file permissions, and exit conditions to prevent runaway execution. GitHub Actions, GitLab CI, and Azure DevOps all support Claude Code integration through environment variables and secrets management. The pattern that works now is scoped, single-responsibility agents—one for review, one for test generation, one for auto-fix—not a single agent attempting all tasks. Claude Code

2026-08-02 原文 →
AI 资讯

Day 23/30: Expose Tools with MCP

I still remember the frustration when our team's support bot, powered by LangGraph and MCP, couldn't retain context between user interactions. It was as if the bot had a case of conversational amnesia, forcing users to repeat themselves over and over. We later discovered that the issue stemmed from our lack of a centralized tooling server, making it impossible for the bot to access and leverage external tools in a scalable manner. This experience taught us the importance of building a robust MCP server to expose tools to our AI applications. In this post, we'll walk through the process of setting up an MCP server, focusing on exposing a single tool to any MCP-compatible AI app. Let's consider a simple tool that performs sentiment analysis on text input. We want this tool to be accessible from our support bot, allowing it to gauge user sentiment and respond accordingly. The first step in building an MCP server is to define the tool and its interface. MCP provides a set of APIs and protocols for tool definition, including the Tool class and the MCPTool interface. We'll use these to create our sentiment analysis tool. Here's a simplified example of how we might define this tool in Python: from MCP import Tool , MCPTool class SentimentAnalysisTool ( Tool , MCPTool ): def __init__ ( self ): super (). __init__ () self . name = " SentimentAnalysis " self . description = " Analyzes the sentiment of the input text " def execute ( self , input_text ): # Simplified sentiment analysis logic for demonstration if " love " in input_text or " great " in input_text : return " Positive " elif " hate " in input_text or " bad " in input_text : return " Negative " else : return " Neutral " # Create an instance of our tool sentiment_tool = SentimentAnalysisTool () Next, we need to set up an MCP server to host our tool. MCP servers can be configured to expose tools over various interfaces, including REST and gRPC. For simplicity, let's use a basic REST server. We'll use Flask, a lightweig

2026-08-02 原文 →
开发者

"iota ใน Go — อักษรกรีกตัวจิ๋วที่กลายเป็นเครื่องมือทรงพลัง"

📅 เขียนเมื่อ: กรกฎาคม 2026 ⚠️ ตรวจสอบข้อมูลจาก Go Specification, APL documentation, และบันทึกของผู้พัฒนา ถ้าคุณเขียน Go มาระยะหนึ่ง คุณคงเคยเห็น iota — เจ้า identifier ประหลาดที่ไม่มีใครรู้ว่ามันคืออะไรตอนเจอครั้งแรก const ( Monday = iota + 1 // 1 Tuesday // 2 Wednesday // 3 ) มันไม่ใช่ keyword, ไม่ใช่ type, ไม่ใช่ function — มันคืออะไรกันแน่? และที่สำคัญ — ทำไมต้องชื่อ iota ? คำตอบพาเราย้อนกลับไปถึงปี 1962 — ถึงนักคณิตศาสตร์ชาวแคนาดาคนหนึ่ง และภาษาโปรแกรมมิ่งที่เปลี่ยนโลก iota คืออะไรใน Go ใน Go spec — iota คือ predeclared identifier ที่ใช้ เฉพาะใน const declaration เท่านั้น มันทำสิ่งเดียว: นับเลขให้อัตโนมัติ const ( _ = iota // 0 (skip) KB = 1 << ( 10 * iota ) // 1 << 10 = 1024 MB // 1 << 20 = 1,048,576 GB // 1 << 30 ) ค่า iota เริ่มที่ 0 และเพิ่มทีละ 1 ทุกครั้งที่เจอบรรทัดใหม่ใน const block — แม้ว่าบรรทัดนั้นจะไม่ได้ใช้ iota ก็ตาม สิ่งที่ทำให้ iota ทรงพลังคือมันเป็น expression (ไม่ใช่แค่ตัวเลข) — คุณเอาไปคูณ บวก ลบ shift ได้หมด const ( Read = 1 << iota // 1 << 0 = 1 Write // 1 << 1 = 2 Execute // 1 << 2 = 4 ) นี่คือวิธีมาตรฐานในการสร้าง enum, bitmask, และ constant series ใน Go — ทั้งหมดด้วย keyword เดียว iota — อักษรกรีกตัวเล็กที่สุด ก่อนจะเป็นชื่อใน Go — ιώτα (iota) คืออักษรตัวที่ 9 ของกรีกโบราณ: ι มันคืออักษรที่ เล็กที่สุด ในภาษากรีก — แค่เส้นตรงหนึ่งเส้น ไม่มีหาง ไม่มีขีด ในพระคัมภีร์ไบเบิล มีวลี famous: "not one iota" — แปลว่า "ไม่แม้แต่นิดเดียว" — เพราะ iota คือสิ่งที่เล็กที่สุด และมันคือชื่อที่สมบูรณ์แบบสำหรับสิ่งที่ "เพิ่มทีละหนึ่ง" จุดเริ่มต้น — APL และ Kenneth Iverson นักคณิตศาสตร์ผู้สร้างภาษา ปี 1962 — Kenneth E. Iverson ตีพิมพ์หนังสือ "A Programming Language" (ที่มาของชื่อ APL) Iverson เป็นนักคณิตศาสตร์ชาวแคนาดา (ต่อมาได้ Turing Award ปี 1979) — เขาไม่ได้แค่ออกแบบภาษาใหม่ แต่ปฏิวัติวิธีคิดเรื่อง programming แทนที่จะเขียน for i = 1 to 10 — Iverson คิดว่า programming ควรเหมือนคณิตศาสตร์: สั้น, สัญลักษณ์, และทรงพลัง เกิดเป็น ⍳ (iota) ใน APL, Iverson สร้าง operator ⍳ — เรียกว่า iota — ที่ทำสิ่งเดียว: สร้างลำดับเลข ⍳ 5 → 1 2 3 4 5 ⍳ 10 → 1 2 3 4 5 6 7 8 9 1

2026-08-02 原文 →
AI 资讯

LLM中如果一个问题容易验证 那么AI就容易学会解决!说说这个特性与P与NP问题的关联性

大模型来了,有个说法是如果一个问题容易验证 那么ai就容易学会解决!说说这个特性与p np问题的关联性 这个说法听起来很直观,但其实 混淆了"验证的复杂性"和"学习/求解的复杂性"这两件不同的事 。我们把它拆开看。 先把"容易验证"在 P/NP 里的精确定位理清 在计算复杂度理论中: NP = 给定候选解(证书),能在多项式时间内验证其正确性的问题 P = 能在多项式时间内直接求解的问题 P ≠ NP ? = 是否所有容易验证的问题,也都容易求解? 所以"容易验证"在 CS 里的严格含义是: 验证者在多项式时间内工作 , 不是说 AI 训练成本低 。 "容易验证 ⇒ AI 容易学会"——部分成立,但有重要的限定 这个直觉 在某些场景下确实成立 ,原因是"验证"提供了 稠密的训练信号 : ✅ 成立的情形:验证器可作奖励/过滤 当一个问题具备"易于验证"的结构时,我们可以用它来: 生成训练数据 :比如 SAT 问题,随机生成一个赋值,代入公式验证,正确就得到一对 (公式, 赋值) 训练样本—— 数据无限且免费 RL 中的奖励塑形 :LLM 生成代码 → 编译器/单元测试验证 → immediate reward Self-play / 自我蒸馏 :AlphaGo 等用模拟器验证落子结果 Verifier-Guided Search :用"易于验证"的判据引导 beam search / MCTS,如 AlphaCode、AlphaGeometry 💡 这就是为什么像 代码生成、形式化证明、数学解题 这些领域近期进展飞快——它们都有"相对容易的验证器"(单元测试、类型检查器、证明校验器)。 ❌ 但这个推论远非普遍成立 "容易验证"≠"AI 容易学会",有几个关键原因: 1. 验证器只给二值信号,梯度稀疏 验证器通常只输出 0/1(对/错),而深度学习需要平滑的损失曲面。对于复杂的 NP 问题,绝大多数随机猜测都是错的 → 奖励恒为 0 → 梯度消失,学不到东西 。这就是"稀疏奖励"难题。 2. P ≠ NP 意味着:验证简单 ≠ 求解简单 即使验证是 O(n),找到那个能通过验证的解可能仍需 O(2ⁿ)。AI 模型本质上是在做启发式搜索,面对组合爆炸, 没有 free lunch 。例如: 数独:验证 O(n²),但最难的数独对人类和 AI 都极具挑战 TSP:验证一条回路 O(n),但找最优回路是 NP-Hard 3. 分布偏移与泛化 NP 问题的"容易验证"是** worst-case 复杂度**意义下的。AI 学到的是训练分布的统计规律,遇到分布外的实例会失效。比如 LLM 在数学竞赛题上表现好,但换个数字或换种表述就可能崩。 4. 验证本身也可能不在 NP 里 很多现实问题是 PSPACE 或更难 (如围棋先手胜负),验证一个"策略"需要指数时间——这种问题连"提供证书让 AI 模仿"都很困难。 一张对照表 问题类型 验证复杂度 AI 易学吗? 例子 P 类 多项式 通常容易 (有高效算法可直接教) 排序、最短路径 NP-Complete,且有稠密验证信号 多项式 中等 (RL + 验证器有效) SAT、数独、TSP 近似 NP-Complete,但验证信号稀疏 多项式 困难 (奖励太稀) 某些密码学难题 超出 NP(PSPACE 等) 超多项式 极难 (验证本身就很贵) 围棋先手胜、QSAT 不可判定 不存在 不可能 (理论上限) 程序等价性 真正的关联在哪里 "容易验证 ⇒ AI 容易学会"更准确的说法应该是: 📌 如果一个问题有"多项式时间的验证器",并且我们能从中提取稠密的训练信号(如 partial credit、逐步验证),那么 AI 可以通过"生成 + 验证"的循环去逼近求解。 这本质上就是 用 NP 的"验证侧"去攻击"求解侧" ——也是当前 LLM + Verifier 范式(如 RLHF 中的 reward model、AlphaProof 的 formal verifier)的理论基础。 但要注意: 这不是 P=NP 的证明,AI 找到的解在 worst-case 仍可能不是最优的 AI 解决的是 平均情况(average-case) 或 特定分布 ,而非 worst-case 一旦问题规模增大到超出训练分布,性能会急剧下降 一个更深的视角:平均-case 复杂度 理论计算机科学里有个分支叫 Average-Case Complexity ,研究"典型实例"的难度。很多 NP-Complete 问题在 average-case 下其实有不错启发式算法——这也解释了为什么 AI 在某些 NP 问题上表现惊喜,但在 adversarial 构造的 hard instance 上翻车。 所以回到你的说法: "

2026-08-02 原文 →
开发者

Apache Hadoop Installation

This guide is a collection or a summary on how to install and use a footprint of Apache Hadoop. I tried to follow an old version 2.7.1 guide that I created few years ago and adjusted this to use the latest version. Apache Hadoop 3.5.0 is used below; check the Apache releases page before future installations. These instructions target Linux (Ubuntu/Debian) for development or testing. Production clusters need Kerberos, network controls, encryption, monitoring, backups, and an upgrade plan. Do not expose HDFS or YARN ports to the internet. Native single-node installation Prerequisites sudo apt-get update sudo apt-get install -y openjdk-17-jdk openssh-client openssh-server pdsh curl tar java -version Hadoop requires Java and SSH; pdsh is recommended by the current Apache single-node documentation. Find JAVA_HOME if needed: readlink -f "$(command -v java)" | sed 's:/bin/java::' Download and install Pin the version for repeatable installs and verify Apache's SHA-512 checksum: export HADOOP_VERSION=3.5.0 cd /tmp curl -fLO "https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz" curl -fLO "https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz.sha512" sha512sum -c "hadoop-${HADOOP_VERSION}.tar.gz.sha512" sudo tar -xzf "hadoop-${HADOOP_VERSION}.tar.gz" -C /opt sudo ln -sfn "/opt/hadoop-${HADOOP_VERSION}" /opt/hadoop sudo chown -R "$USER":"$USER" "/opt/hadoop-${HADOOP_VERSION}" Add this to ~/.bashrc, adjusting JAVA_HOME if necessary: export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 export HADOOP_HOME=/opt/hadoop export HADOOP_CONF_DIR="$HADOOP_HOME/etc/hadoop" export HADOOP_HDFS_HOME="$HADOOP_HOME" export HADOOP_YARN_HOME="$HADOOP_HOME" export HADOOP_MAPRED_HOME="$HADOOP_HOME" export PATH="$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin" Then load and verify it: source ~/.bashrc sed -i "s|^# export JAVA_HOME=.*|export JAVA_HOME=${JAVA_HOME}|" "$HADOOP_HOME/etc/hadoop/hadoop-env.sh" had

2026-08-02 原文 →
AI 资讯

Day 1: Understanding Cloud Computing — Service and Deployment Models Explained with a Biryani Analogy

Yesterday I announced I'm blogging daily on AWS & DevOps. Here's Day 1 — the fundamentals everything else builds on. ## What is Cloud Computing? Instead of setting up and maintaining infrastructure on-premises, you now access computing resources remotely over the internet — this is Cloud Computing. "Cloud" refers to a network that provides resources over the internet, accessible whenever needed. It evolved from grid computing, virtualization, and distributed computing. All you need to use it is a web browser. As per NIST , cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort. Key characteristics: uses virtualization, enables on-demand access, and offers "pay-as-you-use" pricing. Traditional companies had to spend heavily on infrastructure, hardware, and operations. With cloud computing, providers manage all of this — handling troubleshooting, recording activity, and sending analytics data to users. Service Models — IaaS, PaaS, SaaS IaaS : Providers offer databases, servers, storage, and networking as a service, and you pay per use. Examples: AWS, Azure, GCP. PaaS : Gives you an on-demand environment for developing, testing, and delivering apps, with ready dev tools already set up. Examples: Heroku, Google App Engine. SaaS : Delivers ready-to-use software over the internet, usually via subscription, with the provider managing everything underneath. - Examples: Gmail, Microsoft 365, Google Drive. The layered view: moving from On-Premise to IaaS to PaaS to SaaS, each model hands you a bigger pre-managed slice. On-premise means you manage everything yourself. IaaS shifts virtualization, servers, storage, and networking to the vendor. PaaS additionally hands over OS, middleware, and runtime. SaaS means the vendor manages everything — you just use the app. The biryani a

2026-08-02 原文 →
产品设计

"Plan 9 — ระบบปฏิบัติการที่โลกลืม แต่เปลี่ยนวิธีคิดเรื่อง OS ไปตลอดกาล"

📅 เขียนเมื่อ: กรกฎาคม 2026 ⚠️ อ้างอิงจากเอกสารต้นฉบับของ Bell Labs และบันทึกของผู้พัฒนา ถ้าผมถามว่า "ระบบปฏิบัติการที่เจ๋งที่สุดในโลกคืออะไร" — คุณคงตอบ Linux, macOS, หรือ Windows แต่ถ้าถาม Ken Thompson และ Dennis Ritchie — สองคนที่สร้าง Unix ขึ้นมา — พวกเขาจะตอบว่า Plan 9 Plan 9 คือระบบปฏิบัติการที่ Bell Labs สร้างขึ้นในช่วงปลายยุค 80 ถึงต้นยุค 90 โดยทีมเดียวกับที่สร้าง Unix แต่มันไม่ใช่แค่ "Unix เวอร์ชันใหม่" — มันคือการเริ่มต้นใหม่ทั้งหมด และถึงแม้วันนี้แทบไม่มีใครใช้ Plan 9 — แนวคิดของมันแทรกซึมอยู่ในทุกระบบปฏิบัติการที่คุณใช้อยู่ จุดเริ่มต้น — "Unix เริ่มแก่แล้ว" ปัญหาที่ Unix สะสมมา Unix เกิดในปี 1969 — ตอนนั้นคอมพิวเตอร์คือเครื่องเดียวที่มี terminal ต่อพ่วง พอยุค 80 มาถึง โลกเปลี่ยน — network กลายเป็นเรื่องปกติ, graphics เริ่มสำคัญ, distributed computing เริ่มเกิด แต่ Unix ไม่ได้ถูกออกแบบมาเพื่อสิ่งเหล่านี้ มันถูก patch, extend, retrofit — จนกลายเป็นระบบที่ซับซ้อนเกินกว่าที่ผู้สร้างจะภูมิใจ Ken Thompson เคยพูดประมาณว่า: "Unix เริ่มต้นด้วยความเรียบง่าย แต่มันค่อย ๆ สะสมความซับซ้อนเข้าไปเรื่อย ๆ — ถึงเวลาที่ต้องเริ่มใหม่" ทำไมต้องชื่อ Plan 9 ชื่อ "Plan 9" มาจากหนัง B-movie สุดคลาสสิกเรื่อง "Plan 9 from Outer Space" (1959) ของ Ed Wood — ที่ได้ชื่อว่าเป็น "หนังที่แย่ที่สุดตลอดกาล" แต่ชื่อนี้ไม่ได้หมายความว่า OS นี้แย่ — มันคือมุกวงในของทีม Bell Labs ที่ชอบตั้งชื่อแปลก ๆ (Unix เองก็เป็นมุก — มันล้อ Multics) หัวใจของ Plan 9 — "ทุกอย่างคือไฟล์" จริง ๆ จาก Unix สู่ Plan 9 — ทำให้สุดทาง Unix มีแนวคิด famous: "everything is a file" filesystem เป็นไฟล์ → /home/user/document.txt devices เป็นไฟล์ → /dev/sda , /dev/tty processes เป็นไฟล์ → /proc/1234 แต่มันมีข้อยกเว้น — network sockets, graphics, window system — สิ่งเหล่านี้ไม่ใช่ไฟล์ใน Unix Plan 9 เอาแนวคิดนี้ไป สุดทาง — ใน Plan 9, ทุกอย่างคือไฟล์ ไม่มีข้อยกเว้น 9P — โปรโตคอลเดียวที่เชื่อมทุกอย่าง หัวใจของ Plan 9 คือ 9P — โปรโตคอลที่ทำให้ทุกอย่างสื่อสารกันผ่าน filesystem หน้าต่าง GUI → mount เป็นไฟล์ network connection → mount เป็นไฟล์ เครื่องอื่นใน network → mount เป็นไฟล์ ลองนึกภาพ: คุณ ls ดูไฟล์ในเครื่องคนอื่นได้เหมือน

2026-08-02 原文 →
AI 资讯

I built CleanSlate, an open-source coding agent for the IDE, CLI, and SDK

CleanSlate is an open-source platform for running coding agents across your local machine and the cloud. Today, it works through an IDE, CLI, and SDK. Agents can understand a codebase, make changes, run commands, browse the web, and verify their work. We are now building longer-running autonomous cloud agents that can continue working without keeping your machine active. CleanSlate supports multiple model providers and is not tied to a single ecosystem. GitHub: https://github.com/TheWariend/CleanSlate Website: https://thewariend.com/cleanslate The project is still early, and I would appreciate honest feedback from developers who use coding agents.

2026-08-02 原文 →
AI 资讯

Architecting Mainline-Friendly Products

Mainline-friendly products are designed so their board support lives in upstream Linux, U-Boot, and standard build systems instead of a vendor fork. The decision is architectural, not aspirational: it is made when you choose the SoC, design the add-on connectors, and write the device tree — not when the product is already shipping. This article gives the strategic case, the product design rules that follow from current kernel work on hot-pluggable add-on boards, a vendor checklist for tech leads, and the concrete steps to upstream your own board support. We have covered why silicon vendors are moving to upstream-first BSPs . This article covers the product team's side of that shift: what you should do about it. Building mainline-friendly products means making a set of design decisions — SoC selection, connector design, device tree structure, and an upstreaming plan — so that mainline Linux and U-Boot treat your board as a normally supported board rather than as a permanent private port. Each section below turns one of those decisions into rules you can apply on your next board. Why mainline-friendly products are a strategic decision The cost of a vendor-fork BSP is not paid at bring-up; it is paid for the life of the product. Every kernel upgrade becomes a forward-port of private patches. Every security fix arrives on the vendor's schedule, not the kernel's — and for devices in scope of regulations such as the EU Cyber Resilience Act, patch latency is now a compliance question, not just an engineering one. Hiring is harder, because engineers must learn your fork before they can touch it, and the knowledge they build does not transfer in either direction. Board support that lives in mainline inverts each of these. New kernels are more likely to boot your board without forward-porting private support patches, because your board is part of the kernel's own build-and-test surface; LTS security fixes are easier to consume because the code paths you depend on are already

2026-08-02 原文 →