IRC channel logs

2017-07-27.log

back to list of logs

<paroneayea>either I need to figure out how to proxy each read/write to the underlying port and watch carefully for -1
<paroneayea>or I need a way to not "call through C" to the supplied read/write function, which means setting scm_read and scm_write, but apparently that's currently done on the port type rather than the port itself
<happy_gnu>hello :)
<happy_gnu>I am trying to pass as arguments "and" or "or"
<happy_gnu>but when i call the function with them i get a syntax error
<happy_gnu>"unknown location: source expression failed to match any pattern in form and"
<happy_gnu>(define comparative
<happy_gnu> (lambda(comp arg1 arg2)
<happy_gnu> (comp arg1 arg2)))
<happy_gnu>
<happy_gnu>(comparative or #t #t)
<happy_gnu>I get an error :/
<happy_gnu>what am I doing wrong?
<daviid>happy_gnu: you can't do that because and and or are macros, not functions
<daviid>what you can do is pass a symbol and use case in the body
<daviid>(define (comp op foo bar) (case op ((or) (or foo bar)) ((and) (and foo bar))))
<happy_gnu>ohhh ok daviid :) i was very confused
<daviid>not sure what yu are trying to do though
<happy_gnu>i never try to pass them as arguments, couldn't understand why this didn't work
<happy_gnu>daviid: I am doing the little schemer
<happy_gnu>there are 2 functions intersects? and subset? they are really similar just change the "or" and the "and"
<happy_gnu>so I thought of making one that can cover both
<happy_gnu>this is not part of the little schemer but I am trying to do everything that comes to my mind
<daviid>happy_gnu: ok, good to experiment yes
<daviid>i wonder why reduce args were defined in that order, I'd rather reduce something using a procedure and an initial value ..., just curius
<happy_gnu>daviid: it works :) :D great
<daviid>wc!
<happy_gnu>daviid: ohh they do not use them the way I did :/
<happy_gnu>I just saw that 2 very similar functions were only different for and "and" and a "or"
<happy_gnu>so i tried defining one and just define them using the one that groups them but I didn't know I couldn't pass "and" and "or" as arguments :V
<paroneayea>janneke: WOW! I just read now about https://lists.gnu.org/archive/html/guile-user/2017-07/msg00089.html
<paroneayea>compiling tinycc???? incredible!
<cmaloney>woah
<paroneayea>rekado_: ^^^^^^
<cmaloney> https://octodon.social/@craigmaloney/4935912
<paroneayea>okay, sent an email to the list about where I'm at with the suspendable-ports and gnutls https://lists.gnu.org/archive/html/guile-devel/2017-07/msg00014.html
<paroneayea>wingo: If you can find time to look over https://lists.gnu.org/archive/html/guile-devel/2017-07/msg00014.html and offer advice, I'd really appreciate it!
<janneke>paroneayea: hehe yeah :-)
<janneke>paroneayea: ouch, sorry to read you're stuck...good luck with that!
<ArneBab>two months ago I asked in guile-devel about including wisp in Guile, but there was no result of the discussion. How should I move forward with that? Thread: https://lists.gnu.org/archive/html/guile-devel/2017-05/msg00039.html
<magnicida>is there a way to produce/compare SCM_UNDEFINED from Scheme directly?
<ArneBab>I would assume that no, because "Its most important property is that is not equal to any valid Scheme value." → https://www.gnu.org/software/guile/manual/html_node/Immediate-objects.html
<ArneBab>but I’m only going by the docs here
<ArneBab>paroneayea: you could stray from the cooperative model and spawn a receiver pthread just before you send the request
<paroneayea>ArneBab: I could, though I'd need a good way for it to send a message back to the actor
<rekado_>tb
<paroneayea>and
<paroneayea>I could do that more feasibly if I finished switching 8sync on top of fibers
<paroneayea>but that's a lot of extra work itself
<paroneayea>maybe that is the fastest way to make this happen
<paroneayea>but it's a pivot in strategy, and it's still leaving a problem open
<ArneBab_>paroneayea: doesn’t ActivityPub send a message to the test when it gets a reply from the other server?
<ArneBab_>(to make this even cleaner, you could start a second process which only listens for the request from ActivityPub and provides the expected result)
<paroneayea>ArneBab_: yeah, so here's the situation that's happening
<paroneayea>the test suite needs to run a "fake" AP server
<paroneayea>to see if it gets federated messages
<paroneayea>but we're also logged into the remote server, using the client to server API
<paroneayea>where we can post messages logged in as that user
<paroneayea>so if we do
<paroneayea>POST: {"to": ["https://address.of/our-local-user/"], "type": "Note", "content": "Hi!"}
<paroneayea>and submit that to our outbox endpoint of the user we're logged in as
<paroneayea>when we do the http request, in a cooperative model where https blocks, we're waiting for the response
<paroneayea>but
<paroneayea>the server getting it, we have no control over how it's written
<paroneayea>and it may actually try federating the message *before* we get an HTTP response
<paroneayea>but the server is blocked on the initial request
<paroneayea>anyway, yes, if this was running in a separate process or thread, it wouldn't be a problem
<paroneayea>when I said
<paroneayea><paroneayea> ArneBab: I could, though I'd need a good way for it to send a message back to the actor
<paroneayea>I wasn't referring to messages as in terms of AP messages
<paroneayea>but 8sync actor messages
<paroneayea>so, layering 8sync on top of fibers would fix this, because each actor could run in its own thread, and yeah you could have a worker process to do requests
<paroneayea>that's a possible direction
<happy_gnu>paroneayea: hi :)
<paroneayea>happy_gnu: hi
<happy_gnu>paroneayea: I've learned a lot of lisp since the last time we talked and I was trying to look for your game to see if I understand it better now
<happy_gnu>but i can't find it in your blog
<paroneayea> https://notabug.org/cwebber/mudsync/
<paroneayea>video on https://notabug.org/cwebber/mudsync/ gives a general idea of some concepts
<happy_gnu>i think it is the same link paroneayea :)
<happy_gnu>ok great I hope I can understand more now
<catonano>happy_gnu: the video is on the 8sync web site
<catonano>happy_gnu: https://www.gnu.org/software/8sync/
<happy_gnu>catonano: yes!! thanks