This paper introduces Deputy, a dependently typed language designed for practical programming. Deputy integrates dependent types into a Lisp-like language, aiming to balance the power of dependent types with the flexibility and practicality of dynamic languages. It achieves this through a novel combination of features: gradual typing, allowing seamless mixing of typed and untyped code; a hybrid type checker employing both static and dynamic checks; and a focus on intensional type equality, allowing for type-level computation and manipulation. This approach makes dependent types more accessible for everyday tasks by allowing programmers to incrementally add type annotations and leverage dynamic checking when full static verification is impractical or undesirable, ultimately bridging the gap between the theoretical power of dependent types and their use in real-world software development.
Nordström, Petersson, and Smith's "Programming in Martin-Löf's Type Theory" provides a comprehensive introduction to Martin-Löf's constructive type theory, emphasizing its practical application as a programming language. The book covers the foundational concepts of type theory, including dependent types, inductive definitions, and universes, demonstrating how these powerful tools can be used to express mathematical proofs and develop correct-by-construction programs. It explores various programming paradigms within this framework, like functional programming and modular development, and provides numerous examples to illustrate the theory in action. The focus is on demonstrating the expressive power and rigor of type theory for program specification, verification, and development.
Hacker News users discuss the linked book, "Programming in Martin-Löf's Type Theory," primarily focusing on its historical significance and influence on functional programming and dependent types. Some commenters note its dense and challenging nature, even for those familiar with type theory, but acknowledge its importance as a foundational text. Others highlight the book's role in shaping languages like Agda and Idris, and its impact on the development of theorem provers. The practicality of dependent types in everyday programming is also debated, with some suggesting their benefits remain largely theoretical while others point to emerging use cases. Several users express interest in revisiting or finally tackling the book, prompted by the discussion.
Andrew N. Aguib has launched a project to formalize Alfred North Whitehead and Bertrand Russell's Principia Mathematica within the Lean theorem prover. This ambitious undertaking aims to translate the foundational work of mathematical logic, known for its dense symbolism and intricate proofs, into a computer-verifiable format. The project leverages Lean's powerful type theory and automated proof assistance to rigorously check the Principia's theorems and definitions, offering a modern perspective on this historical text and potentially revealing new insights. The project is ongoing and currently covers a portion of the first volume. The code and progress are available on GitHub.
Hacker News users discussed the impressive feat of formalizing parts of Principia Mathematica in Lean, praising the project for its ambition and clarity. Several commenters highlighted the accessibility of the formalized proofs compared to the original text, making the dense mathematical reasoning easier to follow. Some discussed the potential educational benefits, while others pointed out the limitations of formalization, particularly regarding the philosophical foundations of mathematics addressed in Principia. The project's use of Lean 4 also sparked a brief discussion on the theorem prover itself, with some commenters noting its relative novelty and expressing interest in learning more. A few users referenced similar formalization efforts, emphasizing the growing trend of using proof assistants to verify complex mathematical work.
Niri is a new programming language designed for building distributed systems. It aims to simplify concurrent and parallel programming by introducing the concept of "isolated objects" which communicate via explicit message passing, eliminating shared mutable state and thus avoiding data races and other concurrency bugs. This approach, coupled with automatic memory management and a focus on performance, makes Niri suitable for developing robust and efficient distributed applications, potentially replacing complex actor models or other concurrency paradigms. The language is still under development, but shows promise for streamlining the creation of complex distributed systems.
Hacker News users discussed Niri's potential, focusing on its novel approach to UI design. Several commenters expressed excitement about the demo, praising its speed and the innovative concept of manipulating data directly within the interface. Concerns were raised about the practicality of text-based interaction for complex tasks and the potential learning curve. Some questioned the long-term viability of relying solely on a keyboard-driven interface, while others saw it as a powerful tool for experienced users. The discussion also touched upon comparisons to other tools like spreadsheets and the potential benefits for specific use cases like data analysis and programming. Some users expressed skepticism, finding the current implementation limited and wanting to see more concrete examples of its capabilities.
Summary of Comments ( 1 )
https://news.ycombinator.com/item?id=44041515
Hacker News users discuss the paper "The Lisp in the Cellar: Dependent Types That Live Upstairs," focusing on the practicality and implications of its approach to dependent types. Some express skepticism about the claimed performance benefits and question the trade-offs made for compile-time checking. Others praise the novelty of the approach, comparing it favorably to other dependently-typed languages like Idris and highlighting the potential for more efficient and reliable software. A key point of discussion revolves around the use of a "cellar" for runtime values and an "upstairs" for compile-time values, with users debating the elegance and effectiveness of this separation. There's also interest in the language's metaprogramming capabilities and its potential for broader adoption within the functional programming community. Several commenters express a desire to experiment with the language and see further development.
The Hacker News post titled "The Lisp in the Cellar: Dependent Types That Live Upstairs [pdf]" links to a PDF describing a programming language called Deputy. The discussion in the comments section is relatively brief, with a focus on the practicality and implications of the presented ideas.
One commenter expresses skepticism about the overall benefit of dependent types, questioning if the added complexity is worth the effort and if the advantages primarily apply to specific niches like formal verification. They seem to imply that for general-purpose programming, the trade-offs might not be favorable.
Another commenter points out a perceived similarity between Deputy's approach and the concept of gradual typing. They suggest that Deputy seems to be striving for a system where dependent types can be introduced incrementally, allowing developers to choose where and when to apply the stricter typing discipline.
A third comment delves into the technical details of Deputy's type system, highlighting its use of elaboration and normalization. They specifically mention that values are normalized during elaboration, comparing this approach to how Agda, another dependently typed language, handles type checking. They also raise a question about the implementation of large eliminations, a technical aspect related to how dependent types are handled in practice.
Finally, someone notes the irony in the paper's title, "The Lisp in the Cellar: Dependent Types That Live Upstairs," by pointing out that historically, Lisp has often been associated with more academic or advanced programming concepts, while dependent types are now being brought into that same realm. This comment focuses on the shifting perceptions and adoption of these programming paradigms.
While there are other comments, they are largely short expressions of interest, questions about specific technical details, or requests for clarification. The comments summarized above represent the most substantial points of discussion and offer insights into the community's reaction to the Deputy language and its features.