HackerPapers

arXiv:1709.00833cs.PL

Code Staging in GNU Guix

Ludovic Courtès

Abstract

GNU Guix is a " functional " package manager that builds upon earlier work on Nix. Guix implements high-level abstractions such as packages and operating system services as domain-specic languages (DSLs) embedded in Scheme. It also implements build actions and operating system orchestration in Scheme. This leads to a multi-tier programming environment where embedded code snippets are staged for eventual execution. This paper presents G-expressions or " gexps ", the staging mechanism we devised for Guix. We explain our journey from traditional Lisp S-expressions to G-expressions, which augment the former with contextual information and ensure hygienic code staging. We discuss the implementation of gexps and report on our experience using them in a variety of operating system use cases-from package build processes to system services. Gexps provide a novel way to cover many aspects of OS connguration in a single, multi-tier language, while facilitating code reuse and code sharing .

arXiv comments
16th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences (GPCE'17), Oct 2017, Vancouver, Canada
Journal reference
DOI
doi:10.1145/3136040.3136045
Subjects
cs.PLProgramming Languages cs.SESoftware Engineering

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Oct 2017 to Jan 2019.

Comments linking this paper, per year.

Discussed in comments2 threads

    • I don't think that would be enough. At the end of the article I linked the paper "Code staging in GNU Guix" (https://arxiv.org/abs/1709.00833) which explains why 2 stages of code execution are so central in Guix. In practice, this means that a Turing-complete language (Scheme)…

      AmbrevarView on HNParent context

    • But even still you are mixing languages, so the problem remains. The issue is not that Nix uses Bash, but that Nix uses different languages for the host-side and build-side. AFAIK people aren't writing the build-side code in the Nix language, and I'm not sure if it even has the…

      davexunitView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.