SmallJS News

SmallJS release 1.6 18-APR-2025

This release is all about AI support for multiple providers,
with a new example application to show off the new capacilities.
Addtionally, the compiler and build environment where improved.
Have fun!

Smalltalk library
- Node & browser: AI support for OpenAI, Deepseek, Google AI and Anthropic!
   With provider-neutral base class functionality.

Examples
- New multi-provider AI example chat app!
- New Counter example app using the Mithril library. (thanks @pdfernhout!)

Compiler
- Inline assignment was fixed, e.g.: '^ ( a := 1 ) + 2' sets a to 1 and returns 3.

Build
- Build, clean and install scripts more modular.
   Examples are now excluded from the default build.
   Run buildAll.sh to include examples.
- Global npm prerequisites removed,
   now using local packages and npx. (thanks @pdfernhout!)

Documentation
SmallJS was presented an UK Smalltalk User Group (UKSTUG) meetup on 26-Feb-2025
- The video of the presentation is here: Richard Ronteltap - SmallJS
- The presentation slides are here: Why_SmallJS.pdf

SmallJS release 1.5 21-Jan-2025

This one is all about database support and multi-threading.

Smalltalk library
- Database: SQLite database support added!
- Database: Added async error handling to all supported databases.
- Database: Added support for ST classes: Float, Date, Boolean, Uint8Array.
- Node: Worker threads support added.
   Enables development of multi-threaded Node.js apps.
- Browser: Web Workers minimal support added, only to support the example app.

Examples
- Web Workers example app added!
- Electron: Split up Node and Browser compilation to prevent class name clashes.

Website
- Added Web Workers example app to this site.

SmallJS release 1.4 8-Oct-2024

Examples
- Electron example app added!
   Electron enables development of multi-platform desktop GUI apps using web technologies.
- NodeGui example app added!
   NodeGui enables development of multi-platform desktop GUI apps based on the QT library,
   that are smaller, faster and easier to make than Electron apps.
- Pharo Smalltalk server with SmallJS browser client added!
   Pharo is an expansive, "traditional" Smalltalk with an active user base.
   The SmallJS client uses a standard web API to communicate with the Pharo Zinc web server.

Smalltalk library
- Minimal Electron support added, only to support the example app.
- Minimal NodeGui support added, only to support the example app.
If you want more complete support for these frameworks or if you want to contribute,
please open an issue in the SmallJS GitHub repo.

Website
- The Playground now supports multiple statements and local variables.
   Thanks to @aiksiongkoh for the suggestion.

SmallJS release 1.3 23-Aug-2024

Compiler
- New Playground project that can evaluate any ST expression in realtime!
- Signal error duplicate local variables.
- Signal error on newlines in string constants (like in JS).
- Hide instance variables for class methods.

Smalltalk library
- HTML Canvas 2D functionality fully implemented with supporting classes like:
   CanvasRenderingContext2d Path2d, DomMatrix, DomPoint, ImageData, ImageBitmap.
- Standardized 3D point operations on new class Point3d (iso DomPoint).
   Enhanced reflexivity with canUnderstand: and respondsTo:.

Build
- Improved ST debugging experience in Firefox (source mapping).

Browser project
- Restructured all functionality and tests into separate components.
- Only use HTML label elements when there's a 'for' clause (less warnings).
- New canvas component with visual tests for all canvas drawing methods.

Examples
- New Balls example project with bouncing balls, using canvas functionality.

Website
- Playground project added!
- Bouncing balls example added.
- Is now mobile friendly.

SmallJS release 1.2 1-Feb-2024

Compiler
- Implemented minimize to prevent generation library code not used by your app.
- Stricter language syntax parsing.
- Improved compile error handling.
- Allow newlines in VARS and CLASSVARS declarations

Build
- Expanded detection of prerequisites.
- Build scripts now exit on startup errors.
- Added MacOS browser testing options.

Smalltalk library
- Node: Consolidated Fetch and Streams classes form modules Node and Browser to Core.
- Node: ST implementation of full fetch API. Consolidated browser and Node.js functionality.
- Node: Added Linux default browser locations to .env.example files.

Examples
- Shop: Implemented session management.
- Todo: Made it working on Firefox on MacOS.
- Todo: Added language selection option with 2 languages.
- Shop Client SPA: Created new shop client app as a Single Page Application (SPA).

SmallJS release 1.1 25-Nov-2023

Examples
- Added Counter example app. Can be used as a template for new apps.
- Added Todo example app, with functionality for editing, adding, removing and sorting tasks.
- Added Benchmark example app, comparing SmallJS performance to JavaScript.
- Implemented full unit, API and GUI tests on all example apps on all supported browser.

Build
- Various fixes and improvements for first time use, especially on MacOS.
- Added build scripts to check dependencies and build the complete environment.
- Made language extenion an official *.vsix package for deployment.

Compiler
- Added -t and +t options to skip compiling unit tests on selected libraries.

SmallJS release 1.0 30-Aug-2023

Initial commit of SmallJS on GitHub supporting Smalltalk to JavaScript compilation for browsers and Node.js.

For development in browsers, a workable part of the DOM is encapsulated in Smalltalk.
For Node.js, the Express server is embedded plus support for 3 databases: PostgreSQL, MariaDB and MySQL.

It should run on Linux, Mac and Windows.
It's configured for using the Visual Studio Code IDE by default.