IRC channel logs

2021-07-30.log

back to list of logs

<daviid>vijaymarupudi: sorry, was afk ... (use-modules g-golf) is 'instantaneous', but bindings are 'achieved' dynamically - make sure you read and use 'Selective Import' (in the manual ...)
<daviid>fwiw, just upgraded gtk-4 to 4.3.1+ds-1 (in debian experimental 'only' still) - i am on a debian testing 'host'
<daviid>for those interested, you may add an experimental file in /etc/apt/preferences.d with the following content https://paste.debian.net/1205998/, then aptitude update, +U and accept to upgrade the pkg wayland-protocol -> 1.21 experimental as well, this package is only used by libgtk3[4]-dev pkgs
<vijaymarupudi>daviid: With selective import, I'm getting a window using python in 0.1s while g-golf seems to take 1.5s. Is there a way to cache the bindings?
<vijaymarupudi>daviid: PS. thank you very much for the library, it's been pretty seamless
<daviid>vijaymarupudi: no, sorry
<daviid>vijaymarupudi: tx,please share your codeand experience ... i'm looking to removeas many bugs as possible 'now' ...
<daviid>vijaymarupudi: are you using gtk-4? 'no pressure', just curious - and what is your app/project about?
<vijaymarupudi>For the time to launch measurements, I just used the python gtk 4 example here: https://www.gtk.org/docs/language-bindings/python/
<vijaymarupudi>daviid: and the scripting example here: https://www.gnu.org/software/g-golf/manual/html_node/Scripting.html
<vijaymarupudi>daviid: I'm using it to create an interface to make video data analysis faster
<vijaymarupudi>Using IPC with the mpv video player for the video stuff, but buttons and shortcuts in combination with gtk-text-view for controls and quick entry
<vijaymarupudi>Haven't done anything too complex yet, but I'm sure it'll happen soon :)
<daviid>vijaymarupudi: ok, tx for those info - did you clone g-golf, devel branch? there are a few gtk-4 examples in the tree ...
<vijaymarupudi>I did use the devel branch
<daviid>ok great
<vijaymarupudi>Ah yes, I am using gtk-4, forgot to mention that!
<daviid>vijaymarupudi: right, i gathered that info from you saying you're measuring time using the example ...
<daviid>are you usingdebian aswell?
<vijaymarupudi>I'm using Arch Linux
<vijaymarupudi>I wonder if you can replicate the timing difference too
<daviid>vijaymarupudi: ok (arch linux), asked because the gtk-4-demo example 'Video Player' doesn't work, on debian - Gtk team says it is a pkg 'bug', it misses a media backend ... was wondering if there is a solution 'outside asking the pgkmaintainer' ... just curious
<daviid>vijaymarupudi: i won't work on caching bindings before a 'longtime' - i havefar too many other things to do and it will require a substantial resource effort to achieve a robust solution ...
<vijaymarupudi>The video player example in Arch Linux, seems to work, but it's a bit buggy
<vijaymarupudi>The controls don't show the duration of the video, and the play button in the control doesn't work, I have to click the middle of the video to do that.
<daviid>vijaymarupudi: ah ok - tx for the info
<vijaymarupudi>Which is why I resorted to the mpv player instead
<vijaymarupudi>daviid: totally fine, do you know if Python caches them?
<daviid>vijaymarupudi: was looking to what is the next examplkeishould add to g-golf ...
<daviid>vijaymarupudi: not sure,about yuor last quiz - but pygobject is very very mature, g-golf hasn't born yet :)
<vijaymarupudi>Haha, that is true
<vijaymarupudi>I think a GtkTreeView, GtkListView, and GtkListBox examples would be very nice
<vijaymarupudi>some*
<daviid>vijaymarupudi: ok, tx for the wish list :) - those are actually easy to getinto g-golf, will do one now ...
<vijaymarupudi>Oh sweet, would appreciate a snippet, I was going to work on one of those tomorrow
<daviid>ok, i have one that works in gtk-3, let me paste so you can look at it ..
<vijaymarupudi>I remember I had a minor issue with install g-golf btw, It was the same issue discussed in this chat log <http://logs.guix.gnu.org/guile/2020-05-15.log>
<vijaymarupudi>I have both guile3 and guile2 installed, and I had to change guile.m4 to manually set the _guile_effective_version to 3.0
<daviid>vijaymarupudi: here is a 'unpolished' gtk-3.0' old way (using gtk-init,gtk-main ...) list-store example https://paste.debian.net/1206004/
<daviid>vijaymarupudi: the guile.m4 that comes with g-golfis the guile.m4 of guile itself
<vijaymarupudi>daviid: That seems like a straightforward translation from C, thank you!
<daviid>vijaymarupudi: so, if you write a mini configure.ac file that reproduce this problem, you should talk to the arch folks ... i perso don't 'trust' distro // installation but ...
<daviid>vijaymarupudi: iow, imo, this is not a g-golf problem
<vijaymarupudi>I don't really understand autotools, so I'm going to let someone else debug this one
<vijaymarupudi>I want to really express how amazing g-golf is for GUI development, and how perfect Guile and Scheme are for this job. Your efforts on this project are greatly appreciated :)
<daviid>vijaymarupudi: fine,and welcome! but i'll work on a slightly more beautifull example to add to the g-golf tree
<daviid>vijaymarupudi: thanks!
<vijaymarupudi>I'll try to contribute to documentation or education once I get the hang of g-golf more
<daviid>vijaymarupudi: cool - but right now, the best help is your write your app ... it will prob raise some problems/bugs ...
<daviid>vijaymarupudi: how do you measure yourtimings?
<vijaymarupudi>Sounds good :)
<vijaymarupudi>I'm just using the time shell command
<vijaymarupudi>And ran it around 5 times and took the mean
<daviid>vijaymarupudi: but when i do that here, itmesures the timeileft the win'opne' :)
<vijaymarupudi>I tried to close it pretty quickly
<vijaymarupudi>But another way to test it is without opening a window
<vijaymarupudi>g-golf still takes around a second while python is pretty quick
<daviid>i don't understand the last sentence
<daviid>i'd like to meausre the timeit takestoopen the window, here it is def below onesec
<daviid>not to compare with pygobject but ...
<vijaymarupudi>I think the problem is not time to open window, but time to import gobject introspection bindings?
<vijaymarupudi>Here's my shell output: https://paste.debian.net/1206008/
<daviid>right
<daviid>right to 'time to import the typelib elements', the GI bindings are in g-golfcore ... those are instantaneous
<daviid>vijaymarupudi: yeah, those a re not reliable measurements i think, but thanks -
<daviid>vijaymarupudi: here, loading a precompiled hello-world version takes .5s, not .1 but not 1.5either ...
<daviid>scheme@(guile-user)> ,time (load "hello-world.scm")
<daviid>;; 0.546736s real time, 0.664921s run time. 0.148366s spent in GC.
<daviid>when it isloaded, running (main '()) is instantaneous
<vijaymarupudi>This might be a difference of machines then: I guess
<vijaymarupudi>scheme@(guile-user)> ,time (load "hello-world.scm")
<vijaymarupudi>;; 1.109343s real time, 1.258566s run time. 0.236839s spent in GC.
<vijaymarupudi>Yep, (main '()) is instantaneous to me too
<daviid>and here is 'none pre-compiled version' - https://paste.debian.net/1206010/
<daviid>yes, obviously the machine ... but anyway,iwas just curious, i won't work on this before alonglongtime ...
<vijaymarupudi>Yep, agreed, not too important. I suspect the important code in Python is not cached, but written in C
<vijaymarupudi>But a micro optimization that can be done later
<daviid>i did ask on #introspection, i'll let you know
<vijaymarupudi>thanks, will keep an eye out
<tohoyn>New version Theme-D 4.0.0 has been released. It implements lexically scoped and statically dispatched generic procedure resembling C++ function overloading. See http://tohoyn.fi/theme-d/index.html.
<sneek>Welcome back tohoyn, you have 1 message!
<sneek>tohoyn, avp says: I'm using user procedures from Guile (Scheme).
<tohoyn>New version Theme-D-Golf 0.9.3 has also been released. It is compatible with Theme-D 4.0.0. See http://tohoyn.fi/theme-d-golf/index.html.
<tohoyn>New version Theme-D-Gnom 0.9.6 compatible with Theme-D 4.0.0 has also been released but you should use Theme-D-Golf instead. See http://tohoyn.fi/theme-d-gnome/index.html.
<tohoyn>s/Gnom/Gnome/
<tohoyn>Is anybody using Lambda the Ultimate?
<leoprikler>hmm, PathQuery looks interestig
<leoprikler>s/interestig/interesting
<ecraven>how can I see which module exports a binding on the guile command line? for example `interaction-environment'
<ecraven>maybe a bad example, this one is simple (scheme repl), but what about something more basic, like `socket'?
<ecraven>how do I get that in guile3 --r7rs?
<leoprikler>I don't think it's that simple, but you could load a bunch of guile modules and output their bindings, then query that output
<ecraven>yea, I'm just grepping the guile sources now ;) that mostly works
<ecraven>hm.. so (exit 3) "just" raises a &quit-exception? I'll need to ignore that ;)
<stis>Helloi guilers!
<civodul>o/
<chrislck>\o
***Server sets mode: +ntz
<civodul>hey dsmith-work, happy Friday!
<dsmith-work>Firidays are especially awesome because I usually have Thai for lunch. Mmm.
<dsmith-work>Also on Fridays
<ggoes>freedom friday
<ggoes>freedom fries day
<vijaymarupudi>daviid: I get a segfault when I use (get-cursor tree-view) in g-golf btw
<vijaymarupudi>daviid: Link to the test code: https://pastebin.com/raw/mvjAAYZn
<vijaymarupudi>Oh I realize that I use a custom module, here's a better paste: https://paste.gnome.org/pngxyoapc
***Noisytoot_ is now known as Noisytoot
<daviid>vijaymarupudi: thanks for the report and code to reproduce, will look asap ...
<avp>Hello Guilers! How do you get a list of the following form '(a . ,b) printed to a port, where "b" must be substituted for a value from the context where this list is formed? AFAIU '(a . ,b) is a shorthand for '(a . (unquote b)).
<RhodiumToad>do you mean `(a . ,b) ?
<avp>I know that 'unquote' must be used only inside a 'quasiquote', but I need to generate this as a part of a bigger quasiquoted list.
<avp>(pretty-print '(a . (unquote b))) -| (a unquote b)
<avp>Hmm, I think I'm doing something wrong here but I'm still figuring it out.
<RhodiumToad>you also know that (a . (b c)) is (a b c), yes?
<RhodiumToad>the (a . b) syntax is only printed if b is not a proper list (i.e. it is an atom other than '() or it is an improper list)
<RhodiumToad>actually if b is an improper list (b . c) you'd get (a b . c)
<avp>Okay, that makes sence.
<RhodiumToad>(a unquote b) is a valid representation of (a . ,b) too
<avp>RhodiumToad: Thanks, that was a helpful insight.
<RhodiumToad>a bit of experimentation suggests that pretty-print only outputs (unquote b) as ,b in limited contexts, and the unusual case of (a . ,b) is not one of them
***taylan2 is now known as taylan