Does 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.
anal_reactor · 44m ago
I played with Prolog just a little long time ago, and I can't shake off the feeling that Prolog is basically a prank that went too far to be stopped. It requires a way of thinking that is compatible with neither how computers work, nor how maths works.
actionfromafar · 17m ago
But it sort of is maths.
eikenberry · 2h ago
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.
pyinstallwoes · 1h ago
I wish more things were protocols instead of APIs.
linux2647 · 1h ago
Could you explain the difference?
packetlost · 10m ago
They're both poorly defined, but what I think GP meant is they want something that you use something like a socket instead of FFI to interface with. You need an extra data description layer for a 'protocol' in this context because you can't rely on something like the C data model and calling convention as a given.
spicybright · 1h ago
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 with existing code.
neuroelectron · 40m ago
A protocol is like the line at Subway where an api is a bar & restaurant.
smikhanov · 1h ago
Looked at the source, it’s so compact, wow.
echelon · 54m ago
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!
B1FF_PSUVM · 3h ago
Why am I reminded of the all-Erlang HN first page?
pona-a · 3h ago
Fun fact: the first version of Erlang interpreter was written in Prolog.
There was also a virtual large scrolling desktop, and virtual multi-screen "rooms", both purely written in PostScript, which all plugged together with the tabbed windows and pie menus and X window manager seamlessly. They were all independent of each other and could be used separately, but worked together synergistically. Take that, ICCCM! ;)
Also here's a (pre-ICCCM, pre-X11) X10 window manager with pie menus, written in C and scripted in Forth, from around 1986:
>In summary, ICCCM is a technological disaster: a toxic waste dump of broken protocols, backward compatibility nightmares, complex nonsolutions to obsolete nonproblems, a twisted mass of scabs and scar tissue intended to cover up the moral and intellectual depravity of the industry’s standard naked emperor.
>Using these toolkits is like trying to make a bookshelf out of mashed potatoes." -Jamie Zawinski
agumonkey · 1h ago
First time I ever get the chance to see object postcript/forth, thank you
leephillips · 4h ago
Very 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.
rclkrtrzckr · 3h ago
Isn't ".pl" actually used for perl?
Well, there might be a Prolog interpreter written in (a) perl (regex) ...
ajdude · 3h ago
Prolog was using .pl for a bit over a decade before Perl existed.
tikhonj · 2h ago
It's used for both which consistently confuses logic that guess programming language purely based on file extensions.
jimjimjim · 3h ago
Prolog is a older than Perl and there doesn't need to be any exclusive claim on file extensions.
Prolog seems interesting, but any time I tried to do anything more than toy examples on my own, I got infinite recursion, unsolvable problems.
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 with existing code.
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!
Lots of documentation! Awesome!
https://wingolog.org/archives/2008/07/31/introducing-griddy
There was also "GWM", based on its own lisp dialect, "WOOL", which was around from at least the early 90s.
On the more popular side, you had sawfish (using an elisp-alike, IIRC) and stumpwm (Common Lisp).
There might also be ones in other Schemes, but as FFI hasn't been standardised across Schemes yet I doubt there's an implementation-agnostic one.
https://donhopkins.com/home/archive/NeWS/owm.ps.txt
And some design notes and emails on that NeWS based window manager for X11 windows:
https://donhopkins.com/home/archive/NeWS/i39l.txt
It incorporated NeWS tabbed windows written in PostScript, which could wrap around X11 windows (and frame NeWS windows too of course):
https://donhopkins.com/home/archive/NeWS/win/tab.ps
And NeWS pie menus written in PostScript, which you could pop up on tabbed window frames and manage X11 windows (and use in NeWS apps too of course):
https://donhopkins.com/home/archive/NeWS/win/pie.ps
There was also a virtual large scrolling desktop, and virtual multi-screen "rooms", both purely written in PostScript, which all plugged together with the tabbed windows and pie menus and X window manager seamlessly. They were all independent of each other and could be used separately, but worked together synergistically. Take that, ICCCM! ;)
Also here's a (pre-ICCCM, pre-X11) X10 window manager with pie menus, written in C and scripted in Forth, from around 1986:
https://donhopkins.com/home/archive/piemenu/uwm/fuwm-main.f
And some of my thoughts on X-Windows and ICCCM window management in general:
https://donhopkins.medium.com/the-x-windows-disaster-128d398...
>In summary, ICCCM is a technological disaster: a toxic waste dump of broken protocols, backward compatibility nightmares, complex nonsolutions to obsolete nonproblems, a twisted mass of scabs and scar tissue intended to cover up the moral and intellectual depravity of the industry’s standard naked emperor.
>Using these toolkits is like trying to make a bookshelf out of mashed potatoes." -Jamie Zawinski
Well, there might be a Prolog interpreter written in (a) perl (regex) ...