Sandblocks is a projectional, block-based programming environment written in Squeak/Smalltalk.
Projectional editors are promising for tasks like language composition and domain-specific projections. Effective user interaction requires clear communication of program structure and supported editing operations. While making the abstract syntax tree visible can enhance clarity, it often leads to increased space usage and potential usability issues. Sandblocks is an early prototype of a tree-oriented projectional editor for Squeak/Smalltalk, which aims to minimize space while clearly visualizing the tree structure.
For more information on projectional editing, you can start by reading Martin Fowler’s explanation (here), in which he describes it as an alternative to source editing.
Give it a Try!
You can find the simple installation instructions on the project page here. The page specifically mentions Squeak 5.3, but it seems to work similarly well with Squeak 6.0. Sandblocks is a research prototype, so be sure to save often while working with it.
Have a great time with Smalltalk and keep on Squeaking!
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:
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.
March 2024 Release 1.2.0 adds FFI and MIDI plugins, JIT for Sista bytecodes, JPEG write prim, fixes keyboard input, copy/paste, scroll wheel, highdpi, allows ES6 in source.
SqueakJS executes Squeak in a web page. It is a fully capable virtual machine implemented in pure JavaScript running unmodified Smalltalk images. Check it out at https://squeak.js.org/.
There will be a Squeakfest again in Uruguay at June, 7th – 9th, this time in Atlantida. Etoys will cover the major part of the event, but there will also be workshops in Python, turtle art and robotics. After all, Uruguay is the country with XO-laptops in every elementary school and teachers are using the software which comes with Sugar.
From our education team, Randall Caton and myself are going to present Etoys workshops. This year, I’ll introduce Kedama. I’m looking forward to an inspiring event!
If you want to help or know someone who would like to, I created a crowdfunding page to collect money to help to cover our travel cost. Please share as you like!
BetaNews: What does the future hold for the Pi — new versions?
Liz Upton: The Foundation’s committed to making sure that we don’t suddenly up-sticks and change the platform under people’s feet: the open community has been very good to us, and the last thing we want to do is to make the work they’ve done on the available software redundant. We want to continue selling the Raspberry Pi Model B for a good long time yet; we do have a final hardware revision to make, but the platform will be set in stone after that. We don’t have plans to make a new Pi at the moment; what we are putting a lot of effort into is improving the software stack. We reckon there are orders of magnitude of performance increases we can shake out of Scratch, for example; and this isn’t stuff you can expect the community to do, because it’s a very long and fiddly job. So Scratch, Wayland, Smalltalk: you should see some big improvements coming over this year. We’re also switching a lot of our concentration to our educational mission this year, after a year spent scrambling to get on top of manufacture.
Bert posted a youtube video as a response to a newbie question:
For her third language she chose Squeak, since she knew that Scratch was written in it. I would like to have her write the “Hello Pythagoras” program using Morphic objects, in a visually appealing way. So far I have had some trouble finding a tutorial that covers relevant information. I am sure I can figure this out by poking around long enough but if anyone has a pointer to documentation that might help, or a similar example, that would be great and much appreciated
Göran Krampe has begun the process for this year’s elections for the Squeak Oversight Board.
The Squeak Oversight Board (SOB) consists of seven members from our community, all of whom are elected by popular vote. The members are responsible for
building a legal presence – currently by working with the Software Freedom Law Center as part of their Conservancy;
providing the network services that support the various mailing lists and repositories that in turn make a community possible;
helping coordinate the various interest groups and projects being pursued by Squeakers;
making decisions where there is no clear community consensus.
The schedule and process of the Election is as follows:
Nominations
Candidates should nominate themselves by 3rd March and start their campaign on the squeak-dev mailing list. Or if you nominate someone else, make sure that person really wants to run. Göran will not put anyone on the candidate list until that person makes it known on squeak-dev that he/she does run.
Final candidate list
The list will be closed on 3rd March. The candidates should ideally present themselves on squeak-dev, unless they have already done so, and the community can ask questions.
Online election starts
The voting period starts on 10th March 6PM (18.00 UTC) and is one week long. Ballots are sent out via email.
Online election ends
The voting process will end on 17th March 6PM (18.00 UTC). Results will be announced immediately when the election ends.
Registering
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 vote do ONE of the following:
Get a “known” Squeaker to vouch for you. If a known Squeaker sends an email to voters@squeak.org giving your name and email address then Göran will add you.
Send an email to voters@squeak.org yourself (and CC to squeak-dev if you like) with information/arguments showing 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.
More information
Everything about the election, including schedule above and more, can be tracked here:
Scratch is a visual programming language, developed in Squeak, that makes it easy to create interactive stories, animations, games, music, and art — and share these creations on the web. Aimed at children between the ages of 8 and 16, Scratch has developed a thriving community, with over 1000 new projects being uploaded to the site every day.
In inviting the Scratch team to submit an article, the editor of CACM explained his motivation: “A couple of days ago, a colleague of mine (CS faculty) told me how she tried to get her 10-year-old daughter interested in programming, and the only thing that appealed to her daughter (hugely) was Scratch.”
Esteban Lorenzano gave Squeakers on Mac OS X a nice little Christmas present to see out 2008, with the release of Mars, an MVC framework for Squeak built using Cocoa. Mars is a plugin, and will run in any fork of Squeak, and as you can see above, is integrated with OmniBrowser.
Esteban notes that one of his main objectives in developing Mars is to keep it small and simple, in order to allow it to be executed in small environments such as the iPhone, (using John McIntosh’s new VM and Edgar de Cleene’s SqueakLightII minimal images).
Mars is MIT licensed, and can be downloaded from the Mars homepage, which also has posts following the progress of Esteban’s work. Esteban adds that Mars is still in the pre-alpha stage, and he looks forward to bug reports, feature requests, comments, and of course, code.