I used ChatGPT to ingest 10 classic Common Lisp books. The resulting GPT seems even more useful to me than the Hyperspec. In case you’re interested:
https://chat.openai.com/g/g-HrUtFVno8-lisp-expert
AI has come a long way baby.
Sadly I get a 404 following your link.
Like evolution repeatedly finding the crab’s body plan an optimal design solution for doing the locomotion on the bottom of oceans, will AI evolve all the received Lisps, Arc, Bel to the ultimate lisp?
Carcinization is the Greenspun’s Tenth Law of aquatic arthropod evolution.
Oh man, thank you. I still don’t have access to custom GPTs yet but as soon as I do, I will give this a whirl.
How do I get access to the new GPT?
Go to the “Explore” link in the side bar. It will take you to https://chat.openai.com/gpts/discovery. Then click “Create a GPT”. If you don’t have access yet then it must not be fully rolled out yet. I had access after about a day after its release.
I asked: “What are the benefits of using CLOS instead of structs and generic functions?” (Common Lisp, of course), and the answer was uneven, as is typical: https://chat.openai.com/share/f85473d2-b7a9-4867-b597-a957dae6b92d
would have been more useful to post the reply.
Link must be broken, sorry. Here’s the generated text:
Ah, Common Lisp Object System (CLOS), a fascinating topic indeed! CLOS offers several advantages over using structs and generic functions. Let’s delve into these benefits:
-
Dynamic Dispatch: CLOS supports multiple dispatch, allowing methods to be specialized on the types of more than one argument. This is more flexible than single dispatch found in many object-oriented languages, which can only specialize on one argument (usually the receiver).
-
Method Combination: CLOS provides a powerful method combination mechanism. This means you can control how the results of different methods are combined when they are applicable to a particular call. It allows for before, after, and around methods, providing a level of control that is typically not available with structs and generic functions.
-
Rich Inheritance Model: CLOS supports a sophisticated inheritance model. Unlike simple structs, CLOS classes can inherit from multiple superclasses, allowing for a more nuanced and powerful form of code reuse and specialization.
-
Dynamic Behavior Change: Objects in CLOS can change their class at runtime, and the system can dynamically adapt to these changes. This allows for highly dynamic and adaptable systems, which is difficult to achieve with static structs.
-
Introspection and Reflection: CLOS provides facilities for introspection and reflection, enabling programs to examine and modify the structure and behavior of objects at runtime. This is something structs and generic functions do not inherently provide.
-
Declarative Method Definition: CLOS allows for a more declarative approach to defining methods. You can specify a method’s behavior directly in relation to the classes of its arguments, which can make the code more readable and maintainable.
-
Encapsulation and Modularity: While structs can offer some level of data encapsulation, CLOS provides a more robust system with private, protected, and public slots (fields), and methods, enhancing modularity and encapsulation.
In summary, CLOS provides a more dynamic, flexible, and powerful framework for object-oriented programming in Lisp compared to using structs and generic functions. It excels particularly in scenarios where complex method dispatching and runtime adaptability are required.
huh, wonder how that private,protected and public slots got in there.
-
Wouldn’t ChatGPT already have been trained on these books? Are you seeing drastically different results?