johann Sorel | 25 Oct 21:51 2011

Re: Is neko the solution ?

Good evening,

I finally have some time to work with nekovm. The doc is nice, but a few samples would be even better.

for example, i'm trying to read a file using another lib. so It must be loaded, but can't find any info for the lib name.

I guess I should obtain something like this :

$loader.loadmodule("???",$loader);
var f = file_open("/.../file.txt", "r");
var s = file_contents(f);
$print(s);

I also tryed haxe to generate a neko file but it generates a full 3000+ lines neko file ... I can't find the 'interesting' part in all this.

If someone could put me on the right track I would really appreciate :).

thanks

johann






-----Original Message-----
From: waneck <at> gmail.com
Sent: Sat, 8 Oct 2011 10:51:49 -0300
To: neko <at> lists.motion-twin.com
Subject: Re: [Neko] Is neko the solution ?

There's a couple of people, including me, that are working on an opengl wrapper for neko and hxcpp. You can see its progress at https://github.com/m22spencer/HxGL . You might need to recompile the whole thing with NEKO_GLUE define for the native wrappers for neko support

Cheers!

2011/10/8 johann Sorel <sorel.johann <at> inbox.com>

Thanks for the link but it doesn't handle my case :( .

To tell the truth I have no interest in Web, javascript/php/flash ... and accessing true OpenGL functions is a requirement.

johann




> -----Original Message-----
> From: ncannasse <at> motion-twin.com
> Sent: Sat, 08 Oct 2011 14:31:21 +0200
> To: neko <at> lists.motion-twin.com
> Subject: Re: [Neko] Is neko the solution ?
>
> Le 08/10/2011 13:52, johann Sorel a écrit :
>>
>> Hello again.
>>
>> I explored the nekovm docs and find them really interesting, so I'm
>> going to give NekoVM a try for my project :) .
>>
>> At first I thinked most the things I requiered were missing but plenty
>> of them already exist.
>> - file manipulation : http://nekovm.org/doc/view/file
>> - archive : http://nekovm.org/doc/view/zlib
>> - threading : http://nekovm.org/doc/view/thread
>> - errorstack from original language :
>> http://nekovm.org/doc/nxml#file_position
>>
>> That's a funny thing : NXML . I had to code something really similar
>> when working on ParrotVM :
>> http://sourceforge.net/p/eria/code/ci/66c74ecf6de100cf455af4bb96ada076ec9159da/tree/parrot/test/eriaparser/StringDeclarationAndCall.xml
>> It will make me win a lot of time :) . it's the best way I found to make
>> parser tests.
>>
>>
>> But there are a few things missing which I will try to provide in the
>> futur.
>> - X3.64 for enhanced console ouputs, mainly colors and font variations.
>> (I already wrote it in java and parrot so it should not be that hard in
>> neko)
>> http://en.wikipedia.org/wiki/ANSI_escape_code
>>
>> My biggest problem is rendering, since I build mapping applications I
>> requiere 2D and 3D outputs. Do you know if there is already a binding
>> for OpenGL somewhere ?
>> If not perhaps someone could put me on the right path to achieve this.
>> (I believe it will be http://nekovm.org/doc/ffi)
>
> You might want to have a look at NME. It's mainly used from haXe which
> is a highlevel language running on top of NekoVM or compiling to native
> c++ : http://haxenme.org
>
> Best,
> Nicolas
>
>
> --
> Neko : One VM to run them all
> (http://nekovm.org)

____________________________________________________________
Send your photos by email in seconds...
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if3
Works in all emails, instant messengers, blogs, forums and social networks.



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


Get Free Smileys for Your IM & Email - Learn more at www.crawler.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Nicolas Cannasse | 25 Oct 22:22 2011

Re: Is neko the solution ?

Le 25/10/2011 21:51, johann Sorel a écrit :
> Good evening,
>
> I finally have some time to work with nekovm. The doc is nice, but a few
> samples would be even better.
>
> for example, i'm trying to read a file using another lib. so It must be
> loaded, but can't find any info for the lib name.
>
> I guess I should obtain something like this :
>
> $loader.loadmodule("???",$loader);
> var f = file_open("/.../file.txt", "r");
> var s = file_contents(f);
> $print(s);

See http://nekovm.org/doc/vm#loaders

You can do :

file_content = $loader.loadprim("std <at> file_contents",1);
$print(file_content("file.txt"));

$loadmodule is used for loading other .n files and return their $export 
object.

Nicolas

--

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


Gmane