Qi Xiao, the creator of the Elvish shell, dives into the intricacies of building a shell in Go. He discusses the evolution of Elvish, its advantages over traditional shells, and the significance of command-line interfaces. The conversation highlights Go's adaptability in modern cloud systems and Elvish’s unique features that enhance user experience. They also touch on code organization challenges and the future of Elvish, including plans for a new TUI framework, showcasing innovation in shell development.
The podcast discusses the motivations behind creating Elvish, a Go-based shell aiming to improve functionality and user experience compared to traditional shells.
Elvish introduces innovative features such as nested lists and built-in file management, enhancing user interaction and making scripting more intuitive.
Using Go for Elvish allows for rapid feature implementation and cross-platform distribution due to its powerful libraries and garbage collection capabilities.
Deep dives
Understanding the Cloud
The discussion emphasizes that cloud computing is not as magical as many people perceive; rather, it stems from traditional server management concepts. Historically, developers used to manage their servers directly, but with the rise of cloud services, these tasks have evolved into more complex abstractions that cater to larger audiences. Familiarity with the underlying mechanics of cloud infrastructure empowers developers to create innovative features that enhance user experiences. For instance, by understanding the basics of virtual machines, developers can build applications that leverage cloud efficiencies in unexpected ways.
Building a New Shell
The conversation delves into the motivations behind creating Elvish, a shell built using Go, highlighting the limitations of existing shells like Bash and Zsh. The speaker found these traditional shells lacking in functionality and user experience, particularly for programming tasks. By developing Elvish over a span of eleven years, the creator aimed to offer a shell that combines both UI ease and programming capabilities. Elvish is designed to be both a programming language and a usability interface, making it more versatile than its predecessors.
Features of Elvish Compared to Traditional Shells
Elvish introduces several features that set it apart from traditional shells, including nested lists and maps, which resemble real programming languages. Moreover, Elvish enhances user interaction by providing a built-in file manager, improving how users navigate their file system. The conversation touches on how Elvish's functional programming capabilities allow for more intuitive and readable scripts, thereby reducing the learning curve for new users. By integrating user-friendly features and programming constructs, Elvish aims to simplify and enhance the everyday tasks of developers and system administrators.
Go as the Choice of Language
The selection of Go as the programming language for Elvish is justified through its powerful standard library and built-in garbage collection. The speaker highlights that using Go allows for straightforward bindings to existing libraries, significantly reducing development time and complexities. This benefit is particularly notable given that Go's standard libraries fit seamlessly into Elvish's functionality, allowing for rapid implementation of features. The ease of distributing Elvish across multiple platforms without extensive platform-dependent code further showcases Go's advantages in this project.
Future Directions for Elvish
Looking ahead, the development of Elvish will focus on enhancing user interfaces through a new TUI (Text User Interface) framework, enabling the creation of interactive applications. This innovation aims to bridge the gap between shells and terminal applications, offering an integrated environment for users. The long-term vision includes merging the functionalities of a terminal with those of a shell to create a more cohesive user experience. This evolution reflects the ongoing commitment to improving usability and introducing fresh features that resonate with modern programming needs.
Writing a shell is rarely the kind of project you take on lightly. In this episode, Johnny is joined by Qi Xiao to explore how to go about such a feat in Go.
Changelog++ members save 9 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
Fly.io – The home of Changelog.com — Deploy your apps close to your users — global Anycast load-balancing, zero-configuration private networking, hardware isolation, and instant WireGuard VPN connections. Push-button deployments that scale to thousands of instances. Check out the speedrun to get started in minutes.
Retool – The low-code platform for developers to build internal tools — Some of the best teams out there trust Retool…Brex, Coinbase, Plaid, Doordash, LegalGenius, Amazon, Allbirds, Peloton, and so many more – the developers at these teams trust Retool as the platform to build their internal tools. Try it free at retool.com/changelog
Timescale – Real-time analytics on Postgres, seriously fast. Over 3 million Timescale databases power loT, sensors, Al, dev tools, crypto, and finance apps — all on Postgres. Postgres, for everything.