Tag: AI

  • Integrating AI Language Models into Smalltalk Development Workflows

    Integrating AI Language Models into Smalltalk Development Workflows

    In recent months, Craig Latta has been exploring the integration of AI language models, particularly GPT-4, into Smalltalk development environments, with the goal of enhancing workflows and improving conversational interactions with the language model. Rather than relying on traditional coding methods, Craig has focused on fine-tuning the model using English system prompts, with promising results. This approach aims to guide the AI’s behavior through prompt evolution, rather than direct coding, leading to surprisingly effective outcomes.

    One of the key insights from this experimentation is that GPT-4’s pre-existing knowledge of Smalltalk and Squeak provides a solid foundation for further fine-tuning. By applying constraints to system prompts – such as instructing the model to avoid sending messages to access objects when direct access via instance variables is possible – Craig has steadily refined the AI’s responses.

    Conversing with the Language Model in Squeak

    A central goal of the project was to enable conversations with the AI model from within any text pane in Squeak, utilizing Smalltalk’s classic “do it,” “print it,” and “inspect it” functionalities. To achieve this, Craig modified the Compiler>>evaluateCue:ifFail: method to handle UndeclaredVariable exceptions. When an undeclared variable (e.g., “What” in “What went wrong?”) triggers an exception, the model object underlying the text pane takes over, interpreting the next chat completion from the language model.

    The model objects Craig has focused on are instances of Smalltalk’s Debugger and Inspector. A notable feature of this approach is that it logs all interactions – whether English prompts or Smalltalk code – into the changes log, just as it would with traditional code. Each model object maintains a reference to the most recent chat completion, allowing successive prompts to be interpreted in the context of the entire conversation, fostering dynamic and evolving dialogues.

    Practical Results and Application

    The system has already shown practical value in a live development environment. For example, when evaluating a prompt like “What went wrong?” in the debugger, the language model provides surprisingly accurate and detailed responses, as if debugging the code itself. Similarly, when tasked with generating Smalltalk code – such as instructions for selecting the most recent context with a BlockClosure receiver – the debugger manipulates the code correctly, demonstrating the viability of using the AI in real-time development workflows.

    Future Exploration

    Currently, Craig is expanding the scope of the AI’s functionality. He is experimenting with prompts that describe the application’s domain, purpose, and user interface, eager to see how the model can assist in these areas. This exploration has the potential to significantly improve Smalltalk development workflows by integrating AI-driven conversational interactions into the process.

    As AI models continue to evolve, Craig anticipates further advancements in integrating these models with development environments, offering new opportunities to enhance productivity, troubleshooting, and even code generation. The future of AI-enhanced Smalltalk development looks promising, and this project represents an exciting first step. For more details on Craig’s exploration of AI in Smalltalk development, be sure to check out his full blog post at thisContext.

    Growing Interest in AI for Squeak Development

    There has been growing interest in applying both semantic understanding and generative AI to the Squeak environment, as these technologies hold great promise for improving development workflows. By combining the ability to generate code with deeper understanding and reasoning, developers are beginning to explore new ways AI can assist with both writing and debugging Smalltalk code. This integration could help streamline development, enhance debugging efficiency, and even assist in explaining complex code patterns, all within the context of Squeak’s unique environment. Or, it could take over the world. You decide. As interest continues to grow, a future article and video from a recent demonstration will explore these advancements in more detail, offering insights into how AI-driven approaches can enhance Smalltalk programming and provide practical demonstrations of these evolving tools.

    Have a great time with Smalltalk and keep on Squeaking!

    Photo by Andrea De Santis on Unsplash

  • UKSTUG Meeting on Wed 27: Christoph Thiede on SemanticText and Guille Amaral on Webside

    UKSTUG Meeting on Wed 27: Christoph Thiede on SemanticText and Guille Amaral on Webside

    Join us next Wednesday for an engaging double presentation on innovative advancements in Smalltalk programming:

    1. SemanticText: Improving Exploratory Programming in Squeak with Generative AI

    Presenter: Christoph Thiede

    From autocomplete to conversational agents, AI is transforming how we interact with code. Christoph will introduce SemanticText, a framework that integrates large language models (LLMs) into Squeak/Smalltalk, enabling conversational agents, semantic search tools, and retrieval-augmented generation workflows. He will showcase experimental integrations with Squeak’s tools and present the concept of a semantic exploratory programming system for debugging and exploring systems using natural language.

    Bio: Christoph Thiede is a member of HPI’s Software Architecture Group and a core developer of Squeak/Smalltalk, with a focus on enhancing developer productivity and tools.

    An extended abstract is available here.

    2. Webside: A Unified HTTP API for Smalltalk

    Presenter: Guillermo Amaral

    Guillermo will discuss Webside, an API that standardizes communication with Smalltalk systems via HTTP and introduces its application as a fully operational IDE. He will highlight recent improvements in its extensibility and functionality.

    Bio: Guillermo Amaral is the creator of Webside and has been a passionate Smalltalk user and advocate for over 20 years, leveraging it throughout his academic and professional journey.


    The meeting will be an online meeting from home and take place on 2024-11-27 at 7pm GMT/19:00 UTC/20:00 CET/11:00 PST. The event is hosted on Meetup and will be hold via Zoom.

    If you are curious about some of the latest ideas for Squeak and Pharo, tune in on Wednesday and bring all your questions and ideas!