Category: Smalltalk

  • 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

  • Squeak Turns 20!

    Please Donate to Squeak!

    Craig Latta writes:

    Hi all–

    Happy 20th birthday to us! It was twenty years ago that Dan Ingalls and the rest of Alan Kay’s team announced Squeak to the world. You really changed things with this run at the fence. 🙂  Thanks again!

     

     


    Back to the Future

    The Story of Squeak, A Practical Smalltalk Written in Itself

    by

    Dan Ingalls Ted Kaehler John Maloney Scott Wallace Alan Kay

     

     

  • Squeak 4.5 Released!

    squeak4.5

    From Chris Muller:

    So!  Let it be known!  Squeak 4.5 is released!

    Home page is here:  http://www.squeak.org

    4.5 release notes are here:  http://wiki.squeak.org/squeak/6193

    Excellent Job Everyone!!  Can you tell we are excited!

  • Cog Development Welcomes Clément Béra

    Bert VM Icon(icon by Bert)

    Word has it that Clément Béra is working With Eliot Miranda on Cog.  Göran pointed out Clements excellent blog: here, to me a few weeks ago after meeting him at ESUG.

    From Eliot: Clément Béra is, amongst other things, working on Cog performance, looking at adaptive optimization/speculative inlining (Sista in Cog, for Speculative Inlining Smalltalk Architecture).

    I just wanted to welcome Clément Béra and to say thank you to everyone working on the VM for both communities, you know who you are (and we do to) and especially Eliot for working on Cog and keeping the advancements coming!  Hip Hip … and all that.

  • Etoys at Maker Faire in Hannover

    BertShowsEtoys

    Etoys, children, a funny hat and a handmade Smalltalk balloon.  What more could you ask for!  Looks like a great day for everyone.

    Read more about it here: http://squeaklandnews.blogspot.de/

  • Doug Engelbart, American inventor and computing legend, Dies at 88.

    Sad news.  Most of the Smalltalk community knows all about Doug through stories shared by Alan.  Some of you have been lucky enough to have met him.  Much of what we know about computers was invented by some really terrific minds.  Today we lost one of the best.  It is amazing how far technology has progressed in such a short time.  We are lucky to live in a time that still has so many of the great inventors still alive.  It’s an amazing time to be standing the the shoulders of giants.  Alan Kay reminds us that all of the present is not made up of all of the past.  Only part of what was done back then survived and is in use today.  Some of our history is better than our present.  We should all take a moment and remember that past.

    I couldn’t help but notice that Doug has three controls.  The Mouse the keyboard and what?  A function menu?  A view selector? Just what is that left hand doing?  I know I’ve tried to explain ctrl-c to people and even today many people have no idea that keyboard shortcuts exist.  Just a thought.

    http://www.nytimes.com/2013/07/04/technology/douglas-c-engelbart-inventor-of-the-computer-mouse-dies-at-88.html?pagewanted=all&_r=3&

    http://gigaom.com/2013/07/03/doug-engelbart-american-inventor-computing-legend-passes-away/

  • Smalltalk under the Pi: an Interview with tim Rowledge

    tim

    Don’t miss Tim’s interview with SmalltalkInspect!  You can find it here: Smalltalk under the Pi: an Interview with tim Rowledge

    In this episode we talk to tim Rowledge about his work on Smalltalk VMs over the years, especially for the RISC OS Platform and ARM machines.. The latest and probably hottest thing in this arena is his port of Squeak to the Raspberry Pi. This is not only cool in itself, but more importantly enables Raspberry Pi users to use Scratch and EToys on this little machine on RISC OS (the Raspbian Linux version existed before). You can probably imagine how much fun we had in recording this session.

     

  • Imagine Invent Inspire – Etoys

    Etoys-iii

    Don’t miss the new Etoys book: http://wiki.squeakland.org/index.php/LearningWithEtoysI3.

    Etoys is:

    • an educational tool for teaching children powerful ideas in compelling ways
    • a media-rich authoring environment and visual programming system
    • a free software program that works on almost all personal computers

    All school children should have the opportunity to engage with computers in the most meaningful way. Learning to think and using the computer to discover and work with powerful ideas is the knowledge of true value. The community of Etoys users is working toward the dream of having all students become computer literate. This book only covers a small portion of those items. As you and your students learn some of the basic techniques, you will find more and more uses for them. The process of learning Etoys is just that, a process; the learning is on-going even though projects are begun and finished. Students will enjoy becoming experts and sharing their knowledge with others in the classroom.

    Imagine this: A group of learners want to visualize what they Imagine so they go to Etoys to Invent their dreams and Inspire each other by building on their various Etoys projects. Today’s learners need this kind of experience to be prepared for the future.

    For more information about Etoys visit www.squeakland.org