IRC channel logs

2018-04-09.log

back to list of logs

<cmhobbs>what am i see here as the output of receive? is this response body a bytevector? https://hastebin.com/awixidiyuy.php
<cmhobbs>how can i determine its type?
<cmhobbs>yes, i know my api key is visible there
<cmhobbs>not a problem
<cmhobbs>and if that is a byte vector, how can i translate that to something guile-json can understand?
<cmhobbs>none of my old code really deals with bvs
<cmhobbs>other than doing crap with sxml
<daviid>cmhobbs: have to leave that for others to answer ... not competent here ...
<jiby>hi all
<jiby>For my first project (a bdd framework for guile) I need to parse files for overall structure
<jiby>Looking through docs I found two things: the LALR SCM parser, or guile-reader library
<daviid>i try to avoid any web related dev
<cmhobbs>i'd like to but i don't have much of a choice
<jiby>Anyone who tried parsing things in Guile can tell me if I'd be wrong to use either?
<cmhobbs>i mean, i guess i could download these files externally, load them into guile from there, and try to parse them
<cmhobbs>whatever
<daviid>cmhobbs: i think you got an encrypted response, as exécted? not sure, but guile's manual simple http-get example returns fully readable text ...
<daviid>anyway, #guile is full of web related expert ... just be patient, someone will shimein ...
<cmhobbs>maybe i did
<cmhobbs>it's using gnutls
<daviid>try a simple requwst first ... then gnutls ...
<cmhobbs>all the other web related code i've written in guile is just http
<cmhobbs>yeah, i'm able to fetch guile's website with http-get
<cmhobbs>no problem
<daviid>cmhobbs: you may find examples in guix (guix is full of inspiration for almost everything we can think of :))
<cmhobbs>i still feel like that thing is a bytevector, though
<cmhobbs>i just don't know how to figure out the type of a thing in guile
<daviid>it is
<cmhobbs>and i'm pretty sure it's just the expected json response
<cmhobbs>however (scm->json (raw-prediction-body)) gets grumpy about "json-invalid"
<cmhobbs>because it's not json...
<cmhobbs>it's a bytevector
<cmhobbs>heh
<daviid>yes, see 6.6.12 Bytevectors in the manual
<cmhobbs>i'll jump back into it later. going to play a game with my son for now
<daviid>english help "In addition to the above list the @code{im-nl-means-channel} accepts one additional optional keyword argument:" in that sentence, how could I avoid to use twice additin additional?
<daviid>maybe getting rid of the initial part of the sentence might be better, keeping only "The @code{im-nl-means-channel} procedure accepts one additional optional keyword argument:"
***fibratio` is now known as fibration
<gour>morning
<gour>i'm on fedora fc27 and wonder how to configure geiser to use guile2.2 since guile2 is required for bunch of other stuff?
<spk121>gour: geiser does have some emacs variables you can tweak. If you want a quick answer, just start the guile you want to use with a --listen flag, and then, in emacs, launch geiser using M-x geiser-connect.
<spk121>but otherwise, I know someplace in the geiser manual it describes how to pick a version, but, I don't recall the details.
<gour>spk121: thanks. --listen method works, will check manual as well
<fibration>what are applicable structs actually good for? is there a way to automatically pass the struct itself as the first argument to the proc so that i have some kind of fake closure in c?
<lloda>fibration: not sure what you mean with automatically, but if the struct is in context when you define the proc, you can do whatever you want with it
<lloda>I used them to let me do (A i j ...) instead of (array-ref A i j ...) when A is a sort-of-array
<lloda> https://github.com/lloda/guile-newra/blob/4eccc987115c8736d8804d54edad0924a16a2c38/mod/newra/newra.scm#L150
<lloda>I'm hardly an expert though and I haven't used them from c
<fibration>OK, but if already have scheme closures it seems to be applicable structs are just for aesthetic reasons
<lloda>applicable structs are their own type. Otherwise I'd say yes, but that's true of most of Scheme
***fibratio` is now known as fibration