On Sat, Jul 16, 2016 at 10:05:45AM +0200, Panicz Maciej Godek wrote: > Hi, > thanks for your reply -- I think I have solved it (although I took a > slightly different approach*) -- the problem was probably that the scale > was too small for anything to be visible, and it was sufficient to enlarge > the values of points. > > Of course, if you publish your examples, as it is always a pleasure to read > other people's ideas :) I don't think they have anything valuable Scheme-wise. Anyways, the code is attached. It uses gtk and cairo, and repeating patterns which I used to prototype custom grids on my canvas. Probably it could be useful for someone. Working on the code I've learned hard way gtk is not thread save and how to avoid this issue working in the Emacs Geiser environment. Basically, it is something like (gdk-threads-init) ; only once ; and then (and (gdk-threads-enter) (your-function) (gdk-threads-leave)) Other attempts always lead me to crashes due to non-thread-safe underground libraries (I cannot recall all, though one of which is libpango which bugged me not long ago when I worked on another issue). Even using (begin ...) instead of (and ...) lead to crashes. Now I suspect the procedures in the (begin ...) body while are executed one by one, nobody waits until any of them finishes, which leads to race conditions in the gtk case. Probably I'm wrong, don't know. Further investigation has showed me that the standard external REPL server (I still use the stock version of guile in Debian stable which is 2.0.11) doesn't even use after-eval-hook so I cannot try to automate those two calls without using work-arounds in my code. I've found the rework of REPL in the Sly (previously guile-2d) code by David Thompson which solves this for his library. Hope to see something like this in the future releases of guile. BTW, thank you for your pamphlet against R. It has given me many new ideas wrt the code I'm now working on. -- Vladimir