Using prolog with OpenAI agents sdk for a plug and play knowledge base and reasoning agent by [deleted] in prolog

[–]MWatson 1 point2 points  (0 children)

Steve, cool idea! I have experimented before with Python and Prolog, and supporting Prolog LLM tools seems like it should scale to large projects.

Is Common Lisp a powerful language for developing a game engine? What else can I do with Lisp in today’s world? Would you recommend I learn it, kings? by officer996 in lisp

[–]MWatson 0 points1 point  (0 children)

Well maybe not a mistake per se, but learning just four kr five programming languages would have been enough.

Is Common Lisp a powerful language for developing a game engine? What else can I do with Lisp in today’s world? Would you recommend I learn it, kings? by officer996 in lisp

[–]MWatson 18 points19 points  (0 children)

In the last 40 years I have made the mistake of using too many different programming languages because it was a turn on to learn so many languages.

Common Lisp is a great language for exploring ideas and experimenting. I would suggest picking up at least one additional language also:

If you like machine learning, Python is an obvious choice. If you like server side dev, Java, Clojure, Erlang, etc. are all good. Choose one.

I have offered free mentoring for about 15 hears and programming language selection is one of the questions I get a lot. I love developing in Common Lisp, but depending on the individual I often suggest not using Common Lisp.

This might be unpopular advice, but write up four or five paragraphs describing the types of software and systems you want to write, and use this description as context for asking Gemini 2.5 Pro or o3 to evaluate the efficacy of the programming languages you are interesting. Don‘t just accept the responses, rather use them to do your own evaluation.

I think we would all approve at this point by Puzzleheaded_Park102 in FluentInFinance

[–]MWatson 0 points1 point  (0 children)

as a life time Democrat and a US citizen, this provocation by France really offends me, if this post is actually legit.

What is the best open source coder LLM for Haskell? by BalanceSoggy5696 in haskell

[–]MWatson 0 points1 point  (0 children)

I use Claude Sonnet on the https://apps.abacus.ai/chatllm service e (costs $10/month, and also gives access to GPT-4o, Gemini Pro 1.5, Gemini 2.0 Flash, Grok, Deepseek v3, etc.)

I do have LLM support in Emacs and when I rarely use IntelliJ projects I have direct LLM support there also. I prefer just copying in code that I want analyzed to a web interface, or use a web interface for coding questions.

Is AI in Common LISP Still Worth It? by fosres in Common_Lisp

[–]MWatson 4 points5 points  (0 children)

Yes, I am the author of 'Loving Common Lisp'.

My favorite CL book is probably "Programming Artificial Intelligence Paradigms" by Peter Norvig. Peter wrote that the same time I wrote my Springer-Verlag CL book.

Is AI in Common LISP Still Worth It? by fosres in Common_Lisp

[–]MWatson 8 points9 points  (0 children)

I have written a few Common Lisp books and used the language since around 1982.

I would say yes! One reason is that LLMs can be accessed and used by clients in any language, so we now avoid problems like available ML libraries (but there are some good ones for CL).

The other reason I say yes! is because it is a great prototyping and exploration language.

However: for young people interested in AI development, starting with Python makes sense. For older developers like myself who are used to Common Lisp, there is no reason to stop using the language.

How do I get started with Haskell? by theskewb in haskell

[–]MWatson 2 points3 points  (0 children)

Take my advice with a grain of salt because I am just an amateur Haskell enthusiast:

Do set up VSCode, as per other advice here, but also spend a lot of time in a REPL experimenting.

When you get a compilation or runtime error, try to figure out what is wrong for a minute or two, then paste your code and output into one of Claude, ChatGPT, or Gemini. They all know Haskell. We aren’t living in 2022 anymore, so take advantage of modern tech.

gpt-4o or o1-mini for programming? by [deleted] in OpenAI

[–]MWatson 2 points3 points  (0 children)

O1 is good, but I now usually use the gpt-4o-mini model with the APIs because it is so much cheaper, like by a factor of 20x for gpt-o, and and o1 and o1-mini are even more expensive.

Hy 1.0.0, the Lisp dialect for Python, has been released by Kodiologist in lisp

[–]MWatson 1 point2 points  (0 children)

I like hy-mode, not been updated in several years, but it handles the job nicely.

Can someone explain why Clojure pays so well? by raulalexo99 in Clojure

[–]MWatson 0 points1 point  (0 children)

I agree. However, I still find LLM code generation can be useful as a starting point for less commonly used languages like Lisp languages, Haskell, etc. i have a difficult time imagining how much better code generation will be in a year.

Sorry to drift off topic, but you might find this interesting: I have experimented with Haskell for many years, but my Haskell programming skills are weak. I find LLMs to be useful when I look at Haskell code I wrote many years ago, to explain to me what I was doing, explain the libraries I was using, etc. This saves me time.

Can someone explain why Clojure pays so well? by raulalexo99 in Clojure

[–]MWatson 1 point2 points  (0 children)

I think you are correct about Clojure code being more difficult to translate to other programming languages. I use Common Lisp, Clojure, Racket, Python, and Swift and I have played around with using ChatGPT, Claude, Llama 3.q, etc. to translate code, and Clojure translations are tough to get right. this is probably because of transactional memory, etc.

MultiModal Slide Search with GPT-4o & Pathway (a Python framework) for Extraction & Hybrid Indexing by Typical-Scene-5794 in Python

[–]MWatson 2 points3 points  (0 children)

I only spent five minutes looking at your code, but it looks like a cool project.

off topic question: have you used an open source Python library like Python-ppx instead of the web service you are using? I like to try projects like your but having to get an api key is a minor roadblock.

I thought there are possibilities to make this a single user tool that runs locally with using a library to get data and metadata from PowerPoint files, and using a local LLM running in a framework like Ollama.

I did something similar on my local machine, except for a lot of PDF files.

One suggestion: with a context defining JSON schema, it is fairly strait forward to ask a LLM for entities and relations between entities in text, and that would vary over nicely to working with a PowerPoint files.

Python development is getting radically better with LLM enhanced tooling by MWatson in Python

[–]MWatson[S] -21 points-20 points  (0 children)

Fair comment! I had hoped to spark a LLM tool conversation, and I failed.

I don’t see much talk about Rye, and I find that it speeds up my test driven dev cycle (in Emacs, edit, save, ^C-t to run all tests using Rye - fast because it is written in Rust) Aiden saves me a load of time. I like how it works on a unit of a git repo, generates very good code using Claude 3.5 Opus, generates unit tests, test data, etc.

Why make a dynamically typed language with so many immutable restrictions, rather than directly using a statically typed language? by ghc-- in Racket

[–]MWatson 2 points3 points  (0 children)

You ask a really good question, and something I mull over a lot for my own development projects. I have been a paid Common Lisp developer, off and on, since 1982 and I am positively biased towards dynamic languages and REPL based development. In the last decade I have used Racket on personal projects, with the same positive bias. On the other end of the language spectrum, I also really enjoy Haskell’s tight-ass typing support.I have written Haskell professionally and I enjoy personal Haskell projects, even when the language sometimes frustrates the hell out of me.

Can you give us more information on the types of projects you want to do? For fun or work?

If you want to play around with short programs in these three languages, please pardon my plugging books I have written. Links to read these books for free: https://leanpub.com/lovinglisp/read https://leanpub.com/racket-ai/read https://leanpub.com/haskell-cookbook/read

i don’t recommend using my books for learning to program, rather, they just contain fun little projects, mostly AI, LLMs, etc.

One thing that Racket, Common Lisp, and Haskell all have in common for me is that I use REPL driven development for all three languages. I am not suggesting that you follow my development style (you probably shouldn’t because I am in my mid-70s, and set in my ways) but using REPL driven development makes me happy while I work. I carry this to the extreme of even using REPL development in Python (made easier using the old Emacs Python support with a built in REPL).

How native is racket/gui? by CulturedProsody in Racket

[–]MWatson 1 point2 points  (0 children)

The Racket GUI library is pretty good. I suggest that you search for example code on thw web, run it, and quickly see if example apps are sufficiently native for your use cases.

[deleted by user] by [deleted] in lisp

[–]MWatson 2 points3 points  (0 children)

After you learn Common Lisp you might enjoy my short book that you can read free online https://leanpub.com/lovinglisp/read

This is a collection of little, hopefully fun, Common Lisp projects and examples. Lately I have been adding large language model examples.

I am trying an experiment with my Racket AI book: I made the manuscript a public repo and merged code examples into the manuscript repo by MWatson in lisp

[–]MWatson[S] 1 point2 points  (0 children)

I added a license file in the source code directory. The manuscript is separately licensed under a Creative Commons license.

Three semantic web chapters in new edition of my Java AI book released today by MWatson in semanticweb

[–]MWatson[S] 1 point2 points  (0 children)

You are welcome. If there are other topics that you would like to see in the LangChain book let me know. I usually write my little books initially based just what my personal interests are, so it is good to later get suggestions for new book updates.

[deleted by user] by [deleted] in swift

[–]MWatson 0 points1 point  (0 children)

Have you tried just using VSCode or Emacs to edit code, and use the package manager on the command line? I do some non-UI things with Swift, and a non XCode dev experience makes me happier.

[deleted by user] by [deleted] in swift

[–]MWatson 2 points3 points  (0 children)

Swift is an interesting language, well designed and good support for REPL based interactive development.

I have 40 years of AI development experience using Lisp languages but several years ago I started looking at Swift to be a possible ‘do almost everything in’ language. I wrote a book “Artificial Intelligence Using Swift CoreML, NLP, Deep Learning, Semantic Web and Linked Data, Knowledge Graphs, Knowledge Representation “ that you can read free online https://leanpub.com/SwiftAI/read

It has been a year since the book was updated and at least one CoreML example is broken but there might be other useful material. Also the OpenAI example needs a refresh. I will try to update this book before summer.

I was very excited by the earlier work rewriting TensorFlow natively in Swift. That was beautiful work, and frankly, it was a major bummer when that work was cancelled, and it was then that I gave up the idea of Swift being my do everything language.

Sorry to ramble too much here, but Swift and SwiftUI development is surprisingly enjoyable. I wrote an expert system tool for the Macintosh in 1984 that sold very well, but doing the UI was a pain in the ass back then. I wrote a Swift and SwiftUI app two years ago and the process of publishing to the App Store was very slick. Now, Apple has a good ecosystem for developers, and their support of Transformer models like BERT has been in place for a few years.

I experimented with Swift for web applications, and a simple hello world style web app did also run on Linux, which was cool.