from Hacker News

Show HN: Chez Scheme txtar port from Go

by hellcow on 2/8/25, 6:24 PM with 8 comments

This is a loose port of https://golang.org/x/tools/txtar, which concatenates files together and allows for a top-level comment.

The txtar format is specifically designed to be easy for humans to read and write by hand. It's perfect for test data.

The library itself tries to follow scheme standards by depending on only SRFIs (and if you're new to scheme like me, SRFI stands for "Scheme Requests For Implementation," and it's like a standard library). I hope this is a helpful showcase of a scheme library!

I'm also new to writing scheme, and if any experienced scheme/lisp devs are out there with feedback, that would be much appreciated.

  • by thaliaarchi on 2/8/25, 7:11 PM

    Simple format. Makes me want to write a parser for it using a shared buffered reader library I’m working on in Rust.
  • by shawn_w on 2/8/25, 10:03 PM

    The Go version treats file data as byte arrays; might want to do the same and use Scheme bytevectors instead of strings. OTOH the docs say it's not supposed to be a general binary format...
  • by ewired on 2/9/25, 2:52 AM

  • by sudahtigabulan on 2/9/25, 1:33 AM

    The Markdown of archives.
  • by tyho on 2/8/25, 9:29 PM

    I have been using txtar to provide context to LLM's recently.