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.
Gleam v1.9.0 introduces improved error messages, specifically around type errors involving records and incorrect argument counts. It also adds the gleam echo
command, a helpful tool for debugging pipelines by printing values at different stages. Additionally, the release includes experimental support for Git integration, allowing Gleam to leverage Git information for dependency resolution and package management. This simplifies workflows and improves dependency management within projects, especially for local development and testing.
Hacker News users discussed the Gleam v1.9.0 release, largely focusing on its novel approach to error handling. Several commenters praised the explicit and exhaustive nature of error handling in Gleam, contrasting it favorably with Elixir's approach, which some found less strict. The discussion also touched upon the tradeoffs between Gleam's stricter error handling and potential verbosity, with some acknowledging the benefits while others expressed concerns about potential boilerplate. A few comments highlighted the language's growing maturity and ecosystem, while others inquired about specific features like concurrency and performance. One commenter appreciated the clear and concise changelog, a sentiment echoed by others who found the update informative and well-presented. The overall tone was positive, with many expressing interest in exploring Gleam further.
MichiganTypeScript is a proof-of-concept project demonstrating a WebAssembly runtime implemented entirely within TypeScript's type system. It doesn't actually execute WebAssembly code, but instead uses advanced type-level programming techniques to simulate its execution. By representing WebAssembly instructions and memory as types, and leveraging TypeScript's type inference and checking capabilities, the project can statically verify the behavior of a given WebAssembly program. This effectively transforms TypeScript's type checker into an interpreter, showcasing the power and flexibility of its type system, albeit in a non-practical, purely theoretical manner.
Hacker News users discussed the cleverness of using TypeScript's type system for computation, with several expressing fascination and calling it "amazing" or "brilliant." Some debated the practical applications, acknowledging its limitations while appreciating it as a demonstration of the type system's power. Concerns were raised about debugging complexity and the impracticality for larger programs. Others drew parallels to other Turing-complete type systems and pondered the potential for generating optimized WASM code from such TypeScript code. A few commenters pointed out the project's connection to the "ts-sql" project and speculated about leveraging similar techniques for compile-time query validation and optimization. Several users also highlighted the educational value of the project, showcasing the unexpected capabilities of TypeScript's type system.
The blog post "Gleam, Coming from Erlang" explores the author's experience transitioning from Erlang to Gleam, a newer language built on the Erlang Virtual Machine (BEAM). It highlights Gleam's similarities to Erlang, such as its functional nature, immutability, and the benefits of the BEAM ecosystem like concurrency and fault tolerance. However, the author emphasizes key differences, primarily Gleam's static typing, more approachable syntax inspired by Rust and Elm, and its focus on clearer error messages. While acknowledging some current limitations in tooling and library availability compared to Erlang's mature ecosystem, the post ultimately presents Gleam as a promising alternative for building robust, concurrent applications, particularly for developers coming from other statically-typed languages who might find Erlang's syntax challenging.
Hacker News commenters generally expressed interest in Gleam, praising its friendly syntax and the benefits it inherits from the Erlang ecosystem, like the BEAM VM. Some saw it as a potentially strong competitor to Elixir, appreciating its stricter type system and simpler tooling. A few users familiar with Erlang questioned the necessity of Gleam, suggesting that learning Erlang directly might be more worthwhile. Performance comparisons with Elixir and other BEAM languages were also a topic of discussion, with some expressing hope for benchmarks. A recurring sentiment was curiosity about Gleam's potential to attract a larger community and gain wider adoption. Several commenters also appreciated the author's candid comparison between Gleam and Erlang, finding the article helpful for understanding Gleam's niche.
Astral is a new static type checker being developed for Python that aims to be faster and more ergonomic than existing options like MyPy. It leverages a new type inference algorithm designed for performance and boasts features like auto-completion, goto-definition, and an improved developer experience. The project is still early in development but claims significant speed improvements, with a goal of being at least 5x faster than MyPy on real-world codebases. Astral also intends to offer seamless integration with existing Python tooling and provide enhanced support for popular libraries like NumPy and Pandas.
Hacker News users discuss Astral's potential, drawing parallels to MyPy but with a focus on performance. Some express skepticism about static typing in Python, questioning its necessity and impact on the language's flexibility. Others are interested in Astral's approach to gradual typing and its ability to handle complex codebases. Performance improvements over MyPy are frequently mentioned as a key benefit. Several commenters inquire about specific features, such as handling metaclasses and integration with existing tools. Overall, there's a mix of cautious optimism and interest in seeing how Astral develops.
Dusa is a logic programming language based on finite-choice logic, designed for declarative problem solving and knowledge representation. It emphasizes simplicity and approachability, with a Python-inspired syntax and built-in support for common data structures like lists and dictionaries. Dusa programs define relationships between facts and rules, allowing users to describe problems and let the system find solutions. Its core features include backtracking search, constraint satisfaction, and a type system based on logical propositions. Dusa aims to be both a practical tool for everyday programming tasks and a platform for exploring advanced logic programming concepts.
Hacker News users discussed Dusa's novel approach to programming with finite-choice logic, expressing interest in its potential for formal verification and constraint solving. Some questioned its practicality and performance compared to established Prolog implementations, while others highlighted the benefits of its clear semantics and type system. Several commenters drew parallels to miniKanren, another logic programming language, and discussed the trade-offs between Dusa's finite-domain focus and the more general approach of Prolog. The static typing and potential for compile-time optimization were seen as significant advantages. There was also a discussion about the suitability of Dusa for specific domains like game AI and puzzle solving. Some expressed skepticism about the claim of "blazing fast performance," desiring benchmarks to validate it. Overall, the comments reflected a mixture of curiosity, cautious optimism, and a desire for more information, particularly regarding real-world applications and performance comparisons.
Go's type parameters, introduced in 1.18, allow generic programming but lack the expressiveness of interface constraints found in other languages. Instead of directly specifying the required methods of a type parameter, Go uses interfaces that list concrete types satisfying the desired constraint. This approach, while functional, can be verbose, especially for common constraints like "any integer" or "any ordered type." The constraints
package offers pre-defined interfaces for various common use cases, reducing boilerplate and improving code readability. However, creating custom constraints for more complex scenarios still involves defining interfaces with type lists, leading to potential maintenance issues as new types are introduced. The article explores these limitations and proposes potential future directions for Go's type constraints, including the possibility of supporting type sets defined by logical expressions over existing types and interfaces.
Hacker News users generally praised the article for its clear explanation of constraints in Go, particularly for newcomers. Several commenters appreciated the author's approach of starting with an intuitive example before diving into the technical details. Some pointed out the connection between Go's constraints and type classes in Haskell, while others discussed the potential downsides, such as increased compile times and the verbosity of constraint declarations. One commenter suggested exploring alternatives like Go's built-in sort.Interface
for simpler cases, and another offered a more concise way to define constraints using type aliases. The practical applications of constraints were also highlighted, particularly in scenarios involving generic data structures and algorithms.
Summary of Comments ( 21 )
https://news.ycombinator.com/item?id=43342178
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.
The Hacker News post "The Future Is Niri," linking to an article describing a hypothetical new internet protocol called Niri, generated several comments discussing its feasibility, potential benefits, and drawbacks.
Several commenters expressed skepticism about Niri's claims and its ability to overcome existing internet infrastructure challenges. One commenter questioned the practicality of Niri's micropayment system for content retrieval, highlighting the existing complexities and costs associated with micropayment infrastructure. They also pointed out the potential for abuse and the difficulty in determining fair pricing for various types of content. Another skeptic argued that the benefits of Niri, such as censorship resistance and improved efficiency, are overstated and that similar functionalities are already achievable or in development within existing protocols. The commenter also raised concerns about the cost and complexity of transitioning to a new internet architecture.
A recurring theme in the comments was the difficulty of replacing the existing internet infrastructure. Commenters pointed out the entrenched nature of TCP/IP and the massive undertaking required to transition to a new protocol. They also questioned the economic incentives for such a shift, given the significant investments already made in current technologies. One commenter drew parallels with previous attempts to create alternative internet architectures, suggesting that Niri might face similar challenges in gaining widespread adoption.
Despite the skepticism, some commenters expressed interest in Niri's potential. One commenter praised the innovative approach and the focus on addressing some of the internet's limitations, particularly in the areas of security and efficiency. They acknowledged the significant hurdles to implementation but encouraged further exploration of the concept. Another commenter specifically highlighted the potential of Niri's addressing system to improve routing efficiency and reduce latency.
The discussion also touched upon the technical aspects of Niri, with some commenters questioning the specifics of its implementation and its ability to scale to the size of the current internet. One commenter raised concerns about the potential for denial-of-service attacks and the need for robust mechanisms to mitigate such threats.
Overall, the comments on the Hacker News post reflect a mix of skepticism and cautious optimism towards Niri. While some commenters see potential in its innovative approach, others remain unconvinced of its practicality and ability to overcome the significant challenges associated with replacing the existing internet infrastructure. The discussion highlights the complex considerations involved in developing and deploying a new internet protocol and the importance of addressing issues such as scalability, security, and economic incentives.