<thomassgn>derp, guile complains that I can't use define inside a define... How do I create local variables? <thomassgn>like here: (let (files (cdr (list-head (command-line) (- (length (command-line)) 1))))) <thomassgn>holomorph: thanks, makes sense after checking the docs :) <paroneayea>I'll probably promote the new guile release in the morning <paroneayea>I could do it now, but it'll have more foot traffic earlier tomorrow. <helloGuile>hmm emacs erc how to connect #guile channel?;; irc server address is irc.freenode.net:6667 right? <paroneayea>helloGuile: M-x erc <RET> irc.freenode.net <RET> 6667 <RET> helloERC <RET> (wait for login) /join #guile <RET> <helloGuile>I'm PlumpMath guile beginner (and scheme);; nice to meet you & everyone :) <paroneayea>I'm back from a fun dentist appointment (filling popped out) which interrupted the middle of my day <paroneayea>back to hacking 8sync's agenda to use the new suspendable ports. <paroneayea>yeah it happened while eating a nice carmel I had gotten as a gift <paroneayea>and then the carmel smushed right into the filling hole <paroneayea>luckily I work from home so nobody would judge my arms flailing run to the bathroom to brush it out of my teeth <paroneayea>trying to understand a pile of baroque abstractions a previous me wrote. nice job, old self. ***logicmoo is now known as dmiles
<ArneBab>paroneayea: :) — that’s a great way to learn writing maintainable code <paroneayea>and I think I know how to refactor to make 8sync a much nicer place *and* integrate suspendable ports :) <lloda>need help with a threading problem, It happens only after aa84489d18320df086e08554554d6f3b92c45893 'Reimplement dynamic states' on the master branch. <lloda>deadlock in make_bytevector in the call to scm_gc_malloc_pointerless <lloda>there are a bunch of threads just like #2 <lloda>gc version is gc7_6_0 which I updated to after finding the deadlock in an earlier 2015 version <lloda>I mean with an earlier 2015 version <dsmith>lloda: Aww Fouey. And wingo just did a release yesterday <lloda>it happens only after I create some pretty large arrays (GB), but it didn't happen before <lloda>before aa84489d18320df086e08554554d6f3b92c45893 I mean <wingo>yep i can see how that happens <wingo>so it seems that we should not try to get the current warning port from that function and instead just write to stderr <wingo>lloda: does that make sense to you? <lloda>ah, the large allocation warning <lloda>not familiar with those routines, but in the situation it makes sense <lloda>so we should just fprintf(stderr...)? <lloda>yet the comment at scm_gc_warn_proc says 'cannot allocate GC memory'. So it does it anyway through the weak table thing? <wingo>just that the weak table has weak cells which aren't safe to reference outside the allocation lock <wingo>so accessing cells in the weak table goes to take the lock <wingo>but the lock is already taken, so deadlock. <davexunit>wingo: does one need to use multiple pthreads to do profiling with system-async-mark? my assumption is "no" but the implementation isn't clear to me. <lloda>wingo: why doesn't it wait for the lock to be released? sorry if this is a stupid question <davexunit>to learn, I wanted to write a form that would handle every interrupt opportunity and count how many times it happened. <wingo>lloda: because the same thread took the lock <wingo>lloda: it's already issuing the error while having the lock <wingo>davexunit: no, you can use signals <wingo>signals use system-async-mark under the hood <lloda>ah oh for the malloc you mean <lloda>I just assumed it was some other thread somehow :-| <lloda>anyway patching scm_gc_warn_proc does fix it for me to be sure <lloda>thanks for the support wingo :) <wingo>lloda: np :) feel free to submit a patch that just rips out that code and replaces with a write to stderr <davexunit>wingo: are signals not in the manual. the index brings me to the POSIX section of the manual. <wingo>signals are in the manual i think :) <sinkbot>paroneayea: *rolls*... you get a 19! <paroneayea>8sync is running using (ice-9 suspendable-ports) :D <paroneayea>and it CONSIDERABLY simplifies writing networked code. <sinkbot>Woo woo (ice-9 suspendable-ports)! :D <paroneayea>I also had a nice revelation this morning about how to simplify a whole lot of things in 8sync <sinkbot>I can't help you... I can't even help myself! <paroneayea>sinkbot: sorry davexunit tried to use you maliciously. <paroneayea>wingo: I also thought a lot about the conceptual overlap between what you're doing with channels and what I'm doing with the actor subsystem <davexunit>I've been using a channel-like construct in my async game prototype <paroneayea>8sync's core agenda doens't really provide a way to coordinate between the different concurrent things you split up. but the actors mechanism does provide a coordination mechanism <wingo>i always think writing things up is worth it :) <paroneayea>at the heart of it, they're both about coordinating between different inboxes of messages of sorts <paroneayea>I'm considering making the actors subsystem not require using GOOPS classes <paroneayea>and just have a constructor function for an actor (which can be anything, including something that knows how to construct the GOOPS class), and the actor provides a procedure to send it messages <paroneayea>and in that case, if you want, you really don't need GOOPS, but GOOPS can be used by those who like GOOPS. <paroneayea>anyway, I should remove the debugging statements from this code and commit it :) <paroneayea>davexunit: by next release I'll try to have decent docs in 8sync, maybe you can give 8sync's actors concept a try and think about it from there :) <paroneayea>and maybe it would apply nicely to your game engine, maybe not, but it could give you a conceptual place to think about it from <davexunit>I would probably snarf rather than use directly, since I have my own coroutine implementation with job control and such at this point <paroneayea>davexunit: I think the main value to you will be to play with how 8sync does it <davexunit>but to see an implementation of the concept would be nice <paroneayea>another thing I need to do in 8sync is stop using select, heh ;) <davexunit>right now I'm using a channels-like thing to have threads yield when processing input events and stuff, but you can make a channel for anything. <davexunit>don't yet know how well it works in practice. <davexunit>I currently have concerns about live hackability <davexunit>that I'm hoping I've somewhat addressed by making coroutines a first-class datatype and adding a define-coroutine form that will stop the current version of itself when it is redefined at the REPL. <paroneayea>one really cool thing about using suspendable ports <paroneayea>I was able to convert a 32 line function where I did all the buffering on incoming socket data from irc <paroneayea>to a 6 line function that just used (read-line socket) and looped <daviid>paroneayea: I'd be happy to read some doc about 8sync too <daviid>paroneayea: I would not loose any time, not even a second to (re)writing sonething that will 'mimic' oop, in a poor way by def (msg passing is not good) where goops does the job, my 2c :) <paroneayea>daviid: the actor model already uses message passing <paroneayea>the message passing component is used to coordinate between concurrently executing actors <daviid>paroneayea: so, how about doing things the other way around, maybe, rewrite that part so that it uses goops? <daviid>remember, at that time, msg pass is all they knew ... <daviid>earling actor model articles I mean... <paroneayea>daviid: then various properties of the system wouldn't work I think <paroneayea>especially the ones that allow you to communicate with remote actors on other processes/servers <paroneayea>you *could* do the message passing as procedure calls, but it would involve currying, and it would only work for local actors I think <daviid>I see, but this is not much oop anyway, you 'just' write on a socket, pipe or what ever ... and the other read <paroneayea>right, but what does the abstractions for all that look like in the end? <paroneayea>daviid: also, thanks for the offer to review docs once they're ready, I'll likely take you up on it :) <daviid>paroneayea: yes, back to hacking, and welcome... <paroneayea>daviid: also, whether or not there's an option to not use GOOPS in actors, I'll probably still use it... GOOPS'y actors are a lot of fun :) <dsmith>paroneayea: Seems like most things I have to do in python are "not as cool as ..." <thomassgn>I have the following expression: (system* rsync transport options progress files dest) where files is a list of files e.g. ("testfile" "tst"). I get 'Wrong type (expecting string): ("testfile" "tst")' and I can't figure out how to "get them out of list". I have found list-ref, but not sure how to make do... <janneke>i particularly liked/miss python's "fooo %(bla)s" % locals () trick <janneke>fmt seems to address that, and more? <paroneayea>guile-irregex is packaged in guix fwiw. fmt isn't yet <paroneayea>I would describe irregex as "imagine if you could write insanely complicated regular expressions and then read them just fine later." <paroneayea>I wrote a "parser" (not really a parser) for the Ledger command line accounting text format one night in about an hour <paroneayea>and came back and tweaked it several months later <dsmith>thomassgn: So want something like (system* r t o p '("a" "b" "c") d) to be (system* r t o p "a" "b" "c" d) ? <dsmith>thomassgn: Hmm. Maybe you gather up files and dest into a list and then use apply. <dsmith>Something like (untested): (apply system* r t o p (append files (list d))) <thomassgn>dsmith: mm, seems like it works. It does end up having null at the end of the list, which it complains about. <thomassgn>might be a step forward, will check docs and try some more :) <kyamashita>paroneayea: This is so cool. I know what I'm using for regex in Guile! <dsmith>thomassgn: Is dest a string or a list?