IRC channel logs
2017-07-06.log
back to list of logs
<paroneayea>I think I can do it using mutexes, ice-9 q, and fibers' condition system. <paroneayea>question: what's the smallest object with unique (as in eq? unique) identity you can make in guile? <wingo>paroneayea: regarding buffered channels: just spawn another fiber <wingo>paroneayea: (define (buffered-channel size) (let ((ch (make-channel))) (spawn-fiber (lambda () (buffering ch 10))) ch) <wingo>paroneayea: (define (buffering ch size) (let lp ((q (make-q))) (cond ((q-empty? q) (enq! q (get-message ch))) ((< (q-length size)) (perform-operation (choice-operation *recv-op* *send-op*))) (else (send-message ch (deq! q)))) (lp)) <wingo>for appropriate definitions of recv-op / send-op <wingo>it's exactly the example in the kill-safe paper actually... <wingo>we don't really have a kill-thread operation so the point is moot <ArneBab_>wingo: I’d like to run your fibers channel tests on our 80 core cluster, can you give me a short info how to generate the graphs from your recent article? <wingo>the benchmarks are in fibers git <wingo>they just make csv though, my graphing code is in an uncommitted state atm <ArneBab_>can you give me something to just create equivalent plots? (needs not be clean, should just be comparable) <ArneBab_>(it’s nice to have the Makefile in the benchmarks! — I see it now) <reepca>Hm, has guile got a built-in by any chance that is like rmdir but works with non-empty directories? <civodul>reepca: no, but (guix build utils) has 'delete-file-recursively', which is like 'rm -rf' <davexunit>paroneayea: cool! bummer that it is in chicken, though! <davexunit>paroneayea: also re: smallest object that you can use eq? on, I imagine that symbols would be the thing. <wingo>pairs are smallest eq? object <davexunit>or alternatively, is there an easy way to discover the size of primitive types so I can answer my own questions? <wingo>hard to say how big a symbol is <wingo>but if it's unique, then at least the characters plus about 8 words <wingo>more heavy-weight to allocate :P <davexunit>interesting. I thought symbols were interned and were more-or-less an integer. <wingo>has to go through global symbol table <wingo>well all SCM values are a word <davexunit>maybe symbols aren't the best thing to be using for fast accesses to things... <wingo>i thought you were referring to the memory pointed to by a non-immediate SCM <wingo>eq? just looks at the SCM pointer, not at the memory that it points to... <davexunit>that was a quick way to learn that I don't know a damn thing. <cmaloney>Would it be safe to say that symbols are akin to strings in Python (eg: immutable, would need to be re-created if something changed, etc.)? <davexunit>they have some string-like qualities but are also quite different. <davexunit>ACTION waits to be told that I'm actually wrong <civodul>what about: symbols are immutable interned strings, meant to be used as identifiers <dsmith-work>Anyone know if it's possible to turn local echo on in gnu screen? <paroneayea>wingo: ok, thanks for the clarity... I'll give the buffering stuff a try!