Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tiobe Index: Prolog to Become Most Popular Langugage

259 views
Skip to first unread message

burs...@gmail.com

unread,
Apr 1, 2017, 4:59:51 PM4/1/17
to
A recent analysis shows that Prolog seems to
become most popular language in the future. Among
the current top contenders are Java, Python, ...

But they are drastically loosing turf as Edward J.
Goodwin from the software institute in New Albany,
Indiana told. Another commenter involved with machine
lerning told us, we run all our prediction models

and it seems pretty clear that Prolog will be the
raising star in the next 6-18 Months. Meanwhile
GitHub has announced it might default the extension
.p to Prolog in the future. Many schools started

buying the Art of Prolog books, which is currently
out of stock at Amazon. A definitive explanation for
this surge of Prolog has not yet been found. Professor
Sally Popcorn from the Applehart University for Lingustics

and Philosophy said, we speculate that the programming
language has a genetic advantage in that it provides
the logical variable. A concept that was more than
2000 years ago introduced by Aristoteles.

She cited various studies that showed that logical
variables have clearer semantics, support unicode,
dont need a preprocessor, have a parser friendly syntax
and are less prone to segmentation faults.

https://www.tiobe.com/tiobe-index/

kint...@gmail.com

unread,
Apr 3, 2017, 2:57:51 PM4/3/17
to
Ha ha , funny stuff .

"it seems pretty clear that Prolog will be the raising star in the next 6-18 Months."

~~~
I think the reason for this phenomena is in the recent drastic upsurge in reader-friendly material that presents Prolog in such a manner as to appeal to the imperativ program with a gradual introduction to non-imperativ features .

Statistics obtained from analysis of recently created Prolog example code reveals :

- a 21.4% increase in the use of comprehensible and descriptive VARIABLE names

- a 612.23% reduction in the use of the '!' cut operator

- widespread (93%) adoptation of the `|` operator as the long-circuit `or` in accordance with it's nearly universal meaning in computer programming , allowing for the reinterpretation within Prolog of the ';' in accordance with the expectations of an imperativ programmer .

- growing (64%) realization amongst Prolog programmers that more `(` and `)` , though optional , might be helpful .

- increasing (47%) occurrence of stackoverflow answers that begin with the lines :

:- use_module(library(clpfd)) .
:- op(10'1,'fy','once') .
:- op(10'1,'yfx','forall') .

- a 100% reduction in the use of the phrase "I leave the rest for you to solve as a simple exercise" .

- etc ?

~~kintalken~~
~~~
~~~

Mostowski Collapse

unread,
Feb 8, 2021, 6:49:42 AM2/8/21
to
Who had parents that were reading The Emperor's New Clothes
to you as a child? Nobody? Well most of the time the programming
languages marketing psychology works by the following equation:

pattern matching = one sided unification

Which somehow implies that pattern matching is somehow
the more controlled and better Prolog. Even seasoned Prologers
might fall for this marketing psychology. But the sad truth for
functional programming languages is only:

pattern matching = no logical variables

Mostowski Collapse

unread,
Feb 8, 2021, 6:53:19 AM2/8/21
to
But can we give prove/evidence for the equation pattern
matching = no logical variables. Can we articulate what
we mean by that? Or are we overwhelmed by the marketing

hype and simply silenced? Lets repeat. Maybe most of the
marketing pitch confusion stems from the fact that functional
programming languages are identified with one sided unification

and logic programming with two sided unification. Even Haskell
uses this marketing pitch:

Here is what A gentle Introduction to Haskell says about it:

Pattern matching in Haskell is different from that found in logic
programming languages such as Prolog; in particular, it can be
viewed as “one-way” matching, whereas Prolog allows “two-way”
matching (via unification), along with implicit backtracking in
its evaluation mechanism.

But there is more to it. Namely there are more differences between
functional programming languages and logic programming languages,
which basically prevent a realization of functional programming
languages via subsumes_term/2 only.

Mostowski Collapse

unread,
Feb 8, 2021, 6:56:58 AM2/8/21
to
Here is a quick sketch of a catalogue:

1) No Logical Variables:
It is not only that logical variables from logic programming
languages are more flexible in that they provide two sided unification,
they also are objects in itself which might transpire from within a
rule to within some output. Something that functional programming
languages cannot do, and a language that has mixed subsumes_term/2
and (=)/2 cannot prevent.

Check this Picat code:

fresh(X) => X=_.

And then these Picat queries:

Picat> fresh(X).
yes
Picat> fresh(X), fresh(Y), X==Y.
no

2) Datatypes with Equality:
Further functional programming languages see (=)/2 totally different
than logic programming languages. The notion of a linear pattern is well
established in functional programming languages. And non-linear patterns
are resolved with (==)/2 instead of (=)/2. And the (==)/2 is only needed for
ground terms, since there are no logical variables in functional programming.

See also:

Example forbidden code (which I would like to be able to write):

isWaiting x (Push x y p) = True
....

The same logic, but working variant:

isWaiting x (Push z y p) = if x == z then True

Why do Haskell patterns have to be linear?
https://stackoverflow.com/q/56002197/502187

3) Return Values
We do not find the use of (=)/2 in functional programming languages
to return a value in some argument. Since functional programming
languages do not have logical variables we cannot return something in
an argument. But functional programming languages are programming
units are functions, and we can return function values or use a tuple
result for multiple simultaneously values.

4) Let
We do not find the use of (=)/2 in functional programming languages
to assign some local value. Since functional programming languages
do not have logical variables, the idiom of using (=)/2 to have a local
variable H and give it some value H = ... has no equivalent. The let construct
in functional programming languages has a totally different pedigree. It
mainly comes from lambda calculus, and H=E;S is a shorthand for (λH.S)E.

Mostowski Collapse

unread,
Feb 8, 2021, 10:26:29 AM2/8/21
to
That Haskell doesn’t have logical variables is best explained by the Slogan:

patterns in Haskell are not first class

You find the slogan here:

Why It’s Nice to be Quoted: Quasiquoting for Haskell
https://www.cs.tufts.edu/comp/150FP/archive/geoff-mainland/quasiquoting.pdf

You find also explanations in the paper why this is so,
and solutions to lift certain limitations, such as Template Haskell,
which provides compile-time metaprogramming facilities.

https://wiki.haskell.org/Template_Haskell

Mostowski Collapse

unread,
Feb 8, 2021, 11:53:42 AM2/8/21
to
But what would be bliss, is to have code that doesn’t emit an
instantiation error for attributed variables. There is still something
wrong with this code. It is somehow suggested by Richard O’Keefes

material that introduces the instantiation error for so called unbounded
predicates. But if the logical variable is also an attributed variable,
it is not really anymore unbounded. So there is kind of an inconsistency

in Picat. Its quite strange that Picat has delayed evaluation and
attributed variables, but through its subsumes_term/2 semantics
basically arrives at a semantics that has an extra first clause error.

This runs counter to Haskell lazy expressions:

sumlist(X, _, _) :- var(X), %%% lazy expression viewpoint
throw(error(instantiation_error,_)). %%% Picat error doubtful
sumlist([], Sum0, Sum) :- !,
Sum = Sum0.
sumlist([H|T], Sum0, Sum) :- !,
Sum1 is Sum0+H,
sumlist(T, Sum1, Sum).
sumlist(X, _, _) :-
throw(error(type_error(list,X),_)).

The analogue in Haskell would be its lazy expressions. Typically
pattern matching in Haskell causes lazy expressions to be evaluated,
so that the matching can be decided.

Mostowski Collapse

unread,
Feb 9, 2021, 7:24:49 AM2/9/21
to
Woa! Excel going functional programming with lambdas and let:

To illustrate the power of LAMBDA, here’s a function written using the
notation to compute the length of the hypotenuse of a right-angled triangle:

=LAMBDA( X, Y, SQRT( X*X+Y*Y ) )

LAMBDA complements the March 2020 release of LET, which allows us
to structure the same example like this:

=LAMBDA( X, Y, LET( XS, X*X, YS, Y*Y, SQRT( XS+YS ) ) )

LAMBDA: The ultimate Excel worksheet function
Published January 25, 2021
https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/

LoL

Mostowski Collapse

unread,
Feb 9, 2021, 7:29:46 AM2/9/21
to
A harsh wind is blowing into the face of Prolog now…

Mostowski Collapse

unread,
Feb 9, 2021, 8:17:25 AM2/9/21
to
Tim Finin was fast, he tweeted already on 27.02:
https://twitter.com/timFinin/status/1354435931571441669

But now that Microsoft is drumming about it:
https://twitter.com/LambdaDays/status/1358778701945667584

I guess we all know how 2021 will look like?
Excel Lambda all over the place?

Mostowski Collapse

unread,
Feb 9, 2021, 8:18:36 AM2/9/21
to
Corr.:
Tim Finin was fast, he tweeted already on 27.01.2021

Mostowski Collapse

unread,
Feb 23, 2021, 4:13:55 AM2/23/21
to
Here is a little challenge for all Prolog and Datalog afficiandos. Why is
there a proliferation of DatalogXXX for functional and/or imperative
programming languages? What does the TIOBE index say

about logical variables?

https://en.wikipedia.org/wiki/Datalog#Systems_implementing_Datalog

Whereas Prolog does not really need that for hierarchical Datalog? Here
is the challenge, assume we have datalog facts P, datalog rules P :- Q
and a datalog query ?- R. Now we rewrite the facts and rules into

single sided unfication:

P => true.
P => Q.

Would a query ?- R still work?

Mostowski Collapse

unread,
Feb 23, 2021, 4:15:14 AM2/23/21
to
The answer is negative. A direct translation to single sided unfication
already doesn’t work for the simplest of Datalog facts and query:

p(a).

?- p(X).
X = a

If we take a Prolog fact P as P :- true, rewrite the fact via (=>)/2 into
P => true. The thingy doesn’t work anymore, demonstrated
with SWI-Prolog 8.3.19:

p(a) => true.

?- p(X).
ERROR: No rule matches p(_2556)

Even Picat was bugged by this problem, and had initially special
processing for facts. The recent release v3 of Picat even
reintroduced Horn clauses.

Mild Shock

unread,
Oct 13, 2023, 6:55:59 AM10/13/23
to
How it started:

Wirth Interview: Java and C# will break on their own weight
Elena Trichina for the ACM on 13 March, 2018 in Zürich, Switzerland
https://www.youtube.com/watch?v=DRkfqiF46MQ

How its going:

October Headline: C# is getting closer to Java
TIOBE Index for October 2023
https://www.tiobe.com/tiobe-index/

LoL

Mild Shock

unread,
Oct 13, 2023, 7:01:01 AM10/13/23
to

Now I have to recover from a little burn out, caused
by making the Dogelog Player for Java version.
But this version opens a new door, since all that was

done was adding types to the JavaScript version, so
every let variable declaration was replaced by type variable
declaration and so on. But if I am lucky, and if I can

recover and find a nice development environment,
one could do a C# target for Dogelog Player, and even
run Dogelog Player inside some Unity 2D/3D Game

whatever. Doing the C# target is some annonying
monkey work, doesn't need much brain, just translate the
Java into C#. But one has to find the motivation and

resources to do such monkey work. But its definitively
on the to do list, to turn the 3 Amigos (JavaScript, Python
and Java) into 4 Amigos (JavaScript, Python, Java and C#).

Mild Shock

unread,
Oct 13, 2023, 9:25:40 PM10/13/23
to

Microsoft is so lucky right now, not only C#
has momentum, they can also say Candy Crush
Saga is now their own! LoL

Microsoft’s $69 billion Activision Blizzard takeover approved
https://www.youtube.com/watch?v=6HnkwC4TelM

Mild Shock

unread,
Oct 17, 2023, 5:24:05 PM10/17/23
to
People are flocking to C#
Even the Dutch Governement is using it:

private static string GetPercentageRounds(double percentage)
{
if (percentage == 0)
return "⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪";
if (percentage > 0.0 && percentage <= 0.1)
return "🔵⚪⚪⚪⚪⚪⚪⚪⚪⚪";
if (percentage > 0.1 && percentage <= 0.2)
return "🔵🔵⚪⚪⚪⚪⚪⚪⚪⚪";
if (percentage > 0.2 && percentage <= 0.3)
return "🔵🔵🔵⚪⚪⚪⚪⚪⚪⚪";
if (percentage > 0.3 && percentage <= 0.4)
return "🔵🔵🔵🔵⚪⚪⚪⚪⚪⚪";
if (percentage > 0.4 && percentage <= 0.5)
return "🔵🔵🔵🔵🔵⚪⚪⚪⚪⚪";
if (percentage > 0.5 && percentage <= 0.6)
return "🔵🔵🔵🔵🔵🔵⚪⚪⚪⚪";
if (percentage > 0.6 && percentage <= 0.7)
return "🔵🔵🔵🔵🔵🔵🔵⚪⚪⚪";
if (percentage > 0.7 && percentage <= 0.8)
return "🔵🔵🔵🔵🔵🔵🔵🔵⚪⚪";
if (percentage > 0.8 && percentage <= 0.9)
return "🔵🔵🔵🔵🔵🔵🔵🔵🔵⚪";

return "🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵";
}


https://github.com/MinBZK/woo-besluit-broncode-digid-app/blob/ad2737c4a039d5ca76633b81e9d4f3f9370549e4/Source/DigiD.iOS/Services/NFCService.cs#L182

By way of:
https://twitter.com/JeroenFrijters/status/1615204074588180481

LoL

Mild Shock

unread,
Oct 18, 2023, 11:22:55 AM10/18/23
to
Meanwhile Racket:

#lang yaml-exp racket/base
- define:
- fibbi: [x]
- if:
- <=:
- x
- 1
- x
- +:
- fibbi:
- -:
- x
- 1
- fibbi:
- -:
- x
- 2
- displayln:
- fibbi: [10]
https://racket.discourse.group/t/yaml-exp-write-s-expressions-in-yaml/2398

By way of:
https://twitter.com/samth/status/1714478992017756355

LoL

Mild Shock schrieb:

Mild Shock

unread,
Oct 18, 2023, 7:10:29 PM10/18/23
to
Just in case this gets censored. I am already
censored on comp.lang.python. But currently
various programming languages just make my day,

first C#, then racket, now python, its infinite LoL:

symbolic link python script Windows versus Linux
https://github.com/python/cpython/issues/110896#issuecomment-1769528819

I don't have a Python discourse account, but I
am happy that you discuss the problem elsewhere,
might take a couple of years until the issue has been
elaborated enough including vanity satisfaction,
so closing this ticket right now.

Maybe I am advocating a more straight engineering
approach, and this shows that I am not a Pythonista.
Could be the merrit of Python that it cherishes a
different discussion culture, that then results in
PEPs that don't leave an open questions at all.

Go, go, Python, you are doing good!

P.S.: Or translated: Was thinking there is already a
push underway, fixing the issue, didn't expect a
coffee party.

Mild Shock schrieb:

Mild Shock

unread,
Oct 18, 2023, 9:22:39 PM10/18/23
to
The discrepancy between Windows and Linux can be located:

On Windows:

if (GetFullPathNameW(path0,
Py_ARRAY_LENGTH(fullpath),
fullpath,
&ptemp)) {

https://github.com/python/cpython/blob/main/Python/pathconfig.c#L452

On Linux:

nr = _Py_wreadlink(path0, link, Py_ARRAY_LENGTH(link));

https://github.com/python/cpython/blob/main/Python/pathconfig.c#L413

Unfortunately GetFullPathNameW() doesn’t compute a real path,
it only computes a cannonical path. And I am afraid, I cannot suggest a
replacement for GetFullPathNameW(), maybe something with

GetFinalPathNameByHandleW()? But now that I have inspected
the source code, I have also doubts about the linux solutions.
Could it be that the linux solutions doesn’t normalize the path?

Might give a different result from the Python os.path.realpath?

Mild Shock

unread,
Oct 18, 2023, 9:23:15 PM10/18/23
to

Wouldn’t it be possible to write such launcher stuff in Python itself.
Leading to less code and more uniform semantics? Or is there
a chicken egg problem? Just currious.

Mild Shock

unread,
Oct 27, 2023, 5:25:41 PM10/27/23
to
Its 2023 now, and we have ChatGPT, nevertheless some software
still behaves as if the transitor was invented 24 hours ago. Currently
there is a kind of “inconsistency”, since in the top-level I can do:

/* SWI-Prolog 9.1.17, Windows */
?- ensure_loaded('<dir>\\foo\\bar').
true.
But when I use the command line it doesn’t work:

>swipl.exe <dir>\\foo\\bar
ERROR: Prolog initialisation failed:
ERROR: file `'<dir>//foo//bar'' does not exist

Mild Shock

unread,
Oct 27, 2023, 5:28:16 PM10/27/23
to

Also Python couldn't resolve its symlink issue yet. They
use some fugly #ifdef hell C code that nobody understands
anymore on first sight, even not Python core developers, not to
mention that nobody is able to maintain it.

As a result they have a totally messed up launcher, inconsistent
between Linux and Windows. On the other hand for example in
Dogelog player, since it wants to be 100% Prolog, the launcher is
written in Prolog itself. It is written with the assumption that it
has a full Prolog core available:

% sys_launch
sys_launch :-
current_prolog_flag(argv, L),
sys_launch(L).

% sys_launch(+List)
sys_launch([]) :- % no input script, launch top-level
sys_banner,
sys_toplevel.
sys_launch([H|T]) :- % input script, run it and exit
set_prolog_flag(argv, T),
ensure_loaded(H).

Mild Shock

unread,
Oct 27, 2023, 5:30:11 PM10/27/23
to

But having a 100% Prolog written launcher could be
indeed tricky. There might be some chicken egg
problems involved. The approach in Dogelog player
is cross compilation of the launcher into the system.
So you can have any sort of launcher, complex or simple.

For example formerly Jekejeke Prolog has a little bit
more complicated launcher since it has some Prolog
option processing, and it has a hard time to detect whether
an ansi colorable console is connected, so it switches
to coloring when it does the top-level.

Mild Shock

unread,
Dec 21, 2023, 10:47:32 AM12/21/23
to
Dynamic programming can be so much fun. Especially with Prolog!

The Wikipedia page mentions Dijsktras shortest path as a dynamic
programming problem. I am not yet 100% sure, dynamic programming
is not known to also deal with looping problems?

Just for fun, what one finds also on the Wikipedia page about
dynamic programming. The Wikipedia page doesn’t really give the
below solution, but it is what it is, fibonacci with mode directed

tabling as a dynamic programming problem:

:- table fib(_, sum).
fib(0, 1).
fib(1, 1).
fib(N, X) :- N > 1, M is N-2, fib(M, X).
fib(N, X) :- N > 1, M is N-1, fib(M, X).

Doesn’t loop anyway, seems to work fine:

/* SWI-Prolog 9.1.21 */
?- fib(99, X).
X = 354224848179261915075.



Mild Shock

unread,
Dec 25, 2023, 11:18:18 AM12/25/23
to
Rule 50 draws a christmas tree for you:

Step 0: .....S.....
Step 1: ....O.O....
Step 2: ...O.O.O...
Step 4: ..O.O.O.O..
Step 5: .O.O.O.O.O.
Etc...

Wishing you a peaceful and pleasant time!

P.S.: Got some time on your hands for procrastination? Try this:

https://adventofcode.com/2023/day/21

Trehnop

unread,
Dec 28, 2023, 7:21:56 AM12/28/23
to

Mild Shock

unread,
Jan 5, 2024, 5:59:47 PMJan 5
to

Mild Shock

unread,
Jan 6, 2024, 1:29:44 AMJan 6
to
Everybody loved him. And thats a solid joke:

"Because Europeans pronounce his name properly,
while Americans pronounce it as "nickel's worth", he is
called by name in Europe and called by value in America."

Maybe even recited by himself from time to time?

Mild Shock schrieb:

Mild Shock

unread,
Jan 6, 2024, 1:45:50 AMJan 6
to

Ok, interesting, he would have made it into age 90 on 15. February
https://dev.to/anogneva/day-when-skynet-becomes-self-aware-and-69-reasons-to-chill-out-with-colleagues-part-1-h5h

January 1 — Brian Kernighan's Birthday
January 10 — Donald Ervin Knuth's Birthday
January 14 — Nathaniel Rochester's Birthday
January 31 — Guido van Rossum's Birthday
February 4 — Ken Thompson's Birthday
February 15 — Niklaus Wirth's Birthday
February 22 — Thomas E. Kurtz's Birthday
February 24 — Steve Jobs' Birthday

Mild Shock schrieb:
0 new messages