IRC channel logs

2021-01-01.log

back to list of logs

<dissoc>is it possible to call a function from a module that wasnt declared with define-public or exported?
<dissoc>from another module
<amirouche>you can import it with @@ look it up in the manual
<dissoc>i must've missed it. thank you. i will take a look
***apteryx is now known as Guest78113
***apteryx_ is now known as apteryx
<tohoyn>sneek: botsnack
<sneek>:)
<chrislck_>sneek: happy new year!
<a_v_p>Good morning, Guilers! I need to create a full-screen window that I can draw on. I suppose that it can be achieved by means of Guile Gnome. I managed to show a GTK window with Guile, but it seems that I should use GDK to make a drawable window. Is there any examples of how to do that?
<Aurora_v_kosmose>Hm, Guile Gnome docs seem to not be particularly rich in examples.
<a_v_p>Yes, that's the problem.
<a_v_p>I read the docs, but there's no examples either.
*Aurora_v_kosmose looked for guile programs using it but failed to find them
<a_v_p>Well, if I manage to do what I want, it may serve as a Guile Gnome usage example...
<Aurora_v_kosmose>That would be quite nice to have.
<a_v_p>Hmm, the last commit in the Guile Gnome repository was more than 3 years ago.
<a_v_p>Too bad. What is the official way of making GUI in GNU Guile now?
<a_v_p>I found some examples in Guile Gnome repository: https://git.savannah.gnu.org/cgit/guile-gnome.git/tree/gtk/examples
<Aurora_v_kosmose>There doesn't seem to be much up to date.
<Aurora_v_kosmose>This is an unfortunate state of GUI stuff
<wleslie>guile-gi is the gnome prefered way
<wleslie>oh and guile-clutter
<wleslie>daviid: you've got some new guile-gnome release recently?
<a_v_p>wleslie: Okay, I try it. But there's no Guile-Gi in the Ubuntu 20.04 repository yet.
<ManDay> https://www.gnu.org/software/guile/manual/html_node/Pipes.html doesn't seem to mention what open-pipe returns (only visible in the example) or what am I missing?
<Aurora_v_kosmose>ManDay: It mentions it as the output of the currently-shadowed current-(input|output)-port
<ManDay>I don't understand what you mean. Which line are you referring to?
<Aurora_v_kosmose>"For an input pipe, the child’s standard output is the pipe and [...]"
<ManDay>At least to me that doesn't make it immediately clear that open-input-pipe returns a port.
<Aurora_v_kosmose>Ah, nvm, I got the question wrong.
<Aurora_v_kosmose>It returns a pipe handle.
<Aurora_v_kosmose>Well, handle/port
<ManDay>Given that there is no mention of "handle" on the page, I still think it's not documented.
<Aurora_v_kosmose>close-port’ (*note Ports::) can close a pipe, but it doesn’t reap the child process.
<ManDay>(at least not that I can see)
<Aurora_v_kosmose>ManDay: In your repl, run (use-modules (ice-9 popen)) (let ((b (open-pipe "ls" OPEN_READ))) (display (port b)) (newline) b)
<Aurora_v_kosmose>The page isn't very well documented, but the close-pipe procedure clarifies it closes a port. (And doesn't directly manage the process)
<Aurora_v_kosmose>*does wait out the process
<ManDay>Yes, I know
<ManDay>I only came here to ask whether there is some logic to the documentation which I missed or whether it's indeed unclear that it returns a port.
<Aurora_v_kosmose>It's an awkwardly written documentation page.
*Aurora_v_kosmose accidentally'd a ? after that (port
***chrislck_ is now known as chrislck
<a_v_p>Hmm, I tried to build Guile-Gi on Ubuntu GNU/Linux 20.04 and './configure' fails with "No package 'gobject-introspection-1.0' found" error.
<a_v_p>I have 'gobject-introspection' installed.
<a_v_p>It seems that stepped on a recursive path of solving problems to solve problems.
<a_v_p>Basically I want to build an application in GNU Guile, that shows a semi-transparent window upon all other windows and allows me to track button clicks and movements.
<a_v_p>At least Guile Gnome is present in the official Ubuntu repository so it means less problems for the end users.
***sneek_ is now known as sneek
<daviid>a_v_p: you should consider using g-golf or guile-gi for new development on/using the gnome platform
<daviid>sorry to be a bit late in the party but ... both guile-gi and g-golf are on guix, and there is a g-golf debian package here - http://www.tohoyn.fi/g-golf-debian/
<daviid>wleslie: i won't release guile-gnome[clutter] anymore - you can use clutter from g-golf
<daviid>fwiw, here is how one creates a clutter stage in g-golf - https://paste.gnome.org/pu1fvm0q3 - note that it comes (is displayed) without window decorations, to get window decoration one need to declare an environment variable, which I forgot the name of ...
<a_v_p>daviid: In my case I want to make sure that a user can use my application with a minimally possible burden. So Guile Gnome still can be a better choice, given that it can be readily installed through the official repositories.
<leoprikler>Dunno, being limited to Gtk2 and olde versions of Guile is very much a burden.
<daviid>a_v_p: using guile-gnome is the last thing you want to do, you will have been warned - not only is it being removed from debian, other distro will follow, but you will be programming using a 20y old (more then 15y out dated) system, while you have g-golf and guile-gi, ready to let you work in gtk4 as well ... usig guile-gnome is total heresy
<daviid>leoprikler: not only that, it actually binds gtk 2.16 ...
<daviid>or 2.10, GLib 2.16, Gtk 2.10
<leoprikler>sounds like necromancy
<a_v_p>Okay, I see -- thanks for the warning. I'll do my best to use Guile-Gi (or G-Golf) for my project later. Currently I want to make a proof-of-concept and I made some progress with Guile Gnome.
<daviid>a_v_p: ok, note that both guile-gi and g-golf are in guix, by the time you have a well designed/working/tested app, i bet they will be in debian as well - there is g-golf debian package available already - and meanwhile, you can use guix pack to provide a ready to be used 'package' with your app
<daviid>in the example above, if you want clutter win decoration, add export CLUTTER_BACKEND=x11
<a_v_p>Nevertheless, it would be nice to have Guile-Gi in the Ubuntu repository! I guess many of us maintain GNU Guile projects just-for-fun so all I can do is politely ask the Guile-Gi/G-Golf maintainers to add my wish somewhere to your TODO list. ;-)
<mwette>a_v_p: not sure what you application is but xev will capture all events in a window
<mwette>s/you/your/
<a_v_p>I want to make a GNU Guile application that allows a user to select an area on a screen with the mouse and record everything inside to a file with FFmpeg.
<a_v_p>Akin to the Shift+PrintScreen behavior in Ubuntu, only for video instead.
<a_v_p>I already can record a selected window with the application.
<leoprikler>Doesn't GNOME already come with a screen recorder?
<daviid>a_v_p: i am the g-golf author and maintainer, feel free to ping me (which doesn't mean I can answer/statisfy any request, but I'll try ...) there is a debian package already, and it will be updated and very well maintained but being in the official debian repo will take a lot more time, and that doesn't depend on me (at all)
<a_v_p>leoprikler: Usually I use SimpleScreenRecorder -- it's great, but one need to perform recorder configuration each time and it can be a bit cumbersome I think.
<daviid>a_v_p: I did ask the gnome team for some pointer on how to acheive your goal, here is what they answered: "They will need to get the RGBA visual: https://developer.gnome.org/gdk3/stable/GdkScreen.html#gdk-screen-get-rgba-visual and set it on the GtkWindow: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-visual"
<daviid>"... Then they can use a transparent background, or set the opacity of the window <ebassi> Of courswe, they'll need to either use Wayland, or use a compositing window manager under X11"
<a_v_p>daviid: Thanks!
<daviid>welcome
<daviid>a_v_p: fwiw, here is a transparent clutter stage example using g-golf - https://paste.gnome.org/pzo7xhvil
<daviid>paste link valid one day only ...
<daviid>it only works if you do _not_ set CLUTTER_BACKEND=x11
<a_v_p>daviid: Copied the code, thanks.
<Aurora_v_kosmose>We should probably setup something like Cliki for Guile, because it's become quite obvious that this page (https://www.gnu.org/software/guile/libraries/) isn't sufficiently updatable. Some "awesome guile" listing would also work, I suppose.
<daviid>sneek: guile-software
<sneek>Someone once said guile-software is http://sph.mn/foreign/guile-software.html
<daviid>Aurora_v_kosmose: ^^
<Aurora_v_kosmose>daviid: Oh nice, that's definitely more up-to-date.
<daviid>it is up-to-date, I email the mainainer every time i find a new project
<daviid>need to email the recent guile-shape project
<Aurora_v_kosmose>Seems like email is the only option indeed, the git submodule with the repo's content seems to be a private repo.
<Aurora_v_kosmose>daviid: You might also want to mention Nomad
<Aurora_v_kosmose> https://www.nongnu.org/nomad/
<daviid>Aurora_v_kosmose: feel free to send emails to the author - sph dot posteo dot eu - just sent one for guile-zstd and guile-shapefile - i thought nomad was there alreasy ...
***rekado_ is now known as rekado
<rekado>I find layout configuration in Emacs to be really difficult.
<rekado>Guile Studio now tries to provide better defaults, but I’d really like to reserve Emacs windows for certain files.
<rekado>there’s a package called Purpose, but making it work with side windows and display-buffer-alist is tricky.
<rekado>I’d be happy to hear your comments on the latest version of Guile Studio
<rekado>I’m not sure I’ll keep the toolbar; maybe it’s better to move the contents to the mode line.
<terpri>i'm pretty sure someone updated scwm since 2000...
<terpri>sph.mn's list is cc-nc-sa so not a good starting point for licensing reasons :( it's a good list contentwise though
<terpri>neat, someone's working on guile-scsh
<rlb>RhodiumToad: I spent a little time toying with syntax-parameterize after your suggestion, and it turns out it's *almost* viable for the purpose, but (I think) the limitation is that syntax-parameters have to (always) be bound at the top-level to work, so you can't (define recur #f) and then still have (loop [x 5] (when (pos? x) (recur (dec x)))) still work
<rlb>i.e. recur should only exist within the loop form.
<rlb>(and when it does, should always start off as the special syntax (but can be shadowed afterward)
<rlb>)
<rlb>In any case, thanks for the suggestion -- it's otherwise cleaner, and possibly more "correct".
<a_v_p>So finally I managed to implement what I wanted. Here's the project: https://gitlab.com/gkaz/finger-frame
<a_v_p>For now it records 5s as video everything that is inside a selected window/area on the screen.
<a_v_p>The most trickiest part for me was to implement a simple graphic top-level semi-transparent window for sure.
<a_v_p>The goal is to make the screen recording as simple as "hit a hot key and select a window or a region on the screen, hit another hot key to stop the recording."
***sneek_ is now known as sneek