Category: Tools

  • Announcing the Multicast Project for Squeak

    Announcing the Multicast Project for Squeak

    Tony Garnock-Jones recently announced on the Squeak Developers mailing list (here) a new contribution to the Squeak community: Multicast, a project that brings UDP multicast socket support to Squeak.

    The project has been published on SqueakSource (here), where you can obtain the code and experiment with it directly. Tony also provided the file-in code with his announcement.

    What Does Multicast Do?

    Multicast provides the necessary support code for creating and using UDP multicast sockets within Squeak. This makes it possible for Squeak images to participate in group communication over networks – an important feature for distributed applications and collaborative tools. Check out the mailing list thread for more information on what multicasting does.

    Current Status and Platform Support

    • Tested on macOS: Initial testing has been done successfully.
    • Linux support: Testing is planned soon.
    • Windows users: Contributions are welcome – help testing Multicast on Windows would be especially valuable.

    Requirements

    To use Multicast, you will need:

    • A current Trunk version of Squeak
    • The SocketPlugin enabled

    How to Help

    Community involvement is encouraged! If you are running Squeak on Linux or Windows, testing Multicast and reporting results would be a great way to contribute.

    Have a great time with Smalltalk and keep on Squeaking!

    Photo by GuerrillaBuzz from Unsplash: https://unsplash.com/photos/a-group-of-blue-lights-iFj_9n695ns

  • Announcing GraphQL for Squeak: A Structured Query Language for Flexible API Development

    Announcing GraphQL for Squeak: A Structured Query Language for Flexible API Development

    A few days ago, Chris Muller announced the immediate availability of GraphQL for Squeak, a package that allows efficient data query and manipulation within the Squeak environment using the powerful GraphQL language. This release introduces a comprehensive implementation of the GraphQL specification, opening another door for Smalltalk developers to create flexible, performant applications with real-time capabilities.

    What Is GraphQL?

    GraphQL is an API query language that allows clients to request precisely the data they need, and nothing more. Unlike traditional REST APIs, where multiple endpoints return fixed data structures, GraphQL provides a single endpoint and a flexible query system. This system empowers clients to define the structure of the response, making it highly efficient and tailored to their needs.

    GraphQL is particularly well-suited for applications that require real-time data updates and complex queries. It supports features such as strong typing, relationships between data types, and aggregating multiple resources into a single query. These characteristics make GraphQL a great fit for building robust servers and clients in Squeak, particularly when dealing with complex domain models and the need for real-time data synchronization.

    Introducing GraphQL for Squeak

    The GraphQL implementation for Squeak, developed by Chris Muller, strictly adheres to the current GraphQL specification (October 2021) and is made available under MIT license. This is a complete implementation. Every grammar, validation, and execution rule defined in the specification is covered by at least one test case. The framework integrates seamlessly with Squeak.

    Key Features:

    • Complete GraphQL Specification Compliance: The implementation covers every aspect of the GraphQL specification, ensuring that your applications can utilize all features, including asynchronous subscriptions.
    • Documentation and Examples: Included help pages illustrate working examples, making it easy to get started and explore the capabilities of the framework.
    • Modular and Extensible: Type systems (and their associated resolvers) can be defined and assembled into complete applications.
    • Custom Scalar Types and Directives: Several additional custom scalar types and powerful directives are included to enhance your development experience and streamline common tasks.

    Interoperability Is King

    One benefit of GraphQL is how conformance to a standard fosters greater interoperability between not only systems but the groups surrounding them: whether between users and developers, organizations and their customers, or front-end and back-end technologies – GraphQL optimizes the right separations of concerns.

    For example, having a standard way to inspect the schema of a live GraphQL-based system opens possibilities for automated cooperation that are impossible without a standard. As organizations publish their GraphQL schemas, implementers can help optimize their customer-facing experience with tools that capitalize on the features of GraphQL. GraphQL allows certain elements like type and field definitions to have integrated markup “documentation” which could be rendered in user interfaces, or as a page in a generated “help” compendium. The possibilities are limitless.

    Being able to easily parse and interact with other organizations’ GraphQL schemas directly in the image could open new potentials for integration. Exploring the following expression lets one browse the type definitions and directives of the GitHub GraphQL API:

    GqlParser parse:
    	(WebClient httpGet:
    		'https://docs.github.com/public/fpt/schema.docs.graphql') content

    Try It Out!

    Install the GraphQL package into Squeak Trunk by selecting the (head) version of the project from the SqueakMap window (available via the Apps menu of the world main docking bar).

    Alternatively, simply execute this in a workspace:

    Installer new merge: #graphQlTestsEngine

    To verify the installation, tests can be found under the GraphQL-* packages in the TestRunner (available under the Tools menu).

    To get started, you can run the following snippet, which creates a small but complete GraphQL engine for searching all classes in the system for certain names.

    | system engine |
    
    "Define a small type system and its resolver."
    system := GqlSystemDefinition
    	typeSystem: '
    		type Class {
    			name : String!
    			superclass : Class
    		}
    		type Query {
    			findClasses(pattern : String) : [Class!]!
    		}'
    	resolver: 
    		(GqlCraftedSchemaResolver new map: {
    			{ 'Query'. 'findClasses'. SystemNavigation. #allClassesAndTraitsMatching:. #('pattern') }.
    			{ 'Class'. 'name'. Class. #name }.
    			{ 'Class'. 'superclass'. Class. #superclass }
    		}).
    
    "Instantiate the engine, supply a domain provider."
    engine := GqlEngine
    	systemDefinition: system 
    	providers: {self systemNavigation. nil. nil}.
    
    "Execute the only possible query, request the name and the superclasses' name for each result."
    (engine execute: '{
    	findClasses(pattern: "*Collection") {
    		name
    		superclass { name }
    	}
    }') response data

    This query will return the following JsonObject:

    Help Is Available

    After loading the package, a “GraphQL” section will also become available in Squeak’s Help Browser (available via the help menu in the docking bar), where you can find detailed guidance and more complex examples to experiment with.

    Roadmap

    The next step is a networking package to accept GraphQL requests sent from a client to a server and return the JSON responses. This is well underway and planned to be released soon.

    Happy Squeaking!

    Authors: Chris Muller and Christoph Thiede

  • A Seaside for every size

    There have been a couple of interesting pieces of news about Seaside in the last few days.

    Sebastiane Sastre and colleagues at flowingconcept.com have brought their new airflowing.com application out of private beta, and are now accepting new commercial subscriptions. Airflowing is an online tool for managing your creative business, including contacts, tasks and finances. It’s designed to be a quick-start tool aimed at people “who need to get things done and get paid” and is already in use in 35 companies. Under the skin it’s based on Smalltalk and Seaside so scaling the application up to meet new customer demand should be no challenge for the team! Find out more about this release and the hard work behind it at the flowingconcept blog, and try a trial subscription at airflowing.com.

    At the other end of the scale, Lukas Renggli highlighted a post by Pavel Krivanek to the Seaside mailing list. Pavel has managed to build a working Seaside image weighing in at under 5MB. The image includes the Zinc web server, and is based on a stripped-down Pharo-kernel image. As well as build instructions, Pavel has made a pre-built image available, so check it out!

  • SqueakSource 3 beta available

    Soon to be replaced?

    Although we all work with SqueakSource every day, it has been in need of some care and attention for some time now. Fortunately, Tobias Pape and colleagues have been working on a total re-work of the SqueakSource code, and have now announced the availability of their first beta of SqueakSource3, named “Easter Fire”.

    SqueakSource3 is a port of the original SqueakSource to Seaside 3 and Magritte 2. It is based on the original SqueakSource by Lukas Renggli, Adrian Lienhard, and Avi Bryant.

    The developers’ plan for SqueakSource3 is:
    • Have it running on GemStone, esp. GemStone 3 beta
    • Provide a cleaner external API (may be REST or XMLRPC)
    • Provide a more clear modularization and extension api
    • Stability
    • You name it! Suggestions are welcome.

    SqueakSource3 is expected to run on GemStone/GLASS as well as on squeakish Smalltalks, ie, Pharo and Squeak. This beta has been tested on GemStone 2.4.4.x/GLASS 1.0-beta.8 and Squeak4.2 both with Seaside 3.0.4. Pharo tests are pending.

    SqueakSource3 incorporates work done in several SqueakSource forks such as access to diffs in a browser as done by Bert Freudenberg for source.squeak.org and a basic issue tracker contributed by Dale Henrichs. Other key contributors to the project include Philippe Marschal, Dale Henrichs, and Gerhard Obermann have contributed much to SqueakSource3.

    See the release announcement for more information, and for instructions on how to install the new code

  • Magma 1.2 released

    Chris Muller wrote to the squeak-dev mailing list announcing that Magma 1.2 is now released for Squeak 4.2, Pharo 1.1 and Pharo 1.2.

    Magma is a high-performance, fault-tolerant, multi-user object database that provides transparent access to a large-scale shared persistent object model, supports multiple users concurrently via optimistic locking, and uses a simple transaction protocol.

    This new release offers bug fixes, new features and improved performance thanks to minimising problems associated with finalisation. In addition, Chris has reviewed and updated the Magma documentation. More information and support is always available from the Magma mailing list.

    Chris writes that “this release is, exactly, one year since Magma 1.1, thank you for your patience”. Surely it’s us who should be saying thank you to Chris, for his continued work on this valuable project!

  • Welcome to the Real World – Kinect in Squeak

    The newly-launched Microsoft Kinect has been causing a lot of excitement in hacker circles since its recent launch, due to its open interfaces, and the Smalltalk community has already got some great uses of this device.

    The Kinect is a device, intended to be used as an accessory for the X-Box, which interprets 3D scene information from a continuously-projected infrared structured light, allowing live controller-less interaction by interpretation of movement and posture. This makes it a great complement to existing project teams working in Smalltalk.

    Ricardo Moran was a member of the team from the Grupo de Investigación en Robótica Autónoma at CAETI in Argentina who won the 2010 ESUG Innovation Technology Awards with Physical Etoys, their Arduino-based interface to Squeak which allowed them to monitor and control robots as they drove round the conference hall. They spent their prize money wisely, buying a Kinect! Building on the work done by Stephen Howell in getting the Kinect working with Scratch (a visual programming environment developed at MIT), they have now shown how to use the Kinect to control activities in Etoys, using the existing OSCeleton framework to provide the skeleton interpretation interface. Their approach is documented in more detail on their blog.

    Another approach to integrating data from the Kinect is that taken in Nikolay Suslov’s separate and equally impressive implementation which uses the lower-level OpenKinect driver to access the raw colour and depth information and pass this into his bespoke Krestianstvo images, where he then does the detailed video processing and interpretation in Smalltalk, which reduces his reliance on external, platform-specific code. His blog gives more details of his implementation as well as source code, and pre-built images.

  • The Return of the Connectors

    Chris Muller has recently updated Connectors to work with Squeak 4.2 images. Connectors gives you the ability to turn Morphic into a drawing environment for making connected diagrams. This tool was developed by Ned Konz many years ago and hasn’t been able to load in an up-to-date image for some time.

    A Connector is a Morph that looks like a line and has a constraint on either end that keeps the ends attached to some other Morph. You can specify properties such as width, borders, fills, end-decorations for each connector, as well as determining the path the connector takes and what labels it should have. The package also comes with other tools to aid in the creation of smart drawings. See the tutorial for more information.

    The updated package is available on SqueakSource.

  • Seaside 3.0 released

    Following some last minute work at this year’s second Camp Smalltalk event, the Seaside developers are pleased to announce the release of Seaside 3.0 on the eve of the ESUG 2010 Conference in Barcelona.

    Seaside has undergone a total overhaul, with many classes having been refactored to reduce complexity, decrease coupling, and improve flexibility. The packages in Seaside are now cleanly defined with clear relationships and interdependencies, allowing you to load only those pieces you require. There are improvements in testing, in portability and in performance, as well as much better tools for developers including the Seaside Control Panel for Pharo and Squeak, and the web-based administration interface.

    For more information, see the Seaside 3.0 release announcement, or the following links:

    Seaside 3.0 Detailed Release Notes
    http://seaside.st/community/development/seaside30

    Seaside One-Click Experience 3.0 (runs with one-click on Mac, Windows and Linux)
    http://www.seaside.st/distributions/Seaside-3.0-final.app.zip

    Seaside 3.0 Developer Image 3.0 (for Pharo developers)
    http://www.seaside.st/distributions/Seaside-3.0-final.zip

    SqueakSource Repository for Seaside 3.0
    http://www.squeaksource.com/Seaside30.html

  • Seaside 3.0rc – One Click Image

    Following on from the recent release of the Seaside release candidate for 3.0, a Squeak “One-Click” image has been put together to allow you to try out the new version with—er—one click!

    The new image is based on Squeak 4.1, and launches fully configured with Seaside running with Comanche on port 8080, so you can immediately see the new improved Seaside welcome page at http://localhost:8080/, with links to documentation and the Seaside book.

    Seaside’s 3.0 release is faster, cleaner, better tested and has many other changes and improvements over previous releases, so it’s well worth checking out this release candidate now.

  • JNIPort: Running Java from Squeak

    Joachim  Geidel has published a preview release of JNIPort, a Smalltalk library which allows Java code to be invoked from Smalltalk. It acts as a bridge between the world of Smalltalk objects and a Java Virtual Machine (JVM) where Java code is executing.

    The port to Pharo and Squeak is not yet finished: it lacks support for callbacks from Java to Smalltalk, and is a work in progress. Joachim is particularly interested in feedback from Squeak 4.1 users.

    JNIPort was originally written by Chris Uppal for Dolphin Smalltalk and published under a liberal licence which permits its use in commercial and non-commercial software. Joachim Geidel originally ported JNIPort to VisualWorks in 2006 and is now building on that work to make it available to Pharo and Squeak. The goal is to publish a stable release for VisualWorks, Pharo and Squeak in Q3/2010.

    In addition to giving Smalltalk programs access to Java libraries and services, the interactivity of Smalltalk makes it an ideal environment to experiment and prototype new Java functionality.

    Once it’s installed, calling some Java can be as simple as three lines in your workspace:

    jvm := JVM current.
    class := jvm findClass: #’java.lang.System’.
    class currentTimeMillis_null

    Installation instructions documentation and much more information are on the JNIPort Wiki.