AI 资讯
Compilando Brainf*ck para a JVM, parte 1: o interpretador
Quando eu decidi aprender como a JVM funciona por dentro, eu precisava de uma linguagem simples o suficiente pra não atrapalhar o aprendizado. Algo onde eu pudesse focar na mecânica do compilador sem me perder na complexidade da linguagem fonte. Brainfuck foi a escolha óbvia. Esse é o primeiro post de uma série de três onde a gente vai construir, do zero, um compilador que transforma código Brainfuck em bytecode JVM executável. Sem dependências externas, sem framework, só Node.js puro. No final da série, você vai ter um compilador que gera arquivos .class válidos que rodam direto no java . O código completo está no GitHub . Nesse primeiro post, a gente vai construir o interpretador - que é a base pra tudo que vem depois. O que é Brainfuck Brainfuck é uma linguagem de programação esotérica criada em 1993 por Urban Müller. Ela tem 8 comandos . Oito. E ainda assim é Turing-completa - ou seja, em teoria, você pode computar qualquer coisa que qualquer outra linguagem computa. O modelo de execução é simples: Uma fita de memória com 30.000 células, cada uma armazenando um byte (0-255) Um ponteiro que aponta pra célula atual Entrada e saída (stdin/stdout) Os 8 comandos: Comando O que faz + Incrementa o valor da célula atual - Decrementa o valor da célula atual > Move o ponteiro uma célula pra direita < Move o ponteiro uma célula pra esquerda . Imprime o valor da célula atual como caractere ASCII , Lê um byte da entrada e armazena na célula atual [ Se a célula atual é zero, pula pro ] correspondente ] Se a célula atual não é zero, volta pro [ correspondente Qualquer outro caractere é ignorado - o que significa que você pode escrever comentários livremente no meio do código. Um exemplo simples Pra imprimir a letra "A" (código ASCII 65), você precisa colocar o valor 65 na célula e usar . : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ . São 65 sinais de + seguidos de um . . Funciona, mas é feio. Uma forma mais elegante: ++++++++ [ > ++++++++ < - ] > +. O qu
AI 资讯
Recursive Superintelligence signs $410 million compute deal with Amazon
Recursive’s $400 million outlay represents the bulk of the company’s fundraising to date.
AI 资讯
Build a Palm-Sized POV TV with a Raspberry Pi Pico
Clear a corner of your workbench and gather a handful of parts, because this palm-sized television is an afternoon build, not a semester project. Here is the shopping list for a Scanwheel of your own: A Raspberry Pi Pico to run the show An A4988 stepper driver A 21-02485 stepper motor (or a similar small NEMA-style unit) Five LEDs, plus current-limiting resistors A 3D-printed case and spinning disk The Scanwheel, built by a maker who goes by [Ancient], is a mechanical TV that fits in your hand. Instead of a glowing panel, it leans on persistence of vision: your eye holds each flash of light for a fraction of a second, so a row of blinking LEDs seen through a moving slit reads as a solid picture. Spin the disk fast enough and the flicker melts into an image. How the picture actually forms The disk sitting on top of the case carries 20 small holes spaced evenly around its edge, each drilled at a slightly different height. As the motor turns, only one hole passes in front of the LEDs at a time, so light escapes in a scanning line rather than a wash. The Pico drives the stepper up to roughly 900 RPM through the A4988, then fires the LEDs in a precise order timed to the disk position. Get that timing right and the holes trace out a grid. The payoff is a 20x20 pixel color display in the center, flanked by two more 20x20 black-and-white panels that can each show a different image. Five LEDs feed all three. The whole coordination job lives on the Pico's GPIO pins, which is why the wiring stays simple enough to manage on a breadboard before you commit anything to a soldered protoboard. Small light baffles in the base keep the LEDs from bleeding into each other, a detail worth copying if your first image looks smeared. Give it a spin The full build guide, firmware, and disk files are on the project's GitHub repository , so you can match the hole spacing and LED timing exactly. If your image drifts or tears, start by trimming the RPM and re-checking when each LED switches rela
产品设计
Robot snakes searched for Venezuela earthquake survivors in collapsed buildings
US robotics researchers flew to Venezuela with snakebots after getting a call.
AI 资讯
GFM Tables in Payload's Lexical Editor Without Data Loss
Managing payload cms lexical tables in a content-heavy site means enabling EXPERIMENTAL_TableFeature — but the real trap is the markdown import that strips tables without warning. We lost a whole batch of production blog posts to this exact hole before we found the fix. Here’s why it happens and the step-by-step configuration that keeps your tables intact. The Silent Table Eater: Payload CMS Lexical Tables and Markdown Conversion The default markdown-to-Lexical conversion helper completely ignores your editor’s feature list. So even when you’ve added the table feature to your editor config, every GFM table in imported markdown is silently dropped. Here’s the code that ate our data: import { editorConfigFactory , defaultFeatures } from ' @payloadcms/richtext-lexical ' // ❌ This uses a plain config that doesn’t know about tables const mdConverter = editorConfigFactory . default ({ features : defaultFeatures , }) const lexicalData = mdConverter . parse ( ' # Hello \n\n | A | B | \n |---|---| \n | 1 | 2 | ' ) // result: { root: … } — no table node anywhere The problem: editorConfigFactory.default builds a conversion pipeline from a static feature set, not from your actual editor config. Any experimental or custom feature you’ve wired into the editor simply isn’t there during markdown parsing. Fix It: Wire EXPERIMENTAL_TableFeature Into the Conversion Config Switch to editorConfigFactory.fromFeatures , which actually reads the feature array you provide. Include the table feature alongside the defaults, and the markdown converter will start producing proper Lexical table nodes. import { editorConfigFactory , defaultFeatures , EXPERIMENTAL_TableFeature , } from ' @payloadcms/richtext-lexical ' const mdConverter = editorConfigFactory . fromFeatures ({ features : [... defaultFeatures , EXPERIMENTAL_TableFeature ()], }) Takeaway: You must add EXPERIMENTAL_TableFeature() to both your editor’s features array and to every markdown conversion config. Missing one side silently eat
AI 资讯
The Clapper was a bad smart home gadget — and a viral sensation
Clap on. Clap off. Well, more like, Clap, pause for half a beat but no longer because otherwise it'll stop hearing you, clap again because you waited too long, clap louder and faster, that didn't work, clap two more times, and suddenly: on. The Clapper didn't always work - and even when it did, it […]
开源项目
Version Controlled SQL Database Dolt Releases 2.0 with Automatic Storage Cleanup and Compression
DoltHub has recently released Dolt 2.0, a major update to the open source version-controlled SQL database. The latest major version adds automatic storage optimization, including garbage collection and compression, along with improved support for large and vector data types. By Renato Losio
开发者
How Philips Hue got the smart home right
The state of the smart home can be frustrating, because it is just so obvious how things ought to work. You should be able to control everything from everywhere. Your spaces should adapt to what you're doing and how you're feeling. Making your home smart shouldn't require renovating, and the smarts should be mostly invisible. […]
AI 资讯
How Keurig saved — and ruined — your coffee
Before Keurig, the coffee in your office was almost certainly terrible. Old, burned, made by someone who would rather poorly eyeball than properly measure. Just altogether gross. After Keurig? You could make your own coffee, a cup at a time, exactly when you needed it. The single-cup brewer was an elegant solution to an extremely […]
AI 资讯
Podcasting platform Riverside enters the newsletter publishing game
Users will be able use AI to create newsletters based on their recordings.
产品设计
Nest’s quest to fix your thermostat
The founding story of Nest is pretty much a perfect tech myth. A legendary product maker (in this case, Tony Fadell) helps create one of the most successful products ever (the iPhone) and then rides off into the sunset to enjoy the rest of his life, only to have an experience that drags him back […]
AI 资讯
Understanding Curly Braces: Syntax and Semantics in Code
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
AI 资讯
How Roomba started a robot revolution
If you had a Roomba, especially in the early days of the robot vacuum, it was in many ways a fairly unsophisticated machine. It would just bump around your house, looking for something to suck up, until its battery died or its (way too small) tank filled up. Not that it mattered, though. You probably […]
AI 资讯
The impossible dream of the universal remote
You don't really ever have to explain why a universal remote is a good idea. You have a bunch of stuff that needs controlling; this thing controls them all. Many companies have set out to build a product worthy of this idea, and one product came much closer than most. It was called the Harmony, […]
AI 资讯
⚠️ The Kotlin Multiplatform division-by-zero trap
If you write Kotlin Multiplatform code that involves integer division, you may have already hit this: the exact same expression behaves completely differently depending on which platform compiles it. 🐛 The problem Take this innocuous expression: val quotient = 12 / 0 val remainder = 12 % 0 On JVM and Native , both lines throw an ArithmeticException . That is the behavior most Kotlin developers expect and design around. On JavaScript , both lines execute without any exception and silently return 0 . Here is a concrete illustration drawn directly from the Kotlin test suites for each platform: // Kotlin/JS check ( 12 / 0 == 0 ) // passes — no exception check ( 12 % 0 == 0 ) // passes — no exception // Kotlin/JVM and Kotlin/Native val quotient : Result < Int > = runCatching { 12 / 0 } val remainder : Result < Int > = runCatching { 12 % 0 } check ( quotient . exceptionOrNull () is ArithmeticException ) // passes check ( remainder . exceptionOrNull () is ArithmeticException ) // passes Summary table: Expression JVM / Native JavaScript 12 / 0 ArithmeticException 0 12 % 0 ArithmeticException 0 🤔 Why it happens On Kotlin/JS, Int values are represented as JavaScript numbers, and 12 / 0 evaluates to Infinity while 12 % 0 evaluates to NaN . Kotlin/JS truncates Int arithmetic to 32 bits using JavaScript's | 0 operator, and per the ECMAScript ToInt32 conversion, both Infinity | 0 and NaN | 0 evaluate to 0 — so the division-by-zero result silently becomes 0 , with no exception thrown. JVM and Native follow Java's long-standing contract: integer division by zero is always an ArithmeticException . The practical consequence is that any guard you write and test on JVM — a try/catch(ArithmeticException) or a pre-condition check that relies on an exception — is silently bypassed when the same code runs on JS. No compile error, no warning, just a wrong result. ✅ The fix: Integer from Kotools Types 5.1.1 The Integer type in Kotools Types explicitly checks for a zero divisor before delegat
AI 资讯
Competitive Programming Series — Session 2: Recursion and Backtracking
After covering the foundational building blocks in Session 1, the next step is one of the most important problem-solving techniques in all of programming: recursion . And once recursion feels comfortable, it unlocks a powerful search strategy called backtracking . These two concepts appear everywhere in competitive programming — Fibonacci, binary search, tree traversal, merge sort, dynamic programming, N-Queens, and more. They deserve their own spotlight. 🌟 What Is Recursion? A function is recursive if it calls itself. Instead of solving a problem in one go, a recursive function breaks it into a smaller version of the same problem, solves that, and repeats — until the problem becomes simple enough to answer directly. Three things define every recursive solution: The problem is expressed in terms of a smaller instance of itself Each call reduces the problem size There is a point where the problem becomes trivial and no further calls are needed — this is the base case The Nested Box Analogy Think of recursion like opening nested boxes. A big box contains a smaller box, which contains another, and so on. Eventually you find the item you were looking for. That innermost box is the base case. Without it, you would keep opening boxes forever — which is how you get a stack overflow, not a solution. Base Case and Recursive Case Every recursive function has exactly two parts: Recursive case — the problem is reduced in size and the function calls itself again. Base case — the terminating condition. No further recursive call is made. The function returns a direct answer. Both are non-negotiable. A function without a base case will keep calling itself, consuming stack memory until the program crashes. Example: Factorial 5! = 5 × 4! 4! = 4 × 3! 3! = 3 × 2! 2! = 2 × 1! 1! = 1 ← base case Each step reduces the problem by one. When the function hits 1! = 1 , it stops, and the results unwind back up the call stack. In pseudocode: function factorial(n): if n == 1: return 1 # base cas
AI 资讯
Anthropic: Claude Now Writes 80% of Its Own Code in 2026
80%. That is the share of code currently being merged into Anthropic's production systems that was written by Claude. Not code-reviewed. Not pair-programmed. Written. In February 2025, when Claude Code launched, that number was in the low single digits. Sixteen months later, the company decided that data point — and the trajectory behind it — was worth a public warning. On June 4, 2026, Anthropic published "When AI Builds Itself," a research paper co-authored by Marina Favaro, head of the Anthropic Institute, and Jack Clark, one of the company's co-founders. It was the first major publication from the Anthropic Institute since its founding in March 2026. The paper did two things simultaneously: disclosed internal productivity data that most AI companies keep private, and called for a global mechanism to slow or pause frontier AI development before the process becomes self-sustaining without meaningful human direction. The data came first. The policy recommendation followed from it. Here is what the numbers actually show and why every developer building on AI infrastructure today should read this carefully. The Productivity Curve Nobody Predicted Anthropic published a chart of engineering output per engineer, indexed to a baseline from 2021–2024. The curve is flat for four years. Then Claude Code shipped in February 2025. The multiplier progression from that point: 1.2x, 1.5x, 1.9x, 2.5x. By Q1 2026: 5.8x. By Q2 2026: 8x. The typical Anthropic engineer is now merging eight times as much code per day as they were in 2024. Not 8% more. Eight times more. That is not a productivity improvement — it is a different category of output from the same headcount. To understand what drives the number, you need to understand what Claude Code actually does inside Anthropic's engineering workflows. The tool was built for and by engineers working on frontier AI systems — which means the tasks it handles are not boilerplate CRUD endpoints. Claude is writing test harnesses for novel m
AI 资讯
Git & Collaboration: A Beginner's Guide (With Real Analogies)
🌐 Read this post in Bahasa Indonesia here . 📝 A note on this article This post is based on my personal study notes on version control and Git collaboration. To make these notes more readable and useful — for myself and for others — I worked with AI to help expand and structure them into a proper blog format. The ideas, learning journey, and understanding are mine; the AI helped with the writing and presentation. Learning Git doesn't have to be intimidating. In this article, I'll break down the essential concepts of version control and collaboration — using simple analogies that anyone can understand. What Is Git? Git is a version control system . Think of it as a save system for your code — like save points in a video game. Every time you save (commit), Git remembers the state of your project at that moment. If something goes wrong, you can always go back. Repository: Your Project's Warehouse A repository (or "repo") is the folder that Git watches. There are two types: Local repository : lives on your computer. Your personal workspace. Remote repository : lives on a server (GitHub, GitLab, Bitbucket). The "official" shared copy your team can access. They stay connected through a Remote URL, so you can push your local changes up and pull others' changes down. git init # Start tracking a folder git remote add origin <url> # Connect to a remote repo git push origin main # Send commits to remote git pull origin main # Get latest from remote Commit: Your Project's Save Point A commit is a snapshot of your project at a specific moment. Each commit has: A message describing what changed A unique ID (hash) A timestamp git add . # Stage all changes git commit -m "Add homepage layout" # Save a snapshot git log --oneline # View commit history Write meaningful commit messages. Future you will thank present you. Checkout, Reset, Revert: Traveling Through Time These three commands all interact with your commit history — but in very different ways: git checkout — Visit the Past (T
AI 资讯
Git & Kolaborasi: Panduan untuk Pemula (Lengkap dengan Analogi)
🌐 Baca artikel ini dalam Bahasa Inggris di sini . 📝 Catatan tentang artikel ini Artikel ini dibuat berdasarkan catatan belajar pribadi saya tentang version control dan Git kolaborasi. Untuk membuat catatan tersebut lebih mudah dibaca dan bermanfaat — bagi saya dan orang lain — saya menggunakan bantuan AI untuk mengembangkan dan menyusunnya menjadi artikel blog. Ide, perjalanan belajar, dan pemahamannya adalah milik saya; AI membantu di bagian penulisan dan penyajiannya. Belajar Git itu tidak harus membingungkan. Di artikel ini, saya akan menjelaskan konsep-konsep penting dalam version control dan kolaborasi menggunakan bahasa yang sederhana — bahkan dengan analogi yang bisa dipahami anak kecil sekalipun. Apa Itu Git? Git adalah version control system — sistem yang merekam setiap perubahan yang kamu lakukan pada file-file proyekmu. Bayangkan Git seperti fitur save point di video game. Setiap kali kamu menyimpan (commit), Git mengambil "foto" dari kondisi proyekmu saat itu. Kalau ada yang salah, kamu bisa kembali ke foto sebelumnya. Repository: Gudang Proyekmu Repository (atau "repo") adalah folder yang diawasi oleh Git. Ada dua jenisnya: Local repository : ada di komputermu sendiri. Ruang kerja pribadimu. Remote repository : ada di server (GitHub, GitLab, Bitbucket). Salinan "resmi" yang bisa diakses seluruh tim. Keduanya terhubung lewat Remote URL, sehingga kamu bisa mengirim perubahan ke remote ( push ) atau mengambil perubahan terbaru dari sana ( pull ). git init # Mulai memantau sebuah folder git remote add origin <url> # Hubungkan ke remote repo git push origin main # Kirim commit ke remote git pull origin main # Ambil update terbaru dari remote Analogi: Local repo adalah buku sketsamu di rumah. Remote repo adalah papan pengumuman kelas — semua orang bisa melihat dan mengaksesnya. Commit: Save Point Proyekmu Commit adalah snapshot dari kondisi proyekmu pada satu titik waktu. Setiap commit berisi: Pesan yang menjelaskan apa yang berubah ID unik (hash) Timestamp g
安全
My SSN was exposed in a breach at Columbia—a school I have no connection with
Columbia admits last year’s data breach exposed victims beyond its students, staff.