lira
hatlog
lira | hatlog | |
---|---|---|
1 | 1 | |
21 | 1 | |
- | - | |
0.0 | 0.0 | |
11 months ago | over 5 years ago | |
Haskell | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lira
-
Why Learn Prolog in 2021?
Lira[0] and its readable paper[1] is a good example of abstracting smart contracts into a statically typed, domain-specific language that describes the contract precisely at a high level. It's not Turing complete, which works for a large class of contracts (for instance, see the American and Asian options examples in [1]).
One concern with logic programming is cost of computation, on Ethereum every transaction has a gas associated with it and so you can't run computations that go over the gas available in a block.
Turner's ideas of Total Functional Programming[2] might have application in the smart contract space as well, since you disallow general recursion but allow structural recursion, you can likely precalculate or bound gas costs accurately ahead of time.
As for being statically typed, I completely agree, Solidity's poor design choices contributed to millions of USD in loss (e.g. DAO hack) because the developers were not able to easily reason about the implicit behavior or concurrency model.
[0] https://github.com/etoroxlabs/lira
[1] https://bahr.io/pubs/files/bahr15icfp-paper.pdf
[2] http://www.jucs.org/jucs_10_7/total_functional_programming/j...
hatlog
-
Why Learn Prolog in 2021?
A couple years ago I hacked on a Python type inferencer someone wrote in Prolog. I wasn't enlightened, despite expecting to be, from a bunch of HN posts like this.
https://github.com/andychu/hatlog
For example, can someone add good error messages to this? It didn't really seem practical. I'm sure I am missing something, but there also seemed to be a lot of deficiencies.
In fact I think I learned the opposite lesson. I have to dig up the HN post, but I think the point was "Prolog is NOT logic". It's not programming and it's not math.
(Someone said the same thing about Project Euler and so forth, and I really liked that criticism. https://lobste.rs/s/bqnhbo/book_review_elements_programming )
What are some alternatives?
mercury - The Mercury logic programming system.
pyswip - PySwip is a Python - SWI-Prolog bridge enabling to query SWI-Prolog in your Python programs. It features an (incomplete) SWI-Prolog foreign language interface, a utility class that makes it easy querying with Prolog and also a Pythonic interface.
awesome-prolog - Curated list of Prolog packages and resources
core.logic - A logic programming library for Clojure & ClojureScript
Searching-In-An-Infinite-Space-Prolog - PP2014 Prolog Homework