[squeak-dev] WebAssembly experiments (was Re: Bootstrapped Squeak ( was Survey: what do you do with Squeak, what do you *want* to do?)
Edgar J. De Cleene
edgardec2005 at gmail.com
Fri May 4 22:36:48 UTC 2018
On 04/05/2018, 16:55, "Yoshiki Ohshima" <Yoshiki.Ohshima at acm.org> wrote:
> In particular I wish to know.
I start of a modified Squeak 4.6 .
On top I load first my modifications
SqueakRosCore
PackageInfo-Base
Monticello
( for loading arbitrary .mcz with resources)
| loader |
loader _ CodeLoader new.
loader baseURL:'http://www.squeaksource.com/Ladrillos/'.
loader installLastMonticelloFor: #('DynamicBindings' 'KomServices'
'KomHttpServer' 'HTML' 'HV' );installSourceFiles.
This let have a server for later web experiments.
WasmLivingBook.3.image the dirty thing letting dissects .wasm and "compile"
.wast to .wasm files like
https://github.com/WebAssembly/wabt
I have a local copy and do "reverse engineering" collecting 44 .wasm ranging
from empty module to complete compilers
Right now disects .wasm well and compile simpler .wast
Using this tool
https://01alchemist.com/projects/turboscript/playground/
For boostrap module put the following text
class SmalltalkObject {}
class SmalltalkBehavior {}
class SmalltalkClass {}
class SmalltalkMetaclass {
x: int32;
constructor(x: int32): SmalltalkMetaclass {
this.x = x;
return this;
this.meta = true;
}
class SmalltalkPackage {}
class SmalltalkMethod {}
class SmalltalkNil {}
class SmalltalkSymbol(string) {
this.value = string;
}
class SmalltalkMetaclass {
x: int32;
constructor(x: int32): SmalltalkMetaclass {
this.x = x;
return this;
}
Gives boostrap.wasm
In Terminal
cd /Users/edgardecleene/Documents/MagallanesSites/SqueakWASM/wabt wasm2wast
boostrap.wasm -o boostrap.wast
Drag and drop or use file list for boostrap.wast
Tomorrow I made a video and put in YouTube showing how gizmo "compile"
See all Squeakers in FAST Smalltalks 2018
October 31 to November 2 at Universidad Nacional de Salta, in Salta,
Argentina.
Edgar
@morplenauta
More information about the Squeak-dev
mailing list
|