[Cuis] [OT] AjTalk

H. Hirzel hannes.hirzel at gmail.com
Sat Jan 5 07:28:54 CST 2013


Hello Angel

Thank you for your interesting comments about using github for
HelpPages. I'd like Juan et. al. to answer first about the help issue
and write here about something which caught my interest:

    AjTalk


On 1/5/13, Angel Java Lopez <ajlopez2000 at gmail.com> wrote:
...
> I put simple online demo of my AjTalkJs (Smalltalk in JavaScript) in the
> gh-page branch of:
> https://github.com/ajlopez/AjTalkJs
> it was published as
> http://ajlopez.github.com/AjTalkJs/
>
> As another branches, it can received pull request for improvements.
>

I quickly had a look at your AjTalk pages.

For example I find your ClientCanvas class

https://github.com/ajlopez/AjTalkJs/blob/master/examples/client/canvas/ClientCanvas.st


Then I found the class library here
https://github.com/ajlopez/AjTalkJs/blob/master/lib/ajtalk.js
(1700 lines of code)

It contains the class definitions for

* Number
* MetaClass
* Protoklass
* ProtoObject
* Nil
* Block
* ExecutionBlock  (contains a big case statement for byte code
interpretation and stack operation)
* Compiler
* ChunkReader



And you write that it gets compiled to a ByteCode

which you give as

	var ByteCodes = {
GetValue: 0,
GetArgument: 1,
GetLocal: 2,
GetInstanceVariable: 3,
GetGlobalVariable: 4,
GetSelf: 5,
GetNull: 6,
GetBlock: 7,

SetLocal: 10,
SetInstanceVariable: 11,
SetGlobalVariable: 12,

Add: 20,
Subtract: 21,
Multiply: 22,
Divide: 23,
Concatenate: 24,

Primitive: 30,
NativePrimitive: 31,
LastTarget: 32,

SendMessage: 40,
NewList: 41,
Return: 50,

// Javascript bytecodes

NativeAt: 100,
NativeAtPut: 101,
NativeApply: 102,
NativeNew: 103
};

Are there more classes like Dictionary, Array, OrderedCollection,
String and Stream?

Are you aware of https://github.com/ympbyc/LittleSmallscript . It
compiles directly to JavaScript without the need for ByteCode and a
VM?

Thank you for sharing this interesting project. I think with some more
documentation it is an interesting learning experience and playfield.

And maybe you can use Cuis in some way in connection with AjTalk :-)

Kind regards
Hannes




More information about the Cuis mailing list