Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
triska
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
181.
▲
by
triska
4y ago
In his seminal paper A Relational Model of Data for Large Shared Data Banks , Codd explicitly mentions first-order predicate calculus as a suitable formalism for the sub-language. Quoting from https://dl.acm.org/doi/
182.
▲
by
triska
4y ago
In modern Prolog systems, this is in fact done: When looking up clauses from the database, the Prolog system builds an index as needed based on which arguments of the query are instantiated. This is called Just-In-Time (JIT) indexing. Moder
183.
▲
Ciao Prolog Playground
(ciao-lang.org)
6 points
by
triska
4y ago
|
0 comments
184.
▲
Backtracking through Time and Space in Erlang [video]
(youtube.com)
2 points
by
triska
4y ago
|
0 comments
185.
▲
by
triska
4y ago
I liked this part about thinking of your codebase as a database: "Now close your eyes and imagine your codebase like a database - some imaginary glowing network floating in cyberspace - and then imagine your ‘program’ as a ‘query’ of
186.
▲
Imagining Prolog on Web Scale
(github.com)
4 points
by
triska
4y ago
|
1 comments
187.
▲
Serverless Prolog for Cloudflare Workers
(github.com)
5 points
by
triska
4y ago
|
0 comments
188.
▲
Rules and Visual Syntax in Praxis
(toblotron.com)
17 points
by
triska
4y ago
|
2 comments
189.
▲
A Preview of Praxis: Visual Programming in Prolog
(toblotron.com)
2 points
by
triska
4y ago
|
0 comments
190.
▲
Hashlog: A Simple Datalog in OCaml
(philipzucker.com)
3 points
by
triska
4y ago
|
0 comments
191.
▲
by
triska
4y ago
One of the most interesting results I found in Leslie Lamport's papers is Buridan's Principle : A discrete decision based upon an input having a continuous range of values cannot be made within a bounded length of time. Quoting
192.
▲
by
triska
4y ago
Yes it is true, logic programming languages like Prolog are indeed often a good fit to solve such combinatorial tasks. For example, using Scryer Prolog and its CLP(ℤ) library for constraint logic programming over integers , we can solve th
193.
▲
by
triska
4y ago
Your example code now already uses lists of characters for names, and it is very readable. A good debugger will emit the exact same representation you are now using in the code, such as "Bobberton", "Bobbing" etc., and i
194.
▲
by
triska
4y ago
Constraint solvers are a great attraction of many Prolog systems, and in fact they are often an important reason for buying a fast commercial Prolog system. For example, here is a solution of the first puzzle shown in the article, using Scr
195.
▲
by
triska
4y ago
In my experience, data in Prolog programs will look like alice, bob and dhalia only in very artificial examples or exercises. For example, I have never seen a person's name spelled bob, and spelled like this, it is rather unlikely to b
196.
▲
by
triska
4y ago
I would phrase it like this: If you are using, in Prolog code, an atom of length greater than 1, then consider using a list of characters instead , especially if you want to reason about the data itself within your program. If you use list
197.
▲
by
triska
4y ago
In SICStus Prolog, the query I showed yields C = 108 by default, because "Hello, world!" is interpreted as the list of character codes [72,101,108,...]. In contrast, in all the recent systems I mentioned, the double-quoted strin
198.
▲
by
triska
4y ago
Prolog is brilliantly useful for text processing and reasoning about strings, mostly due to its built-in grammar formalism called Definite Clause Grammars (DCGs). In fact, Prolog originates from Q-systems which were specifically designe
199.
▲
by
triska
4y ago
Regarding the code in question, it is possible to write it a bit more elegantly and more compactly, with a combination of techniques. For example, let's consider this snippet from lines 110 to 119: type(Ctx, case(T0, {z, Tz}, {s(
200.
▲
by
triska
4y ago
One of the most interesting applications of Prolog I have seen in the recent past is the formalization of dose-escalation trial designs that occur in clinical oncology. In particular, David C. Norris has implemented a Prolog formulation o
201.
▲
by
triska
4y ago
I think this is due to Pournelle's Iron Law of Bureaucracy : https://www.jerrypournelle.com/reports/jerryp/iron.html "In any bureaucratic organization there will be two kinds of people: First, there wil
202.
▲
by
triska
4y ago
Datalog also lets you define facts and rules, in addition to posting queries. A key attraction of Datalog is that the same simple and very uniform syntax is used in all cases. All these cases are special cases of a single unifying language
203.
▲
Resources on Modern Prolog
(old.reddit.com)
3 points
by
triska
4y ago
|
0 comments
204.
▲
Alain Colmerauer L'Aventure Prolog
(youtube.com)
2 points
by
triska
5y ago
|
0 comments
205.
▲
by
triska
5y ago
> Absolutely nothing works better, it's the best by a ridiculously large margin. Is this really the case? It seems that to find mistakes in software for various interaction patterns, truly exhaustive automated tests would likely w
206.
▲
Scryer Prolog v0.9.0: Greatly improved performance and many enhancements
(twitter.com)
10 points
by
triska
5y ago
|
0 comments
207.
▲
by
triska
5y ago
For example, aptly named ad hoc polymorphism and overloading 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
208.
▲
by
triska
5y ago
Personally, I think monads are hard to understand in Haskell mostly due to its quite complex and comparatively ad hoc type system. Let's remove all the complexities that are introduced by the static type system for a moment, and focu
209.
▲
by
triska
5y ago
One interesting aspect of logic programming languages like Prolog is that many commonly used relations are naturally tail recursive, even though the corresponding functions in functional languages are not naturally tail recursive. For insta
210.
▲
by
triska
5y ago
I'm very excited about Chalk . Quoting from the page: Chalk is a reimplementation of Rust's trait system using declarative logic rules, à la Prolog. Chalk has been years in development, and has been experimentally integrated i
More ›