Skip to content

Commit 7a14dc1

Browse files
committed
Release 1.2.4
1 parent 902de11 commit 7a14dc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+235
-206
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules/
33
gh-pages
44
dist/*.min.js*
5+
*.code-workspace

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2024 Vanessa Freudenberg
3+
Copyright (c) 2013-2025 Vanessa Freudenberg
44
Copyright (c) 2016 Fabio Niephaus, Google Inc.
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
SqueakJS: A Squeak VM for the Web and Node.js
22
=============================================
33

4-
SqueakJS is an HTML5 runtime engine for [Squeak][squeak]</a> Smalltalk written in pure JavaScript. It also works for many other OpenSmalltalk-compatible images.
4+
SqueakJS is a runtime engine for [Squeak][squeak]</a> Smalltalk written in pure JavaScript. It also works for many other OpenSmalltalk-compatible images.
55

66
Embedding a Smalltalk application in your webpage can be as simple as:
77

88
SqueakJS.runSqueak(imageUrl, canvas);
99

10-
The interpreter core is divided in a number of `vm.*.js` modules, internal plugins in `vm.plugins.*.js` modules and external plugins in the "plugins" directory. The Just-in-Time compiler is optional ("jit.js") and can be easily replaced with your own.
10+
There are options to configure screen sizes etc.
11+
12+
The interpreter core is divided in a number of `vm.*.js` modules, internal plugins in `vm.plugins.*.js` modules and external plugins in the "plugins" directory. The Just-in-Time compiler is optional ("jit.js") and can be replaced with your own.
1113

1214
There are a number of interfaces:
1315
* browser: the regular HTML interface lets you use SqueakJS on your own web page. Just include "squeak.js".
1416
* headless browser: a headless VM. It lets you use SqueakJS in your browser without a direct UI (you can create your own UI with a plugin). Include "squeak_headless.js" and add an "imageName" parameter to your website URL (eg. https://example.com/my/page.html?imageName=./example.image) or call the Javascript function "fetchImageAndRun('https://example.com/my/example.image')" to start the specified image.
15-
* Node.js: another headless VM. It lets you use SqueakJS as a Node.js application. Just run "node squeak_node.js <image name>".
17+
* Node.js: another headless VM. It lets you use SqueakJS as a Node.js application via "node squeak_node.js <image name>".
1618

1719
For discussions, please use the [vm-dev mailing list][vm-dev]. Also, please visit the [project home page][homepage]!
1820

@@ -43,7 +45,8 @@ Running it
4345

4446
**Which Browser**
4547

46-
All modern browsers should work (Chrome, Safari, IE, FireFox), though Chrome performs best currently. Safari on iPad works somewhat. YMMV.
48+
All modern desktop browsers should work. Mobile browsers work too, but most Squeak images assume a keyboard and mouse. YMMV.
49+
4750
Fixes to improve browser compatibility are highly welcome!
4851

4952
If your browser does not support ES6 modules try the full or headless SqueakJS VM as a single file (aka bundle) in the [Distribution][dist] directory.
@@ -91,12 +94,14 @@ Things to work on
9194
-----------------
9295
SqueakJS is intended to run any Squeak image. It can already load any image from the original 1996 Squeak release to the latest Cog-Spur release, including 64-bit and Sista variants. But various pieces (primitives in various plugins) are still missing, in particular 3D graphics and networking (however, see [Croquet][jasmine] which supports both, but should be generalized). Also, we should make pre-Spur 64 bit images load. And, it would be nice to make it work on as many browsers as possible, especially on mobile touch devices.
9396

94-
As for optimizing I think the way to go is an optimizing JIT compiler. The current JIT is very simple and does not optimize at all. Since we can't access or manipulate the JavaScript stack, we might want that compiler to inline as much as possible, but keep the call sequence flat so we can return to the browser at any time. Even better (but potentially more complicated) is actually using the JavaScript stack, just like Eliot's Stack VM uses the C stack. I have done some [advanced JIT mockups][jit]. To make BitBlt fast, we could probably use WASM or even WebGL.
97+
As for optimizing the way to go is an optimizing JIT compiler. The current JIT is very simple and does not optimize at all, it only eloiminates the interpreter's instruction decoding overhead. Since we can't access or manipulate the JavaScript stack, we might want that compiler to inline as much as possible, but keep the call sequence flat so we can return to the browser at any time. Even better (but potentially more complicated) is actually using the JavaScript stack, just like Eliot's Stack VM uses the C stack. I have done some [advanced JIT mockups][jit]. To make BitBlt fast, we could probably use WASM or even WebGL.
9598

96-
To make SqueakJS useful beyond running existing Squeak images, we should use the JavaScript bridge to write a native HTML UI which would certainly be much faster than BitBlt.
99+
To make SqueakJS useful beyond running existing Squeak images, we should use the JavaScript bridge to write a native HTML UI which would certainly be much faster than BitBlt (Craig Latta has done some interesting work towards that in [Caffeine][caffeine]).
97100

98101
Better Networking would be interesting, too. The SocketPlugin currently does allows HTTP(S) requests and WebSockets. How about implementing low level Socket support based on HTTP-tunneling? The VM can run in a WebWorker. How about parallelizing the VM with WebWorkers?
99102

103+
Also interesting would be wrapping it in a native app, maybe via [Electron][electron] similar to [Sugarizer][sugarizer], which uses SqueakJS to run Etoys.
104+
100105
There's a gazillion exciting things to do :)
101106

102107
-- Vanessa Freudenberg (codefrau)
@@ -110,15 +115,19 @@ There's a gazillion exciting things to do :)
110115
[etoys]: https://squeak.js.org/etoys/
111116
[scratch]: https://squeak.js.org/scratch/
112117
[jasmine]: https://github.com/codefrau/jasmine
118+
[caffeine]: https://caffeine.js.org/
113119
[jit]: https://squeak.js.org/docs/jit.md.html
114120
[ws]: https://github.com/codefrau/SqueakJS/tree/main/ws
115121
[dist]: https://github.com/codefrau/SqueakJS/tree/main/dist
116122
[zip]: https://github.com/codefrau/SqueakJS/archive/main.zip
117123
[pullreq]: https://help.github.com/articles/using-pull-requests
124+
[electron]: https://www.electronjs.org
125+
[sugarizer]: https://github.com/llaske/sugarizer
118126

119127

120128
Changelog
121129
---------
130+
2025-02-19: 1.2.4 fix isAssociation for JS Bridge, optimize loading image with many objects
122131
2024-09-28: 1.2.3 fix primitiveInputSemaphore, fix iOS keyboard
123132
2024-06-22: 1.2.2 make copy/paste work on mobile
124133
2024-05-27: 1.2.1 add virtual cmd button, fix touch events

benchmark/benchmark.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<!--
4-
Copyright (c) 2013-2024 Vanessa Freudenberg
4+
Copyright (c) 2013-2025 Vanessa Freudenberg
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

benchmark/benchmark.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013-2024 Vanessa Freudenberg
2+
* Copyright (c) 2013-2025 Vanessa Freudenberg
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

demo/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
simple.html

demo/simple.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<title>SqueakJS</title>
66
<!--
7-
Copyright (c) 2013-2024 Vanessa Freudenberg
7+
Copyright (c) 2013-2025 Vanessa Freudenberg
88
99
Permission is hereby granted, free of charge, to any person obtaining a copy
1010
of this software and associated documentation files (the "Software"), to deal

demo/simple.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013-2024 Vanessa Freudenberg
2+
* Copyright (c) 2013-2025 Vanessa Freudenberg
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)