Azrael has joined the team!
Tuesday, 30 December 2008
Sunday, 21 December 2008
Sunday, 2 November 2008
Current status
It's been ages since I last posted here... It's 02:00, and I'm too tired to write a long post, but I just wanted to tell what's going on, why I haven't worked on Topaz, and a bit about the future.
The now
Development has halted completely. Last commit was nearly two months ago. Why? I've lost all motivation to work on it. The current code was only meant as prototype to see how it could work. Over time I added more features, and now (read: when i stopped working on it) it's grown unmaintainable. I should start over, but I don't feel like scrapping all the work.
The future
So do I abandon Topaz?
No, but if I can't get someone else to help me I don't think it will be finished in a while.
This post feels unfinished, but it's now 02:20, and I'm too tired to continue. I might update this tomorrow.
Tuesday, 2 September 2008
Progress report #2 (or 3? 4?)
Not much have happened since the last post. I got no comments, and while some people have joined #topaz, no-one have actually said something. The reason for the standstill is that I'm not sure of the best way to "bundle" instances to functions (currently it's grabbing the function from the top of the stack and the instance from the second-to-top spot. This means that you run arbitrary functions).
Here is an incomplete todo list:
- Method calls
- Access specification (public, protected, private)
- Exceptions
- Instantiation
- Inheritance
- A way to store and transfer data
Friday, 22 August 2008
Progress report
School started this week, so I haven't had much time to work on Topaz. The current HEAD revision is broken (or is it just the examples that aren't updated?), so if you want a working version revert to revision 9.
I would really like some feedback on how you want Topaz to be, so please leave a comment or join #topaz.
Wednesday, 13 August 2008
It's working, it's working!
I brought the VM back to a working state tonight, and it does now support jumps, both conditional and non-conditional, with the opcodes JMP, JMPIF (pop the top of the stack, if it's true, jump), and JMPEL (else, jump if the top value is false). In addition, I've fixed static calls, and with some changes to the assembler, the example code works.
I've also started to take a look at Tamarin (WP), which is the VM that powers AS 3, and will eventually be used in Mozilla. ActionScript is very similar to what I plan Topaz to be, so I can look at it to get ideas on how to do stuff. The source file layout is very confusing tought, so the only useful thing I've found yet is the list of the OpCodes.
PS: Join me at irc://irc.gamesurge.net/#topaz
Wednesday, 6 August 2008
Assembla Space (SVN)
Wednesday, 23 July 2008
Assembler
:class MyClass
:func MyFunc
PUSH 1
PUSH 2
THISCALL __add
PEEK tmp
PUSH "The result is %d"
THISCALL format
PUSHG io
STACALL writeln
PUSH 3
THISCALL __eq
:branch
.When true
PUSH "Result == 3"
PUSHG io
STACALL writeln
.End
.When false
PUSH "Result != 3"
PUSHG io
STACALL writeln
.End
.End
into
MyClass = { -- :class MyClass
MyFunc = { -- :func MyFunc
{0x11, 1}, -- PUSH 1
{0x11, 2}, -- PUSH 2
{0x41, "__add"}, -- THISCALL __add
{0x31, "tmp"}, -- PEEK tmp
{0x11, "\"The result is %d\""}, -- PUSH "The result is %d"
{0x41, "format"}, -- THISCALL format
{0xFFFFFFFF, "io"}, -- PUSHG io
{0x42, "writeln"}, -- STACALL writeln
{0x11, 3}, -- PUSH 3
{0x41, "__eq"}, -- THISCALL __eq
{0x61, nil} -- :branch
{ -- :branch
[true] = { -- .When true
{0x11, "\"Result == 3\""}, -- PUSH "Result == 3"
{0xFFFFFFFF, "io"}, -- PUSHG io
{0x42, "writeln"}, -- STACALL writeln
},
[false] = { -- .When false
{0x11, "\"Result != 3\""}, -- PUSH "Result != 3"
{0xFFFFFFFF, "io"}, -- PUSHG io
{0x42, "writeln"}, -- STACALL writeln
},
},
}
}
Of course, this is completely useless as long as the VM doesn't work, but it's nice to relax(?) with some simpler code.
Tuesday, 22 July 2008
Out with opcodes, in with functions
0x11, {topaz.vm.T_LOCALREF, 'VAL'}, {topaz.vm.T_FLOAT, 1}, -- MOV eax, 1
0x21, {topaz.vm.T_LOCALREF, 'VAL'}, {topaz.vm.T_FLOAT, 2}, -- ADD eax, 2
0x23, {topaz.vm.T_LOCALREF, 'VAL'}, {topaz.vm.T_FLOAT, 3}, -- MUL eax, 3
0xF1, {topaz.vm.T_LOCALREF, 'VAL'}, {0, 0}, -- PRINT eax
becomes
0x11, {'INT', 1}, nil, -- PUSH (INT)1
0x11, {'INT', 2}, nil, -- PUSH (INT)2
0x22, '__add', nil, -- THISCALL __add
0x22, '__mul', nil -- THISCALL __mul
0x11, 'print', nil -- PRINT
But the details are far from finished, and I would like some feedback.
Wednesday, 16 July 2008
Introduction
Hello, and welcome to my blog where I will talk about Topaz. I'm creating this blog for two reasons: First, so you can get more detailed information about the project.Currently the only things that exists is a broken early VM (virtual machine, the thing that actually executes the program), supporting only a small subset of the features I want Topaz to have.
So, what exactly is Topaz?
Topaz is (going to be) a high-level scripting language, supporting classes, inheritance, polymorphism, delegates, etc...
What does Topaz look like?
The exact syntax of Topaz is not finished yet, but I'm imagining something like this:
// A simple class that holds a value,
// using only one instance per value
class ExampleClass{
private exampleMember;
private function exampleClass(arg){
exampleMember = arg;
}
private static _instances;
public static function getInstance(arg){
if(!_instances) _instances = new Hash(Any, ExampleClass);
return (
_instances.hasKey(arg) ?
_instances[arg] :
_instances[arg] = new ExampleClass(arg)
);
}
}
But the syntax / supported features are still not decided. The second reason for creating this blog is to get feedback. I want to know how YOU want it to be!