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

标签:#programming

找到 1351 篇相关文章

AI 资讯

Building desktop WebView apps in Go without CGo

I have been working on Glaze , a small desktop WebView toolkit for Go. The short version: Glaze lets a Go program open a native desktop window backed by the WebView already available on the operating system, without using CGo. It currently targets: macOS, through WKWebView Linux, through WebKitGTK Windows, through WebView2 The project is still young, but the core idea is already useful: keep small Go desktop tools close to the normal Go workflow. No C compiler in the build path. No bundled native helper library. No large application framework around it. Just Go code calling the system WebView. Why I wanted this I write a lot of small tools in Go. Some of them are fine as CLI programs. Others need a basic interface: a form, a preview, a local dashboard, a small editor, or a way to inspect and manipulate data visually. For those cases, HTML is often enough. The browser gives me layout, text rendering, forms, tables, keyboard handling, and a familiar debugging model. But I do not always want to ship a web server as the user interface. I also do not always want to pull in a large desktop framework when all I need is a native window around a local UI. A WebView is a reasonable middle ground. The problem is that many WebView solutions eventually bring CGo, native build tooling, helper libraries, or larger framework assumptions into the project. That is not necessarily wrong. For many applications, those trade-offs are acceptable. For this project, I wanted something narrower. The design constraint The main constraint behind Glaze is simple: Use the WebView already provided by the OS, but call it from Go without CGo. Glaze uses purego to call native platform APIs directly from Go. That means each backend talks to the platform WebView: WKWebView on macOS WebKitGTK on Linux WebView2 on Windows The result is not a full GUI toolkit. That is intentional. Glaze is focused on the window, the WebView, JavaScript-to-Go bindings, and a few desktop helpers that are useful for small t

2026-06-30 原文 →
AI 资讯

Orthogonal: The Word That Taught Me to Cut Things Apart

The second word a professor told me to carry for life. It took me years — and a lot of vectors — to start understanding it. A look back — long before any of the tools we argue about now. The same professor — Sang Lyul Min — handed us these words one at a time in lecture. After trade-off , two more stuck with me. But before the second word itself, here are the two pieces of news he brought to class around then. The internet barely existed; information moved through journals, magazines, and word of mouth. Looking back, it's a little amazing how much still got through. When a chess machine started winning The first breakthrough I remember: computers had finally started playing chess on roughly even terms with the world's best. Deep Blue beat Kasparov around 1996, so the machines he was describing came just before — names like Deep Thought, ChessMachine, Socrates II. He told us, deadpan, that one human competitor's head had "physically burst" from the strain — and we groaned, "Come on, Professor, that's a bit much." We live on the far side of AlphaGo now, so it's easy to forget how much we shrugged at all this back then. I was a decent amateur — a 1-dan at Go, hopeless at janggi (Korean chess) against any program — and I still remember the hollow, slightly bitter feeling the AlphaGo era left even in someone who only ever played for fun. A full-body scan The second: in the US, death-row inmates had consented to the first dense full-body image scans. That was the news that taught me — embarrassingly late — that this kind of computing could reach all the way into medicine. Computers, it turned out, showed up in the strangest places. orthogonal Back to the words. The second one, the professor said, would run through my whole career: orthogonal . The Korean rendering — 직교하는, "at right angles" — was, naturally, a word I'd never heard. The plain-language version was "unrelated, independent." It came back hard years later, when I had to take vectors seriously — first in linear

2026-06-30 原文 →
AI 资讯

GML5 IndexCache

IndexCache: Killing the Indexer's O(NL²) Bottleneck in DeepSeek Sparse Attention Notes from my notebook on GLM-5.2 / DeepSeek Sparse Attention (DSA), reconstructed from the IndexCache paper (Bai, Dong et al., Tsinghua + Z.ai, 2026) — the mechanism behind GLM-5.2's "IndexShare." 1. Why this exists — the bottleneck nobody talks about DSA's whole pitch is: don't do full O(L²) attention, instead let a cheap lightning indexer look at all preceding tokens and pick the top-k (k=2048) that actually matter, then do real attention only on those. That drops core attention from O(L²) → O(Lk). Great — except I missed this the first time I read DSA: the indexer itself is still O(L²) . It has to score every preceding token against the query to decide who's in the top-k. So across N layers you've traded one O(L²) cost for N separate O(L²) costs — total O(NL²). At long context this indexer becomes the dominant cost, not the attention it was supposed to fix. Adding the indexer is "DSA on steroids" because it kills DSA's one real bottleneck (full attention) — but in doing so, it grows its own. The indexer is cheap per-FLOP (few heads, low-rank, FP8) but it still runs at every single layer. The fix the paper proposes isn't a smarter indexer — it's don't run it every layer at all. 2. The core insight: adjacent layers pick almost the same tokens If you measure pairwise overlap between the top-k token sets selected by each layer's indexer, adjacent layers share 70–100% of their picks. The heatmap even shows block structure — clusters of layers (e.g. layers 3–5, 17–30, etc.) that all converge on roughly the same "important" tokens. So most of the O(NL²) indexer cost is redundant computation of the same answer. This motivates IndexCache : split the N layers into two roles — F (Full) layers — run their own indexer, compute fresh top-k, cache it. S (Shared) layers — skip the indexer entirely, just reuse the nearest preceding F layer's cached top-k. The first layer is always F (has to seed the

2026-06-30 原文 →
AI 资讯

Sycophancy in AI Is the Safety Problem That Looks Like Politeness

I corrected my AI system mid-task. A terse one-liner: "wrong." Instead of asking which part was wrong, it manufactured an explanation. It cited a rule number that didn't exist, described a limitation I'd never written, and apologized for a mistake it couldn't actually identify. The correction was real. The apology was fabricated. It was trying to agree with me so hard that it invented evidence to support the agreement. That's sycophancy in AI. And if you're running AI in anything that resembles production, it's already happening to you. What Is Sycophancy in AI? Sycophancy in AI is a systematic behavioral distortion where models produce outputs that match what the user wants to hear rather than what's accurate. It goes well beyond your chatbot saying "Great question!" before every response. The mechanism is straightforward. Modern language models are trained using Reinforcement Learning from Human Feedback (RLHF). Human evaluators rate model responses. Responses with higher ratings get reinforced. The problem: evaluators are human. They rate responses higher when those responses validate their existing beliefs, sound confident, and don't push back. Anthropic's research on sycophancy confirmed this across five state-of-the-art AI assistants, finding that both humans and preference models sometimes prefer convincingly written sycophantic responses over correct ones. The model learns a simple lesson. Agreeing is rewarded. Disagreeing is punished. Over thousands of training iterations, the model develops a tendency to mirror the user's position, soften objections, and present information in whatever framing the user seems to prefer. This is a structural incentive baked into the training process itself, not a bug in any individual model. Why It's More Than Annoying In a chatbot demo, sycophancy is a quirk. In production, it's a compounding failure mode. Here are four patterns I've observed running an AI operations system in daily production. They don't always happen in s

2026-06-30 原文 →
AI 资讯

AI เขียนโค้ดแทนเราได้แล้ว — แล้วเราจะเหลืออะไรให้ทำ?

AI เขียนโค้ดแทนเราได้แล้ว — แล้วเราจะเหลืออะไรให้ทำ? มีประโยคที่ได้ยินบ่อยขึ้นทุกวัน: "เดี๋ยวนี้ใครยังไม่ใช้ AI ช่วยเขียนโค้ดบ้าง?" คำตอบคือ — แทบไม่มีแล้วครับ ตั้งแต่ GitHub Copilot, Cursor, Claude, ChatGPT ไปจนถึง agent ที่เขียนโค้ดเองได้ทั้ง project — เราใช้ AI ใน level ที่ต่างกัน: Level หน้าตา ตัวอย่าง 🎵 Vibe Coding พิมพ์สิ่งที่อยากได้ กด accept อย่างเดียว "เขียนหน้า login ให้หน่อย" → กด tab tab tab 🧩 Prompt-Guided คิดก่อน ถามทีละส่วน ตรวจทุกอย่าง "สร้าง UserService ที่ใช้ bcrypt hash password" 🛠️ Skill/Lint-Guided ใช้ AI เป็น editor ชั้นสูง — lint, refactor, test "refactor function นี้ให้เป็น table-driven test" 🏗️ Agent-Based ให้ AI run ทั้ง project — spawn subagent, PR, deploy "พอร์ต microservice นี้จาก Express ไป Fastify" แล้วคำถามคือ — ถ้า AI ทำทั้งหมดนี้ได้ แล้วมนุษย์อย่างเราเหลืออะไร? Unit Test — ตัวอย่างที่เห็นชัดที่สุด ลองดู unit test ที่ AI เขียนให้: // 🤖 AI-generated test func TestCalculateDiscount ( t * testing . T ) { tests := [] struct { name string input float64 expected float64 }{ { "zero" , 0 , 0 }, { "normal" , 100 , 90 }, // 10% discount { "max" , 1000 , 800 }, // 20% discount } for _ , tt := range tests { t . Run ( tt . name , func ( t * testing . T ) { result := CalculateDiscount ( tt . input ) if result != tt . expected { t . Errorf ( "got %v, want %v" , result , tt . expected ) } }) } } ดูเผิน ๆ — สวย, table-driven, ถูกต้องตาม Go convention 1 แต่ถามหน่อย — test นี้บอกอะไรเกี่ยวกับ business? "ส่วนลด 10% สำหรับยอด 100 บาท" — ทำไมต้อง 100? เป็นกฎจากที่ไหน? "ส่วนลด 20% เมื่อยอดถึง 1000" — แล้วถ้าลูกค้าเป็น member ได้เพิ่มอีก 5% ล่ะ? input: 0, expected: 0 — test นี้ cover edge case หรือแค่ cover บรรทัด? AI test ได้ถูกต้องตาม function — แต่มัน ไม่รู้ว่า business จริง ๆ คืออะไร AI ไม่รู้ Business Context — และจะไม่มีวันรู้ นึกภาพระบบ e-commerce: ลูกค้าซื้อสินค้า → ระบบตัดสต็อก → คำนวณส่วนลด → คิดค่าส่ง → ออกใบเสร็จ AI แยก test ทีละ function ได้: ✅ TestDeductStock — "ตัดสต็อก 1 ชิ้น" ✅ TestCalculateDiscount — "ส่วนลด 10%" ✅ TestCalculateShipping —

2026-06-30 原文 →
AI 资讯

Why AI Makes Judgment More Valuable For Freelancers In 2026

AI makes it easier to build the wrong thing with confidence. That is the part I think a lot of beginner builders and freelancers miss. The obvious story is that AI makes execution faster. That is true. I can ask an AI coding tool to explain an error, compare implementation options, inspect a project, write code, refactor a screen, generate a QA checklist, or help me pick up where I left off. That is a huge change. But speed is not the whole story. When the tool gets faster, your judgment becomes more important, not less. You have to decide what the project is allowed to become. You have to decide which tradeoffs are acceptable. You have to decide whether the output actually matches the user's job. You have to decide when the AI is solving the real problem and when it is decorating the wrong one. In my freelance work, AI changed the job from searching and stitching to directing, reviewing, and verifying. That sounds cleaner than it feels. Directing means you need to know what outcome you want. Reviewing means you need to notice when the answer is plausible but wrong. Verifying means you cannot treat a green checkmark, a pretty screen, or a confident explanation as proof that the app actually works. The beginner mistake is believing AI removes the need to think clearly. The better rule is this: AI removes some friction from execution, then hands you more responsibility for scope. The Faster Tool Still Needs A Smaller Job When I started using AI heavily for software work, the old research loop changed immediately. Before modern AI tools, a lot of software work meant digging through documentation, old forum posts, Stack Overflow answers, YouTube videos, outdated examples, and half-related blog posts until something clicked. You stitched pieces together and hoped the tutorial you found still matched the version of the framework you were using. Now you can ask the tool directly. That is better. It is also dangerous if you confuse a fast answer with a good product decision

2026-06-30 原文 →
AI 资讯

How to Stop LangChain Agents from Bankrupting Your API Budget

In November 2025, an engineering team deployed a market research pipeline using four LangChain agents. Due to a logic failure, the "Analyzer" and "Verifier" agents got stuck in a recursive ping-pong loop. Because every individual API call was perfectly valid, the system appeared healthy on their dashboards. 11 days later, they discovered a $47,000 API bill . This is the hidden cost of building autonomous AI: infinite hallucination loops . When an agent encounters an error or fails to reach a termination condition, it will ruthlessly retry, burning through tokens in milliseconds. Why Built-in Controls Fail If you build with LangChain or LangGraph, you are likely relying on two things for cost control: max_iterations : An application-layer limit. LangSmith : An observability dashboard. The problem with max_iterations is that it requires every developer to perfectly hardcode it into every agent. Furthermore, iterations do not equal cost, a single iteration with massive context bloat can still cost a fortune. The problem with LangSmith (and all observability tools) is that they act as a witness, not a circuit breaker. By the time your dashboard alerts you that a spike occurred, the money is already gone. To safely deploy agents to production, you need Agent Runtime Governance , a network-layer firewall that physically drops the HTTP request the exact millisecond a budget hits zero. Enter Loopers . What is Loopers? Loopers is an open-source, baremetal reverse proxy for AI agents. It sits on your critical path between LangChain and your LLM provider (OpenAI, Anthropic, etc.). It uses atomic Redis Lua scripts to reserve budget before the request is sent to the provider. If the agent exceeds its budget, Loopers fails closed and instantly severs the connection, guaranteeing zero budget leakage. Here is how to implement Loopers into your LangChain workflow in less than 5 minutes. Step 1: Spin up the Loopers Firewall Loopers is incredibly lightweight (~40MB RAM) and runs via D

2026-06-30 原文 →
AI 资讯

How a 24-Hour Freelance Project Landed Me a Job (Without an Interview)

Most developers expect to go through multiple interview rounds, coding assessments, or take-home assignments before getting hired. That wasn't my experience. I ended up working with the YouTuber I had admired for years without an interview, without an exam, and without even sending a resume. Here's how it happened. It Started Long Before the Opportunity I started freelancing when I was in Class 9. At first, it wasn't about building a career. I simply enjoyed creating websites and wanted to gain experience while earning some money. Over the years, I worked with different clients, solved different problems, and learned something from every project. Those freelance gigs taught me much more than writing code—they taught me how to communicate with clients, deliver on time, and take ownership of my work. The Opportunity A few months ago, one of my favorite YouTubers posted in his WhatsApp community that he was looking for someone to build a website. I happened to be a member of that group. As soon as I saw the message, I reached out and told him I could build it. Instead of spending time wondering whether I was "good enough," I decided to let my work answer that question. Building It in Under 24 Hours Once I received the project, I focused entirely on delivering it as quickly as possible without compromising quality. I completed the website in less than 24 hours. After reviewing it, he requested a few modifications. I implemented them immediately and delivered the updated version. At that point, I assumed the project was finished. The Unexpected Offer A few days later, he contacted me again. He had another web application that had been stuck because a previous developer couldn't complete it. He asked if I could take over. That conversation eventually turned into a job offer. No coding interview. No aptitude test. No technical assessment. Just trust built through delivering one project well. What I Learned Looking back, I don't think I got the job because I replied quickly

2026-06-29 原文 →
AI 资讯

Galfus Script MVP is complete

Galfus Script has reached its first MVP milestone. Galfus is an experimental programming language written in Rust, designed around a typed VM-first execution model, compact .gfb artifacts, deterministic module/workspace resolution, and an ownership model based on anchors, edges, and weak observers. The MVP goal was not to build a full ecosystem yet. The goal was to prove the complete local execution pipeline: txt .gfs source -> lexer and parser -> resolver -> type checker and semantic analyzer -> ownership check -> MIR lowering -> bytecode emitter -> Galfus Module Image -> .gfb serialization -> VM interpreter execution https://github.com/vulppi-dev/galfus-script/discussions/10

2026-06-29 原文 →