IRC channel logs


back to list of logs

***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
<artyom-poptsov>Hi wingo
***michel_mno_afk is now known as michel_mno
<civodul>Hello Guilers!
<wingo>davexunit, did you get to poke around with transients yesterday?
<davexunit>wingo: didn't get a chance yet, sorry.
<wingo>intmaps aren't optimized for append like clojure's vectors
<wingo>but are still ok
<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>sparse int -> foo maps
<wingo>uniformly pretty good lookup times
<wingo>structure-sharing in all operations
<davexunit>wingo: O(log n) lookup?
<wingo>o(1) switching from transient to persistent and vice versa
<wingo>davexunit: yes, O(log_32 n)
<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
<wingo>intsets rather
<davexunit>thanks for the details
<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>it would be great to have datastructure performance information in one place similar to the TimeComplexity information in Python:
<ArneBab>^ answers the question “which datastructure should I use for this algorithm?”
<davexunit>ArneBab: that sounds like a good idea
<dsmith-work>Morning Greetings, Guilers
<ArneBab>good evening dsmith-work ☺
<dsmith-work>ArneBab: heh
***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
<davexunit>it should be just fine
<davexunit>the loop doesn't have to be scheme
<daviid>davexunit: here look for
<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
<djcb>or gtk to deal with
<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!
<djcb>it's a massive task
<daviid>it's a massive learning task, the massive work was done by wingo, thanks wingo!
<paroneayea>oh hey djcb
<paroneayea>I hadn't noticed you hanging out in here :)
<paroneayea>djcb: thanks for all your work on mu(4e)
<djcb>paroneayea: thanks!
<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
<daviid>nice! do you have a git repo?
<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>djcb: be right back
<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 ?
<djcb>daviid: i did not
<daviid>you should
<djcb>okay... done
<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?
<daviid>could you doi this
<daviid>,use (gnome-2)
<daviid>(getenv "LD_LIBRARY_PATH")
<daviid>oh no, i mean guile-gnome-2
<daviid>not guile
<daviid>then getenv ...
<djcb>i did a `make distclean' and rebuild to /usr
<djcb>just to make sure...
<daviid>you need make uninstall
<daviid>did you installed guile-cairo there as well ?
<daviid>and g-wrap?
<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
<daviid>i'm surprised
<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>djcb: that's funny
<daviid>ah ok, the documentation errors are expected, unless you use the devel branch
<daviid>what prefix did you pick up this time ?
<djcb>now trying /opt...
<daviid>djcb: it would be much much easier for me if we could do things setp by step together
<daviid>please make uninstall all
<daviid>cd guile-cairo
<daviid>git clean -dxf
<daviid>./ --prefix=/opt
<daviid>make install
<daviid>then g-wrap: cd g-wrap
<daviid>git clean -dxf
<daviid>git checkout --track -b devel origin/devel
<daviid>./ --prefix=/opt
<daviid>./configure --prefix=/opt
<daviid>make install
<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>follow me
<daviid>till now guile-cairo and g-wrap should be ok right ?
<djcb>they're compile & installed yes
<daviid>perfect, now do this
<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>cd guile-gnome
<daviid>git clean -dxf
<daviid>git checkout --track -b devel origin/devel
<daviid>./ --prefix=/opt
<daviid>./configure --prefix=/opt
<daviid>make install
<daviid>tell me when it is done please
<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 ?
<daviid>ah maybe i know
<daviid>where did you install guile?
<djcb>everything in /opt
<djcb>but my g-wrap might be master g-wrap, not devel...
<djcb>let me try
<daviid>could you tell me if you have a directory /opt/share/guile/site/g-wrap
<djcb>i do
<daviid>if you do [in another terminal]
<daviid>,use (g-wrap)
<daviid>what does it say ?
<djcb>ERROR: no code for module (g-wrap)
<djcb>but that's expected i suppose
<daviid>ok let's solve this
<daviid>give me a sec
<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]
<daviid>then trying make again
<daviid>did it work?
<djcb>rebuild && installed guile-gnome
<djcb> ,use (g-wrap)
<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
<daviid>export PATH=/opt/bin:$PATH
<daviid>then try scribble agin
<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>cd gtk/examples/guile-gtk-demo
<djcb>yeah, same error
<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 (gnome-2)
<daviid>(use-modules (oop goops) (gnome glib) (gnome gtk) (gnome gtk gdk-event))
<daviid>(make <gtk-window>)
<djcb>same error
<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?
<daviid>no you have the gtk wrapper
<djcb>the use-modules gave that same error, sadly
<daviid>let's try this again: (exit from guile)
<djcb>about "GClousre"
<daviid>(use-modules (gnome-2) (oop goops) (gnome gtk))
<daviid>i nedd to know if this is ok ?
<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>exit guile
<daviid>export GUILE_LOAD_PATH=/opt/share/guile/site
<daviid>(use-modules (gnome-2) (oop goops) (gnome gtk))
<daviid>and tell me
<dsmith-work>remember that "export VAR=value" (on one line) is a bashism.
<dsmith-work>djcb: You are in a bash shell?
<djcb>oh, i was using a different term :)
<djcb>using zsh
<djcb>with the envvar
<dsmith-work>Not sure if that's supported or not
<djcb>i get a different error
<daviid>djcb: what ewrror?
<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
<daviid>i don'1t know zsh
<daviid>djcb: let's do this instead
<djcb>i doubt that's the problem here...
<daviid>exit guile
<daviid>(set! %load-path (cons "/opt/share/guile/site" %load-path))
<daviid>(use-modules (gnome-2) (oop goops) (gnome gtk))
<daviid>then tell me if it did work
<djcb>it's as before...
<daviid>what before
<daviid>what i typed should work
<daviid>no matter what
<djcb>ERROR: In procedure latent var already registered: %s:
<djcb> <gtk-tree-path>
<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> exit guile
<djcb><daviid> guile
<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 ...) ?
<daviid>wouw! never seen this
<daviid>what guile version ?
<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>,backtrace #:full? #t
<daviid>and paste it for me somewhere [lisppaste or something]
<djcb> ,backtrace #:full? #t
<djcb>Nothing to debug.
<daviid>dsmith-work: what would be a zsh 'export GUILE_LOAD_PATH=..." like ?
<djcb>just like that :)
<daviid>nothing to debug
<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
<daviid>need to think
<djcb>so it's a good experiment
<dsmith-work>Odd that there is a "%s" in there...
<djcb>we'll get there
<daviid>djcb: let's recompile g-wrap from devel
<djcb>already did that
<daviid>cd ~/src/g-wrap
<daviid>makwe uninstall
<daviid>make uninstall
<daviid>gitr clean -dxf
<daviid>git checkout --track -b devel origin/devel
<daviid>./ --prefix=/opt
<daviid>./configure --prefix=/opt
<daviid>make; make install
<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>unless you did that already?
<daviid>git branch
<djcb>yes, as i said
<djcb>i was on devel already
<daviid>oh you told me before you did ake g-wrap from master
<daviid>well then fine
<djcb>that was before the debugging session started
<djcb>i have devel now
<daviid>fine fine, so guile-cairo from master, g-wrap and guile-gnome both from devel right ?
<daviid>is this ok:
<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
<daviid>ok let me think
<djcb>oh... i didn't re-install gnome-guile after the last step
<djcb>nah, didn't make a difference
<daviid>try this
<daviid>,use (gnome-2)
<daviid>,use (oop goops)
<daviid>,use (gnome gobject)
<daviid>does it fail as well ?
<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!
<daviid>djcb: ok, good night
<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.
<dsmith-work>But the gtk -dev package are
<dsmith-work>daviid: ^^