6 ms·
Racket has Racklog: > Racklog is an embedding of Prolog-style logic programming in Racket. “Embedding” means you don’t lose Racket: You can use Prolog-style an
by anon____ 3y ago
Racket has Racklog:
> Racklog is an embedding of Prolog-style logic programming in Racket. “Embedding” means you don’t lose Racket: You can use Prolog-style and conventional Racket code fragments alongside each other. Racklog contains the full repertoire of Prolog features, including meta-logical and second-order (“set”) predicates, leaving out only those features that could more easily and more efficiently be done with Racket subexpressions.
https://docs.racket-lang.org/racklog/index.html https://docs.racket-lang.org/racklog/index.html
Racket also has GUI, and basically everything else you may need.
- fuzztester 3y ago>Racket also has GUI, and basically everything else you may need. How about good docs and examples, community, decent perf for small apps at least? Racket newbie here. Had just played around with a little some years back when it was called MZ Scheme, PLT Scheme or such. There was an IDE called Dr Scheme, IIRC. I guess all that is part of Racket now.
- anon____ 3y agoDocumentation and educational material is where Racket is unbeatable: https://docs.racket-lang.org/index.html https://docs.racket-lang.org/index.html. The performance is around Python / general scripting level; perfectly acceptable. As you guessed, DrScheme became DrRacket. You can find more info at https://www.racket-lang.org https://www.racket-lang.org, presented much better than I could do here.
- fuzztester 3y agoThanks.
- klibertp 3y agoDocs - oh boy. 90% of contributors to Racket are educators with many decades of experience teaching. The quality, depth, organization, interlinking, examples, references to papers... basically everything about Racket docs is at the level you just don't see anywhere else. Both the reference and guide are works of art. You get Realms of Racket and Beautiful Racket on top of that. Programming Languages: Application and Interpretation you'd find on the same shelf as SICP. How to Design Programs should be mandatory reading (and an antidote for the mind) for every OOP-focused dev out there (though, by the time they're "OOP-focused" they're most likely a lost cause anyway...) What's funny here is that Racket includes an OOP system, which is also described with incredible detail and thoughtfulness. The way they derive mixins from first-class anonymous classes is beautiful and enlightening. I've learned so much from docs.racket-lang.org that no other single resource can even begin to compare. Performance: closer to Groovy, Clojure or Raku than to Python, Ruby or JS. That is, startup is not as fast, but execution after that is decent. For a few years, performance improvements were not the focus of development due to the migration from custom VM to Chez Scheme. Now Racket on Chez is the default and I think we'll see further improvements on that front (easier maintenance and better potential performance were the reasons behind the migration IIRC.) The community is small, and the core strength of Racket is not something normal programmers use in day to day programming (that strength being the ability to shape the syntax and semantics of your code at will, ad hoc, anytime, with no friction at all, in any way you want). On the other hand, the results of giving that power to a bunch of very smart people are really worth seeing.
- fuzztester 3y agoInteresting, thanks.
- zelphirkalt 3y agoThere is also Minikanren. While not the same as Prolog, it still allows you to do similar reasoning from inside your language. I always found the talk by Byrd and Friedman about it at RacketCon fascinating and wish I would get to use it or something like it at $job.
- User23 3y agoThis is also the common pattern for using Prolog in Common Lisp. It goes back to the first generation AI days back in the 70s. Peter Norvig's Lisp AI book has a nice rundown.