[HN Gopher] Dogelog player is a Prolog system for the JavaScript...
___________________________________________________________________
Dogelog player is a Prolog system for the JavaScript and the Python
platform
Author : bryanrasmussen
Score : 45 points
Date : 2022-07-29 17:01 UTC (2 days ago)
(HTM) web link (www.xlog.ch)
(TXT) w3m dump (www.xlog.ch)
| nerdponx wrote:
| Great timing! I've lately been studying up on Prolog and
| miniKanren, and increasingly I've been wishing that I had one or
| the other embedded in my usual programming languages. I believe
| there is already at least one miniKanren implementation in each
| of JS and Python, but it's cool to see this pop up.
|
| One thing I've wondered about with such systems as performance: I
| would be nervous about pathological cases leading to really bad
| performance or even DOS attacks. My understanding of Prolog in
| particular is that sometimes in order to get your program to run
| to completion requires a nontrivial understanding of the
| backtracking algorithm them so you can judiciously place cuts,
| etc.
|
| Inspired by Will Byrd's many presentation on quines, this leads
| me to wonder: what if you had a logic language that does not run
| at runtime, but that _generates code with certain properties_
| according to some set of rules? It 's such a thing possible? Are
| there theoretical results on that subject?
| Avshalom wrote:
| You might want to look at
| https://en.wikipedia.org/wiki/Inductive_logic_programming
| adenozine wrote:
| You'd be interested in Grammar-Guided Genetic Programming.
|
| It's tangential, but along similar lines. You generate a
| grammar of what a successful program looks like, and then that
| grammar can spit out programs of that "shape" ad infinitum.
|
| The main difference is that you don't have the same verifiable
| guarantees as logic-al solutions because the grammar is
| generated and evolved over time instead of induced from a
| ruleset.
| aarroyoc wrote:
| > One thing I've wondered about with such systems as
| performance: I would be nervous about pathological cases
| leading to really bad performance or even DOS attacks. My
| understanding of Prolog in particular is that sometimes I get
| in your program to run to completion requires a nontrivial
| understanding of the backtracking algorithm them so you can
| judiciously place cuts, etc.
|
| That depends on which constructs are you using. It's perfectly
| fine to write modern Prolog code without any cut, but the sad
| thing is that those constructs (once/1, dif/2, if_/3, tabling,
| ...) aren't taught in most books out there (the exception is
| The Power of Prolog) which still perpetuates these ideas about
| Prolog.
| Karrot_Kream wrote:
| You would probably need to do some testing before heading to
| production, but the easiest insurance would probably be to
| wrap every query in a timeout and just cancel the query after
| a max timeout. Most net systems work this anyway and it gives
| you insurance around a slow query saturating your business
| logic.
| JadeNB wrote:
| I always love to see Prolog in the wild, but a project that's
| this protective about its _documentation_ (e.g.,
| http://pages.xlog.ch/littab/doclet/en/docs/15_manual/02_refe...):
|
| > All industrial property rights regarding the information -
| copyright and patent rights in particular - are the sole property
| of XLOG Technologies AG. If the company was not the originator of
| some excerpts, XLOG Technologies AG has at least obtained the
| right to reproduce, change and translate the information.
|
| > Reproduction is restricted to the whole unaltered document.
| Reproduction of the information is only allowed for non-
| commercial uses. Small excerpts can be used if properly cited.
| Citations must at least include the document title, the product
| family, the product version, the company, the date and the page.
|
| (am I already violating the provisions by quoting those
| paragraphs?) makes me immediately scared of what will happen if I
| _use_ it.
| nerdponx wrote:
| The Common Lisp HyperSpec has a similarly nerve-wracking
| proprietary license. The result is that nobody is able to so
| much as reupload its contents in a different web UI, let alone
| make substantive additions to it, even if the additions are
| clearly labeled as such and the original content is not
| modified.
| joshuanapoli wrote:
| How does dogelog compare with tao prolog?
|
| http://tau-prolog.org/
| aarroyoc wrote:
| Tau Prolog is an ISO Prolog system from scratch and just for
| JavaScript. It tries to follow some of the innovations of
| Scryer and Trella Prolog. Dogelog inherits some stuff from
| Jekejeke Prolog and has an innovative GC.
| tannhaeuser wrote:
| There seems to be a growing number of ISO Prolog systems running
| in the browser, including native systems ported over to a browser
| target. I guess a common restriction is the lack of ISO I/O
| predicates (which don't make sense in a browser or wouldn't help
| portability if implemented over HTTP in an ad-hoc way).
|
| [1]: http://tau-prolog.org/
|
| [2]: https://quantumprolog.sgml.io
___________________________________________________________________
(page generated 2022-07-31 23:02 UTC)