IRC channel logs

2020-06-25.log

back to list of logs

***deesix_ is now known as deesix
***dddddd_ is now known as dddddd
***catonano_ is now known as catonano
***terpri__ is now known as terpri
***apteryx_ is now known as apteryx
<R1ck77>Hi! Has anybody tried using Guile to write native android applications? If not, is it due to some technical or legal blocking problem anybody knows about Thank you!
<dsmith-work>Thursday Greetings, Guilers
<R1ck77>Hi! Has anybody tried using Guile to write native android applications? If not, is it due to some technical or legal blocking problem anybody knows about Thank you!
<mwette>Can android host binaries like guile? I thought it was more java based, in which case you might look into kawa: https://www.gnu.org/software/kawa/
<R1ck77>mwette, you can use C/C++ on Android, they call them "native applications". Never delve into them too much, but I thought "what the heck, C is a pain, but maybe with Guile it would be fun..."
<R1ck77>I was going to give it a try anyway, but I'm only concerned about license compatibility to be honest
<R1ck77>also, I'm a bit put down that guile doesn't seem to be much popular outside GNU projects... Wrong/though audience, but I'm wondering where is the catch...
<mwette>OK. Thanks. Sorry, can't help w/ your question, though.
<R1ck77>mwette, thank you for trying anyway! :)
<roelj>I was trying something fun, and seem to not understand why the following throws an error: ((symbol-append 'co 'ns) 'A '()). I hope someone can explain it to me :)
<roelj>I guess because it is evaluated as ('cons 'A '()). But how would I go from 'cons (the symbol) to cons (the function)? eval?
<dsmith-work>Ya
<dsmith-work>scheme@(guile-user)> cons
<dsmith-work>$1 = #<procedure cons (_ _)>
<dsmith-work>scheme@(guile-user)> (eval 'cons (interaction-environment))
<dsmith-work>$2 = #<procedure cons (_ _)>
<dsmith-work>scheme@(guile-user)> (eq? $1 $2)
<dsmith-work>$3 = #t
<roelj>Alright, that seems easy enough to understand. So, this (interaction-environment), what does that mean? When I (use-modules (foo)), and in the module "foo" I have a function "bar" that takes one argument. Would (eval 'bar (interaction-environment)) be eq? to the function "bar" from the module "foo"?
<roelj>And how is that different from what primitive-eval does?
<leoprikler>Not really
<leoprikler>An alternative would be using module-ref
<leoprikler>then you really have just that procedure
<dsmith-work>roelj: eval requires an environment to look stuff up in. (interaction-environment) is what you get at the repl.
<roelj>Hm. I'm going to read the manual again. Thanks! :)
<dsmith-work>roelj: https://www.gnu.org/software/guile/manual/html_node/Fly-Evaluation.html
<guix-vits>sneek later tell nly hello again.
<sneek>Will do.
<roelj>Is it possible to use 'sendfile' with the port returned by (http-get ... #streaming? #t) as the input port?
<dsmith-work>Used sendfile to rx from a socket?
<dsmith-work>The manpage for the sendfile system call says:
<dsmith-work>"The in_fd argument must correspond to a file which supports mmap(2)-like operations (i.e., it cannot be a socket)."
<dsmith-work>roelj: With that in mind, I would think not.
<roelj>Heh, too bad.. :) Is there a other efficient way to write ~100G from a http-get request to a file? Should I just use a bytevector buffer and iterate over it?
<dsmith-work>Guile used to have a low-level read function. Had a very scary name with slahes and bangs in it. Don't remember the name right now.
<dsmith-work>roelj: I'm not sure what would be best. Might want to try a some differnet approaches.
<dsmith-work>roelj: That was read-string!/partial , btw
<roelj>dsmith-work: Ahyeah. Thanks! I'm receiving binary data, so I think I prefer bytevectors anyway.
<dsmith-work>That names comes from before guile had bytevectors
<dsmith-work>Probably *should* be a bytevector instead
<roelj>Hm interesting
<dsmith-work>Hmm. The name actually comes from scsh
<dsmith-work>Gory details in libguile/rw.c
<dsmith-work>roelj: You are probbaly better off with recv!
<roelj>dsmith-work: I realize I can just try it, but is ‘recv!’ more efficient than ‘get-bytevector-n!’?
<dsmith-work>Don't know. But it looks like it's just a thin wrapper over the recv syscall.
<roelj>Ah, so they are pretty much the same, but recv! is a slightly more direct route to the actual syscall.
<roelj>Ugh. The server responds with “Content-Type: application/x-www-form-urlencoded; charset=utf-8”. I think Guile then thinks that the body port should be a string port. Is there a way I can override that to be a binary port?
<dsmith-work>get-bytevector-n! Does all the port machinery, buffering, pushback, etc. revc! ignores all that and just reads from the fd.
<roelj>Hm, a throughput of ~20MB/s.
<roelj>Ah, increasing the buffer size increases the throughput.
<dsmith-work>Yes
<roelj>Right, I think I'm maxing out the server's upload, so that's good
<dsmith-work>THis over a local Ethernet?
<roelj>dsmith-work: No, over the internet.
<mrkotfw>Hello everyone
<mrkotfw>I'm attempting to build guile-SDL2 on MinGW64, and I'm getting this error: 'In procedure dynamic-link: file: "/mingw64/lib/libSDL2", message: "The specified module could not be found."'
<mrkotfw>Is it expecting an .a file? Or in this case, .dll?
<mrkotfw> https://pastebin.com/raw/5QKutJ9p
<mrkotfw>Okay, I think I understand... sdl2/config.scm holds paths, and the path it's using is invalid
<mrkotfw>Damn, looks like there's an issue with SDL2_mixer
<dsmith-work>mrkotfw: Not sure if this applies to mingw32, but there is a notorius problem with dynamic link. The error is always a misleading "can't be found".
<dsmith-work>If the init function errors out, you get that error.
<dsmith-work>mrkotfw: Usually, on linux, using strace reveals if the .so is actual found or not. Not sure how to do that under windows.
<dsmith-work>THere is some kind of tracing tool, but I can't remember the name of it.
<mrkotfw>dsmith-work: Thanks for the info... I might have to shelve this for now