IRC channel logs

2020-10-23.log

back to list of logs

***terpri_ is now known as terpri
<refcfar>How do you document code? I've tried websearch but come up with nothing
*refcfar sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/japIgkUJIGomeyrlvXOJicwV/message.txt >
***apteryx_ is now known as apteryx
<leoprikler>refcfar: There seem to be multiple solutions.
<leoprikler>One is to just put plain "docstrings" as the first expression of a function.
<leoprikler>Another is to do the same, but with Texinfo markup. You can use (texinfo reflection) to access that.
<leoprikler>A third is to use comments with texinfo markup. This one can then be processed by `guild doc-snarf'.
<leoprikler>Hope that helps you out.
<refcfar>I see, thank you!
<civodul>hey!
<civodul>i'm looking at read-bytes in (ice-9 suspendable-ports)
<civodul>it seems to me that this always blocks
<civodul>there's an "else" case that would wait for data to be available, but i don't see how it can be reached
<civodul>or is it reached if the fd is non-blocking and we get EAGAIN?
<civodul>ah yes, that's it
<civodul>talking helps understand things better
<civodul>thanks for listening :-)
<weinholt>glad to help!
*chrislck too
<civodul>heheh
<mwette>howdy all!
<civodul>o/
<chrislck>{friday dance}
<dsmith-work>Happy Friday, Guilers!!
<civodul>hey dsmith-work! happy Friday! :-)
<dsmith-work>it's a stunningly beautiful day here. I should be home instead!
<ArneBab>leoprikler: I wanted to say „sure, just use r7rs symbols!“ but I think I just found a bug:
<ArneBab>(print-enable 'r7rs-symbols)(write #{1 2 3}#) → Unbound variable: |1 2 3|
<wingo>i think you need to write '#{1 2 3}
<wingo>i.e. quoted
<ArneBab>ok
<ArneBab>that isn’t clear to me on API Reference > Data Types > Symbols > Symbol Read Syntax
<ArneBab>but it works, yes
<ArneBab>So using symbols as immutable strings basically means '|what I wanted to write' here|
<ArneBab>(print-enable 'r7rs-symbols)(read-enable 'r7rs-symbols)(write '|what I wanted to write' here|)
<leoprikler>I do still want to have all the string functions available, at least the read functions.
<leoprikler>Therefore I'll be using read-only substrings of copies.
<leoprikler>the copy guarantees, that the string that is passed won't be manipulated and the /read-only guarantees, that the result is not modified.
<leoprikler>hmm
<leoprikler>it appears that substring/read-only already takes care of that
***bchar_ is now known as bchar
<matijja>Hello Guilers!
<matijja>Why (nftw "/" (lambda* (file #:rest args) (format #t "~A~%" file) #t)) don't do it's job?
<matijja>But, "//" or "/../" do...
<RhodiumToad>bug in nftw, or more precisely in one of the functions it calls
<RhodiumToad>(lambda () (go (clean filename) 0 0)) ;; but (clean "/") returns "", which is clearly wrong
<RhodiumToad>(clean) is removing any excess trailing /, but it doesn't have the required special case for filenames that are just "/" and nothing else
<matijja>Thanks for explanation.
<RhodiumToad>bug still exists in 3.0.4, so you might want to report it
<matijja>ok
<RhodiumToad>btw, (nftw "/" (lambda* args (apply pk args) #t)) shows better what happens
<RhodiumToad>or (nftw "/" (lambda args (apply pk args) #t))
<RhodiumToad>it shows that the lambda was called with ("" #f invalid-stat 0 0)
<RhodiumToad>(pk) is a handy diagnostic function that prints all its args and returns the last one
<matijja>I have searching for something like that. Thanks.
<leoprikler>how is (lambda args (apply pk args)) better than (nftw "/" pk #t) tho? ;)
<RhodiumToad>return value is wrong in your version
<RhodiumToad>or at least not predictably correct
<RhodiumToad>pk returns the last arg, but we want a function that always returns #t
<leoprikler>ahh, messed up the brackets
<RhodiumToad>(nftw "/" (compose (const #t) pk))
<RhodiumToad>if you want to get all functional about it
<leoprikler>now that I like
*dsmith-work shakes fist angrily at python
*ft helps
*libfud summons Apollo