Category: Releases

  • 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

  • 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!

  • Squeak 4.2 final now out!

    Squeak4.2-10966.zip is now available at http://ftp.squeak.org/4.2. This is intended to be the actual-released 4.2 image, unless, as Chris Muller says, “we find some problem, which we won’t!”.

    Some of the new features in this release are:

    • Preparation for adoption of Cog VM
    • Significant class-library and IDE improvements, with many speed improvements
    • High-precision Clock (microsecond precision)
    • Cleaned-up code base, with better support for unloading optional packages and fonts.
    • The last of the underscore assignments have been replaced with ANSI assignments.
    • Refactoring and unification of Smalltalk and SmalltalkImage globals.
    • API for stdio access (requires recent VM)
    • Improved command-line interface
    • Better Documentation (see Help > Help Browser)
    • SUnit now supports timeouts
    • More UI work including a tweaked look and feel, and support for translucent fonts
    • Support for classic MVC has been restored to Squeak for better support of slower devices
    • System Reporter (found under Help > About this system) – a tool to simplify and standardise the reporting of your image’s set-up.

    See Help > Welcome Workspaces > Welcome to Squeak 4.2 for more details of the changes in this image.

    Note that users on Macs may find that the mouse buttons work in an unexpected order in this image. This is expected behaviour to allow for the grand reunification of mouse button handling in the upcoming version of the VM, which will restore the standard behaviour. In the meantime, use the Swap Mouse Buttons preference to keep things sane.
    Congratulations to Chris Muller who has been leading the effort to get this release out the door, as well as the many contributors who provided updates, error checking, bug fixes and moral support for the process.

  • An early Christmas present from Aida

    Janko Mivšek is delivering his Christmas presents early this year, with the announcement of  the first beta of the “Christmas edition”(6.2) of Aida/Web. Aida/Web is a Smalltalk web application framework with integrated Ajax support, a rich collection of web components, REST-like URLs, and integrated session and security management and much more.

    Among the many new features in this version are mobile device detection and rendering, HTML5 support, WebSocket support for bidirectional communication between server and browser, nestable AJAX-enabled forms, and the introduction of a unified JSON-based message format between server and browser.

    Aida/Web is supported on six Smalltalk platforms: Squeak, Pharo, Gemstone/S, VisualWorks and ObjectStudio, Dolphin Smalltalk, and Smalltalk/X.

    See the Aida/Web download page from more information. Janko has also provided an interesting analysis of the codebases of Aida/Web, Seaside and Iliad.

  • Hear the Mouse Roar on Multi-Core!

    Stefan Marr has just announced on his blog the relase of RoarVM, the first single-image manycore virtual machine for Smalltalk. RoarVM is based on the work on Renaissance VM by David Ungar and Sam S. Adams at IBM Research, and was ported to x86 architecture by Stefan.

    From his post: “The RoarVM supports the parallel execution of Smalltalk programs on x86 compatible multicore systems and Tilera TILE64-based manycore systems. It is tested with standard Squeak 4.1 closure-enabled images, and with a stripped down version of a MVC-based Squeak 3.7 image.” Support for Pharo 1.2 is currently limited to 1 core, but this is being worked on!

    Here’s some indicative figures for this new VM (using an adapted version of tinyBenchmarks on an MVC image):

     1 core   66M bytecodes/sec;  3M sends/sec
     8 cores 470M bytecodes/sec; 20M sends/sec

    As Stefan notes “The RoarVM is a research project and is not as optimized for performance as the standard Squeak VM”. For comparison:

    Squeak 4.2.4beta1U, MVC image, OS X 555M bytecodes/sec; 12M sends/sec

    so you’ll need a few cores active before you start to see improvements over your existing image! There are also a number of known issues with the current implementation.

    You can download the code from the RoarVm page at GitHub, contribute to the discussion on the vm-dev mailing list, or follow #RoarVM updates on Twitter.

  • Tab Completion returns to Squeak

    Levente Uzonyi is obviously one of a number of people who have been quite envious of the built-in tab-completion in Pharo, so he’s put in the work required to make OCompletion work on Squeak images again. OCompletion works in two ways: it offers a short list of automatic completion hints as you type based on your recent activity, or you can bring up the fuller (classic eCompletion) list by using the tab key, and use the up and down arrow keys to navigate the list and the right arrow to reveal syntax-highlighted source code for the methods listed.

    OCompletion is a re-working of the venerable eCompletion package, based on research done by Romain Robbes and Michele Lanza. It is aware of the current context as you type, and so offers suggestions from your current area of work e.g. class, package etc. This means that it responds much more quickly than eCompletion based on the complete image code base. It also adds a number of look-and-feel enhancements that make it a perfect fit with the current appearance of Squeak.

    To try it out, just evaluate the following script in your image:

    Installer squeaksource
     project: 'RoelTyper';
     install: 'RoelTyper-FredericPluquet.82';
     project: 'OCompletion';
     install: 'OcompletionSqueakCompatibility-ul.1';
     install: 'Ocompletion-ul.67'.

    Useful notes:

    • Check out the squeaksource page for OCompletion to review latest versions of Levente’s code
    • Default behaviour is to switch on the ecompletionSmartCharacters preference, which results in auto-typing of matching [], (), {}, “”, ” characters. Some people may wish to switch off this preference.

    Thanks to Levente for making this handy tool available in Squeak again!

  • Etoys 4.1 now available

    Bert Freudenberg announced on the squeak-dev mailing list that Etoys 4.1 is now available. Etoys is a media-rich authoring environment and visual programming system with a simple, powerful scripted object model, ideal for teaching children powerful ideas in compelling ways. Based on Squeak, Etoys is available for free, with an open-source licence. You can run it on Mac OS X, Windows, and Linux (using the Etoys To Go version), or even use a plugin to run it directly in your browser. Etoys is also available on the XO OLPC laptop.

    This release includes new features such as DrGeo for exploring geometry, speech bubbles for objects, new tiles and Quick Guides in a number of languages. It also includes a large number of bug-fixes and cleanups. A number of new projects have been created to showcase the new features. Some of the new features were developed as part of Smalltalk’s participation in this year’s Google Summer of Code, which was co-ordinated by ESUG.

    You can find out more about Etoys 4.1 by reading the release notes, or by downloading the new version.

  • 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

  • A newer, faster computer – for free!

    Eliot Miranda has announced that his new Cog VM is now available for download, bringing Just-In-Time compilation and massive speed-ups to Squeak and Pharo.

    If you’ve been following Eliot’s blog, you’ll know that he’s been working on this new VM for quite a few months now; well, it’s now ready for public consumption, and it’s blisteringly fast: up to three times faster than the existing VMs.

    The VM selectively re-compiles code to native (Intel) machine-code, based on the size and complexity of the methods, and how often they’re called. This means that the benefits of the new VM vary from task to task, but Andreas Raab estimates that you should expect a 2-3x performance improvement generally, “more towards 2x when running primitive and I/O-bound stuff; more towards 3x when running ‘pure’ Smalltalk code”.

    Eliot is interested in hearing from developers on other platforms who want to port the new VM to those platforms. In the meantime, he has also released the “Stack VM”, a cross-platform interpreter that uses context-to-stack mapping to achieve more modest performance gains.

    See Eliot’s original post and the following discussion for more details of the new VM, some notes of caution, and how to get your hands on it and use it.

    Thanks to Eliot for this great piece of work, and to Teleplace who have funded this work (and have been using it for the past year), and have agreed to release the new VM’s under the MIT Licence.

  • Squeak 4.1 released

    Squeak 4.1 has now been released! This version combines the licence change occurring in the 4.0 release with the development work that has been going on while the re-licensing process took place.

    Much of the work in this release has been focused on fundamental improvements. Major achievements are the integration of Cog’s closure implementation, the improved UI look and feel, the new anti-aliased fonts, the core library improvements, and the modularity advances.

    One key focus for this release was to address the issues that have been known to frustrate developers using Squeak for the first time. A much improved set of UI widgets, the new menu bar including the fast search control, integrated help, improved test coverage, more class and method comments, and integrated syntax highlighting all make the system more accessible. The new full closures, the new traits implementation, multiple improvements to the collections and streams classes, the new NumberParser hierarchy all help make development easier and produce cleaner, faster code. Deploying your completed applications will be made easier by the work done on making many modules unloadable, and by support for other cleanup activities.

    To download the Squeak 4.1 release please visit http://ftp.squeak.org/4.1 or go to the squeak.org homepage and use the Download links on the right hand side.