freenode/#clim - IRC Chatlog
Search
6:43:12
loke
beach: This is for integration between different processes, running on different runtimes, written in different languages, and part of different desktop environments even.
6:44:26
loke
beach: Abotu the print job. Yes, that's exactly what happens. So if you want your Lisp environment to hook into that, they just listen to events from the printer subsystem and act on those.
6:44:56
loke
Notifications can contain questions, and you can send replies back to the entity that sent it (like clickong on "retry" print job for example)
6:45:46
loke
There is an argument to the notification that contains the alternatives that should be presented to the user.
6:45:49
beach
Looking at the Dbus tutorial, it is screaming for a CLOS abstraction layer to be used on top of the protocol in applications. I assume that's what death_ did.
6:47:04
loke
I think what is needed is a way to define abstractions on top of known services. death_ only provided the low lever primitives.
6:48:32
loke
When calling functions, the dbus library provides WITH-INTROSPECTED-OBJECT which returns a function that can be applied like a normal Lisp function.
6:48:47
loke
this specific usage: https://github.com/lokedhs/stumpwm-dbus/blob/master/src/media.lisp#L19
6:50:31
loke
Dbus supports returning multiple values, which death_ matted to regular multiple values in Lisp. Here's the simplest possible implementation of a Dbus service (the function that returns the version and name): https://github.com/lokedhs/stumpwm-dbus/blob/master/src/dbus-server.lisp#L42
6:51:46
loke
So for a project, what would be neat is if there was a library that provided a more Lisp-based interface to the desktop services. The library would know about common services like notifications, media player, printing, etc.
7:28:30
loke
beach: If you have the ‘qdbus’ command, that gives you a nicer commandline tool to play with dbus
7:36:26
loke
I have the qt5 version installed but it gives me an error it can't find the qt4 dependencies
7:37:27
loke
beach: OK, then it should be fine. the text-based qdbus interface is pretty easy to use
7:38:08
beach
I am willing to believe that. But I need to know a bit more about how and what to do with the available services.
7:39:23
loke
I just played around with the file manager Dbus interface. You can use it to, for example, open a file manager window ooking at a given location
7:42:03
loke
(usually the file manager always runs, since it manages the desktop so that you can put files on the desktop)
7:43:07
loke
You can also send a ShowFolders command to that Dbus endpoint, and the filemanager will start automatically. It did for me when I tested
7:45:40
beach
Typing qdbus org.freedesktop.FileManager1 gives a list of paths that I don't know what to do with.
7:49:15
loke
qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowFolders file:///etc ''
7:51:06
beach
Except I could never have guessed what to type. I need to be more systematic about searching for this information I guess.
7:52:45
loke
The naming is annoying, in that they always prefix the names with a reverse-domain-name, so you end up with lots of repitiions.
7:53:40
loke
That's a qdbus thing. In a programming language API, these are mapped to the list/array/whatever primitives in the respective language.
7:54:13
beach
I mean, I could not have figured out from that information what arguments to pass to the command-line interface.
7:54:16
loke
qdbus has some way of indicating a list... I seem to recall it's square brackets (like ‘[foo,bar,test]’ but I'm not sure. It must be documented somewhere.
7:57:55
loke
I had documentation that documented the arguments that the notification service uses, and I had to translate that to the Lisp form
8:00:56
beach
I need to digest all this information and also look into what death_ did. Maybe later, I'll play around with a few lines of Common Lisp code.
15:29:34
jackdaniel
some useful hints for consideration: https://uxdesign.cc/how-white-space-killed-an-enterprise-app-and-why-data-density-matters-b3afad6a5f2a
16:16:32
scymtym
i was sick and traveling, so i missed #708. is there a reason some methods are specialized on ENCAPSULATING-STREAM and some on STANDARD-ENCAPSULATING-STREAM? same for using/not using DEF-STREAM-METHOD
16:44:58
slyrus
scymtym: for the invoke-with-sheet-medium I think admich was using the slot-value which necessitated using standard-encapsulating-stream but then changed it to use encapsulating-stream-stream so, now, that could/should be changed to encapsulating-stream. As for def-stream-method... eh, I'm not such a big fan of the macro-hackery that hides all of the details, but I suppose that's possible.
16:50:37
scymtym
i think it should be used everywhere or nowhere unless there is a reason for doing it in multiple ways
17:03:50
scymtym
i haven't read all the discussions yet, but this seems like something that requires at least a bit of consideration
18:21:17
scymtym
i don't know whether the d-bus topic is still current, but d-feet and bustle are two applications for exploring and debugging d-bus communication