Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

5 results for “recursive functions”

Newest and most relevant first

Zod: TypeScript-first schema validation that gives you strongly typed results back

Zod eliminates duplicate type-and-validation code in TypeScript projects, so developers define schemas once and get inferred static types plus runtime validation together.

Zod is a free, open-source tool for the TypeScript programming language that checks whether data is in the right shape before a program uses it. Its trick is that you describe your data's structure once, and the tool both checks incoming data at runtime and automatically produces the matching type definitions, so the two can never drift apart. It reports exactly which field failed and why. Anyone building software that handles user input, API responses, or configuration benefits.

Zod is a mature, free open-source validation library for TypeScript, a popular programming language. It cuts maintenance costs by removing the common practice of writing the same data structure twice, once as a type, once as a validator, which frequently causes bugs when one copy is updated and the other is not. The article covers no pricing (it is free), adoption figures, or comparison against competitors like Valibot or Yup. Teams writing new TypeScript projects should evaluate it; existing projects face a migration cost.

Zod provides a chainable schema-building API where calling .parse() on data returns either a fully typed value or a detailed error object, with return types automatically inferred, no `as User` casts needed. It supports unions of discriminated objects, optional fields with defaults, and recursive schemas such as trees, plus path-based error reporting that names the failing field. The article gives no benchmark numbers, version, or performance data; it points to the GitHub README and a live docs playground for evaluation.

GitHub Opensource Projects →

Linear Thinking, Nonlinear Costs

Agent systems built with coding tools like Claude Code can pass tests yet carry hidden retry, recomputation and caching costs that make production AI agents economically unsustainable.

This June 16, 2026 O'Reilly article by Nicole Koenigstein argues that AI agent systems, programs where a model calls tools, retries, and reflects before answering, often cost far more than expected because one user request triggers many hidden model calls. The author, an O'Reilly author, says classic computer science tricks like caching and skipping useless paths fix this. Teams building AI agents and paying the bills are affected. The article gives no benchmark numbers or prices.

Koenigstein warns that teams using coding agents such as Claude Code, Codex, and Jules generate agent architectures that are functionally correct but economically wasteful, because the tools won't add cost controls unless explicitly asked. A 60%-reliable step pushed to 99% needs 5 retries, and retries on a flawed model state don't buy independent trials. Hidden cost shows up as latency or the invoice. She advises explicit optimization constraints in SKILL.md or AGENTS.md project instructions.

The piece reframes agent workflows as recursive stateful computation needing classical optimizations: prompt caching for repeated text, memoization of planner decisions modeled as π(S_t) → a_t+1, pruning of unproductive branches (e.g., reflection loops producing only stylistic edits), and dynamic programming for overlapping subproblems. Optimization must follow topology: memoize the planner in centralized systems, cache shared context in decentralized ones, treat memoization as load-bearing in swarms. No benchmarks, tooling, or empirical results are provided.

Oreilly AI ML Blog →

pydantic-monty investigation

Developers running untrusted AI-generated Python get a sandboxed interpreter whose resource limits (max_duration_secs, max_memory, max_allocations, max_recursion_depth) actually work, verified hands-on.

Simon Willison reviewed pydantic-monty, a small, fast way to run Python code inside a locked box. It only supports a limited subset of Python, and when something isn't supported it returns a clear error instead of breaking the host application. Willison had the Claude Code AI tool examine the latest release and confirmed the safety limits work as promised. This matters for anyone letting AI-generated code run inside their software.

Willison's review of pydantic-monty, the Rust-implemented sandboxed Python subset from the Pydantic ecosystem, confirms its key risk controls, time, memory, allocation and recursion caps, perform as advertised. For teams executing AI-generated code, this means a viable sandboxing option with clean failure modes. The article is a short opinionated review, not a benchmark study, and includes no performance numbers.

Monty is a minimal Python interpreter written in Rust for controlled sandboxed execution, omitting most of CPython's functionality. Unsupported features and missing resources fail as structured errors rather than leaking into the host runtime; it is aimed at data transformation, branching, looping and calls to a small set of trusted host tools or a virtual filesystem. Willison verified max_duration_secs, max_memory, max_allocations and max_recursion_depth all work as documented, using Claude Code on the latest release.

Simon Willison’s Weblog →

CUDA 13.2 Introduces Enhanced CUDA Tile Support and New Python Features

CUDA 13.2 gives Python developers native profiling and Numba GPU debugging, and Ampere/Ada/Blackwell support for CUDA Tile means most modern NVIDIA GPUs can now run the new programming model.

NVIDIA has released CUDA 13.2, the software toolkit developers use to write programs that run on NVIDIA graphics chips. This version lets a new programming model, CUDA Tile, run on Ampere, Ada, and Blackwell GPUs, and adds Python tools for measuring program speed and fixing errors. Developers who write GPU code in Python or C++ benefit most.

CUDA 13.2 is a routine but substantive toolkit update shipping now. Python teams gain profiling via Nsight Python and the first GPU debugging for Numba kernels; C++ teams get a Grouped GEMM API claiming up to 4x speedups in mixture-of-experts workloads and FP64 emulation reaching about 2x on B200. Windows data-center GPUs switch default driver model to MCDM, which may slightly raise submission latency. Costs nothing extra; download the toolkit.

CUDA Tile now targets compute capability 8.X, 10.X, 11.X and 12.X (Ampere, Ada, Blackwell), with full Ampere-plus support promised later; cuTile Python adds closures, recursive functions, typed assignments and array slicing. New single-transfer memcpy APIs avoid the batch-of-one workaround, and Windows WDDM per-context local memory shrinks on driver R595. cuSOLVER FP64 emulation on B200 approaches 2x for QR at ~80K matrix sizes. Numba-CUDA GPU debugging via CUDA-GDB has a limited feature set.

NVIDIA Developer Blog →

Using Python to Build a Calculator

This article shows how to build a simple calculator using Python. It's a beginner-friendly guide for learning programming basics, which is important for building foundational digital skills.

This article outlines building a calculator in Python as a teaching tool. It highlights Python's versatility for practical applications and its role in upskilling technical teams.

The article describes implementing a calculator in Python, covering conditional logic, loops, and recursive functions. It serves as an introductory tutorial for foundational programming concepts.

Towards Data Science Blog →