Earlier quoted context omitted.
A protocol is like the line at Subway where an api is a bar & restaurant.
Sorry, I don’t understand this analogy
Plwm – An X11 window manager written in Prolog
51–60 of 77 posts
Re: Plwm – An X11 window manager written in Prolog
#52Does 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.
This is one of the best resources for “real” Prolog: https://www.metalevel.at/prolog His YouTube videos are also incredibly good.
Re: Plwm – An X11 window manager written in Prolog
#53Earlier quoted context omitted.
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…
> My favorite example is an X11 windows manager implementing in about 18 lines of python. Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.
Was a lot easier to understand for me than, say, dwm.
Re: Plwm – An X11 window manager written in Prolog
#54Looked at the source, it’s so compact, wow.
Re: Plwm – An X11 window manager written in Prolog
#55Earlier quoted context omitted.
> My favorite example is an X11 windows manager implementing in about 18 lines of python. Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.
Not sure about that Python project, but years ago I found this very minimal WM in a few hundred lines of C helpful: https://github.com/dylanaraps/sowm Was a lot easier to understand for me than, say, dwm.
Re: Plwm – An X11 window manager written in Prolog
#56I installed all the libs and compiled this on Gentoo, but all I'm getting is a mouse cursor on a black screen.
Re: Plwm – An X11 window manager written in Prolog
#57Earlier quoted context omitted.
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…
> My favorite example is an X11 windows manager implementing in about 18 lines of python. Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.
I had been using dwm (4000 lines of C) for many years and wished to write my own for a long time, but what made me take the leap was really steveWM [2] and TinyWM [3] which are both super small.
[1] - https://github.com/ChanderG/cellwm [2] - https://github.com/stodd1031/steveWM [3] - https://github.com/mackstann/tinywm
Re: Plwm – An X11 window manager written in Prolog
#58Earlier quoted context omitted.
> My favorite example is an X11 windows manager implementing in about 18 lines of python. Uh, do you happen to know where to find that project? Sounds pretty comprehensible for most people as an example.
I created my own X11 window manager [1] at the start of this year in around 800 lines of C. I had been using dwm (4000 lines of C) for many years and wished to write my own for a long time, but what made me take the leap was really steveWM [2] and TinyWM [3] which are both super small. [1] - https://github.com/ChanderG/cellwm [2] - https://github.com/stodd1031/steveWM [3] - https://github.com/mackstann/tinywm
Re: Plwm – An X11 window manager written in Prolog
#59is this actually using any logical prolog features, or mostly just the 'functional' subset of prolog?
on a cursory look almost all annotated predicates are either 'det' or 'semidet', and none seem to have ? argument modes, so on the surface it looks like this is mostly straight functional code.
am i missing something important?
to be sure, prolog has much to recommend it even as a non-logic functional language: great syntax with probably the most flexible grammar out of all non-research languages (e.g. prolog's operator definition facility makes the ilk of haskell's seem like a toy), homoiconicity, etc.
but at least my expectation is perhaps for prolog code to make use more of the logical facilities.