Author: Scott Gibson

  • Using the Squeak Help System for Your Projects

    Using the Squeak Help System for Your Projects

    Dr. Nicola Mingotti has created a highly useful video tutorial, “The Squeak Smalltalk Help System”, where he demonstrates how to use and implement the Squeak Help System in your projects. In the video, Dr. Mingotti walks you through a step-by-step guide on creating documentation for your code, providing valuable insights into integrating the help system into your workflow. You can check out his video here.

    Additionally, Dr. Mingotti offers supporting materials in his Swiki article here, which includes code snippets and further comments to aid your understanding.

    Overview of the Squeak Help System

    One of the many great features of Squeak is its rich set of help documentation. The default Squeak image comes with valuable documentation that covers topics such as: How to Use Squeak, How to Contribute to Squeak, Tutorials, The Terse Guide to Squeak, and Using WebClient and WebServer. This documentation is easily searchable, making it a highly useful resource for your projects.

    Help System vs. Code Comments

    It is important to note that the Squeak Help System is not intended to replace code comments. Squeak/Smalltalk provides excellent functionality for adding comments directly in your code, and these should remain the primary way to document code behavior, logic, and functionality. The Help System is designed for documentation outside the scope of code comments, such as explaining overall project goals, providing tutorials, or offering guidance on using tools and features in your project.

    Features of the Help System

    The help documentation system offers a variety of features, including text styling (bold, italics, strikethrough, underline), code formatting and syntax highlighting, and URLs, to name a few.

    Additionally, you can add images to your documentation. This feature is currently available in the Trunk image, but you can implement it in other images as well by using its code as a reference. For the 6.0 image, you can perform a fileout of the SqueakHelpTextImage class from the Trunk image and then filein it into the 6.0 image. Alternatively, you can create your own code to implement this functionality! Thanks to Christoph Thiede for providing guidance on how he implemented this feature. You can find his post here.

    How to Insert an Image into Your Help Page

    1. Open a Workspace window.
    2. In the Workspace, perform a “do it” on the following code:
      Clipboard clipboardText: Character startOfHeader asString.
    3. In your help page window, move your cursor to the location where you want to insert the image. Paste the clipboard contents (Ctrl+v or Cmd+v on Mac). At this point, you won’t see anything yet.
    4. (Optional) Skip this step if you prefer typing the code manually. Copy the following code, replacing /path/to/file/image.png with the actual path and filename of your image:
      SqueakHelpTextImage forForm: (ImageReadWriter formFromFileNamed: '/path/to/file/image.png')
    5. Return to your help page window and move your cursor to the same location where you want to insert the image. Press Alt+5 (or Cmd+5 on Mac), then select “Custom attribute…” from the bottom of the list.
    6. When the Input Requested box appears, paste the image code from Step 4 (or manually type it in) into the field labeled “Enter expression for text attribute:”. You should now see a shaded outline where the image will appear.
    7. Save your changes by pressing Ctrl+s (or Cmd+s on Mac).

    Your image is now successfully inserted into your help document!

    Conclusion

    A big thank you to Dr. Nicola Mingotti for his helpful video tutorial on using the Squeak Help System, which offers a step-by-step guide for integrating the help system into your workflow. His Swiki article is also a helpful resource with code snippets and additional comments. Be sure to check out his materials to further enhance your understanding of Squeak and the Help System!

    Have a great time with Smalltalk and keep on Squeaking!

  • Simple File-Based Distributed Job Queue in Smalltalk

    Simple File-Based Distributed Job Queue in Smalltalk

    Ramon Leon has a new post on his On Smalltalk blog. In it, he describes how he chose a simple solution for a complex problem. Instead of relying on popular, complex systems, he built a straightforward, file-based job queue in Smalltalk, which has been running smoothly in his production systems for years. He also shares Smalltalk code he created to accomplish this goal, highlighting the effectiveness of simplicity in solving challenges.

    Check out his latest post “Simple File-Based Distributed Job Queue in Smalltalk” here.

    Photo by Tima Miroshnichenko from Pexels: https://www.pexels.com/photo/close-up-view-of-system-hacking-in-a-monitor-5380664/

  • Lesson 5: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 5: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 5 – Designing Objects

    In this lesson, you will begin the process of creating your space shooter game by identifying and designing the key objects that will make up the gameplay. Having become familiar with the Squeak programming environment and basic concepts in previous lessons, it is now time to focus on the major components of the game. Understanding and determining these objects and their roles will lay the foundation for the game mechanics we will develop in upcoming lessons.

    You will be building a simple, classic space shooter game. The game will feature a user-controlled ship that can shoot, enemy creatures that can be destroyed, and a score that accumulates points for each enemy destroyed. These are some of the primary objects you will work with, but as you proceed, you may discover additional objects or find that you need to adjust the roles and responsibilities of those you have already defined.

    Object Roles and Responsibilities

    When designing your objects, it helps to focus on two key aspects: what the object is and what it does – that is, its roles and responsibilities. For example, the spaceship object is something you control, and its responsibility is to move and shoot at enemies. Similarly, the enemy object is something that can be destroyed when hit by a shot. Other objects, like the score object, also play important roles in your game.

    At this stage, you do not need to know all the objects you will need right away – this is perfectly fine! Object-oriented programming (OOP) is flexible, allowing you to modify your design as your game evolves. As you write more code, you might find that new objects are necessary, or some you initially considered may not be needed after all.

    Key Questions to Guide Your Design

    As you work through this process, consider the following questions to guide your object design:

    1. How many objects can you identify in the example? Look closely at the example game screen provided in Figure 1 of Lesson 5. How many distinct elements can you identify that might need to be treated as objects? These could include characters like your ship, the enemies, a shot, or even the score. Everything you see has a purpose in the game. Take a moment to list them out and think about what each element represents.
    2. What names would you choose for these objects? Think about what each object is and what it does. For example, if your game includes a spaceship, the object representing it might be called Ship. If there are enemies, you might have an object called Enemy. Choosing clear and descriptive names from the start will help your code stay organized and easier to understand.
    3. How do these objects interact with each other? Once you have identified and named your objects, think about how they interact. How does your ship shoot at enemies? How do enemies react when hit? Considering these interactions early on will give you a clearer idea of how each object contributes to the overall functionality of your game.

    Naming and Organizing Your Objects

    An important part of designing objects is choosing meaningful names. The names you pick should make it clear what each object is and what it does in your game. At this stage, it is best to keep things clear and simple. For example, if you are designing the object that represents the player’s ship, use a name that clearly describes it, like Ship. Similarly, for enemies, choose a name that makes it obvious what the object represents.

    For other objects, consider their role and responsibility. What would you call the object that represents something the player shoots? And what about the object that tracks the score? Remember, it is better to use simple, intuitive names that describe the object’s function rather than complicating things with complex names.

    Do not worry if the names are not perfect at first. The most important thing is clarity. You can always refine them as your game evolves. In Squeak, renaming objects is easy, so you do not need to worry about getting everything right in the beginning.

    Final Thoughts

    In object-oriented programming, the process of designing and refining your objects is ongoing. You do not need to have all the objects figured out from the start, and it is okay if things are not perfect right away. The goal is to focus on understanding what each object does and how it interacts with others to create the overall game experience. Over time, you will continue to refine and expand your design.

    Remember that in Smalltalk, making changes to your objects is simple – whether that involves adding new objects, renaming them, or adjusting how they behave. Do not be afraid to iterate and improve as you go along. It is all part of the learning process!

    Good luck as you begin designing your space shooter game. Be sure to refer back to the example game screen shown in Figure 1 as well as the rest of Lesson 5 in the online lesson or the downloadable PDF as you proceed.

    Lesson Resources

    For Lesson 5 and the complete series of lessons on creating the Shooter Game, including all the necessary resources such as PDFs, source code, images, sound file, and more, visit https://scottgibson.site/ShooterGame/. This site provides everything you need to progress and also lets you play the game directly in your browser, seamlessly powered by SqueakJS. Whether you are just getting started with Squeak/Smalltalk or advancing your skills, these resources will help guide you as you move forward through the game development process.

    Have a great time with Smalltalk and keep on Squeaking!

  • Using TextLineMorph in Squeak for Single-Line Text Input in Graphical Interfaces

    Using TextLineMorph in Squeak for Single-Line Text Input in Graphical Interfaces

    While working with Morphs can be quite easy at times, working with both text and Morphs might not always seem as straightforward. Dr. Nicola Mingotti provides a helpful video that demonstrates a commonly needed functionality in graphical interfaces, where you would typically want to accept a single line of textual data. Check out his video to see how this can be easily accomplished. You can view the video demonstration “Make a TextLineMorph in Squeak Smalltalk” here.

    Have a great time with Smalltalk and keep on Squeaking!

  • Lesson 4: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 4: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 4: Using Cascades in Code

    This lesson will be the last introductory lesson (lesson practices) before we begin the actual game creation.

    This lesson is simple and quick, but it introduces cascades, which are commonly used in Smalltalk code. Understanding and becoming familiar with them will help you utilize them effectively, as well as recognize them when you encounter other Smalltalk code. By using cascades, you can reduce code clutter and minimize the amount of typing needed.

    The following code is an example from Lesson 3. This code completes messages by using a period which in Smalltalk is the statement separator. Placing a period between two expressions turns them into independent statements.

    s := SimpleButtonMorph new.
    s label: ‘Move right’.
    s target: moveRight.
    s actionSelector: #value.
    s openInWorld.

    The following code is the example from Lesson 4 using cascades.

    s := SimpleButtonMorph new
    label: ‘Move right’;
    target: moveRight;
    actionSelector: #value;
    openInWorld.

    Even though the code looks simpler, it is important to understand what is happening. When the same object is the receiver of a sequence of consecutive messages, you do not need to repeat it. You can remove the repeated receiving object and replace the ending period with a semicolon (;). So, the basic rules for cascades are:

    • Cascaded expressions are separated by semicolons
    • All cascaded messages share the same receiver as the last message executed before the first semicolon

    So, if it is as simple as replacing periods with semicolons, why does this lesson’s example not work if a semicolon were placed after “SimpleButtonMorph new”?

    SimpleButtonMorph is a class, not an instance of that class. This means that you cannot send instance messages directly to the class itself. A class can receive class messages, but in this example, we are sending instance messages, which can only be sent to instances of the class, not the class itself. Therefore, to interact with the instance, you must first create an instance by sending the message “new” to SimpleButtonMorph. It is this instance of SimpleButtonMorph that can receive instance messages. In other words, all the cascaded messages are sent to the object created by “SimpleButtonMorph new”, demonstrating how a sequence of cascaded messages can be sent to the result of an expression.

    In conclusion, understanding and using cascades in Smalltalk can greatly simplify your code, making it more readable and reducing redundancy. By chaining multiple messages to the same object in a single expression, you can streamline your code and focus on the logic rather than repetitive syntax. With this knowledge, you can write more efficient, elegant Smalltalk code and recognize cascading patterns in other code you encounter.

    For Lesson 4 and the complete series of lessons on creating the Shooter Game, including all the necessary resources such as PDFs, source code, images, sound file, and more, visit https://scottgibson.site/ShooterGame/. This site not only provides everything you need to progress but also allows you to play the game directly in your browser using SqueakJS. Whether you are just getting started with Squeak/Smalltalk or advancing your skills, these resources will help guide you as you move forward through the game development process.

    Have a great time with Smalltalk and keep on Squeaking!

  • Squeak Oversight Board 2025 – Call For Candidates

    Squeak Oversight Board 2025 – Call For Candidates

    The following announcement was made by Patrick Rein on the Squeak Developers mailing list (here). Please announce your candidacy on Squeak-dev or vote for a candidate. Now is the time to be involved!


    Hi All,

    It’s that time again to raise your voices and elect your board!
    Can you believe it’s been over a year and one day already?

    It’s a time for you to stand up, help your community and volunteer to serve!

    Squeak wants you!

    Every year we elect the SOB (Squeak Oversight Board) consisting of seven members from our community. The current board members are:

    1. Marcel Taeumel
    2. Vanessa Freudenberg
    3. Tim Rowledge
    4. David T. Lewis
    5. Craig Latta
    6. Christoph Thiede
    7. Bruce O’Neel

    For more info on the board please see:
    https://squeak.org/board/#the-mission

    Everything about the election, including schedule and more, is tracked here:
    https://wiki.squeak.org/squeak/6667

    Now until Friday 21st of March 2025, 18.00 UTC: Nominations of SOB members and campaigning!

    Candidates should nominate themselves and start their campaign on the squeak-dev mailing list. Or if you nominate someone else, make sure that person really wants to run. 🙂 I will not put anyone on the candidate list until that person makes it known on squeak-dev that he/she intends to run.

    During this period, the candidates should ideally present themselves on squeak-dev, unless they have already done so, and the community can ask questions.

    I encourage you to reach out to potential candidates, people that are active in the community and represent your views, and ask them to run.

    Some people will not run without encouragement. Also, I know that some people wait to the last minute to run for the board to see if others will run but please consider getting this year off to a faster start and just jump right in!

    The schedule and process are as follows:

    • Now until Friday 21st of March 2025, 18.00 UTC: Nominations of SOB members and campaigning!
    • Friday 21st of March 2025, 18.00 UTC: Candidate list is finalized.
    • Friday 21st of March 2025, ~19.00 UTC: Online election starts.
    • Friday 4th of April 2025, 19.00 UTC: Online election ends.
    • Results will be announced immediately after the election ends.

    The voting period is two weeks long and ballots are sent out via email.

    And how do you end up on the voter list? See below. 🙂

    IMPORTANT: New voters will NOT be added once the election is started.

    You MUST try to get on the voter list before the online election starts or you will NOT be able to vote. If your email address has changed please try to make sure it is changed on the list of voters before the election starts.


    If you were invited to vote last year you are already on the voter list, no worries! If you are a new Squeaker and wish to vote you should do ONE of the following:

    • Get a “known” Squeaker to vouch for you. If a known Squeaker sends an email to voters (at) squeak.org giving me a name and email for you, then I will add you.
    • Send an email to voters (at) squeak.org yourself (and CC to
      squeak-dev if you like) with information/arguments showing me that you are indeed serious about voting and that you are indeed a Squeaker.

    When the voting period starts all voters will receive an email with instructions and a link to the voting website.

    If there are any further questions, just reply in this thread and I will closely track it – or send email to voters (at) squeak.org which points to me.

    …so let’s get on with it!

    All the best,
    Patrick

    Photo by Tara Winstead from Pexels: https://www.pexels.com/photo/red-check-mark-over-black-box-8850706/

  • ESUG 2025 International Conference

    ESUG 2025 International Conference

    The 30th ESUG conference/summer-school will be held in Gdansk, Poland from Tuesday 1st to Friday 4th of July 2025.

    Program & Info

    To be fleshed out.

    Calls for Contributions

    Conference registration

    Early registration deadline: 15/04/2025

    Conference prices ESUG 2025 in Euros:

    • Early Registration Fee: 600€ (all days) / 200€ (per day)
    • Late Registration Fee: 1000€ (all days) / 300€ (per day)
    • Extra person to social dinner: 70€
    • Payment by bank transfer: free of charge
    • Payment by credit card: +6% fees
    • For late registrations we cannot ensure the availability of T-Shirts nor Social Event extra participants
    • : If the refund is requested during the early bird period all the fee (without charges) will be refunded. If it is requested after the early bird period is finished, the refund will be 50%

    Stay tuned.

    Conference organization

    ESUG 2025 organization committee

    • Stéphane Ducasse, Inria Lille, France.
    • Pablo Tesone, Pharo Consortium, France.
    • Marcus Denker, Inria Lille, France.
    • Noury Bouraqadi, IMT, France.
    • Luc Fabresse, IMT Nord Europe, France.
    • Christophe Demarey, Inria Lille, France.
    • Steven Costiou, Inria Lille, France.
    • Oleksandr Zaitsev, CIRAD, France.
    • Mariusz Matuszek, Gdansk University, Poland
    • Paweł Czarnul, Gdansk University, Poland

    IWST 2025 organization committee

    • Gordana Rakic, University of Novi Sad, Serbia
    • Guille Polito, Inria Lille, France
    • Steven Costiou, Inria Lille, France
  • New Video Demonstrating Morphic Animation

    New Video Demonstrating Morphic Animation

    Would you like to view a demonstration of how to take advantage of the Morphic animation system in Squeak? If so, you are in luck! A new video has recently been posted that takes you through the steps of doing just that. The Morphic animation system in Squeak offers a simple way to animate and interact with objects in your environment. Whether you are building basic animations or more complex interactive systems, Morphic provides a wealth of possibilities for both beginners and seasoned developers alike. You can watch the video titled “A BlinkingRectangle Morph in Smalltalk” here.

    In addition to the video tutorial, you can explore a very simple, yet powerful example included in the Squeak image. This example morph can be found with the somewhat hard-to-remember name, MorphExample. By evaluating “MorphExample new openInWorld” (without the surrounding parentheses) in a Workspace, you can discover how easy it is to make morphs perform various actions. This demonstration emphasizes the beauty of the Morphic system’s simplicity: you do not need to write complex code to animate objects. Instead, you can focus on creating rich, interactive applications and interfaces with just a few lines of code.

    One of the most compelling aspects of the Morphic system is how effortlessly it enables dynamic, real-time interaction, especially when used within the Smalltalk environment. Compared to many other graphical frameworks, where handling interactions often requires more complex event handling and manual updates, Morphic allows you to create interactive, animated objects with minimal code. For example, you can open a halo on the star, resize or rotate it, and the animation will continue to perform and adjust dynamically to the star’s new dimensions. This responsiveness highlights the simplicity and flexibility of the Morphic system, making it an ideal choice for building interactive systems without the need for manual recalculations or updates.

    If you are interested in delving deeper into the Morphic system, you can access Chapter 12 of Squeak by Example for more detailed explanations and examples. The book offers a clear guide to the system, making it an excellent resource for developers looking to better understand Morphic. You can read the full chapter here.

    For those who want to learn more about using halos with morphs in Squeak, there is another excellent video resource available. The video “Morphic Halo icons in Squeak Smalltalk” demonstrates how to interact with the Morphic halo icons to manipulate morphs in the Squeak environment. Whether you are new to Squeak or already familiar with the basics, this video provides valuable insights into how halos can be used to interact with morphs. Check it out here.

    Have a great time with Smalltalk and keep on Squeaking!

  • Lesson 3: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 3: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 3: Moving a Morph with Code

    In this lesson, we will learn about blocks in Smalltalk. A block is a small piece of code that can be treated as an object. It is often used to perform actions or calculations when needed. Blocks are written inside square brackets, and they can be passed around or executed by other parts of the program. While blocks are commonly used in programs to make things happen, for now, think of them as a way to understand how code can be organized and applied. This lesson is a simple introduction to blocks, so you do not need to fully understand everything about them yet. By the end of the lesson, you will have a better idea of what blocks are and how they work in code. You will also learn how to use blocks to interact with your EllipseMorph.

    We will also use a simple button morph to interact with our EllipseMorph. By clicking the button, you will be able to make the EllipseMorph move. This lesson will show you how to create a simple graphical button that can then be used to interact with your morph. This is a nice way of interacting with the morph without having to do much coding for now. It allows you to focus on understanding the basic concepts before diving into more complex programming. As you progress, you will learn how to build more advanced interactions and customize the behavior of your morphs.

    Additional Resources

    For additional learning, there are several resources that can help you dive deeper into the topics we covered. You can start by exploring the Block Swiki page here to get a better understanding of how blocks work in Smalltalk. If you want to learn more specifically about the BlockClosure class, check out a detailed explanation here, also a Swiki article. Another helpful resource is the Terse Guide to Squeak online, which is always available within the Squeak image under Help -> Terse Guide to Squeak. Lastly, the Squeak by Example book is an excellent resource for exploring Squeak and Smalltalk in more detail, and you can read it here. These resources will provide you with more in-depth information and examples to support your learning.

    For the complete series of lessons on creating the Shooter Game, including all the necessary resources like PDFs, source code, images, sound files, and more, visit https://scottgibson.site/ShooterGame/. This site not only offers everything you need to progress but also lets you play the game directly in your browser using SqueakJS. Whether you are just getting started with Squeak/Smalltalk or are advancing your skills, these resources will help guide you as you progress through the game development process.

    Have a great time with Smalltalk and keep on Squeaking!

  • Lesson 2: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 2: Programming the Shooter Game in Squeak/Smalltalk

    Lesson 2: Moving Morphs

    In this lesson, we will focus on making Morphs move, an essential step in creating interactive and engaging gameplay. You will learn how to send messages to Morph objects, enabling them to change their position on the screen. Movement is a key part of any game, whether it involves your ship, enemies, or projectiles. By the end of this lesson, you will understand different ways to move Morphs relative to a specific location, giving you basic control over their movement in your game.

    To begin, it is important to understand how Morph movement is accomplished in Squeak, a version of Smalltalk, as not all Smalltalk implementations support Morphs, which is what we are using here. Squeak is an object-oriented language, meaning everything is an object. Objects can communicate with each other by sending messages, which is how actions and information are requested in Squeak. Much like how people communicate by sending messages to one another, objects in Squeak send messages to request actions or receive information, or both.

    Understanding Messages in Smalltalk

    In Smalltalk, there are three types of messages: unary, binary, and keyword. Unary messages have the highest precedence, followed by binary messages, and then keyword messages. These different types of messages help objects interact in various ways.

    • Unary messages are messages that are sent to an object without arguments.
    • Binary messages consist of special characters like +, -, or @, and each one takes exactly one argument to perform an action or computation involving two objects.
    • Keyword messages consist of one or more keywords, each ending with a colon (:), and each keyword takes an argument.

    The Difference Between position: and position

    In this lesson, you will focus on understanding how to use the position messages. The first important thing to know is the difference between two messages that seem similar but actually work in different ways: position and position:. They both deal with the position of Morphs, but they are used differently.

    • The message position, without a colon, is a unary message. It does not require any arguments and simply retrieves the current position of the Morph.
    • The message position:, with a colon at the end, is a keyword message. It can receive a value or an argument, which is used to change the position of the Morph.

    This difference in how the messages are structured is important because it tells Squeak how to process them. The position message simply retrieves the current location of the Morph, while the position: message accepts an argument to set or change the Morph’s location.

    Understanding How to Control Morph Movement

    By understanding how messages work in Squeak, you can effectively control the movement of Morphs. Each message, whether unary, binary, or keyword, enables you to send specific instructions to objects, helping them change their state or position on the screen. This knowledge of messages forms the basis of interacting with objects in your game.

    As you progress through the lesson, you will learn how to send different types of messages to Morphs, allowing you to interact with them in various ways. This skill will be crucial for making your game dynamic and interactive, enabling you to work with Morphs to create engaging gameplay elements.

    By the end of this lesson, you will have a good foundation in how messages are used to control movement in Squeak, and you will be ready to apply this knowledge in your game.

    Final Notes

    Please remember to save your Squeak image after each lesson. This way, if you ever encounter a problem with your code, you can always close the image and reopen it from where you last saved it. It would be helpful to save your Squeak image after you have successfully completed each lesson, so you can always reopen the image from the last completed lesson in case something unexpected happens while proceeding through the current lesson.

    Note that the extra parentheses in this lesson are not necessary, but they may help new learners visualize the objects conceptually, especially at the start. The syntax is still correct and can be adjusted later, so nothing harmful is being introduced. At this point, it seemed better to provide a visual, conceptual understanding through the code, rather than focusing solely on minimizing syntax. Future lesson code will not include these.

    Lesson Resources

    For the complete series of lessons on creating the Shooter Game, including all the necessary resources like PDFs, source code, images, sound files, and more, visit https://scottgibson.site/ShooterGame/. This site not only offers everything you need to progress but also lets you play the game directly in your browser using SqueakJS. Whether you are just getting started with Squeak/Smalltalk or are advancing your skills, these resources will guide you through each step of the game development process, helping you apply the techniques you learned in this lesson, such as moving Morphs and controlling game objects.

    Have a great time with Smalltalk and keep on Squeaking!