this post was submitted on 13 Nov 2023
1 points (100.0% liked)

Lisp

53 readers
3 users here now

founded 1 year ago
MODERATORS
 

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.

top 11 comments
sorted by: hot top controversial new old
[–] Wood_Work16666@alien.top 1 points 1 year ago (1 children)

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?

[–] bitwize@alien.top 1 points 1 year ago

Carcinization is the Greenspun's Tenth Law of aquatic arthropod evolution.

[–] DevMahasen@alien.top 1 points 1 year ago

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.

[–] simendsjo@alien.top 1 points 1 year ago

Wouldn't ChatGPT already have been trained on these books? Are you seeing drastically different results?

[–] ipmonger@alien.top 1 points 1 year ago (1 children)

How do I get access to the new GPT?

[–] MCHerb@alien.top 1 points 1 year ago

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.

[–] anticrisisg@alien.top 1 points 1 year ago (1 children)

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

[–] Shoddy_Ad_7853@alien.top 1 points 1 year ago (1 children)

would have been more useful to post the reply.

[–] anticrisisg@alien.top 1 points 1 year ago (1 children)

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:

  1. 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).

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

[–] Shoddy_Ad_7853@alien.top 1 points 1 year ago

huh, wonder how that private,protected and public slots got in there.

Sadly I get a 404 following your link.