IRC channel logs

2021-10-10.log

back to list of logs

<RhodiumToad>the caffeine must flow
<rlb>:)
<stis>:)
<lampilelo>stis: so what are fpipes?
<stis>bufered ports that works well with fibers, I think that I could have used just ports, but now I have full control
<stis>used to build computing pipelines
<stis>As usual the framework is not that interesting, but I have zlib nodes,scm serializerere and deserialiser as well as zmq source and sinks
<lampilelo>and you can chain them? so just like BIOs from openssl
<stis>yes, just we can use green threads aka fibers.
<stis>the serializing tool is fast and can serialize lambdas
<stis>if one wants
<lampilelo>this is pretty cool, you're building stis-engine as a foundation for some another project?
<stis>well I think that we need to improve our guile/scheme story when it comes to bih data and utilize fibers, there is aneed in some projects I have
<stis>nit very much, but enough that I wanted some infrastructure in place.
<chrislck>which Dune?
<RhodiumToad>presumably the new one
<stis>yes the new movie
<stis> https://gitlab.com/tampe/stis-engine/-/tree/master/doc
<stis>docs for stis engine
***sneek_ is now known as sneek
*chrislck remembers watching the Sting one c.25yrs ago
*rlb had not realized it had been that long -- https://en.wikipedia.org/wiki/Dune_(1984_film)
<rlb>cf. twin peaks...
<chrislck>discussed with a relative who's now a shotshot AI guru
<chrislck>discussed with a relative who's now a hotshot AI guru
<RhodiumToad>there's been another one since the 1984 film, I think a TV miniseries or some such, and even a sequel to that that did the next book
<RhodiumToad>(or was it the next 2 books, I forget the order)
<stis>Hi guilers!
***chris is now known as Guest4155
***Guest4155 is now known as chrislck
***janneke is now known as janneke[cm]
***janneke[cm] is now known as janneke_
***janneke_ is now known as janneke
<Zelphir>Hello folks! Is there any support for working with tar files in GNU Guile? I mean, except for constructing a string of a running some shell command and running that.
<mwette>Greetings, lambda-heads.
*mwette is working on adding source location tracking in nyacc.
<janneke>Zelphir: gash has some tar support: https://savannah.nongnu.org/projects/gash/
<Zelphir>Hm thanks for the pointer. Did you somehow put unit testing into org mode files? https://git.savannah.nongnu.org/cgit/gash/gash-utils.git/tree/tests/tar.org Looks interesting.
<Zelphir>I found https://git.savannah.nongnu.org/cgit/gash/gash-utils.git/tree/gash/commands/tar.scm, which seems to be the implementation. But it seems to also translate into some command string, which is then run. I am looking for something like https://docs.python.org/3/library/tarfile.html but perhaps with nicer API or so.
<janneke>Zelphir: the implementation is in scheme, in gash/ustar.scm and gash/compress.scm
<janneke>and yes, samplet wrote an org-mode parser in scheme
<stis>o/
<Zelphir>Didn't know an org-mode parser existed. Thought about starting to write one myself sometimes. Good to know!
<Zelphir>Can you link the org-mode parser?
<janneke>no, it's currently not a module that you can include
<janneke>the code is inline in the test script: tests/run-test-suite.in
<RhodiumToad>you could write a binding for libarchive, or call it from the FFI
<Zelphir>Seem like https://wingolog.org/projects/guile-present/guile-present.pdf makes use of something like it, but perhaps it is using different code? (see page 6, `(org->presentation port)`)
<Zelphir>libarchive is the library for tar?
<Zelphir>Perhaps I could try it. Still haven't tried doing any FFI in any lang.
<RhodiumToad>libarchive is a library that implements all of tar, plus all of zip and a number of other archive formats
<janneke>Zelphir: there's also https://git.ngyro.com/r6rs-compression
<RhodiumToad>incl. cpio, jar, ar, xar, rpm, 7z, iso 9660
<janneke>i forgot about that
<stis>what's the story about streamed compression, is it only zlib that do that?
<RhodiumToad>for what?
<stis>in stead of compressing the whole bytevector at once one may want to feed the compressor with chunks and get chunks back out of the compression stage similar in the reverse operation, zlib has it
<stis>you do not need to allocate hugae datastructures and have a better story with fragmentation
<stis>also you may habe 100GB of data compressed, you unpack do an operation like filter like calculate statistics, and then compress back and to the file
<stis>but you read one chunk from the original file, and than store the resulting chunk in another file if transformed
<daviid>Zelphir: you could use nyacc and its ffi-helper to get you started writing (any) bindings to libs using guile's ffi functionality
<daviid>Zelphir: it might (probably will) need manual fine tuning, but will get you very far with very little effort - haven't used it yet :), but examples are very impressive!
<stis>nyacc is wonderful
<Zelphir>Last time I looked at that, it scared me, that I need anything other than "there is that function, it has these types, turn it into a scheme function". I will have to check it out and perhaps try minimalistic examples first, before I try any additional tool, which does magic, that I do not understand.
<daviid>i actually will try and use it, to get myself started to bind fuildsynth, not sure when yet, but 'soon'
<daviid>Zelphir: you may also look at projects that manually bind using guile's ffi, disclaimer i am the author, but g-golf has tons of examples you may read and even snarf if youwish ... there are other projects 'out there' if you prefer of course ...
<stis>I use the ffi to peel int zlib
<stis>peek into zlib
<stis>not that hard
<Zelphir>What was "to snarf"? I forgot.
<daviid>to copy/reuse for your own project..
<Zelphir>Ah ok thanks
<daviid>welcome!
<Zelphir>So, I could do that with any C library, right? I mean, in theory.
<lilyp>nyacc or manual?
<Zelphir>idk, both
<RhodiumToad>in theory you can use the ffi to access any C dynamic library, yes
<Zelphir>Just that it might be very difficult, depending on the C source?
<RhodiumToad>difficulties will depend on things like memory management
<lilyp>nyacc might choke on certain headers, but it ought to give you a solid base in most cases
<Zelphir>ah ok, so one points the ffi at header files, because they contain the signatures
<lilyp>no, ffi is pointed at the shared objects
<lilyp>nyacc OTOH is pointed at the header files, because it's a C compiler with extras IIRC
<lilyp>or well, at least a parser
<mwette>The nyacc ffi-helper is a C parser (and C preprocessor), plus a converter that turns declarations from include files into Guile ffi wrapper code.