[OT] AjTalk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OT] AjTalk

Hannes Hirzel
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 <[hidden email]> 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

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: [OT] AjTalk

Angel Java Lopez
Hi people!

Hirzel, thanks for visit my project. Ok, it's OT, but I hope you find this topic interesting.

Yes, it uses bytecodes, but Smalltalk compiled to JavaScript too. By now, the project doesn't compile .st to JavaScript by itself, instead, it relies on another project:


written in C#, that has a project that compiles .st to .js. I have all the parts to compile to another dynamic languages, but now I'm working on the C# VM.

This other project is a VM, too. It has Dictionary, Array, etc.. implemented using base .NET classes. There are many samples, i.e., a web server. It has enviroments and modules (WIP). And recently, it has processes with the capability of stop and resume (to be tested). That's why I have bytecodes: to make the implementation of suspending a process, more managable. I presented this project at Smalltalks 2010, Argentina. It has remote objects, and something like Software Transactional Objects.  I hope to present distributed objects, STM a la GemStone, for Smalltalks 2013.

In the JavaScript project https://github.com/ajlopez/AjTalkJs, both models: bytecode, and compile JavaScript are supported. I presented it at Smalltalks 2011. I'm still researching my options.

There is another VM in Java https://github.com/ajlopez/AjTalkJava, but it's more WIP.

The idea I want to implement (and I have some parts in place) in the C# project, it's not to have a minimal image, but an image that can be managed from other. My VM can manage MORE than one image at memory, and one image can be managed from another. Then, you can have image A, with all the methods (compile: etc) and classes), and the image B, that you manage from image A, in a growing way: it was born "small", and then it grows. So my VM can manage more than one image, no need to manage a image from a remote VM or other solutions, or to remove unneeded classes. The baby grows ;-)

My posts
A minimal hello world, with an image < 300 bytes, the last time I tried it

Angel "Java" Lopez
@ajlopez
github:ajlopez

On Sat, Jan 5, 2013 at 10:28 AM, H. Hirzel <[hidden email]> wrote:
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 <[hidden email]> 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

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org