Live data from Hacker News

Ask HN: What's Prolog like in 2024?

news.ycombinator.com

191–200 of 289 posts

Re: Ask HN: What's Prolog like in 2024?

#191

Earlier quoted context omitted.

It's an except from the article. Getting an explanation out of context is worthless.

Excerpt from what article? (edit: i see you're referring to the indented quote from the article, but i was asking what the "fuckin a." thing meant.)

https://www.urbandictionary.com/define.php?term=fucking%20a

Re: Ask HN: What's Prolog like in 2024?

#192

Earlier quoted context omitted.

Yup. I learned Clojure just so I can use a Lisp and get paid for it, but there is some weird cult against all forms of typing. Even coming from a Common Lisp background, this was strange to me. In Common Lisp, there are implementations (like SBCL and ECL) that can make use of type declarations to produce efficient machine code and allow the compiler to catch errors that would otherwise be run-time errors. There's als…

I still don't get how Java records can be used for anything like a DTO. Since you're a Clojure dev you may remember the pattern Rich Hickey described as "place oriented programming" :) Nearly every endpoint will have more than 2-3 fields and you really don't want a Java record with more than that many fields for the same reason you don't want a Java method with that many fields e.g. doIt(Long, String,String,Long,Stri…

> I still don't get how Java records can be used for anything like a DTO

In Clojure, we often deserialize a result set from a database to a vector of maps. These maps have different keys depending on what exactly your query was selecting. In Java, one often "projects" results to some DTO. This is one scenario where records offer identical functionality while avoiding boilerplate.

Regarding "place-oriented programming", records are immutable, so that is one technical advantage they have over handwriting a DTO. And from my short experience using web frameworks like Quarkus, it seems that a lot of the "design patterns" I see in documentation exist to help design easy-to-test programs rather than unfettered mutation.

Additionally, I have found records useful for describing the payload of endpoints that accept map-like data. Without records, I would be writing POJOs with public fields anyway.

Overall, Java records behave like TypeScript interfaces with awkward syntax. I have found them ideal for expressing type-safe, map-like data with minimal boilerplate.

Re: Ask HN: What's Prolog like in 2024?

#193

Earlier quoted context omitted.

The more nightmarish thing about Clojure is realizing that, in truth, you have no idea what all these dicts you are passing around the terse, nil-punning functions of your codebase hold at any given time.

Yup. I learned Clojure just so I can use a Lisp and get paid for it, but there is some weird cult against all forms of typing. Even coming from a Common Lisp background, this was strange to me. In Common Lisp, there are implementations (like SBCL and ECL) that can make use of type declarations to produce efficient machine code and allow the compiler to catch errors that would otherwise be run-time errors. There's als…

Could you use https://github.com/clojure/core.typed ? Or https://clojure.org/guides/spec ?

Re: Ask HN: What's Prolog like in 2024?

#195
post #162

Earlier quoted context omitted.

This is why Lenat and CYC had settled on micro-theories. They found it impossible to build a useful universal ontology so had to fracture them on domain boundaries.

I was just pondering if the Prolog universal quantifier would be applicable to reasoning about Cyc frames. Does your comment imply it's not?

I'm somewhat familiar with Cyc but I'd never heard of this development of "micro-theories". It makes perfect sense though - to generalize hugely structured ontologies break as soon as the second person tries to use them or they are used on a slightly different domain.

Anyway, Prolog should be suitable for reasoning over them, but it is only grounded in the "micro-theory" part.

Re: Ask HN: What's Prolog like in 2024?

#196

Prolog, and Constraint Programming especially are great to have in your toolbox. I’ve done research in the field for years, and my job in the industry today is writing Prolog. There are real issues with Prolog: - no proper module nor package system in the modern sense. - in large code bases extra-logical constructs (like cuts) are unavoidable and turn Prolog code into an untenable mess. SWI prolog has single-sided un…

You write Prolog code for a living? Where? Do you happen to have a story to share? I'm very curious.

I suspect that his work is related to this: https://www.tacton.com/products/tacton-cpq/configurator/

Re: Ask HN: What's Prolog like in 2024?

#197

What is it like? 50 years of historic cruft. Questionable whether there are more trip hazards than usefulness for ordinary coding. A fractured community which feels like there are more Prolog systems than Prolog code. Learning Prolog is less "how do I do things in Prolog" and more "how do I contort my things to avoid tripping over Prolog?". A few dedicated clever people and idealists and dreamers talking about ontolo…

> A few dedicated clever people and idealists and dreamers talking about ontologies and building things I don't understand I was briefly deeply interested in ontologies via OWL and I suspect Prolog has the same issues that I think plague ontologies in general. They are a fantastic tool for a system complex enough to be nearly useless. Modelling an ontology for a reasonably complex domain is unreasonably difficult. No…

Ontology: Study of the nature of being, becoming, existence or reality, as well as the basic categories of being and their relations (philosophy)

What does that have to do with this?

Is there some use of "ontology" in logic I have not heard of?

Re: Ask HN: What's Prolog like in 2024?

#198
post #197

Earlier quoted context omitted.

> A few dedicated clever people and idealists and dreamers talking about ontologies and building things I don't understand I was briefly deeply interested in ontologies via OWL and I suspect Prolog has the same issues that I think plague ontologies in general. They are a fantastic tool for a system complex enough to be nearly useless. Modelling an ontology for a reasonably complex domain is unreasonably difficult. No…

Ontology: Study of the nature of being, becoming, existence or reality, as well as the basic categories of being and their relations (philosophy) What does that have to do with this? Is there some use of "ontology" in logic I have not heard of?

In this context ontology means common vocabulary/categories.

Re: Ask HN: What's Prolog like in 2024?

#199
post #197

Earlier quoted context omitted.

> A few dedicated clever people and idealists and dreamers talking about ontologies and building things I don't understand I was briefly deeply interested in ontologies via OWL and I suspect Prolog has the same issues that I think plague ontologies in general. They are a fantastic tool for a system complex enough to be nearly useless. Modelling an ontology for a reasonably complex domain is unreasonably difficult. No…

Ontology: Study of the nature of being, becoming, existence or reality, as well as the basic categories of being and their relations (philosophy) What does that have to do with this? Is there some use of "ontology" in logic I have not heard of?

Maybe more in philosophy and classic general AI. Basically ontologies are systems of categorizing and classifying knowledge. E.g. if you want to reason about self driving, you would have an ontology that lets you separate traffic signs from billboards.

Re: Ask HN: What's Prolog like in 2024?

#200
Formal verification uses Prolog a lot. System on TPTP at U of Miami utilizes this for many of the formally verified tests on there. It is just a more intense discipline than general programming which is why I’m perpetually drawn to it trying to find more real world applications. It is not exactly Prolog but close enough to mention the similarities.
Post reply on HN