HNHacker News
TopNewBestAskShowJobs

falsissime

33 karma · joined January 8, 2020

submissionscomments
falsissime··on Prolog and Logic Programming Historical Sources Archive
There are two different notions of type here. One is determined by the abstract syntax, in this context a variable is a type, that's what you are referring to. With this type no desirable algebraic properties hold like commutativity, since atomic(T), T = a and T = a, atomic(T) differ: one says yes, the other no. As a consequence, the meaning of a program is fixed by the very precise control of Prolog, no way to change this in some context. Many consider this a central weakness of Prolog. Say, Peter Norvig: However, Prolog's depth-first control structure is just too inflexible for me. https://www.quora.com/What-do-Lisp-Haskell-programmers-think...

The other meaning of type is the pure, declarative one. Here, variables do not belong to the valid types. In that context, atomic_si/1 and the other predicates fit in. Here, commutativity (modulo errors) holds. And thus alternative search procedures may be used.

(There is a third meaning similar to the second, but it is only standard related.)

falsissime··on Prolog and Logic Programming Historical Sources Archive
(I do not agree, but let's rather take a sharper example) Consider atomic(T) and T =.. [_] or functor(T,_,0) which describe exactly the same except that atomic(T) similar to integer(T) silently fails and T =.. [_] and functor(T,_,0) produce an instantiation error.
falsissime··on Two Years with Rust
Out of curiosity: What did f 0 0 give for f _ 0 = 1; f 0 _ = 2; ?
falsissime··on Prolog and Logic Programming Historical Sources Archive
Some of your points are taken seriously! Think of purifying Prolog such that cuts and the like are (for many cases) no longer needed, yet you get comparable efficiency. See library(reif), library(pio), ...

Think about implication in propositional logic. Take two entirely unrelated propositions a and b. According to this logic either a → b or b → a is true. This, btw, cannot happen in Prolog.

falsissime··on Prolog and Logic Programming Historical Sources Archive
There are already many built-ins that behave in exactly the same manner as integer_si/1 does. Take T =.. [F|Args]. which produces an instantiation error, idem functor(T,F,1).

The nice thing when you have (such) errors is that if they do not happen you can be sure that the result is correct (in an appropriate pure subset). Without errors, you never know.

falsissime··on Prolog and Logic Programming Historical Sources Archive
Should have been EUR in place of $
falsissime··on Prolog and Logic Programming Historical Sources Archive
Right, that would be a valid answer too! Unfortunately it has very bad termination properties and is also quite inefficient when larger numbers are involved.

And yet, there is a further possibility why not say `when(nonvar(X), integer(X))`. One system tried to go that path: Mu- and Nu-Prolog. However, the practical result was that an erroneous predicate just succeeded and you got an answer with tons of constraints (at that time in that context called floundering goals). A lot of research was put into detecting such flounders, but nothing came out of this effort that is in current use.

falsissime··on Prolog and Logic Programming Historical Sources Archive
$2250 is the first year. Then $750 a year. This includes support. To my understanding, development alone without distribution falls under the personal license.
falsissime··on Prolog and Logic Programming Historical Sources Archive
https://sicstus.sics.se/order4.html

Includes an evaluation license (free) and a personal license for EUR 165.

falsissime··on Prolog and Logic Programming Historical Sources Archive
Do not forget SICStus, it´s jitter is truly excellent.
falsissime··on Warren Abstract Machine
The most difficult to understand aspect of the WAM are its put_unsafe instructions which permits WAM's incredibly simple LCO. You can only appreciate its ingenuity after you had struggled with last call optimizations in engines like the ZIP or the VAM where you need several passes over the environments.
← PreviousPage 2 of 2