Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
triska
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
58 ms
·
481.
▲
by
triska
8y ago
Regarding your last sentence: Yes, I can confirm that this has happened, to a reasonable extent of "learned" in the sense that people went on to write programs using this material. However, I do not know how common this is, since
482.
▲
by
triska
8y ago
Thank you, this sounds like a wonderful addition! In general, the AI chapter is what I am currently working on most. I mean not "only" on the actual content, but on the applications I want to present in this chapter. Anton Kochkov
483.
▲
by
triska
8y ago
I can confirm this impression. In my opinion, there are several reasons for this: First, many types of mistakes that are common when working with lower-level languages cannot occur at all when you use a declarative language. For example,
484.
▲
by
triska
8y ago
Thank you for sharing this, I really appreciate you participating in this thread and this awesome anecdote! One related workplace anecdote that a former fellow student told me: He was working on a rule-based medical recommender system, and
485.
▲
by
triska
8y ago
I once asked my Prolog instructor why this all takes so long. His reply: "How well are you prepared for the next ISO meeting?" At that point, I realized that if you prepare yourself in earnest for, say, the standardization process
486.
▲
by
triska
8y ago
Thank you for the kind words! Regarding companies that use Prolog, here are a few examples: A third of all airline traffic is handled by systems that run SICStus Prolog: https://www.sics.se/projects/sicstus-prolog-leadi
487.
▲
by
triska
8y ago
Thank you very much for the publicity, I greatly appreciate it! This book has been discussed on HN about one year ago: https://news.ycombinator.com/item?id=14045987 Since then, I have added the following new chapters: Pro
488.
▲
DES: Datalog Educational System
(des.sourceforge.net)
1 points
by
triska
8y ago
|
0 comments
489.
▲
by
triska
8y ago
For linear undo and undo branches, undo-tree.el is required: https://www.emacswiki.org/emacs/UndoTree Regarding "_", you can set up Emacs to treat _ as word constituent by modifying the syntax table . For
490.
▲
by
triska
8y ago
In Prolog, there is a neat technique that lets you "comment out" any goal of a clause, including the last one, in a completely uniform way. The trick is to define * as a prefix operator, and then define the predicate ( * )/1
491.
▲
by
triska
8y ago
Yes, such implementation differences definitely exist! Whether one emphasizes the differences or commonalities of Prolog and Datalog may also depend on commercial interests: For vendors of Datalog systems, it may be advantageous to stress t
492.
▲
by
triska
8y ago
Prolog and Datalog also have a lot in common: In addition to Datalog being a syntactic subset of Prolog, the semantics of Prolog and Datalog, and hence the solutions you obtain, are also identical if you enable SLG resolution in your Prol
493.
▲
by
triska
8y ago
Datalog is a declarative database query language with roots in logic programming. Even more holds: Datalog is a syntactic subset of the logic programming language Prolog! However, this page does not use Datalog syntax, but "edn"
494.
▲
by
triska
8y ago
Nice! It's always good to see Datalog in action. In my experience, Datalog is often more convenient and more readable than SQL. As the post mentions, the current ergonomics (" a wall of definitions ") are indeed the main shor
495.
▲
by
triska
8y ago
I often use the declarative programming language Prolog to solve dynamic programming tasks, because it is easy to type and helps you to declaratively express what a solution looks like. After you have expressed what must be the case in a so
496.
▲
by
triska
8y ago
There is a bit more to it though: When a vendor declares compliance to a standard and fails to implement it correctly, then the vendor can be held accountable, and a customer is in a much better position to negotiate a correction. For this
497.
▲
by
triska
8y ago
Regarding the following quote from the article: " A statement either does hold (it has value 1, with some probability p) or it does not (it has value 0, with some probability 1-p; the Law of the Excluded Middle means that there is no p
498.
▲
by
triska
8y ago
Prolog is also like this: ?- x is -4 mod 2. X = 0. ?- X is -8 mod 2. X = 0. ?- X is -9 mod 2. X = 1. Using declarative integer arithmetic, we can even express very generally that a number X is a multiple of 2
499.
▲
by
triska
8y ago
Yes, this is the book from the course's page: http://www.math.cmu.edu/~jmackey/151_128/infdes.pdf This definitely has some aspects of formal logic in it and contains a few definitions about proofs, theorems e
500.
▲
by
triska
8y ago
Personally, I find the lack of logic programming, and logic in general, a rather notable property of the outlined curriculum. In fact, "logic" is nowhere explicitly mentioned in the course titles. Neither are "formal"
501.
▲
by
triska
8y ago
For example, aptly named ad-hoc polymorphism violates referential transparency: ( (7^7^7`mod`5`mod`2)==1, [False,True]!!(7^7^7`mod`5`mod`2) ) This yields: (True,False) suggesting that the same arithmetic expression is bo
502.
▲
by
triska
8y ago
In my experience, Haskell's comparatively complex and - arguably - also rather ad hoc type system can make a discussion of monads quite involved and hard to follow. For those who approach Haskell with some Prolog or Mercury backgroun
503.
▲
by
triska
8y ago
Nice writeup! I especially liked the subsection "Getting rid of global state". Personally, I regard a programming language's ability to conveniently express sets of test cases an important indicator of its usefulness. Also fo
504.
▲
by
triska
8y ago
Again a very good point! The key assumption that breaks down in general, that is, unless you assume an unbounded storage system, is that the data can be written at all . As also the post I linked to states: C together with an unbounded sto
505.
▲
by
triska
8y ago
These are all good points. However, there are now assumptions that do not follow from the C standard, such that you can read the same byte back from a file after writing it. As the post I linked to mentions, you can indeed model an unbounde
506.
▲
by
triska
8y ago
This is all true, and a good summary of the situation. These points are also explained in more detail in the post I linked to. If we use streams as an oracle, then we can represent an unbounded tape, and C together with such streams let us
507.
▲
by
triska
8y ago
A very justified question, and it seems clear that database systems will increasingly do this automatically in the future. For comparison: A very similar issue arises in Prolog, where indexing is traditionally performed only on the outermos
508.
▲
by
triska
8y ago
A fun fact that may appear surprising at first is somewhat implicit in this last paragraph: C is not Turing-complete! The reason is precisely that C cannot "address an unlimited amount of memory", even if an unlimited amount wer
509.
▲
The meaning of = for logic programmers
(metalevel.at)
1 points
by
triska
9y ago
|
0 comments
510.
▲
by
triska
9y ago
I disagree with what the previous article states: There are languages such as Prolog where = doesn't mean assignment. In logic, = means equality, often modulo some theory. In Prolog, = means (syntactic) unification, which is distingu
More ›