I'm hoping one day someone will write a window-manager service for Wayland that replaces the compositor API with a protocol. To once again enable window managers to be implemented in any language, regardless of it having a Wayland/compositor library.
What? Wayland is a protocol. Not an API.
Plwm – An X11 window manager written in Prolog
31–40 of 77 posts
Re: Plwm – An X11 window manager written in Prolog
#32Earlier quoted context omitted.
I wish more things were protocols instead of APIs.
Could you explain the difference?
Think of the difference between an IETF RFC on say SMTP vs an email API - the RFC describes how clients and servers for mail routing interact through an almost dialog, while a typical email API has highly structured interfaces. Another wat to cut it is an API can be tested as it has inputs and return values dependent on those, while a protocol you can generally only assert compliance with the specification of the protocol.
People often assert protocols have something to so with RPC of some sort but that’s not true. Many language support protocols, which can be very similar to interfaces, but don’t have anything to do with OOP, etc. In language protocols it’s slightly different than network/IPC protocols but the intent is similar.
Re: Plwm – An X11 window manager written in Prolog
#33Looked at the source, it’s so compact, wow.
It looks nothing like the Prolog I've seen before. I'm quite amazed the author took a declarative language meant for logic and turned it on its head for managing windows as an actual application. Bravo!
Re: Plwm – An X11 window manager written in Prolog
#34I'm hoping one day someone will write a window-manager service for Wayland that replaces the compositor API with a protocol. To once again enable window managers to be implemented in any language, regardless of it having a Wayland/compositor library.
What? Wayland is a protocol. Not an API.
Re: Plwm – An X11 window manager written in Prolog
#35Earlier quoted context omitted.
It looks nothing like the Prolog I've seen before. I'm quite amazed the author took a declarative language meant for logic and turned it on its head for managing windows as an actual application. Bravo!
Window management and constraints in general are a perfect fit for logic programming.
Re: Plwm – An X11 window manager written in Prolog
#36Does someone know a tutorial or something which explains how to get from "tutorial Prolog" to "real project Prolog", because that's not look anything like tutorial Prolog. Prolog seems interesting, but any time I tried to do anything more than toy examples on my own, I got infinite recursion, unsolvable problems.
https://www.metalevel.at/prolog
His YouTube videos are also incredibly good.
Re: Plwm – An X11 window manager written in Prolog
#37Re: Plwm – An X11 window manager written in Prolog
#38Earlier quoted context omitted.
Could you explain the difference?
I'm not the most knowledgeable, but a protocol talks to another process through a specific format. I personally think its more powerful than writing a new process to replace and existing. My favorite example is an X11 windows manager implementing in about 18 lines of python. Obviously there's dependencies to talk to the X server, but the power of a protocol comes from any program written in any la gage communicate wi…
Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.
Re: Plwm – An X11 window manager written in Prolog
#39Re: Plwm – An X11 window manager written in Prolog
#40Very nice. If you’re used to dwm this should be natural. Unless you use dwm’s tags as more than workspaces, which I do. The author does not, so he implemented workspaces instead of tags. So this can not replace dwm for me.