Showcase: Creating a photo gallery with Scryer Prolog #1055
Replies: 2 comments
-
Really love it and it is very good to bring Prolog in the context of TimBL's https://www.w3.org/DesignIssues/ |
Beta Was this translation helpful? Give feedback.
-
Finally got to watch the video! And as always much deeper than expected from the initial title. Now, the HTML part is interesting since I'm developing Teruel 😅. I knew that approach existed since SWI also has a DCG for doing that (and very flexible indeed). I think that this approach is good but I found out while using it in SWI that most of the time, the HTML part is very static and just fits better to do in HTML since it's the language we're outputting, only small parts are dynamic. Also, I think it would be a better approach for teams (frontend devs) and for copy/pasting, which is useful! That's why I decided to go with the opposite approach of adding a layer in HTML (well it could also work for CSS and JS and X since it's not HTML specific). But I agree the DCG approach is very elegant. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have uploaded a short video that illustrates the use of Scryer Prolog for a simple scripting task, namely Creating a photo gallery:
https://www.metalevel.at/prolog/videos/photo_gallery
It is especially notable how conveniently DCGs can be used in Scryer Prolog to declaratively describe output, recognize file names etc., mostly due to its consistent use of lists of characters to represent data we want to analyze and reason about.
Enjoy!
Beta Was this translation helpful? Give feedback.
All reactions