IRC channel logs

2021-06-16.log

back to list of logs

<dsmith>!since
<sneek>I've been running for 6 days
<dsmith>Ur?
***dsmith is now known as dsmith_
<dsmith_>!seen
***dsmith_ is now known as dsmith
<dsmith>!uptime
<sneek>This system has been up 6 weeks, 21 hours, 55 minutes
***dsmith is now known as dsmith_
<dsmith_>sneek: botsnack
<sneek>:)
<dsmith_>!uptime
<sneek>This system has been up 6 weeks, 22 hours, 1 minute
<dsmith_>!since
<sneek>I've been running for 52 seconds
***dsmith_ is now known as dsmith
<dsmith>!since
<sneek>I've been running for one minute and 3 seconds
<unknown_lamer>dsmith: so I guess adding multi-server support to sneek *really* would have been a waste of time ha
<unknown_lamer>rip freenode
<dsmith>unknown_lamer: Heh. Yeah. Gone gone gone.
<unknown_lamer>20y 29w apparently since I registered and the day it died
*unknown_lamer is getting old now
<dsmith>Ya. #guile had about 12 users then
<dsmith>Not sure why ! commands are not working from my work nick
*sneek yawns
<sneek>Remember, the S in IoT is for Security
<dsmith> https://isfreenodedeadyet.com/
<dsmith>sneek: seen rotty
<sneek>rotty was last seen in #guix 3 months ago, saying: hmm, this is qemu (via libvirt/virt-manager).
***sneek_ is now known as sneek
***amirouche is now known as amirouche`
***amirouche` is now known as amirouche
<dsmith>sneek: test
<chrislck>Wednesday greetings
***apteryx_ is now known as apteryx
<dsmith-work>UGT Greetings, Guilers
<dsmith-work>sneek: botsnack
<sneek>:)
<dsmith-work>!uptime
<sneek>This system has been up 6 weeks, 1 day, 14 hours, 3 minutes
<dsmith-work>!since
<sneek>I've been running for 16 hours
<apapsch>Hi, what is the recommended way to copy from port to port? I have a input port from (pipeline) result and want to write to a file. Currently I (get-bytevector-n!) in 8KB chunks and then (put-bytevector) to the output port, though it seems rather verbose
<leoprikler>that is indeed what you're supposed to do unless you somehow want line-based stuff
<leoprikler>see the Guix download logic as well ;)
<apapsch>alright, thanks :-) i think i'll go with get-bytevector-n without the !, seems a bit easier to use. guile docs don't mention that it returns an eof-object, while the r6rs doc says so. is it a docs issue or does the impl differ from r6rs?
<dsmith-work>apapsch: If you are willing to go linux-specific, sendfile and copy_file_range move data around without copying to userland.
<dsmith-work> https://man7.org/linux/man-pages/man2/sendfile.2.html
<dsmith-work> https://man7.org/linux/man-pages/man2/copy_file_range.2.html
<apapsch>dsmith-work: thanks, but that's going even deeper into the weeds :-) i'll make a mental note for the optimization on a rainy day
<dsmith-work>Guile does have sendfile. Often used in web servers. copy_file_range is new to me. Looks very interesting.
<apapsch>indeed interesting. though it requires a count parameter, which I can't know beforehand (the input port returns the xz output from the pipeline)
<wingo>miscompilation bug has me delving in the guts of "match" :/
<manumanumanu>haha. how much syntax rules can you take?
<wingo>omg
<wingo>(use-modules (srfi srfi-9) (ice-9 match))
<wingo>(define-record-type <pair>
<wingo> (make-pair head tail)
<wingo> pair?
<wingo> (head pair-head)
<wingo> (tail pair-tail))
<wingo>(define (test x)
<wingo> (match x
<wingo> (($ <pair> (x ...) (x ...))
<wingo> (pk x))))
<wingo>what do you think (test (make-pair '(1 2 3) '(1 2 3 4))) does
<wingo>aaaaahhh!!!
<manumanumanu>no guess.
<wingo>ok this one is simpler
<wingo>(use-modules (ice-9 match))
<wingo>(define (test x)
<wingo> (match x
<wingo> (((x ...) (x ...))
<wingo> (pk x))))
<manumanumanu>I think I know what it SHOULD do.
*dsmith-work really needs to lean match
<sneek>Yes please
<wingo>run as (test '((1 2 3) (1 2 3 4)))
<manumanumanu>oh yes
<wingo>am i misunderstanding something????
<wingo>i thought the two "x"'s in the pattern would unify
<manumanumanu>yup.
<manumanumanu>that shouldn't match?
<wingo>consider (match-lambda ((x . x) x) (_ #f)). returns false unless a pair and car and cdr are equal?
<wingo>but (match-lambda (((x ...) (x ...)) x) (_ #f)) -- should return false unless a 2-element list and first and second elements are the same list
<wingo>but not the case apparently??
<manumanumanu>wingo: (chibi match) does the same
<manumanumanu>Maybe I should continue my work to port Trivia from CL...
<wingo>does the same as guile you mean?
<manumanumanu>racket match fails: (match x ((list (list x ...) (list x ...)) x))
<manumanumanu>yes
<manumanumanu>and the code is the same.
<manumanumanu>I would guess
<wingo>right i think we use foof's match so it would make sense that chibi & guile's behavior has the same bug
<manumanumanu>That kind of syntax-rules is no fun to debug. I know. I wrote this: https://git.sr.ht/~bjoli/goof-loop/tree/master/item/goof-impl.scm#L120
<manumanumanu>ocaml does the correct thing as well.
<wingo>this causes a miscompilation, as you might well imagine :/
<manumanumanu>I thought you thought this was a result of a miscompilation, which is why I compared to chibi.
<wingo>seems to be an artifact of the optimizations for (p ...) -- match.upstream.scm:512
<wingo>because ((x . _) (x . _)) does correctly unify x
<manumanumanu>foof hangs in #scheme, btw
<wingo>manumanumanu: because the compiler uses match, it actually causes a miscompilation :)
<manumanumanu>That is better than "We have a miscompilation. it manifests itself in (ice-9 match)", though...
<wingo>marginally :P