Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Voodoo v0.2.0 Released

0 views
Skip to first unread message

Robbert Haarman

unread,
Jan 11, 2009, 4:04:54 PM1/11/09
to
Hello friends!

I have just released a new version of the Voodoo programming language
and the Voodoo compiler. This is what's new:

- There is now a separate page for the language description and the
compiler. The language description is at
http://inglorion.net/documents/designs/voodoo/, whereas the compiler
is at http://inglorion.net/software/voodoo/.

- Bitwise operators (and, not, or, and xor) have been added.

- The existing conditional (if) has been replaced by a set of
conditionals that compare two values. These are ifeq (equal),
ifge (greater than or equal), ifgt (strictly greater than),
ifle (less than or equal), iflt (strictly less than) and ifne (not
equal).

- The compiler now has a publicly accessible Git repository at
http://repo.or.cz/w/voodoo-lang.git.

- Test cases for various constructs have been added to the compiler
distribution. These can be run with "make test".

- The compiler and the code generator have been refactored.

- Many bugs have been created, found, and squashed.

- The documentation has been updated to reflect the new features.

All in all, I feel enough progress has been made to warrant a new
release. Some notes on what to expect for the future:

- The language and the compiler are going to be in an experimental
stage until the release of version 1.0.0. This means that
incompatible changes can occur. Once version 1.0.0 is released,
anything that works with an 1.x.y version should work with any later
1.x.y version.

- Exactly what features are going to be in 1.0.0 has not been decided
yet.

- For the near future, my focus will be on writing programs in Voodoo
and writing compilers that target Voodoo, so that I can get a good
idea of how well various constructs can be mapped to Voodoo, and
what the most important features are that Voodoo still lacks.

Thank you all for your input so far. I look forward to your comments,
encouragement, and criticism in the future.

Kind regards,

Bob

--
I'm a dyslexic agnostic with insomnia... I lie awake at night wondering
if there really is a dog!


Mike Austin

unread,
Jan 11, 2009, 7:33:40 PM1/11/09
to
Seems like it's working :)

> voodoo ./test.voo
> nasm -f elf hello.asm
> gcc hello.o
> ./a.out
Hello, world!

One thing I noticed is that you can't call return with no value, i.e. void.
Would it be possible to make strings null terminated by default? It seems it
would catch a whole lot of mistakes and overruns, and shouldn't conflict with
other methods of string storage (Pascal, etc.)

When writing a few short tests, my style turned into putting "function" and
"string" on the same line as the label - maybe it's not asm /style/, but I find
it easier to read. I'm not saying you should change the style, but people will
always explore new styles when a language is new.

Can you point me in the right direction for implementing a function table,
something like:

------------------------------------------------------------
section ".data"
greeting: string "Hello, world!\x00"

section ".text"
import puts
export main

test1: function
call puts greeting
return 0
end function

test2: function
call puts greeting
return 0
end function

section ".data"

vtable:
test1
test2

section ".text"

main: function argc argv
call vtable + 1
return
end function
------------------------------------------------------------

That doesn't compile of course, but something like that :)
Keep up the good work!

Mike

Robbert Haarman

unread,
Jan 12, 2009, 5:36:53 AM1/12/09
to
Mike,

Thank you for your interest. I have slightly adapted your program:

---BEGIN---

section ".data"
greeting1: string "Hello, world!\x00"
greeting2: string "Hello, people!\x00"

vtable:
word test1
word test2

section ".text"
import puts
export main

test1: function
call puts greeting1
return 0
end function

test2: function
call puts greeting2
return 0
end function

main: function argc argv
let x get-word vtable 0
call x
set x get-word vtable 1
call x
return 0
end function

---END---

This should have worked, but didn't. It turned out there were a few bugs
in the compiler. These have been fixed and a new test case named
"vtable" has been added that tests the features that didn't work before.

If you grab the newly released v0.2.1, you should be able to compile and
run the program above.

Cheers,

Bob

--
That that is is that that is not not, that is, not that that is not.


Robbert Haarman

unread,
Jan 12, 2009, 5:51:32 AM1/12/09
to
Hi Mike,

Thank you for your comments.

> One thing I noticed is that you can't call return with no value, i.e. void.

Correct. Returning without specifying a return value may be implemented
in the future. For now, just return some value, such as 0.



> Would it be possible to make strings null terminated by default?

Possible, but I don't want to do it. The reason is that it takes control
away from you. Now you have the choice to put in a NUL byte if you want
to. If it were included automatically, you would get it whether you
wanted to or not.

> When writing a few short tests, my style turned into putting "function" and
> "string" on the same line as the label - maybe it's not asm /style/, but I
> find it easier to read. I'm not saying you should change the style, but
> people will always explore new styles when a language is new.

I like the style you have used. Perhaps I will convert the example code
to that style, as well.

Kind regards,

Bob

--
Don't anthropomorphize computers. They hate that.

0 new messages