[HN Gopher] Show HN: Chez Scheme txtar port from Go
       ___________________________________________________________________
        
       Show HN: Chez Scheme txtar port from Go
        
       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.
        
       Author : hellcow
       Score  : 45 points
       Date   : 2025-02-08 18:24 UTC (4 hours ago)
        
 (HTM) web link (git.sr.ht)
 (TXT) w3m dump (git.sr.ht)
        
       | thaliaarchi wrote:
       | Simple format. Makes me want to write a parser for it using a
       | shared buffered reader library I'm working on in Rust.
        
         | verdverm wrote:
         | txtar is used in the testsuite package to make writing CLI
         | (blackbox) tests really easy. It adds a header section for the
         | steps to run and comparisons to make. Often you compare actual
         | output with golden data.
         | 
         | (https://github.com/golang/go/tree/master/src/cmd/go/testdata..
         | .)
         | 
         | The tools have been extracted and made installable from here:
         | https://github.com/rogpeppe/go-internal/tree/master/cmd This is
         | really handy for any project to have people submit reproducers
         | as a single file anyone can run. These tools make it so you can
         | transform between txtar and files on disk, and then run the
         | txtar (testscript) as a test or directory of tests.
         | 
         | I have built them into my hof tool, "hof run [--mode test]
         | file.txtar" so you run them as either test files or multifile
         | scripts. The second option is handy if you want to eject a file
         | onto the filesystem without having to do echo or EOF business
         | in bash scripts
         | 
         | https://github.com/hofstadter-io/hof/tree/_dev/script/runtim...
        
       | rtcode_io wrote:
       | https://rt.ht (greetings from ..., an actual public suffix)
        
       | tyho wrote:
       | I have been using txtar to provide context to LLM's recently.
        
       | shawn_w wrote:
       | 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...
        
       ___________________________________________________________________
       (page generated 2025-02-08 23:00 UTC)