Nicolas Cannasse | 15 Oct 2005 12:31
Favicon
Gravatar

NekoML is done !

Hi list,

I have been working a lot on NekoML recently, you can have a look at
http://ncannasse.free.fr/
We might see a  Neko 1.1 release in one month or so.
I also merged on Neko CVS main branch some patches for 64 bit compatibility.

Nicolas

---
Neko : One VM to run them all

Nicolas Cannasse | 21 Oct 2005 15:56
Favicon
Gravatar

Neko Boostrapped

Hi list,

I just finished bootstrapping Neko.
The structure of the project have changed :

/src
   /core : NekoML standard library
   /Neko : Neko compiler written in NekoML
   /Nekoml : NekoML compiler written in NekoML
/boot : precompiled Neko & NekoML compilers bytecodes for boostrapping
/vm : virtual machine

I entirely rewrote the Makefile. It nows compiles only libneko, the vm, the
standard C library and then compile the compiler. The plan is then to have a
Neko script starting in handling the rest of the compilation (mainly other C
libraries), which is not done yet.

Neko does not need OCaml anymore and should work on 64 bit computer if you
add -D_64BITS define to CFLAGS. The standard library have been rewritten and
completed.

I would like some people to do some testing with current build process.
Simply edit the first part of the Makefile to configure it as you need and
then run it.
Please tell me if you have any problem.

You can checkout the new distribution right now on CVS.

Nicolas

(Continue reading)

skaller | 21 Oct 2005 16:42
Picon

Re: Neko Boostrapped

On Fri, 2005-10-21 at 15:56 +0200, Nicolas Cannasse wrote:
> Hi list,
> 
> I just finished bootstrapping Neko.

Nice. I will have a look sometime, but I'm up to my
ears upgrading Felix from a simple event queue model
to what seems to be more or less a complete user space OS ..

I want to have an 'in depth' look at the VM -- the other
stuff isn't as interesting in the sense that the VM
what really defines the architectural properties.

[I mean: one can always write a front end without
disturbing other front ends ..]

--

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

---
Neko : One VM to run them all

Nicolas Cannasse | 21 Oct 2005 16:47
Favicon
Gravatar

Re: Neko Boostrapped

> Nice. I will have a look sometime, but I'm up to my
> ears upgrading Felix from a simple event queue model
> to what seems to be more or less a complete user space OS ..
>
> I want to have an 'in depth' look at the VM -- the other
> stuff isn't as interesting in the sense that the VM
> what really defines the architectural properties.

You should then look at the Neko Specifications, since Neko is specified by
its language and not by its vm bytecode.
In general unlike other VMs (Java, .NET) you shouln't target directly the VM
but instead generate Neko sourcecode and then use Neko compiler to generate
corresponding optimized bytecode.

Nicolas

---
Neko : One VM to run them all

skaller | 21 Oct 2005 18:39
Picon

Re: Neko Boostrapped

On Fri, 2005-10-21 at 16:47 +0200, Nicolas Cannasse wrote:
> > Nice. I will have a look sometime, but I'm up to my
> > ears upgrading Felix from a simple event queue model
> > to what seems to be more or less a complete user space OS ..
> >
> > I want to have an 'in depth' look at the VM -- the other
> > stuff isn't as interesting in the sense that the VM
> > what really defines the architectural properties.
> 
> You should then look at the Neko Specifications, since Neko is specified by
> its language and not by its vm bytecode.

What I'm interested in is this:

> Neko : One VM to run them all

Neko language is much too high level for me, and seems
to make inappropriate architectural assumptions. It isn't
clear to what extent these are in Neko language or the VM.

For example: I do not need any symbolic names (all the symbols
are already uniquely identified by integers).

Any construction creating a local context is useless because
I need to yield at any point, and later resume, without
losing any local variables.

Much of my interest is in (a) wrapping the C FFI, and
(b) custom extensions. 

(Continue reading)

skaller | 21 Oct 2005 19:05
Picon

Re: Neko Boostrapped

On Fri, 2005-10-21 at 15:56 +0200, Nicolas Cannasse wrote:

> Neko does not need OCaml anymore and should work on 64 bit computer if you
> add -D_64BITS define to CFLAGS. 

Can you check the CVS Makefile? My copy seems to have spaces in it,
instead of tabs.. unix make cannot process it.

--

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

---
Neko : One VM to run them all

skaller | 21 Oct 2005 19:12
Picon

Re: Neko Boostrapped

On Fri, 2005-10-21 at 15:56 +0200, Nicolas Cannasse wrote:

BTW: please change file names to 'neko_load.h' etc for all
public files  .. otherwise embedding is impossible.

Ideally, same for all symbols in FFI .. 

cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/alloc.c -o vm/al
loc.o
cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/builtins.c -o
vm /builtins.o
cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/callback.c -o
vm /callback.o
cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/context.c -o vm/
context.o
cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/interp.c -o vm/i
nterp.o
cc -D_64BITS -O3 -fPIC -fomit-frame-pointer -I vm -c vm/load.c -o vm/loa
d.o
vm/load.c: In function ‘neko_module_read’:
vm/load.c:202: warning: passing argument 3 of ‘read_long’ from incompati
ble pointer type
vm/load.c:205: warning: passing argument 3 of ‘read_long’ from incompati
ble pointer type
vm/load.c:206: warning: passing argument 3 of ‘read_long’ from incompati
ble pointer type
vm/load.c:207: warning: passing argument 3 of ‘read_long’ from incompati
ble pointer type
vm/load.c:227: warning: passing argument 3 of ‘read_long’ from incompati
ble pointer type
(Continue reading)

Nicolas Cannasse | 22 Oct 2005 21:48
Favicon
Gravatar

Re: Neko Boostrapped

> BTW: please change file names to 'neko_load.h' etc for all
> public files  .. otherwise embedding is impossible.

Will do that later.
I'll try to have one unique file for them VM since I also one unique for the
API.

> Ideally, same for all symbols in FFI ..

Yes with neko_* prefixes.

> Uncaught exception - load.c(426) : Invalid module : Nekoml/Main

I just fixed most of the warnings (except the main.c one : any suggestion
?).
This error must be some problem with read_long function on 64bit.
Should be easy to fix. Can you do some print/debug in order to give me more
informations ?

Nicolas

---
Neko : One VM to run them all

skaller | 23 Oct 2005 04:30
Picon

Re: Neko Boostrapped

On Sat, 2005-10-22 at 21:48 +0200, Nicolas Cannasse wrote:

> Will do that later.
> I'll try to have one unique file for them VM since I also one unique for the
> API.

Makes sense.

> > Uncaught exception - load.c(426) : Invalid module : Nekoml/Main
> 
> I just fixed most of the warnings (except the main.c one : any suggestion
> ?).

	p.args = (char const**)argv + 1;

just a constness thing I guess: argv should really be 
'const char **argv' but isn't for historical reasons.

> This error must be some problem with read_long function on 64bit.
> Should be easy to fix. Can you do some print/debug in order to give me more
> informations ?

(Aside: in:

static value default_loadmodule( value mname, value this ) {

please don't use 'this' as an identifier, its a C++ keyword)

Anyhow do these numbers work?

(Continue reading)

Nicolas Cannasse | 23 Oct 2005 09:02
Favicon
Gravatar

Re: Neko Boostrapped

> > > Uncaught exception - load.c(426) : Invalid module : Nekoml/Main
> >
> > I just fixed most of the warnings (except the main.c one : any
suggestion
> > ?).
>
> p.args = (char const**)argv + 1;
>
> just a constness thing I guess: argv should really be
> 'const char **argv' but isn't for historical reasons.

Ok. I tried without const but still got a warning when I was compiling on
linux. Will do that way.

> > This error must be some problem with read_long function on 64bit.
> > Should be easy to fix. Can you do some print/debug in order to give me
more
> > informations ?
>
> (Aside: in:
>
> static value default_loadmodule( value mname, value this ) {
>
> please don't use 'this' as an identifier, its a C++ keyword)

Oops :) fixed.

> Anyhow do these numbers work?
>
> static void read_long( reader r, readp p, int_val *i ) {
(Continue reading)


Gmane