Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
40

Guix for development

from dthompson [alt+shift+b] in programming

This wonderful article by Marius Bakke (thanks for using Haunt btw!) about guix shell hit the orange website front page recently. I left a comment to the effect of “hell yeah I use it for all my projects!” and someone asked me for an example of what I do. I sent them some links but I thought hey, this could be a blog post and I haven't written one of those in years! The tl;dr is that Guix is a fantastic developer productivity tool that can easily automate development environment creation and pre-release build testing and you should give it a try but if you like what you already use then that's fine, too. There's gotta be a better way! This is the “Are you tired of this?” part of the infomercial. Read the next few paragraphs and picture me, in black and white, struggling to hold a large stack of boxes, all labeled “software.” I continue struggling to balance the boxes as you read. When you've reached the last paragraph of the section, I fall over, the boxes land on top of me and all over the floor, I'm covered in spaghetti, and in an exasperated voice I shout “There's gotta be a better way!” When setting up a new computer for software development, I want to go from git clone to make in as little time as possible (adjust that for your VCS and build system of choice.) In the old days, this meant manually installing the dependencies through the distro package manager. If things are organized, the project README will have a list of what is needed and it's not so bad. If things are less organized, it's a cycle of installing packages and running ./configure or whatever until it succeeds. Hopefully none of the dependencies are too new to be found in the distro. And when working on multiple projects, hopefully there's no conflicts between the dependencies required for each of them, because your development environment is the entire system and there's no way to isolate different projects from each other. Of course, different programming languages provide their own...
23rd Sep 2022

Stay updated

Get a weekly newsletter with the top 5 articles worth reading every week.

More from dthompson

Haunt 0.4.0 released

I'm quite a bit late on this one, but Haunt version 0.4.0 was released released back in July. I haven't had much time for blogging, but I'm catching up now! This release contains a small set of improvements and bug fixes since the 0.3.0 release in 2024. About Haunt Haunt is a static site generator that uses the Guile Scheme as its configuration language. It aims to be simple, functional, and extensible. Features include: Easy blog and Atom/RSS feed generation Markdown post support Simple development server for viewing edits before publishing Purely functional build process User extensibility Notable changes Added support for HTML in Markdown documents. This was a long time coming because guile-markdown did not support it and the library was abandoned by the original maintainer. As part of my work at Spritely, we forked it, implemented the relevant portions of the CommonMark specification, and released it. Spritely's guile-commonmark fork is now considered to be the official upstream by Guix and others. A further consequence of this is that guile-lib is now a required dependency for building Haunt as we need the (htmlprag) module to parse Markdown documents with embedded HTML. html->shtml from guile-lib's (htmlprag) module is now used instead of xml->sxml in the HTML reader. It was silly of me to use xml->sxml for this purpose years ago, but at the time I wanted guile-lib to be an optional dependency. Added haunt new subcommand for creating a new site. Added default directory, template, and prefix arguments to flat-pages procedure. Added support for index metadata flag to flat pages for pretty URLs. Flat pages now receive all page metadata, not just the page title. This is a breaking change from 0.3.0. Added .scm as an additional extension for sxml-reader. make-file-extension-matcher now supports multiple extensions. Fixed emission of <script> and <style> elements. Fixed handling of no available reader in flat pages builder. Fixed unreachable error handling clause when a reader is not found for a post. Fixed default blog theme template missing an <html> tag. Fixed overloaded -h option in haunt serve. Deprecated post in Skribe reader in favor of document. Download Haunt 0.4.0 is already available in Guix: guix pull guix install haunt See the Haunt project page for information on how to build from source. Thank you to Camilo Rodrigues, Noé Lopez, jgart, Jakob L. Kreuze, and Daniel Meißner for their contributions to this release! Happy haunting!

2 weeks ago • 1 votes
Guile-bstructs 0.2.0 released

I'm happy to announce that guile-bstructs 0.2.0 has been released! About guile-bstructs Guile-bstructs is a library that provides structured read/write access to binary data for Guile. A bstruct (short for “binary structure”) is a data type that encapsulates a bytevector and a byte offset which interprets that bytevector based on a specified layout. See the guile-bstructs project page for more information. Notable changes Added support for anonymous structs and unions. Contrived example: (define-bstruct <location> (struct (id int) (union (struct (x double) (y double) (z double)) (coords (array 3 double))))) Made bstruct-wrap offset optional. Added bstruct-by-value syntax. Added void primitive type. Added support for array elements to bstruct-ref, bstruct-set, etc. Bug fixes Fixed guard clause for bstruct-by-value. Added missing symbolic-match? check in define-bstruct-primitive. Internal type descriptor ids are now stable to allow for clean redefinition at the REPL. Download Starting with this release, I am no longer uploading release tarballs. This is due to Guix moving away from them and for good reason after events like the xz-utils backdoor. Build from the v0.2.0 tag in Git, instead.

12th Mar 2026 • 1 votes
Guile-websocket 0.3.0 released

I'm happy to announce that guile-websocket 0.3.0 has been released! Guile-websocket is an implementation of the WebSocket protocol, both the client and server sides, for Guile Scheme. Highlights for this release are: New (web socket) module that provides a standard Scheme port interface for WebSockets. WebSocket is a framed protocol, not a simple bytestream, but the new wrappers websocket and wrap-websocket provide the useful illusion of a raw bytestream. The #:max-attempts argument to read-data-frame can now be #f, meaning that the read operation should never give up in the case of a read timeout. This is useful for keeping server-side client connections alive as long as the client hasn't hung up, even if ping frames haven't been sent in awhile. New websocket-upgrade-request?, websocket-upgrade-response?, and make-websocket-upgrade-response procedures in (web socket server). These new procedures allow for integration of WebSockets into custom Guile HTTP servers rather than having to use the overly simplistic built-in one that only handles WebSocket requests. The #:configure-socket argument to open-websocket-for-uri has been deprecated. In practice, user code just needs to set some socket flags, particularly SOCK_NONBLOCK for asynchronous I/O. Use the new #:flags argument instead. source tarball: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.3.0.tar.gz signature: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.3.0.tar.gz.asc See the guile-websocket project page for more information. Bug reports, bug fixes, feature requests, and patches are welcomed.

23rd Jan 2026 • 1 votes
Guile-websocket 0.2.1 released

I'm happy to announce that guile-websocket 0.2.1 has been released! Guile-websocket is an implementation of the WebSocket protocol, both the client and server sides, for Guile Scheme. This small patch release contains the following changes: Greatly improved validation of initial handshake request on server. In previous releases, when bots discovered a server and sent random HTTP requests they’d cause needless exceptions to be thrown and clog up server logs. The accept-client hook can now return #t when a new client has not connected but the server loop should continue anyway. source tarball: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.2.1.tar.gz signature: https://files.dthompson.us/releases/guile-websocket/guile-websocket-0.2.1.tar.gz.asc See the guile-websocket project page for more information. Bug reports, bug fixes, feature requests, and patches are welcomed.

6th Aug 2025 • 1 votes
Guile-Bstructs 0.1.0 released

I'm pleased to announce that the very first release of guile-bstructs, version 0.1.0, has been released! This is a library I've been working on for quite some time and after more than one rewrite and many smaller refactors I think it's finally ready to release publicly. Let's hope I'm not wrong about that! About guile-bstructs Guile-bstructs is a library that provides structured read/write access to binary data for Guile. A bstruct (short for “binary structure”) is a data type that encapsulates a bytevector and a byte offset which interprets that bytevector based on a specified layout. Some use cases for bstructs are: manipulating C structs when using the foreign function interface packing GPU vertex buffers when using graphics APIs such as OpenGL implementing data types that benefit from Guile's unboxed math optimizations such as vectors and matrices This library was initially inspired by guile-opengl's define-packed-struct syntax but is heavily based on "Ftypes: Structured foreign types" by Andy Keep and R. Kent Dybvig. The resulting interface is quite similar but the implementation is completely original. This library provides a syntax-heavy interface; nearly all of the public API is syntax. This is done to ensure that bstruct types are static and well-known at compile time resulting in efficient bytecode and minimal runtime overhead. A subset of the interface deals in raw bytevector access for accessing structured data in bytevectors directly without going through an intermediary bstruct wrapper. This low-level interface is useful for certain batch processing situations where the overhead of creating wrapper bstructs would hinder throughput. Example Here are some example type definitions to give you an idea of what it’s like to use guile-bstructs: ;; Struct (define-bstruct <vec2> (padded (struct (x float) (y float)))) ;; Type group with a union (define-bstruct (<mouse-move-event> (struct (type uint8) (x int32) (y int32))) (<mouse-button-event> (struct (type uint8) (button uint8) (state uint8) (x int32) (y int32))) (<event> (union (type uint8) (mouse-move <mouse-move-event>) (mouse-button <mouse-button-event>)))) ;; Array (define-bstruct <matrix4> (array 16 float)) ;; Bit fields (define-bstruct <date> (bits (year 32 s) (month 4 u) (day 5 u))) ;; Pointer (define-bstruct (<item> (struct (type int))) (<chest> (struct (opened? uint8) (item (* <item>))))) ;; Packed struct modifier (define-bstruct <enemy> (packed (struct (type uint8) (health uint32)))) ;; Endianness modifier (define-bstruct <big-float> (endian big float)) ;; Recursive type (define-bstruct <node> (struct (item int) (next (* <node>)))) ;; Mutually recursive type group (define-bstruct (<forest> (struct (children (* <tree>)))) (<tree> (struct (value int) (forest (* <forest>)) (next (* <tree>))))) ;; Opaque type (define-bstruct SDL_GPUTexture) Download Source tarball: guile-bstructs-0.1.0.tar.gz GPG signature: guile-bstructs-0.1.0.tar.gz.asc This release was signed with this GPG key. See the guile-bstructs project page for more information.

5th Jan 2025 • 98 votes

More in programming

"You didn't do it right"

Four sincere attempts at OKRs, four failures, and every time: "you didn't do it right." Maybe the framework doesn't fit you -- so how do you find one that does?

16 hours ago • 1 votes
We solved SQLite's single-writer limitation

Multiple concurrent writers. Multiple processes. Same SQLite. No modifications.

2 days ago • 1 votes
If your team is happy, are you doing a good job?

Brilliant jerks, ZIRP-era managers, and how psychological safety lost the plot. Part 3 of my conversation with Dr. Cat Hicks.

3 days ago • 1 votes
WTF is context engineering? (with real examples)

Say you're deploying an AI assistant that processes online order returns. For it to work, it would need access to your store's purchase policy, item…

4 days ago • 1 votes
Hosting without hyperscalers
5 days ago • 1 votes
📚 BoredReading

You seem to be enjoying this.

Join free to unlock everything.

Create free account

Already have an account? Sign in