Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zmonx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
31.
▲
by
zmonx
9y ago
Yes, I think these are fair statements. John Gustafson's presentation also includes a few important points about interval arithmetic: http://www.johngustafson.net/presentations/Right-SizingPreci...
32.
▲
by
zmonx
9y ago
In such cases, you get a ubound that contains the exact value. When the inputs are exact, the result is exact too. Here is a sample implementation in Julia: https://github.com/JuliaComputing/Unums.jl
33.
▲
by
zmonx
9y ago
Speaking of floats, I highly recommend John Gustafson's book, The End of Error: Unum Computing : https://www.crcpress.com/The-End-of-Error-Unum-Computing/Gus... It is an amazing compendium of the many ways in whi
34.
▲
by
zmonx
9y ago
Whether or not you intended this as a joke: As a matter of fact, I actually do!
35.
▲
by
zmonx
9y ago
Thank you for these benchmarks! For a fair comparison, one should however also take into account that SWI-Prolog is among the slower Prolog systems. I therefore recommend to also use a faster Prolog system. For example, I used the following
36.
▲
Second-Guessing R
(j-paine.org)
2 points
by
zmonx
9y ago
|
0 comments
37.
▲
by
zmonx
9y ago
Why should Prolog be slower than CLisp? It is true, there is some overhead that is inherent to Prolog programs, mostly due to logical variables. But this is a rather small overhead, and if you need this feature, you would pay a comparable p
38.
▲
by
zmonx
9y ago
With "constraint programming" languages, do you mean languages such as MiniZinc that provide dedicated syntax for some tasks? I am asking because support for constraint programming is among the most important and most distinguishi
39.
▲
by
zmonx
9y ago
I am already doing it. Ready when you are!
40.
▲
by
zmonx
9y ago
There is a natural generalization of functions, called relations . To benefit from relations, have a look at a logic programming language such as Prolog. In Prolog, relations are defined by predicates and constitute the basic building
41.
▲
by
zmonx
9y ago
It is true: An isomorphic function admits an inverse function . However, what you are describing in the second paragraph is a generalization of functions: You are now reasoning in terms of relations , where a single entity can be relate
42.
▲
Algorithmic Program Debugging [pdf]
(cpsc.yale.edu)
3 points
by
zmonx
9y ago
|
0 comments
43.
▲
by
zmonx
9y ago
This is indeed an extremely interesting approach. It was pioneered in the context of logic programming and Prolog by Ehud Shapiro in his 1982 PhD thesis "Algorithmic Program Debugging". The thesis was published as an ACM Distingui
44.
▲
by
zmonx
9y ago
int_19h has previously posted a nice overview of some of Solidity's flaws: https://news.ycombinator.com/item?id=14810008 Such issues make the language extremely error-prone. A possible remedy was also suggested: https
45.
▲
by
zmonx
9y ago
Nice! SAT solvers reason about propositional logic, i.e., zeroth-order logic. Next step: Reason about first-order and higher-order logic. For example, with a Prolog engine written in Go.
46.
▲
by
zmonx
9y ago
The declarative programming language Prolog is very suitable for reasoning about trees, lists and recursive structures in general. For example, here is a Prolog definition of the tree from the article: tree(node(4, nod
47.
▲
by
zmonx
9y ago
In the terminology (may I say: terms ) of term rewriting, you are looking for a so-called completion procedure. This takes a set of axioms and turns it into a convergent term rewriting system (or not, because it may not terminate!). If t
48.
▲
by
zmonx
9y ago
This may get out of hand: The task asks not only for all parenthesizations, but also other equivalence classes. The rewrite rules and Prolog in general let you express the equivalence classes reasonably concisely and efficiently. I'm s
49.
▲
by
zmonx
9y ago
Thank you for sharing! A closely related puzzle was previously discussed at: https://news.ycombinator.com/item?id=14400017 The present puzzle can be seen as a natural continuation of this earlier thread, and the declarative
50.
▲
by
zmonx
9y ago
It is! At first, the following may appear quite counter-intuitive, but if you think about larger N and the fact that you often want efficient algorithms also when processing large amounts of data, it becomes clear that an exponent of 2 or 3
51.
▲
by
zmonx
9y ago
You can without loss of generality assume that the weights are integers (if they are rational, you can multiply all weights so that they become integral). Hence, you can use bisection to compute the actual optimum, not involving epsilon at
52.
▲
by
zmonx
9y ago
If you want to really delve into recursion, I recommend to learn a logic programming language like Prolog. Interestingly, Prolog programs are often efficient and general because, due to the power of unification, Prolog programs are more o
53.
▲
by
zmonx
9y ago
And, true to form, it often works in the other direction too! Especially with CLP(FD) and other Prolog constraints.
54.
▲
by
zmonx
9y ago
Awesome work and links! For dynamic layout generation with Prolog, I recommend you start with the PhD thesis of Joost Geurts: https://pure.tue.nl/ws/files/2135764/200613391.pdf Joost uses Prolog CLP(FD) const
55.
▲
by
zmonx
9y ago
For comparison, it's also quite easy to mess up the performance of a JavaScript program, and yet it's part of a web standard. My recommendation in cases of poor performance is to improve Prolog systems by features that yield bette
56.
▲
by
zmonx
9y ago
Yes, this is indeed one possible attack vector! For more information, please see: https://en.bitcoin.it/wiki/Weaknesses#Illegal_content_in_the... To quote: It is illegal in some countries to possess/distribu
57.
▲
by
zmonx
9y ago
Please see my profile page: It contains several links to material that I recommend for learning modern Prolog. You can quite often apply Prolog in actual practice if you know it. For instance, see how often "logic" is mentioned ju
58.
▲
by
zmonx
9y ago
Thank you for sharing! My impression is that database systems are increasingly gravitating towards Prolog, with various extensions such as logical rules, more expressive aggregation, state machines, constraints, Turing completeness, ... All
59.
▲
by
zmonx
9y ago
Please tell me more about this task! Regarding Prolog and CLP(FD), I recommend asking on comp.lang.prolog or Stackoverflow for more information. Chances are high that someone will be able to help.
60.
▲
Building and Probing Prolog with Intel Architecture
(software.intel.com)
2 points
by
zmonx
9y ago
|
0 comments
More ›