Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zmonx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
61.
▲
by
zmonx
9y ago
Great news for Prolog, which is based on Horn clauses! I expect logic programming languages like Prolog to have significant impact in the future for smart contracts and rule based programming.
62.
▲
by
zmonx
9y ago
Personally, I think these edits do not preserve the meaning of the original quotes: The changed sentences stress different things than the original quotes to the extent that one could call them distortions rather than edits. From my own exp
63.
▲
by
zmonx
9y ago
The declarative programming language Prolog is very well suited for solving such tasks, because it ships with built-in backtracking and several methods such as constraints that help to significantly prune the search space. Here is a Prolo
64.
▲
by
zmonx
9y ago
Yes! Prolog is a great language for such use cases in my opinion.
65.
▲
by
zmonx
9y ago
Thank you for sharing! Beware though: The scalar point multiplication method that is shown in the article is subject to side channel attacks such as timing attacks, since it depends on features of the secret key. Use Montgomery multiplicati
66.
▲
by
zmonx
9y ago
Yes I agree. Still, the key insight of constraints like dif/2 may also be applicable in this concrete case to limit the candidates already before and even during the search. It is this automatic pruning that makes logic programming wit
67.
▲
by
zmonx
9y ago
A major attraction of (pure) Prolog is that you can easily reorder goals and use all-solutions predicates to try different search strategies. Further, constraints like dif/2 help considerably to prune the search space. So yes, it can
68.
▲
by
zmonx
9y ago
Interesting. Personally, I found the observation about the pulsations of the jellyfish quite insightful and a good and very short counterargument against the quoted opinion. There are other texts too on the page, which you may find better.
69.
▲
by
zmonx
9y ago
Wow! One of the professors whom they interviewed and are quoting throughout the article is Richard O'Keefe: The author of "The Craft of Prolog" and very famous Prolog, Erlang and Smalltalk programmer in the respective communi
70.
▲
by
zmonx
9y ago
I agree, thank you for the clarification and additional examples!
71.
▲
by
zmonx
9y ago
> Prolog-derived languages go even more nuts with ; and . than C-style terminators. What do you mean by this? In Prolog, (;)/2 is simply a binary infix operator, so that you can write a term of the form: ;(A, B) i.e, a bina
72.
▲
by
zmonx
9y ago
You can readily use the Prolog code I posted to generate such puzzles. For example, you can go about it as follows. First, let us define the following relation that yields the N-th solution of a given Prolog goal: call_nth(Goal_0, C
73.
▲
by
zmonx
9y ago
Thank you for sharing this! One powerful tool that often helps when reasoning over algebraic structures is called Term Rewriting . For example, let us consider the 6 equations from the paper that characterize loops , using Prolog syntax:
74.
▲
by
zmonx
9y ago
Very nice! I see you are using a way to express the constrant "at most two cells of the same value in direct succession in each row and column " that is shorter than the formulation I have posted. I used a conjunction of two con
75.
▲
by
zmonx
9y ago
As eriknstr correctly points out, the puzzle I have included above is already classified as "very hard". SICStus Prolog 4.3.2 takes about 20 milliseconds to find the solution with the formulation I posted. I tested this on a mac
76.
▲
by
zmonx
9y ago
The declarative programming language Prolog is a natural choice for solving such combinatorial tasks. Here is a Prolog formulation of the puzzle, using constraint logic programming over integers that ships with typical Prolog systems:
77.
▲
by
zmonx
9y ago
When I hear "Semantic Web", I think: That's the heavy weight XML bloated thing that has, something like 10+ years ago, moved towards N3 or Turtle, more recently to JSON-LD, and will, in due time, hopefully arrive at Prolog sy
78.
▲
by
zmonx
9y ago
Thank you Chris for all your work on Debian, and congratulations on the release! I have been following your progress from back when you were the maintainer of the SWI-Prolog package for Debian, and it is awesome how much you and all other c
79.
▲
by
zmonx
9y ago
A few good points have already been made in the other responses, and I want to add an additional observation: To me, the core of the issue is not in choosing between "non-deterministic" testing vs. a tiny set of hand-chosen exampl
80.
▲
by
zmonx
9y ago
Indeed! Here is Sudoku, formulated as a SAT problem. You can use for example SICStus Prolog to run it: sudoku(Rows) :- length(Rows, 9), maplist(same_length(Rows), Rows), maplist(row_booleans, Rows, BRows),
81.
▲
by
zmonx
9y ago
Nice! Matching is a restricted form of unification that is available in logic programming languages like Prolog. The difference is that in matching, one side is regarded as fixed, whereas unification works both ways.
82.
▲
by
zmonx
9y ago
Very nice, thank you for sharing! Jelly is routinely used on CodeGolf and frequently wins due to its extreme conciseness. Here are posts that contain Jelly solutions: https://codegolf.stackexchange.com/search?q=jelly Jelly
83.
▲
by
zmonx
9y ago
It's great that Prolog routinely makes an appearance in such overview documents, and is often even mentioned quite positively or at least cautiously positively. Some quotes from the article: By the standard of academia Prolog and Hask
84.
▲
by
zmonx
9y ago
Datalog is a syntactic subset of Prolog, and Datalog queries can be evaluated in polynomial time. This does not fully answer your question, but I hope it is useful for you as a starting point.
85.
▲
by
zmonx
9y ago
Thank you for sharing! A great reference for SAT solving is: Donald Knuth, The Art of Computer Programming , Volume 4, Fascicle 6: Satisfiability. SAT is also an opportunity to point to an important family of data structures called Binary
86.
▲
by
zmonx
9y ago
Since this is now the third time that the blog post is posted on HN, I think it is as good a time as any to ask a few additional and deepening questions about this topic. For example, do bloggers and those who promote them also have some re
87.
▲
by
zmonx
9y ago
Perfect, I am looking forward to reading the blog post! I hope it will also mention Prolog as an important influence. As to your second issue above: Please note that there are many collections and even entire books that describe antipat
88.
▲
by
zmonx
9y ago
Grakn was also recently posted on HN: https://news.ycombinator.com/item?id=14471238 In that thread, I show how you can express the sample relation in Prolog. Maybe you can go into more detail, either here or in that thread,
89.
▲
by
zmonx
9y ago
Nice! For constraint solving, I can also highly recommend to look into Prolog for some useful ideas. For example, consider the use case of Rosetta that is shown on the page. In Prolog, we can express it as follows: First, let us define suit
90.
▲
by
zmonx
9y ago
Your post is full of good insights, and I also highly recommend these pointers and environments! I only want to briefly comment on the question "Are you comfortable not knowing how many answers there might be if you let the program kee
More ›