***logicmoo is now known as dmiles
<amz3`>civodul: sorry I don't have time to work on guile-git right now, I need to prepare my talk <jmd>Why is it that I cannot use a procedure as an optional keyword? <ft>Pretty sure you can. How are you doing it? <paroneayea>davexunit: you have anywhere the .html and .js files you used to test out guile-websocket? <janneke>thaht needs to be reworked in some way to get into websocket/guile, but I have no idea how <rekado>I’m trying to use read-hash-extend to make string input prettier in a file <rekado>(use-modules (ice-9 rdelim)) (read-hash-extend #\\s (lambda (char port) (read-string port))) <rekado>however, the above just hangs forever. <rekado>when I restrict read-string by adding a count it does work. <random-nick>rekado: the port is the whole file, you probably don't want to read-string it <random-nick>well, the whole file after the read macro was encountered <rekado>oh, I need to disengage when reading the character again <rekado>I assumed that was handled automatically somehowe <janneke>paroneayea: yw -- you'll have to use different sockets with vanilla websockets, of course <paroneayea>janneke: I was thinking about taking this route of combined socket anyway <paroneayea>so it's great to see you already did research into it <paroneayea>ahh, eww makes reading html versions of rfc so nice in emacs :) <janneke>paroneayea: glad you think it makes sense -- my patch is flawed though and I as yet failed to inspire davexunit about the need to somehow combine http and websockets <paroneayea>janneke: I haven't read it yet, but I'm sure it'll be useful material to study regardless :) <janneke>what i would really like is set of multiple fields (my clone does that) but also deep fields, like srfi-9-gnu <janneke>paroneayea: did you look at that -- do you have such need? <paroneayea>janneke: I'm not sure I follow, do you mean something like a common lisp "setter" <paroneayea>(set-fields rms ((person-address address-street) "Temple Place")) <paroneayea>janneke: it's not as useful to me, but it would be cool to have <paroneayea>janneke: I'm also not sure, I didn't fully look at how srfi-9 gnu works <paroneayea>since I think the records use a vector type datastructure under the hood <paroneayea>probably since most GOOPS classes don't have too many slots, it's fine to do that <paroneayea>the O(n) cost of copying might not be much more than the cost of fancy functional datastructure mechanics :) <janneke>i liked my (clone o #:slot <value> ...) approach <janneke>but not sure how to translate that template to deep setters <paroneayea>janneke: yes it's nice, though #:init-keywords don't quite line up with slot names necessarily <janneke>paroneayea: in my goops they always do... <paroneayea>maybe it's ok for the only ones you are allowed to change are the ones with #:init-keyword fields <janneke>i just wonder what the feature of having to specify them all is <paroneayea>janneke: I think it's because of CLOS-style resiliency to "evolving models" <paroneayea>you might have a slot that changes what its slots are and how they work over time, but support the old interface... <janneke> (name :accessor .name :init-value #f :init-keyword :name)) <paroneayea>(clone rms ((person-age) 60) ((person-address address-street) "Temple Place")) <paroneayea>janneke: and if you just wanted to change one, you could do (slot-fset) <jmd>I don't understand what (const 2) does <janneke>i didn't consider something so much alike srfi-9-gnu, as i was stuck on the #:key <value> idea <paroneayea>the _ instead of an argument list means ignore input <paroneayea>janneke: yeah, I understand, it looks more like a goops constructor that way <paroneayea>(clone rms ((#:person-age) 60) ((#:person-address #:address-street) "Temple Place")) <paroneayea>though the advantage of the clone version above is it ignores the wibbley-wobbliness of keywords not always matching up to the slot names <paroneayea>janneke: this would actually be closer to slot-set! <paroneayea>(clone rms ((age) 60) ((address street) "Temple Place")) <paroneayea>but you'd have to do a full clone, even of the fields you're replacing, first. <paroneayea>(clone rms ((age) 60) ((address street) "Temple Place")) <janneke>i'm wondering if there's something we can learn/steal from the <janneke>and then combine (fset ..) with clone and deep field setters ... something like that <paroneayea>janneke: can you show me an example of how to do (.slot) <paroneayea>I mean I guess you could supply an accessor that looks like dot notation <janneke>paroneayea: yes, the `.' prefix is a janneke-ism <paroneayea>janneke: I hadn't considered using .foo for accessors <janneke>(it helps with my coming from OO collegues) <paroneayea>clojure has notation like that, and we "borrowed" it in Hy. <paroneayea>that would be like my suggestion of using accessors <paroneayea>but, I think we'd have to do a full object clone <paroneayea>janneke: I think both of these are worth experimenting with. <paroneayea>janneke: so really, the "right" way to do it via accessors <paroneayea>would be to first use shallow-clone from goops to copy the whole thing, then apply the accessors <paroneayea>ACTION should update that header, since it *uses* shallow-clone now :) <janneke>... ((.address .street) "Temple Place")) *sweet* <paroneayea>janneke: maybe I should turn this into a module and submit to guile upstream? <janneke>it never hurts to get more perspectives on it -- and more users <paroneayea>janneke: cool. I'll email guile-user as an update to the thread there first, then I'll work on a patch to guile proper <janneke>i think most of wingo's GOOPS enthusiasm has run out, but you never know <paroneayea>janneke: wingo rewrote GOOPS to be in scheme not too long ago <janneke>yes, indeed he did a lot of very good/hard work there recently <janneke>possibly i'm confusing GOOPS with guile-gtk <paroneayea>janneke: yes daviid is now the maintainer of that <paroneayea>anyway, with the GOOPS rewrite, I feel like personally GOOPS *has* gottten a lot of love :) <paroneayea>it made 8sync actors work with delimited continuations much better <paroneayea>because less stuff being called from C results in less unrewindable continuation mess <janneke>just before the goops rewrite, about 2.5 years ago, i wrote a kind of silly library that would enable much of GOOPS client code to run on a simple lists backend <janneke>but (make <>) and using match to mimick generic accessors <janneke>and a hack for ice-9 match to use record matchers ($ <> .. ) on plain lists <janneke>because GOOPS was too slow...now we're back to GOOPS :-) <janneke>o and paroneayea: thanks for solving my clone problem/wish! <paroneayea>oops I'd better get back to reading the websockets spec now :) <paroneayea>janneke: I remember I posted the pre-scheme thing to you <janneke>been hunting down emacs crash stuff, not fun <paroneayea>did I show you I found a specific paper called "A Verified Compiler for Pure PreScheme"