IRC channel logs

2021-06-03.log

back to list of logs

<leoprikler>lispmacs[work]: there's also string-tokenize IIRC, plus good ol' regexp and peg
***terpri is now known as robin
<flatwhatson>ah, i see doc-snarf is in need of some love... was hoping to use this for my projects
<flatwhatson>i found your patch for (define*, thanks leoprikler!
<flatwhatson>it seems to struggle with internal docstrings though, so some more attention is needed
<flatwhatson>i'm thinking the way forward might be to start with adding some test cases
***sneek_ is now known as sneek
<robin>uh, i think i just killed sneek, by asking it "help later tell"
<robin>i don't remember who runs sneek or i'd ping them directly, sorry about that :(
<leoprikler>flatwhatson if by internal docstrings you mean the "First string in a function", then I'd rather suggest the texinfo module(s)
<manumanumanu>dsmith-work: see what robin wrote above.
<robin>ty manumanumanu
<manumanumanu>robin: np. It is a funny bug :)
<leoprikler>I once confused sneek using tell later tell
<leoprikler>Then tell was disabled, but it seems later tell is the real bug :P
<leoprikler>Or rather it appears sneek doesn't know what to do with multiple commands
<manumanumanu>Is there any IRC library for guile?
<flatwhatson>leoprikler: ah thanks, will look into it
<leoprikler>I think 8sync might come with something, but I'm not sure
<flatwhatson> https://git.savannah.gnu.org/cgit/8sync.git/tree/demos/ircbot.scm
<manumanumanu>I just realized guile is pretty fast starting up. On my system it even beats python3. Only perl and python2 is actually faster.
<manumanumanu>RhodiumToad: I remember john asking you about some bytes->hex thingie (you have a lovely sparse array imlpementation). Did that ever materialize? Did you ever put it in a library? It would be great to have
<RhodiumToad>I think you mean this? https://github.com/RhodiumToad/scheme-bits/blob/master/hex/hex.scm
<wingo>moo
<RhodiumToad>it's not really a sparse array as a cheating way of storing 257 distinct values per byte
<RhodiumToad>rather than storing byte x at index i, it stores (- x (logand i 3)) because due to the nature of the values stored, we know that x can't be less than i
<RhodiumToad>and we also know that if x is 255, (logand i 3) is not 0
<RhodiumToad>so the upshot is that the value 255 never needs to be stored, so we can use it as a flag for "this value isn't valid"
<emestee>wait, guile has sparse arrays?!
<RhodiumToad>?
<RhodiumToad>who said it did?
<civodul>when you have a URI-reference relative to some URI, what's the proper way to build the corresponding URI?
<civodul>as in: URI-reference + base-URI => URI
<lloda>my readline troubles are over after... reinstalling the proprietary nvidia driver. That doesn't use libedit while the mesa driver did. Haha.
<dsmith>sneek: seen robin?
<sneek>Not as far as I can remember.
<dsmith>sneek: help later tell
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>sneek: help later tell
<dsmith>sneek: botsnack
<sneek>:)
<lloda>sneek: later help tell
<lloda>sneek: how far can you remember
<dsmith>sneek: seen rlb
<sneek>rlb was last seen in #guile one day and 17 hours ago, saying: But I *did* like being able to write clj code for the browser (though I haven't been doing any of that for a good while now)..
<dsmith>sneek: robin
<dsmith>lloda: say that "help later tell" command again, and then stay quiet for a bit please. I want to see something.
<dsmith>(or anyone)
<lloda>sneek: help later tell
<dsmith>sneek: seen lloda?
<sneek>lloda was in #guile 56 seconds ago, saying: sneek: help later tell.
<dsmith>Ok!
<dsmith>C0ol
<RhodiumToad>lloda: why would mesa use libedit?
<lloda>apparently it comes through llvm
<RhodiumToad>hmm...
<lloda>and llvm added it for convenience since a couple libraries using llvm also needed that functionality
<RhodiumToad>that seems like a bug
<lloda>from what i read yesterday
<lloda>i agree
<RhodiumToad>yeah, that's definitely bad
<manumanumanu>RhodiumToad: that's the one! Thank you!
<alwalo>Sorry I am not trying to spam, but I think my messeges were invisible cause I didn't finish registration on IRC, now I finished and I send my question again (doesn't mean to spam) sorry if it was visible before
<alwalo>I am using (http-request "url") without any other parameters, I do get error: web/http.scm:252:2: Bad media-type header component: "text/xml", of course I am trying to download xml file, how should I do it ?
<dsmith-work>Thursday Greetings, Guilers
<emestee>alwalo: that doesnt sound right, are you sure the remote server is functioning correctly
<dsmith-work>wingo, civodul: Might be a good idea to update the /topic to mention that your nick must be regisered to speak in the channel.
<civodul>dsmith-work: oh, was it the case back on Freenode?
<dsmith-work>civodul: I don't remember.
<dsmith-work>There was a weird thing that I couldn't change my nick back unlesss I parted the channel.
<alwalo>here is my sample code that results in error: https://pastebin.com/PwpzPyNH
<alwalo>there is misspelling in last (display) call but it is because I had to retype it by hand
<alwalo>I have now checked it exact same program written in Python using Requests library and everything works fine, file gets downloaded and saved on drive
<dsmith-work>alwalo: I would wireshark the attempts for both and compare what is different. Possibly a missing content-type header?
<dsmith-work>alwalo: Maybe somtething this is needed: (http-request "http://myurl" #:headers '((content-type application/xml)))
<dsmith-work>alwalo: Or maybe need an Accept header?
***sneek_ is now known as sneek
<alwalo>can you give an idea how #:headers should look like ?
<alwalo>web/request.scm:133:2: In procedure validate-headers:
<alwalo>Bad request: Bad value for header accept: (application/xml)
<dsmith-work>Posisble (http-request "http://142.250.191.110/" #:headers '((accept (application/xml))))
<alwalo>web/http.scm:252:2: Bad media-type header component: "text/xml"
<lispmacs[work]>leoprikler: string-tokenize sounds pretty close to what I want, though I'm not sure about the challenges of applying that to a live input stream in my use case
<dsmith-work>alwalo: Hmm. I dunno. ((@@ (web http) validate-media-type) "text/xml") -> #t
<dsmith-work>Not sure why that's Bad
<dsmith-work>alwalo: Did you wireshark and compare?
<dsmith-work>alwalo: How about this, try adding #:validate-headers? #f to your http-request
<dsmith-work>alwalo: https://www.gnu.org/software/guile/manual/html_node/Requests.html#index-build_002drequest
<dsmith-work>Sorry, looks like you can't pass that to http-request
<alwalo>(read-request-body (build-request "url" #:headers .....)) should this work like this ? I will try
<lampilelo>lispmacs[work]: for live string input streams maybe 'expect' would be of interest to you
<manumanumanu>lispmacs[work]: what do you mean live input stream?
<lispmacs[work]>lampilelo: thanks, that looks interesting
<manumanumanu>srfi-171 can handle streaming transformations...
<manumanumanu>depending on case, of course.
<lispmacs[work]>manumanumanu: just that I'm reading from a port in real time connected to a device that delivers whitespace separated tokens that need to be processed one a time in real time
<lispmacs[work]>I'm pulling output from a FORTH interpreter running on a microcontroller
<lispmacs[work]>and sending commands
<manumanumanu>sure thing. srfi-171 does that, but you will need to write your own reducer for it that writes to a port
<manumanumanu>you could use the tbatching transducer
<manumanumanu>sorry, tbatch.
<dsmith-work>lispmacs[work]: Yey Forth!
<lispmacs[work]>when our powers combine, I become
***lispmacs[work] is now known as forthmacs[work]
<forthmacs[work]>ta da!
<forthmacs[work]>It is becoming harder and harder to find a telephone booth these days
<dsmith-work>:)
<forthmacs[work]>SHAZAM!
***forthmacs[work] is now known as lispmacs`
***lispmacs` is now known as lispmacs[work]
<lispmacs[work]>I'm back
<manumanumanu>lispmacs[work]: I am not sure how to do it best, though. Unless you want to do some kind of processing, transducers seem like a waste of processing power.
<lispmacs[work]>manumanumanu: this Expect module might be what I was looking for
<manumanumanu>jesus, why have I never seen that before?!
<manumanumanu>but that unhygienic capture of variables is pretty unsexy though.
***Server sets mode: +ntz