Rust's derive often implies inline
In Rust, one of the most common ways to implement core traits (like Debug , Display , and Clone ) is to #[derive(...)] them, e.g.:
In Rust, one of the most common ways to implement core traits (like Debug , Display , and Clone ) is to #[derive(...)] them, e.g.:
A beginner's exploration of the many layers of Common Lisp development environments.
I built a tiny programming language where programs are candy grids, complete with a renderer, photo decoder, AST tree, and execution trace.
Meet G#: expressive data types, explicit nullability, and structured concurrency on .NET. Explore real examples and run your first project.
Curried functions are probably one of the first new things you come across if you go from an imperative language to a functional language. In purely functional languages, the convention is to define an n-parameter function inductively by staggering the parameters: applying the function to argument #1 returns a…
A signals-and-noise course left me writing Monte Carlo math on paper and wishing the notation itself would run. Nine years later, with an AI agent doing the heavy lifting, NoiseLang became a real Monte Carlo language that runs the same fused kernel on the GPU, on every CPU core, and on WebAssembly.
My new book guides you through the start-to-finish build of a real world web application in Go — covering topics like how to structure your code, manage dependencies, create dynamic database-driven pages, and how to authenticate and authorize users securely .
The Pascal language was named after Blaise Pascal (see picture), a French mathematician who was a pioneer in computer development history. In 1641, at the age of eighteen, Pascal constructed the first arithmetical machine, arguably the first computer. He would improve upon the instrument eight years later. In 1650…
New with expressions, type-safe error checking, and faster everything.
Many people, including myself, have implemented garbage collection (GC)libraries for Rust. Manish Goregaokar wrote up a fantastic survey of thisspace a few y...
Ever wondered how Clojure's persistent vector actually works? This is part 1 of a blog series which aims to explain them.
If you’ve ever needed to hit a breakpoint programmatically in C++, you’ve probably written something like this: 1 2 3 4 5 6 7 8 9 #if defined(_MSC_VER) __debugbreak(); #elif defined(__clang__) __builtin_debugtrap(); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ volatile("int3"); #else…
Java classes become CLOS classes, seven JVM languages share one Lisp expression, and a saved Spring Boot application launches in 84 milliseconds.
Forth is uncommonly used to teach programming to kids. Scripting languages like Python and visual environments like Scratch are far more popular options. But when I got the opportunity to introduce middle and high school students to programming, I chose the stack-oriented concatenative language from 1970. I was…
How Go 1.20's WithCancelCause and Go 1.21's WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.
QBE 1.3 took a while to cook, but it is the most significant release since 1.0 with around 7k new lines of code and 1.5k deleted ones. In addition to the usual bug fixes, QBE gained a new and original IL matching algorithm, new optimizations from Roland Paterson-Jones, Scott Graham added support for the Windows ABI…
Introduction to Lisp programming on a PDP-1, with a hands-on practical focus
This is shorter than some of my other posts, but I keep seeing people doing this wrong. It's even worse now in the LLM era.
Crystal is a compiled programming langauge with static type-checking with syntax very similar to the Ruby programming language . Something that keeps Crystal feeling like a dynamically typed language is how a variable can be assigned to multiple types throughout the course of its lifetime, unlike most statically typed…
If you are an Emacs user with a keen eye, you will have noticed that in Emacs Lisp, code is data. After all, 'Lisp' is shorthand for 'List Processing'. One of E...
Atwood's Law predicted JavaScript's dominance through accessibility. A new corollary is emerging: system languages will win through operational efficiency and AI-assisted development.
this has been bothering me for a while now, so I want to write down my thoughts so I can get it out of my head and move on. we’re gonna talk about how Deno approaches security, specifically with its permissions system, and why I think this approach is fundamentally insecure and misleading.
The Nix language lacks a good type system . There are already several configuration languages that provide static and even gradual typing (see, e.g., Cue , Dhall , or Nickel ), but none offer the ability to easily annotate legacy Nix code with types.
I once wrote a Perl subroutine that would memoize the subroutine that called it. That much was useful, but then it inserted a copy of itself into the caller, so that its callers would be memoized too. A well-placed call to aggressively_memoize could back-propagate to the whole codebase, spreading functional purity…
When the address of a nested function is taken, GCC creates at trampoline at run-time. This trampoline is placed on the stack, which means that the stack has to be executable. This is problematic because a non-executable stack is an important security feature. For some time now, GCC has the option to place the…
Why 'indirection has a cost' is usually the wrong reason to inline and what actually costs you.
In the previous article we explored how the Go runtime bootstraps itself — how a Go binary goes from the operating system handing it control to your func main() running. During that bootstrap, one of the first things the runtime sets up is the memory allocator. And that’s what we’re going to explore today. Think of…
These are questions about C++ Style and Technique that people ask me often. If you have better questions or comments on the answers, feel free to email me (bs at cs dot tamu dot edu). Please remember that I can't spend all of my time improving my homepages.