***dje is now known as xdje
***wleslie_ is now known as wleslie
***cluck` is now known as cluck
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
***michel_mno_afk is now known as michel_mno
<wingo>davexunit, did you get to poke around with transients yesterday? <wingo>intmaps aren't optimized for append like clojure's vectors <davexunit>I was attending a debate at MIT last night. didn't do any hacking. <davexunit>wingo: what operations are intmaps optimized for? <wingo>set operations (union, intersection) <wingo>uniformly pretty good lookup times <wingo>structure-sharing in all operations <wingo>o(1) switching from transient to persistent and vice versa <davexunit>oh cool, so yo uuse the 32-way branching thing like Clojure <wingo>bitsets are similar except they map int->bool and take up less space <davexunit>I will take intmaps for a spin soon, I hope. <davexunit>when I have hack time and can be pulled away from guix :P <wingo>will be cooler when we do generic maps, and append-optimized vectors <davexunit>if there are plans for that, I am a happy camper. <ArneBab>^ answers the question “which datastructure should I use for this algorithm?” ***michel_mno is now known as michel_mno_afk
<djcb>...trying to combine the guile repl with a gmainloop <djcb>i saw some old messages on guile-user, but it seems a bit kludgy <djcb>in particular, i'd like to interactively manipulate some gstreamer based objects <djcb>seems a nice solution would be if the guile-repl could somehow be part of the mainloop, <djcb>just like a widget in gtk <daviid>djcb: you can spawn a server just before to call g-main-loop-run and use geiser connect-to-guile, but it does not allow everything you'd be able to do from within the app and i'm afraid it may not work for you, don't know <davexunit>djcb: I'm not familiar with GTK, but the (system repl coop-server) is built to be integrated into an event loop <davexunit>the advantage over the standard REPL server is that it avoids thread synchronization issues <djcb>daviid:, davexunit: thanks! <daviid>davexunit: nice, but this works because your loop is writen in scheme right? <daviid>there won't be any syncro with the glib loop even using coop-server i mean <davexunit>daviid: assuming the loop is single-threaded <davexunit>and there's a way to schedule a hook to be called every <interval> loops <daviid>"he problem with this, is that the gtk.main() loop won't refresh the screen each time that the fraction is set, we need to use the gtk thread engine. We need to call the gtk.thread_init() function to start the thread engine, this call should be made on the same thread that the gtk.main() function is called." <davexunit>daviid: if there's a bunch of threads then maybe the regular REPL server should be used. :) <djcb>at least in my case i don't have any threads <djcb>well, the main thread :) <djcb>and a bunch of internal gstreamer threads <daviid>i'm afraid we can not use guiles threads in guile-gnome, sad but <djcb>seems the coop-server might work, if i add some custom source to the gmainloop <daviid>... Then, we should use gtk.threads_enter() before any access to gtk object, and, once we end up doing transformations, we should call gtk.threads_leave() <daviid>djcb: if you comeup with something working let me know, i'm interested <daviid>i should have said: guile's threads can be used, of course, but within a thread, any attempt to access gobject must call gtk.threads_enter() and gtk.threads_leave() <djcb>the world would be a better place with a bit more guile/glib glue <daviid>djcb: in the link i pasted above, look for Final Example <djcb>i suspect my case is slightly easier since i don't have explicit threads <daviid>djcb: patches welcome! and we are very 'late' as well, we bind 2.10 <djcb>so hopefully i don't need any explicit locks <daviid>i don't know gstreamer but i doubt there are not gobject based somwhow... <djcb>but i only use it from one thread <djcb>people did quite a bit of work on guile/g-introspection which <djcb>would give access to much of the g-libraries <djcb>but i think it was never completed <daviid>djcb: both projets i know of have been abendonned, don't know why. then i was faced with the need to at least maintain guile-gnome 'as is', like perfectly working with guile 2.0 and 2.2, then digged in and started to patch quite a lot, learned quite a lot, and started to work on clutter... gir would be nice but for me maintaing what we have was a better route for now <daviid>i'm almost ready to release guile-gnome 2.16.3, i invite you to check out the devel branch, and report any problem .. that would be nice <djcb>oh, respect and gratitude for your work! <daviid>it's a massive learning task, the massive work was done by wingo, thanks wingo! <daviid>djcb: pleasse keep me informed of your progress wrt to this chat we had now... and if you feel like to help to give me some feedback, please checkout and use guile-gnome devel branch, so far i'm the only one using it, i think <djcb>daviid: sure! i'm working on some little music player project with guile / gstreamer <djcb>and i'll happily share whatever i'll find <djcb>not yet... i'll hack a few more weeks to have something usable <djcb>daviid: gnome-guile compilation works at least :) <djcb>but when running the examples, seems guile can't find some things <djcb>ERROR: In procedure dynamic-link: file: "libgw-guile-gnome-pango", message: "file not found" <daviid>could you tell me what you did? checked out devel? if yes what did you use as your --prefix ? <daviid>djcb: these files are installed in $prefix/lib/guile-gnome-2, could you 1st check they are there indeed? <daviid>also, did you uninstalled the previous guile-gnome version you were using? <daviid>then what example exactly (there are quite some) <djcb>daviid: i didn't have any older versions <djcb>probably some patn issue... <daviid>but could you answer my questions ? <djcb>daviid: they were under /usr/local <djcb>and now under /usr as well <daviid>so you used --prefix=/usr/local then ? <djcb>yes, but that didn't work, so i tried /usr <daviid>well that can't be [under /usr/local and /usr] <djcb>so they are under /usr/lib64/guile-gnome-2/ <djcb>but i get still the same error when running scribble <daviid>you removed everythin under /usr/local ? <daviid>[even if that's prob not the source of the problem] <djcb>didn't help... so seems somehow we can't find the path. might the 'lib64' play a role? <djcb>i did a `make distclean' and rebuild to /usr <daviid>did you installed guile-cairo there as well ? <daviid>scribble.scm works here by the way <djcb>getting a bit further with scribble now.. <djcb>now we get ERROR: In procedure memoize-variable-access!: <djcb>ERROR: Unbound variable: <gtk-window> <djcb>but i don't have cairo installed, might that be the reason? <daviid>djcb: i need to know if you manually installed guile-cairo and g-wrap from their respective git repos? <daviid>ok, if you don't mind, lest do it from scractch together, and let's use /opt as the destination [not to mix with distro based things] <daviid>so do make uninstall [guile-gnome] <djcb>yeah, i just installed guile-cairo too (from git, same for g-wrap) <daviid>g-wrap shoulçd not compile unless you checkout the devel branch <djcb>i just took whatever git clone gave me <daviid>anbd i recommand another prefix, not to mix with the system <djcb>there were some documentation errors <daviid>ah ok, the documentation errors are expected, unless you use the devel branch <daviid>what prefix did you pick up this time ? <daviid>djcb: it would be much much easier for me if we could do things setp by step together <daviid>git checkout --track -b devel origin/devel <daviid>then we ned to inform guile/guile-gnome about what we did _before_ to compile guile-gnome <daviid>tell me if everything is ok till now ? <djcb>well, this won't work because we can't find g-wrap's .pc files <daviid>till now guile-cairo and g-wrap should be ok right ? <djcb>they're compile & installed yes <djcb>PKG_CONFIG_PATH=/opt/lib/pkgconfig ./configure --prefix=/opt <daviid>export ACLOCAL_FLAGS="-I /opt/share/aclocal" <daviid>export LD_LIBRARY_PATH=/opt/lib:/usr/lib:/lib <daviid>export PKG_CONFIG_PATH=/opt/lib/pkgconfig:/usr/lib/pkgconfig <daviid>git checkout --track -b devel origin/devel <djcb>ERROR: no code for module (g-wrap) <djcb>Makefile:1009: recipe for target 'guile-gnome-gw-gobject.c' failed <daviid>then you had an error while doing gwrap <daviid>i'm thinking about what it could be, could you confirm you did not have error while doing g-wrap ? <djcb>but my g-wrap might be master g-wrap, not devel... <daviid>could you tell me if you have a directory /opt/share/guile/site/g-wrap <djcb>ERROR: no code for module (g-wrap) <djcb>but that's expected i suppose <djcb>(same when using /opt/bin/guile-gnome-2) <daviid>export GUILE_LOAD_PATH=/opt/share/guile/site <daviid>guile-gnome-2 does not exists yet [we are trying to compile it] <djcb>rebuild && installed guile-gnome <djcb>does not give any errors anymore -- progress! <daviid>great! so you succedded compiling ionstalling the guile-gnome devel branch right ? <daviid>you need to add these 2 exports in you shell . file <daviid>export GUILE_LOAD_PATH=/opt/share/guile/site <djcb>sadly... , ERROR: Unbound variable: <gtk-window> <daviid>mark_weaver: if the user installs guile-gnome where guile is, he should not need to define GUILE_LOAD_PATH ? i wonder what happened <daviid>djcb: hum that should not be, try the demo suite then i'll think <daviid>ok, but this means one of the steps i suggested did not work <djcb>i bet it's something trivial, a missing env variable or something like that <daviid>(use-modules (oop goops) (gnome glib) (gnome gtk) (gnome gtk gdk-event)) <djcb>;;; WARNING: compilation of /opt/share/guile-gnome-2/gnome/gobject.scm failed: <djcb>;;; ERROR: Throw to key `gruntime-error' with args `("%gtype-class-bind" "No GType registered with name ~A" ("GClosure") ())'. <daviid>ok, i think something provided guile-gnome to build the gtk wrapper <daviid>could you edit the guile-gnome/config.log <daviid>and look for 'available wrappers' <djcb>These wrappers will be built: <djcb> atk cairo glib gtk pango <djcb>These wrappers failed their prerequisites and will NOT be built: <djcb> corba gconf gnome-vfs libglade libgnome libgnomecanvas libgnomeui <daviid>when you do did (use-modules ..) it did fail or not ? <dsmith-work>Maybe the -dev packages for gtk+ are installed, but not for gnome? <djcb>the use-modules gave that same error, sadly <daviid>let's try this again: (exit from guile) <daviid>(use-modules (gnome-2) (oop goops) (gnome gtk)) <djcb>ERROR: no code for module (gnome-2) <daviid>ah then it make sence why did you not say it before :) <daviid>that means you did not exported as needed <daviid>export GUILE_LOAD_PATH=/opt/share/guile/site <daviid>(use-modules (gnome-2) (oop goops) (gnome gtk)) <dsmith-work>remember that "export VAR=value" (on one line) is a bashism. <djcb>oh, i was using a different term :) <djcb>ERROR: In procedure latent var already registered: %s: <gtk-tree-path> <daviid>no but i need to make sure use-modules did work first <djcb>i doubt that's the problem here... <daviid>(set! %load-path (cons "/opt/share/guile/site" %load-path)) <daviid>(use-modules (gnome-2) (oop goops) (gnome gtk)) <djcb>ERROR: In procedure latent var already registered: %s: <djcb><daviid> no but i need to make sure use-modules did work first [23:39] <djcb><daviid> i don'1t know zsh <djcb><daviid> djcb: let's do this instead <djcb><djcb> i doubt that's the problem here... [23:40] <djcb><daviid> (set! %load-path (cons "/opt/share/guile/site" %load-path)) <djcb><daviid> (use-modules (gnome-2) (oop goops) (gnome gtk)) [23:41] <djcb>i still get "ERROR: In procedure latent var already registered: %s: <gtk-tree-path>" <daviid>yu tell me that this is the output of the (use-modules ...) ? <djcb>it bet it's some tiny little thing somewhere <djcb>which will become trivial after a good night's sleep :) <daviid>i don't think so, it is really wierd <daviid>could you do that again and then <daviid>and paste it for me somewhere [lisppaste or something] <daviid>dsmith-work: what would be a zsh 'export GUILE_LOAD_PATH=..." like ? <dsmith-work>daviid: I was going to suggest setting the var and then exporting it as separate commands. (posix) <djcb>results are the same with bash, fwiw <daviid>dsmith-work: djcb ok i was curious, but (set! %load-path ...) fixed that problem anyway, so now i wonder, i've never seen such an error at module import time <djcb>so it's a good experiment <daviid>djcb: let's recompile g-wrap from devel <daviid>git checkout --track -b devel origin/devel <djcb>fatal: A branch named 'devel' already exists. <daviid>should be a mistake on your side <daviid>another user reported the same and then corrected something, a tipo maybe ? <djcb>well i copy-pasted what you wrote... <daviid>oh you told me before you did ake g-wrap from master <djcb>that was before the debugging session started <daviid>fine fine, so guile-cairo from master, g-wrap and guile-gnome both from devel right ? <daviid>(set! %load-path (cons "/opt/share/guile/site" %load-path)) <daviid>(use-modules (gnome-2) (oop goops) (gnome glib) (gnome gobject)) <djcb>;;; ERROR: Throw to key `gruntime-error' with args `("%gtype-class-bind" "No GType registered with name ~A" ("GClosure") ())'. <djcb>;;; WARNING: compilation of /opt/share/guile-gnome-2/gnome/glib.scm failed: <djcb>;;; ERROR: In procedure #<procedure 14b0f00 ()>: Unbound variable: <gclosure> <djcb>While compiling expression: <djcb>ERROR: In procedure %gw:wrapset-new: dependency on nonexisting wrapset: gnome-glib <djcb>oh... i didn't re-install gnome-guile after the last step <djcb>nah, didn't make a difference <djcb>first two work, last one fails with the GClosure error mentioned before <daviid>ok, i think sonething went wrong compiling guile-gnome, coyuld you double check the content of your config.log file <daviid>the other possibility is that there would be a non reported depedency between modules [wrappers] that you do not build because the only diff between you and me, if you did everything right :) is that i build all wrappers <djcb>okay... bedtime here... let's try again tomorrow! <dsmith-work>This may be important: "These wrappers will be built: ...gtk...", "These wrappers failed their prerequisites and will NOT be built: ...libgnome..." <dsmith-work>The gnome -dev packages might not be installed on there.