This project is read-only.

Plugs

Sep 19, 2011 at 10:04 AM

Hey Guys.

After some testing, I've realized my Random Class plug doesn't work. 

Is there any way to have variables for the plug class? Random doesn't expose any variables. Could I have a variable for each instance?

Thanks Again,

CMan332

Sep 19, 2011 at 10:10 AM
you can use plugfields for that..


On Mon, Sep 19, 2011 at 11:04 AM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

Hey Guys.

After some testing, I've realized my Random Class plug doesn't work.

Is there any way to have variables for the plug class? Random doesn't expose any variables. Could I have a variable for each instance?

Thanks Again,

CMan332

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 10:29 AM

Sorry to bother you, but how do I do that?

CMan332

Sep 19, 2011 at 10:31 AM
on your plug class, put a PlugFieldAttribute with a unique name, and a given type, then to access it, add a parameter to your plugmethod, and mark it with the FieldAccessAttribute, specifying the same name. oh, and the parameter need to be a ref one


On Mon, Sep 19, 2011 at 11:29 AM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

Sorry to bother you, but how do I do that?

CMan332

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 10:41 AM

So like this?

    [Plug(Target = typeof(Random))]
    [PlugField(FieldId = "SeedArray", FieldType = typeof(int[]), IsExternalValue = true)]
    [PlugField(FieldId = "inext", FieldType = typeof(int), IsExternalValue = true)]
    [PlugField(FieldId = "inextp", FieldType = typeof(int), IsExternalValue = true)]
    public class RandomImpl
    {
        public static void Ctor(Random aThis,
            [FieldAccess(Name = "SeedArray")] ref int[] SeedArray,
            [FieldAccess(Name = "inext")] ref int inext,
            [FieldAccess(Name = "inextp")]ref int inextp)
        {
	}
    }

Sep 19, 2011 at 10:48 AM
IsExternalValue should be false. it's mainly used to make fake fields, where the value of type int is actually a pointer to int. you dont need that..


On Mon, Sep 19, 2011 at 11:41 AM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

So like this?

    [Plug(Target = typeof(Random))]
    [PlugField(FieldId = "SeedArray", FieldType = typeof(int[]), IsExternalValue = true)]
    [PlugField(FieldId = "inext", FieldType = typeof(int), IsExternalValue = true)]
    [PlugField(FieldId = "inextp", FieldType = typeof(int), IsExternalValue = true)]
    public class RandomImpl
    {
        public static void Ctor(Random aThis,
            [FieldAccess(Name = "SeedArray")] ref int[] SeedArray,
            [FieldAccess(Name = "inext")] ref int inext,
            [FieldAccess(Name = "inextp")]ref int inextp)
        {
	}
    }

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 10:51 AM

Thanks! Now i can get it to work

CMan332

Sep 19, 2011 at 11:29 AM

One other thing. I have the near exact source from the mono implementation except for fields. Is math in Cosmos completely implemented? Like converting doubles to uints and the like. Because I have very different results than I do on mono.

Sep 19, 2011 at 11:33 AM
implemented: probably
bugfree: most likely not


On Mon, Sep 19, 2011 at 12:29 PM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

One other thing. I have the near exact source from the mono implementation except for fields. Is math in Cosmos completely implemented? Like converting doubles to uints and the like. Because I have very different results than I do on mono.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 12:07 PM

I don't think it is implemented properly. I always get 0.0 from my results. Its mono code and it has worked for me before.

Well, I don't think I could fix it. I don't know ASM at all. Thanks for all your help anyway. Thanks!

Hope you answer my request to join.

 

CMan332

Sep 19, 2011 at 12:14 PM
did you test the plugs without the plug structure? (both in windows as in cosmos?)

regarding join request: sent you a message regaridng that..


On Mon, Sep 19, 2011 at 1:08 PM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

I don't think it is implemented properly. I always get 0.0 from my results. Its mono code and it has worked for me before.

Well, I don't think I could fix it. I don't know ASM at all. Thanks for all your help anyway. Thanks!

Hope you answer my request to join.

CMan332

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 12:21 PM
Edited Sep 19, 2011 at 12:23 PM

Oh. Didn't check my e-mails Ha ha.

No, I haven't tried it without the plug structure. I will do that, probably one of my silly coding errors.

I don't really want to do the yahoo thing, too many details. I go on the IRC sometimes, but time zones mean I can't.

EDIT: How do you use the webchat?

Anyway, Thanks for your help.

CMan332

Sep 19, 2011 at 12:27 PM
yahoo doesn't have any details: you just signup to the email lkist, and you get emailed each message sent to the list

On Mon, Sep 19, 2011 at 1:21 PM, CMan332 <notifications@codeplex.com> wrote:

From: CMan332

Oh. Didn't check my e-mails Ha ha.

No, I haven't tried it without the plug structure. I will do that, probably one of my silly coding errors.

I don't really want to do the yahoo thing, too many details. I go on the IRC sometimes, but time zones mean I can't.

Anyway, Thanks for your help.

CMan332

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 12:28 PM
Edited Sep 19, 2011 at 12:29 PM

I sent an email saying subscribe please. I'm not sure if that will work. I hope it does

EDIT: It worked. Yay!

CMan332

Sep 19, 2011 at 2:48 PM
Edited Sep 19, 2011 at 2:51 PM

Currently a large number of conversions between various core types don't work correctly. I have a chart detailing which ones work here:
https://docs.google.com/document/d/1bHRlqmQo-QGXdfAVPfxmIlh0bVBzXpxI_ug7FvrqaVg/edit?hl=en_US

When we get more working i'll update it. My StructTestKernel (SecondaryKernel.cs) is what i was using to determine what works and what doesn't.

Sep 19, 2011 at 2:58 PM
are you also working on fixing them? :)

On Mon, Sep 19, 2011 at 3:48 PM, blah38621 <notifications@codeplex.com> wrote:

From: blah38621

Currently a large number of conversions between various core types don't work correctly. I have a chart detailing which ones work here:
https://docs.google.com/document/d/1bHRlqmQo-QGXdfAVPfxmIlh0bVBzXpxI_ug7FvrqaVg/edit?hl=en_US

When we get more working i'll update it. My StructTestKernel is what i was using to determine what works and what doesn't.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 19, 2011 at 10:34 PM

That makes sense then. It was the casts that was the problem. I'll just have to wait then