The article discusses the decision to rewrite the Bun runtime, originally built in Zig, using Rust instead. It explores the motivations behind this change, potential improvements in performance and ecosystem compatibility, and the challenges involved in such a significant rewrite of a major JavaScript runtime.
#programming-languages
30 items
A programmer shares daily notes from attending PLDI in Boulder, detailing workshop participation, collaborative coding on Datalog and Knuth-Bendix, meeting researchers, and social activities.
Van Wijngaarden grammar is a two-level grammar formalism for defining programming language syntax. It uses metarules to generate production rules, enabling context-sensitive constraints like type checking. It was notably used to define ALGOL 68.
OxCaml is a proposed successor to OCaml that introduces features like effect handlers, layout polymorphism, and first-class modules. The article argues these innovations improve composability and safety, and suggests other mainstream languages should adopt similar concepts to modernize their type systems.
The article demystifies MLsub, a type system that combines Hindley-Milner type inference with algebraic subtyping. It explains how subtyping can be naturally integrated into a type inference framework using a simple set of typing rules and a union/intersection type structure, allowing for more flexible and expressive type checking without sacrificing principal types or inference.
The article argues that low-level programming languages like C and C++ impose high costs through undefined behavior and complex memory management, leading to security vulnerabilities and developer inefficiency. It contends that the belief in their necessary performance advantages is often a fiction, and that safer high-level languages can achieve comparable results with fewer risks.
The LLVM compiler infrastructure, originally developed as a research project at the University of Illinois, has evolved into a widely used framework supporting multiple programming languages. Federal funding from agencies like NSF and DARPA supported its development, enabling compiler technology used by companies such as Apple, Google, and AMD.
The article proposes scaling laws for Lean 4 software development, suggesting that simply adding more computational resources can increasingly automate theorem proving, potentially leading to fully self-improving AI systems that write and verify their own code.
The paper presents a technique called "collapsing towers of interpreters" that eliminates interpretive overhead in multi-level language implementations by using guaranteed type specialization at each interpreter stage, achieving performance comparable to the base system without intermediate layers.
The article argues that Rust is not truly memory-safe despite its design goals, pointing out that unsafe blocks, FFI calls, and memory leaks (via Rc/Arc cycles and Box::leak) can still introduce memory vulnerabilities, and that the language's safety guarantees only hold if the programmer follows strict rules.
Chris Lattner and other experts discuss how machine learning is reshaping programming language design and implementation, exploring topics such as ML-driven compiler optimizations, hardware-aware code generation, and the future of AI-assisted programming tools in a workshop-style talk.
Rhombus is a new language built on the Racket platform that aims to bring flexible metaprogramming capabilities to a C-style syntax. The article explores its macro system, which allows developers to extend the language syntax in powerful ways while maintaining readability and composability.
The Futamura projections describe three transformations in program compilation: deriving a compiler from an interpreter via partial evaluation, generating a compiler generator, and bootstrapping that generator. They illustrate how self-application of a specializer can automatically turn interpreters into compilers.
Partial evaluation is a program optimization technique where a program is specialized with respect to some of its input data, producing a residual program that runs faster when given the remaining inputs. It is related to concepts like function currying and can be applied automatically using a partial evaluator or specializer.
Phantom Type
1.0Phantom types are type parameters in a data type that appear in the definition but not in the constructors, allowing additional static information to be encoded at the type level without affecting runtime representation. They are useful for enforcing invariants, such as distinguishing between different units of measurement or states of a resource, with all type checking performed at compile time.
Mainmatter's "C to Rust Migration Book" is a guide covering strategies, processes, and technical approaches for migrating existing C codebases to the Rust programming language. It addresses challenges such as gradual migration, interoperability between C and Rust, and maintaining system stability throughout the transition.
The article explores how local reasoning—examining small, isolated parts of a system—can be used to verify global properties like correctness, security, and performance. It discusses formal methods and programming language techniques that enable developers to prove system-wide behaviors from local code analysis, emphasizing the importance of modularity and abstraction in software verification.
The article discusses pragmatic strategies for enhancing compiler correctness, focusing on practical methods and approaches to identify and reduce compiler bugs. It highlights techniques such as testing, formal verification, and fuzzing to improve reliability in compiler implementations.
Low-level languages like C and C++ impose high cognitive and security costs through undefined behavior and manual memory management. The article argues these languages' hardware abstractions are increasingly broken, advocating for safer alternatives like Rust that offer stronger guarantees without sacrificing performance.
The post argues that with AI acting as a "super compiler," the current data language is natural human speech rather than Python, R, or SQL. The author predicts future data engineers will not need to learn SQL, as AI translates speech into JavaScript, which can run on both browsers and servers.
The article discusses how local reasoning (examining individual components) can be used to verify global properties in complex systems, drawing on examples from programming languages and formal verification to illustrate the principles.
Rhombus is a new language on the Racket platform with a flexible macro system for compile-time code manipulation, combining powerful metaprogramming with a Python-like syntax. It enables custom syntax extensions and domain-specific languages while maintaining static guarantees.
The article examines how programming language design choices—such as memory management, type safety, and error handling—directly affect software security. It argues that languages like Ada and Rust, which prioritize strong compile-time checks and safe defaults, can prevent entire classes of vulnerabilities that are common in languages like C and C++.
The article introduces Ante, a language that blends borrow checking and reference counting by letting programmers annotate when a value doesn't need borrow checking, so the compiler uses simpler ref counting instead. This combines borrow checking's performance with reference counting's flexibility.
The article discusses how programming language type systems and static analysis can enforce global properties (like memory safety or data race freedom) through local reasoning techniques, allowing developers to verify complex invariants without needing to understand the entire codebase at once.
History of T
3.0Paul Graham describes the history of T, a Scheme dialect developed at Yale in the early 1980s that aimed to combine the power of Lisp with the efficiency of compiled systems languages. Despite technical merit, the project faced challenges and was eventually abandoned.
The article introduces Prism, a research language designed as an alternative to Haskell and Rust for large-scale systems. It features an impure functional design with a monadic effect system, built-in parallel and distributed computation support, and a focus on ergonomic tooling including language servers and debuggers for practical use.
A Hacker News user asks whether improving programming languages and web technologies remains necessary if AI can already generate perfect, best-practice code, questioning if that point makes further innovation or learning redundant.
The article introduces Prism, an impure functional programming language that integrates typed effects using a system based on algebraic effects and row polymorphism. It demonstrates how Prism's type system tracks side effects like state, exceptions, and I/O, allowing pure and impure code to coexist safely within a unified framework.
Flap introduces a deterministic parser with fused lexing that combines lexical analysis and parsing into a single phase, aiming to improve efficiency and eliminate the traditional separation between lexing and parsing in language processing.