XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Sep 19, 2017 7:52 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: c# - DynamicLua - Few Q's
PostPosted: Sat Apr 23, 2016 8:28 pm 
Offline
n00b
User avatar

Joined: Sat Sep 12, 2015 2:16 am
Posts: 18
Location: South Africa
Has thanked: 10 times
Have thanks: 2 times

Hi !

Hoping to ask advice of anyone that has more experience working with DynamicLua or similar library in c# - i think more c# related though...

Persistence / referencing to or from other class/namespace:-

From what i Understand about dynamic types (which is zero) they do not persist, and only accessible locally, within the class, so ive been creating some methods, to perform whatevr queries.

If i wanted to access the same Lua instance from other namespace/class without passing that class as a reference how would it work. If i created new dynamic Lua instance in the same application, would it connect to the initial tables created from other instance, or is it completely seperate ? what is best way ofdoing this, without explicitly creating a new instance of the class that contains that main instance - when i make that class static, or the dynamic lua instance itself - it doesnt seem to work (seems to be only way i know that could make it accessible throughout app)

Seperately:- is there any preferred method,to get some manner of printout of the entire Lua DB, tables/funcs etc. something like a json structure,or just list of tables/func names etc, (Iterate through, use GetDynamicMemberNames ?)

Finally:- why have i seen some cases of guys creating main tables through a new Object[] rather than just stringName of table, or in Queries, referencing the main Table/Root Through testing isee that it can be used to create hierarchy, but is there any other reason im not aware of

Google failed, & not much activity on DynLua page, so any help appreciated

Cheers

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: c# - DynamicLua - Few Q's
PostPosted: Sat Apr 23, 2016 9:33 pm 
Offline
beginner

Joined: Sat Sep 27, 2014 9:19 am
Posts: 34
Location: http://atom0s.com or http://zenhax.com
Has thanked: 0 time
Have thanks: 12 times
Removed.

_________________
My personal website: http://atom0s.com


Last edited by atom0s on Fri Sep 15, 2017 9:36 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: c# - DynamicLua - Few Q's
PostPosted: Mon Apr 25, 2016 10:40 pm 
Offline
n00b
User avatar

Joined: Sat Sep 12, 2015 2:16 am
Posts: 18
Location: South Africa
Has thanked: 10 times
Have thanks: 2 times
atom0s wrote:
In terms of an active Lua implementation for C#, I would recommend checking out MoonSharp:
http://www.moonsharp.org/

The developer is active and the most recent update was pushed 2016-02-09
a
In my opinion, it is one of the better implementations in terms of speed and optimization for Lua < > C#. However in a large scale project that heavily uses Lua you will notice some massive overhead and slow down. (If you need a true implementation of Lua in your project, go with a true Lua implementation in C/C++.)

Dynamic in C# is not restricted to classes only, you can use it anywhere. You can read up more on the dynamic keyword here:
https://msdn.microsoft.com/en-us/library/dd264736.aspx

This can lead to serious overhead and lag if you are constantly talking between the C# app and Lua.


Mate, thank you for such a detailed reply, wasnt expecting as much, so cheers :)

I am definately going to give it a go - currently ive found some workarounds here there, but its all such a headache, and there is virtually no way of properly tracking, and handling exceptions with DynLua, just a craptonne of Unknown fatal this error that error spewing out, half the time, and cant even begin to tell where its coming from :/ have to literally test each tables existence and double check vars on setting to even be sure it worked, mucho headache



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group