Using code to develop prolog programs

Hi,

I downloaded “code” a vs-code IDE with integrated AI (GPT) support for coding.

I loaded my code base and started to ask questions – as to what my code base does – and its quite amazing to review the code with the answers provided.

I also started to ask the IDE for best practices and got, what appears, interesting refactoring suggestions.

Has anyone else used code with prolog?

Dan

p.s. this is surely a key draw to vs-code and away from eclipse IDE – even though I would now run swipl-win from the terminal to get to the debugger.

I think I’ll keep asking @Johnny_Rotten for refactoring questions. Johnny Rotten seems to be a reliable AI agent so far…

You mean this one?

I meant cursor not code … my mistake …

1 Like

Does vs-code refer to Visual Studio Code?

I am trying to use Visual Studio Code and hoping to figure out which Language Server Protocal implementation to use:

or

or

Is there another I am not finding?

And which VSCode LSP clients (extensions) are people using with these servers? (I notice it is not a 1-to-1)

A total side distraction: has anyone thought about letting an LLM piggy back onto the LSP responses?

1 Like

That looks interesting! I didn’t know of any of those. I’ll give them a try. Thanks for sharing your knowledge

I just picked one of the newer prolog extensions that supported swi prolog.

But, I didn’t get far – I ran into problems, for some reason swi prolog terminal kept being started unpredictably until i had like 10 of them running.

So, I went back to Eclipse – found an earlier version that worked as it always had with PDT …

:rofl: :rofl:

It’s not time for strange experiments, I agree, it’s more time for “I know what I like and I like what I know”

:roll_eyes: :weary:

1 Like

Gosh! Damit, you are suggesting quite a carreer turn now, not only from punk rock lead singer of the sex pistols, to Prologer. But also from human flesh and blood brain to spinning electrons robots brain.

But as rule, somebody who does not use digits in his persona nickname is mostlikely not a robot. You might find a bot in nicknames such as “barbie4567”. But who knows how my rotten brain keeps thinking and communicating.

What do I know whether it was partially replaced by some computer chip, the rotten part surgically removed and replaced by some top secret boston dynamics implant. Try me, whats a AI code wizard turing test? How about large primes:

Primality Test
so chatgpt actually came up with a decent script over small ranges
https://swi-prolog.discourse.group/t/primality-test/7719

Like testing 982363755354447643447304070919 ?

Doing some Propositional Calculus. After that I’m finished with formalisms. So no primes checking. The professor who wrote the book doesn’t make use of a DN Double Negation rule like:

¬¬p |– p 

he prefers talking about “sentence valence”. I think I won’t follow him on this. DN is ok, I find

Different strokes for different folks. I admire more number theory
porn, such as this website, which gave me the big prime number:

https://bigprimes.org/

But is 982363755354447643447304070919 really a prime number?
Could an AI wizzard guide me through coding their algorithm?

In the end I would have the Baillie-PSW test in Prolog? Or
can my rotten brain do it without this interactive assistance?

I don’t know @Johnny_Rotten … I don’t know how much Rotten your brain is
Mine is and I only do simple stuff since I realized that…possibly you’re younger than me so you may still have hope

Well you can lookup my age on Wikipedia under John Lydon.
Now chatgpt produced the Prolog code in a blink:


[…]

[…]

https://chatgpt.com/share/10403321-a61e-40fc-a464-97368c136ab6

Probably it was already implemented somewhere on
the web, and it only had to retrieve the code.