[EMAIL PROTECTED] ~/.neko/neko $ make
mkdir bin 2>/dev/nul
/bin/sh: /dev/nul: Permission denied

This is a typo, should be /dev/null
Fixed.

make: [createbin] Error 1 (ignored)
cc -Wall -O3 -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -pthread
-o libs/std/sys.o -c libs/std/sys.c
libs/std/sys.c: In function `sys_cpu_time':
libs/std/sys.c:365: error: `CLK_TCK' undeclared (first use in this function)

Yes this is not the first time I heard of this one.

The problem is that the definition of clock() vary depending on the systems. CLK_TCK has been depecated in favor of CLOCKS_PER_SEC but it doesn't seem to work very well on all platforms.

I updated the file, could you try to recompile then run the following neko program :

-----
var time = $loader.loadprim("[EMAIL PROTECTED]",0);
var cpu = $loader.loadprim("[EMAIL PROTECTED]",0);

t = time();
c = cpu();

fib = function(n) {
     if( n <= 1 ) 1 else fib(n-1) + fib(n-2)
}


$print(fib(32));

$print(time() - t);
$print(cpu() - c);
-----

Both results should have the same unit but slighly different values.

Nicolas


--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to