IRC channel logs

2017-01-20.log

back to list of logs

<amz3`>night!
<catonano>amz3`: good night :-)
<OrangeShark>is there any reason for `set-pointer-finalizer!` in (system foreign) to not be documented?
***micro` is now known as Guest13099
***micro` is now known as Guest38107
<zv>Hey guys, I'm writing a sexp encoder/decoder and I was wondering if anyone had any resources about canonical encodings of various different datatypes?
<zv>i.e a map might be an alist "((a . 1) (b . 2))", an enum might be "((variant . enum_variant) (field0 . 1) (field1 . 2))"
<jmd`>When I do (define (x y) y) (define z `( 1 2 ,(y 3))) this works fine.
<jmd`>However if I put x into a module and export it and use that module in the one that defines z, then Guile claims that x is not defined. Why is this?
<amz3>jmd`: x? that's y that you use in define z
<jmd>amz3` Yeah sorry I mean't to type 'x'
<OrangeShark>jmd: is the module in your load path?
<jmd>OrangeShark: yes.
<jmd>(I found it works if z is a procedure. But not if it's a variable.)
<dsmith-work>Happy Friday, Guilers!!
<civodul>Happy Friday dsmith-work & all!
***random-nickname is now known as random-nick
<gracjan>yeah, fridays are better than non-fridays!
<dsmith-work>Yes!
<gracjan>tuesdays are actually also better than non-tuesdays, in a tuesday sense
<jmd>Is the texinfo rendering stuff part of guile itself or a contrib package?
<dsmith-work>jmd: see module/texinfo.scm in guile sources.
<jmd>dsmith-work: Unfortunately I don't have the guile source checked out.
<dsmith-work>Ok. It does get installed.
<jmd>But as you said "guile sources" then I presume the answer to my question is "yes".
<dsmith-work>Yes. Is part of guile.
<jmd>dsmith-work: Thanks.
<lloda`>you can grep the Guile sources at http://git.savannah.gnu.org/gitweb/?p=guile.git&a=search&h=HEAD&st=grep&s=texinfo
<dsmith-work>AND it's installed. Some guile stuff is not installed, like the C source snarfer and the testing framework.
<amz3> https://github.com/wingo/fibers/issues/5
<gracjan>why does it matter where guile resides?
<davexunit>lol
<avoine>oh rust have a binding to guile now: https://crates.io/crates/guile
<OrangeShark>gracjan: I think it has to do with these developer preferring the workflow of Github + pull requests over the workflow of using mailing list + patches
<amz3`>that's only for growing the hype of github. People love to go big fat and ugly
<daviid>heya!
<paroneayea>hmmmmmm
<paroneayea>naming things...!
<OrangeShark>always so difficult
<paroneayea>not always, but when it's hard it's hard :)
<paroneayea>right now I have <websocket-server> and of course eventually hope to support <websocket-client>
<paroneayea>but something I realized in my implementation so far
<daviid>paroneayea: 1st, how about <ws-server>, <ws-client>?
<paroneayea>daviid: yeah I was just considering that
<paroneayea>but anyway, each server currently handles multiple client connections of course
<paroneayea>but, I realized that unlike with http
<paroneayea>each one of those needs its own address, in some way
<paroneayea>so either a separate actor
<paroneayea>or like, manage a hash table with an id for each connection
<paroneayea>since actors are shared nothing, you'd want another actor to be able to say
<paroneayea>"send something to *THAT* connection"
<paroneayea>without pointing to the connection itself
<paroneayea>but do I really want to spawn another actor for each connecting client
<paroneayea>and what to call the class
<paroneayea>certainly not <ws-client>, since you'd want that to be for "writing a client" :)
<daviid>paroneayea: but a <ws-client> instance has 'its' connection right?
<paroneayea>daviid: if you're talking about "writing a client", of course
<daviid>i guess i don't understand you can't do '(handle my-ws-cliet "this message") or alike ..?
<paroneayea>?
<daviid>"send something to *THAT* connection"
<daviid>the connection is known by the client no?
<paroneayea>daviid: okay I'm talking about a few different things, which is part of why I mentioned this and names :)
<paroneayea>I'm not even worrying about <ws-client> as in terms of writing a client right now
<paroneayea>I'm talking about whether or not <ws-server>, in accepting a new client, creates a new actor for the client connection (from the server side)
<daviid>paroneayea: and that is where i get lost, because in my (superficial) understandng of your design, a server handles multiple clients, each client knows its address, no? why another actor level?
<paroneayea>daviid: it's because of this
<paroneayea>imagine you have a game character
<paroneayea><mean-enemy> wants to (probably with some abstraction in-between) wants to write to the "connected client" that the character got hit
<paroneayea><mean-enemy> (or possibly some proxy which handles the character) doesn't have a direct handle on the connection socket
<paroneayea>because it's a shared nothing environment
<paroneayea>and it shouldn't be able to write to it directly
<paroneayea>that enemy may even be on another process or server
<paroneayea>it has a reference to <ws-server>
<paroneayea>but <ws-server> has a lot of connected clients
<paroneayea>so it needs *some* address to point to the specific client
<paroneayea>so either <ws-server> makes one up
<paroneayea>or it even spawns another actor to handle the connected client, and that's the address used
<daviid>paroneayea: if a connected client his an instance, how come tht that instance does not 'know' its socket address, so that the server can send/post to a client, the client resolve the address...?
<daviid>sorry, really not my domain though ...
<daviid>paroneayea: anyway, the name could be (a-solver> (address solver) ...
<daviid>paroneayea: have to go :), bbl
<daviid>actually, <ws-asolver>
<dsmith-work>sneek: botsnack
<sneek>:)