José A. Alonso · @Jose_A_Alonso
864 followers · 1853 posts · Server mathstodon.xyz

Declarative reasoning on explanations using constraint logic programming. ~ Laura State, Salvatore Ruggieri, Franco Turini. arxiv.org/abs/2309.00422

#logicprogramming #prolog #clp #xai

Last updated 2 years ago

Adrián Arroyo Calle · @aarroyoc
76 followers · 67 posts · Server castilla.social

Monday fun day, because a new release is out! 0.9.2 features a more correct, faster, and more featureful system. Also now on 32-bit systems.

github.com/mthom/scryer-prolog

#scryerprolog #prolog

Last updated 2 years ago

Ténno Seremél · @tennoseremel
428 followers · 1603 posts · Server lor.sh

I guess, now I have a reason to have a Prolog interpreter in my system :blobcatgiggle:

github.com/jan-Lope/Toki_Pona-
> Toki Pona Parser - A tool for spelling, grammar check and ambiguity check of Toki Pona sentences

#lang_en #toki_pona #tokipona #prolog #languages #conlangs

Last updated 2 years ago

Pragmatic Bookshelf 📚 · @pragprog
1256 followers · 2531 posts · Server techhub.social

Programmer Passport: Prolog by Bruce Tate @redrapids

Constraint-based logic programming is the engine powering some of the most powerful algorithms in the world. has the tools you need.

pragprog.com/titles/passprol/p

#prolog

Last updated 2 years ago

Giorgio Sidari · @ideaferace
36 followers · 409 posts · Server mastodon.uno

Look a t those nice examples.
I guess is anticipating a triumphant return to the scenes.

#prolog

Last updated 2 years ago

Adrián Arroyo Calle · @aarroyoc
76 followers · 53 posts · Server castilla.social

New release of postgresql-prolog! Safer queries because the query template and the data are sent separately making injection attacks impossible. To help users with these templates, a new DSL has been done to use syntax to build simple SQL queries.

#sql #prolog #postgresql

Last updated 2 years ago

Saemon Zixel · @saemonzixel
25 followers · 117 posts · Server lor.sh

Мои заметки про Prolog.

Так случилось, что Пролог мне не удалось освоить с наскока. Во второй раз, на второй попытке я прочитал книгу про программирование на Visual Prolog. И тоже после прочтения книги ничего не смог запрограммировать на Прологе.

В третий раз, в третий попытке, я вроде начал что-то понимать. И решил поделиться своими "пониманиями".

Если сравнивать с Си, то предикаты можно воспринимать как функции. Возвращают они, правда, только всегда true или false. А результат вычислений складывают в переменную-аргумент переданный при вызове. Если вообще передали. Если не передали, то только true или false. Если передали несколько, то несколько и заполняют.

Например, функция strstr('abcde', 'b') в Си вернёт номер позиции подстроки 'b' в строке 'abcde'. В Прологе можно эту функция записать как предикат с заголовком strstr('abcde', 'b', X). Когда Пролог встретит этот предикат, то попытается найти значение неизвестной переменной Х. Если это встроенный предикат, то он просто запустит соответствующий код, который сам вычислит соответствующее значение, положит его в X и потом вернёт true. Если не удалось вычислить, то вернёт false и оставит пустым X.

В прологе можно и другие аргументы заменить неизвестными переменными. И пролог попытается их вычислить. Если это встроенный предикат, то просто запустить соответствующий код, который сам вычислит значение неизвестных аргументов (если умеет). А если невстроенный предикат, то начнёт вычислять тело предиката. Если тела нет, то будет искать по правилам все варианты значений неизвестных переменных.

Например: strstr(X, 'b', 2) - должен вернуть даже не один, а все строки, где второй символ 'b'. Откуда он возьмёт эти строки - это его забота.

А strstr('abcde', X, 2) вернёт одно значение X равное 'b'.

А strstr('abcde', X, Y) вернёт все варианты подстрок и их позиций в 'abcde'.

#prolog #lang #dev

Last updated 2 years ago

· @dcz
314 followers · 1926 posts · Server fosstodon.org

Thanks to all who listened to my newbie impressions of at ! I hope you learned something too. (The talk was recorded and will be available online.)

If you like the way I present, then see you at my on Friday :)

#prolog #cccamp23 #rust #workshop

Last updated 2 years ago

Al Sutton · @alsutton
485 followers · 1040 posts · Server snapp.social

I'm pretty sure there is no in our monorepo, but hey, builds and their clear and actionable errors.... 😂

#prolog #android

Last updated 2 years ago

Samuel Lampa · @shl
118 followers · 103 posts · Server genomic.social

This is awesome, a modern book about ! techhub.social/@pragprog/11058

#prolog

Last updated 2 years ago

Samuel Lampa · @shl
118 followers · 103 posts · Server genomic.social

New post: Will data served as language models overtake the role of semantic/linked data?
livingsystems.substack.com/p/w

#linkeddata #llm #prolog

Last updated 2 years ago

José A. Alonso · @Jose_A_Alonso
836 followers · 1711 posts · Server mathstodon.xyz

DeduccionNatural.pl: herramienta escrita en Prolog para el aprendizaje de la asignatura de Lógica. ~ Joaquín Arias, Iván Ramírez, Alessandra Gallinari. aenui.org/actas/pdf/JENUI_2023

#logic #logicprogramming #prolog

Last updated 2 years ago

José A. Alonso · @Jose_A_Alonso
832 followers · 1700 posts · Server mathstodon.xyz
Life is Tetris · @tetrislife
42 followers · 1417 posts · Server qoto.org

@lispi314 @natty also , where the program state can effectively be dealt with as "just" a cache of computations that gets refreshed on every program start.

That is ignoring the gnarly bits like external state that no environment has a chance of getting right.

Also , the other extreme where you can design for not letting the system go down at all.

#prolog #erlang

Last updated 2 years ago

Felix · @leobm
269 followers · 4017 posts · Server norden.social

Lisprolog - Interpreter (compiler) for a simple , written in

metalevel.at/lisprolog/

#lisp #prolog

Last updated 2 years ago

adamcrussell · @adamcrussell
63 followers · 130 posts · Server mastodon.sdf.org

I tried something in recently, I used a Stream to read from a list of character codes (i.e. a double quoted string in GNU Prolog, among others). I am not sure how commonly others might do this but this was not something I've had a need to do enough to remember if I've ever done it before.

This is a pretty simple, but illustrative, example of taking in a double quoted string and decomposing it into a list of atoms.

rabbitfarm.com/cgi-bin/blosxom

#prolog

Last updated 2 years ago

Adrián Arroyo Calle · @aarroyoc
71 followers · 8 posts · Server castilla.social

Hello! I'm Adrián Arroyo Calle and I just switched instance to castilla.social (instance I'm going to manage myself).

I live in Valladolid and I work as a developer for Telefónica.

My hobbies are:

💻 Programming (, , , )
🗺️ Maps
🚲 Bike routes
📕 History
🏎️ Motorsport
🎮 Videogames
🤿 Diving

I usually write larger things on my blog (Spanish, blog.adrianistan.eu), but for shorter stuff I really like Mastodon. See you!

#presentation #prolog #emacs #kotlin #rust

Last updated 2 years ago

Adrián Arroyo Calle · @aarroyoc
71 followers · 8 posts · Server castilla.social

¡Hola! Soy Adrián Arroyo Calle y acabo de cambiar de nodo a castilla.social (nodo que voy a administrar yo).

Vivo en Valladolid y trabajo como desarrollador en Telefónica.

Mis aficiones son:

💻 Programación (, , , )
🗺️ Mapas
🚲 Salir en bici
📕 Historia
🏎️ Deportes de motor
🎮 Videojuegos
🤿 Buceo

Cuando escribo algo largo suelo ponerlo en mi blog, blog.adrianistan.eu pero para cosas cortas me encanta usar Mastodon. ¡Saludos!

#presentacion #prolog #emacs #kotlin #rust

Last updated 2 years ago

Luke Miller · @upmultimedia
138 followers · 475 posts · Server mastodon.gamedev.place

Just found there's some folk on masto. I love that language so much. Hashtag subscribed!

I'm probably the only person to have a game on steam (partially) written in prolog. Even though I did that I still don't understand it. But it is perfect for murder mysteries.

Pretty amazing that a language 50 years old still has a few tricks up its sleeve.

#prolog

Last updated 2 years ago

Alecu Ștefan-Iulian :verified: · @alecui
98 followers · 728 posts · Server qoto.org

Number four: . Not as much hate as Perl gets, but a lot of misconceptions that I want to clear up for people who might hear about this for the first time:

  1. Tcl != Tk. Although they’re released together nowadays, Tk is a standalone cross-platform widget toolkit. That’s where the Tk in Tkinter comes from. There are several bindings for Tk: Ada (TASH), Python (the aforementioned Tkinter), Perl (Tcl::Tk, Tkx and Perl/Tk if you want native Perl access to Tk structures), Lua (tclua and ltcltk), Haskell (HTk), Ruby, Scheme, Ksh (through dtksh), R (tcltk) and probably many others. The Python bindings even use Tcl as a bridge to Tk, same with Tcl::Tk and Tkx from Perl).

  2. “Tk looks bad”. While it used to look like Motif on Unices, now it has (for quite some time) a native look and feel + theming support. Tkinter people sure don’t complain and probably neither do you realistically speaking.

  3. “Tcl is a toy language”. On the contrary, it’s really powerful with the syntax it has (that and its syntax is defined by the Dekalogue, only 12 rules). In a way, it’s like Lisp and Forth (two of my crushes). I even tried a Forth-esque DSL in Tcl… and I could actually do it. I can implement if I wish try/catch, for..in, exceptions, classes, I can model it to my liking. This argument is genuinely more petty than even “Lisp has too many parentheses”. Additionally, it isn’t complex, which is a good thing (you can actually understand the whole language, implementation included). You can even redefine anything in Tcl using rename or have access to the Tcl interpreter using eval, uplevel and upvar for some metaprogramming if you so wish.

  4. “Tcl has no types”. Yes, if you want to be strict about it, it only has strings (although that’s like saying that Lisp only has lists). You don’t need to perform conversions, however you aren’t likely to introduce bugs because the checks on the format of the strings are very strict. It’s a bit like Postel’s law: “be conservative in what you send, be liberal in what you accept”, but in reverse I think. Even better, you don’t need serialization because everything is a string already. You can even do stuff like sending a list through a TCP socket through puts $socket $mylist and on the other side set mylist [read $socket], it’s that easy. The central data structure is the list, not the string, and any Lisp programmers knows the implications of that.

  5. “Tcl is slow”. This shares the same sentiment as in the Perl argument. Of course it isn’t gonna be a power house for sure in the runtime department, but it sure is quick to develop in. Heck, once you have some commands going on, you can start writing executable files that look like configuration (if you really tried, you could surely replicate syntax for example).

Besides that, there are a couple of other nice things about Tcl:

  • you can have multiple paradigms: since the language is so flexible, you can add , programming, even throw some arrays for good measure (I have seen a code snippet somewhere in the Tcler’s wiki of someone doing vector arithmetic using just raw Tcl and some elbow grease).
  • because code in Tcl is first class, it’s very simple to write functional language primitives that play well with the logic of the language (for examplem with stock Tcl you can do lmap i {1 2 3 4 5} { expr $i*$i} which prints 1 4 9 16 25.
  • the Tcl source code is (in my humble opinion) one of the best written C programs you’ll find (please, look at it for yourself), the quality of the interpreter is amazing. It works exactly the same in different environment, including Tk).
  • in a way, considering how it’s written, you can kinda think about it as an accessible Lisp with square brackets (it essentially works on the same sort of notation without the s-expr part).
  • easy shelling? check. easily embeddable? check. easy sandboxable? check. reasonably rich standard library - check. high level abstractions - check. you can find all of these and more in Tcl. ;)
  • Erlang’s author said in a tweet (web.archive.org/web/2019032511):
    “You know - TCL/TK8.6 is insanely great.

I stopped using TCL/wish in about 2004 - this was a BIG
mistake - I can now build GUIs in described by pure text.
Nothing is hidden it’s all text - I just need emacs and make.

Why oh why did I ever even click on a button to start Xcode”

The only people that are mad about Tcl/Tk at this point are RMS (because he’s still butthurt that failed in face of Tcl and not even Emacs adopted, only Guix (Guile is good though), he even went so far as to call John Ousterhout a “parasite” (ironic coming from him, huh?)), MAYBE Larry Wall and people who didn’t bother checking up Tk (or looking at Tcl ever). And with that (for today, I think) I am done, although I could touch up on , , , , , … Even . These languages deserve some love too, even though they aren’t particularly used. I truly believe that Tcl should become a more popular language, for me it was love at first sight (I like it so much that this is the language I chose to implement for my bachelor’s thesis on a Raspberry Pi Pico). Long live Tcl.

#tcl #guile #php #ada #cobol #smalltalk #tcltk #nginx #oop #functionalprogramming #fp #forth #fortran #ml #prolog

Last updated 2 years ago