IronPython for Silverlight 5?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

IronPython for Silverlight 5?

Chad Brockman

I see Silverlight 5 now has something besides simple reflection (ICustomTypeProvider) -

 

http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data

 

Will we see an update to Iron*/DLR to support binding to dynamic objects any time soon? This will open fantastic options for using IronPython in Silverlight.

 

Thanks -- Chad

 

Chad Brockman

Production Solutions Architect

[hidden email]

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Jeff Hardy-4
On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]> wrote:
> I see Silverlight 5 now has something besides simple reflection
> (ICustomTypeProvider) -
>
> http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>
> Will we see an update to Iron*/DLR to support binding to dynamic objects any
> time soon? This will open fantastic options for using IronPython in
> Silverlight.

If someone provides a patch, yes.

We actually need someone with an interest in Silverlight to keep an
eye on it and make sure that we don't break SL support and new
features like this. We don't have anyone in that role right now.

- Jeff
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Keith Rome
The logical thing would seem to be adding ICustomTypeProvider to ExpandoObject or DynamicObject, but these are both in System.Core so more or less out of our hands. Or has the Silverlight team extended those classes to support this new interface (I haven't pulled down the SL5 bits to check)?

And it begs the question of why did the Silverlight team feel we need yet another (incompatible) custom type info implementation?


Keith Rome
Senior Consultant and Architect
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS
Wintellect | 770.617.4016 | [hidden email]
www.wintellect.com


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff Hardy
Sent: Thursday, April 14, 2011 10:32 AM
To: Discussion of IronPython
Cc: Chad Brockman
Subject: Re: [IronPython] IronPython for Silverlight 5?

On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]> wrote:
> I see Silverlight 5 now has something besides simple reflection
> (ICustomTypeProvider) -
>
> http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>
> Will we see an update to Iron*/DLR to support binding to dynamic
> objects any time soon? This will open fantastic options for using
> IronPython in Silverlight.

If someone provides a patch, yes.

We actually need someone with an interest in Silverlight to keep an eye on it and make sure that we don't break SL support and new features like this. We don't have anyone in that role right now.

- Jeff
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Dino Viehland
In reply to this post by Jeff Hardy-4
Jeff wrote:

> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
> wrote:
> > I see Silverlight 5 now has something besides simple reflection
> > (ICustomTypeProvider) -
> >
> > http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
> >
> > Will we see an update to Iron*/DLR to support binding to dynamic
> > objects any time soon? This will open fantastic options for using
> > IronPython in Silverlight.
>
> If someone provides a patch, yes.
>
> We actually need someone with an interest in Silverlight to keep an eye on it
> and make sure that we don't break SL support and new features like this. We
> don't have anyone in that role right now.

If anyone's interested on working on this it'd probably mean adding an implementation
of this onto OldInstance as well as adding it onto our new-style instances whose
classes are created by NewTypeMaker.  Adding the interface is probably pretty easy,
making it return useful things may be a little more difficult.

I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.


_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Jeff Hardy-4
On Thu, Apr 14, 2011 at 11:03 AM, Dino Viehland <[hidden email]> wrote:

> Jeff wrote:
>> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
>> wrote:
>> > I see Silverlight 5 now has something besides simple reflection
>> > (ICustomTypeProvider) -
>> >
>> > http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>> >
>> > Will we see an update to Iron*/DLR to support binding to dynamic
>> > objects any time soon? This will open fantastic options for using
>> > IronPython in Silverlight.
>>
>> If someone provides a patch, yes.
>>
>> We actually need someone with an interest in Silverlight to keep an eye on it
>> and make sure that we don't break SL support and new features like this. We
>> don't have anyone in that role right now.
>
> If anyone's interested on working on this it'd probably mean adding an implementation
> of this onto OldInstance as well as adding it onto our new-style instances whose
> classes are created by NewTypeMaker.  Adding the interface is probably pretty easy,
> making it return useful things may be a little more difficult.
>
> I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.

Are you really surprised? :)

It is still in Beta. Maybe there's a slight chance their minds could
be changed? I'm guessing they don't have the rest of
System.ComponentModel either, so they didn't want to add just one
interface.

- Jeff
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Keith Rome
After looking into what it takes to implement ICustomTypeProvider it seems like it would be a nightmare for dynamic object support. You have to produce actual custom Type instances, presumably using TypeBuilder and emitting IL opcodes to handle the getter/setter accessors. If the databinding system caches those dynamically-created Types then it could cause problems because what happens when we add a new member via expando after binding once (or remove one that previously existed)? But if they don't cache the Type objects then it seems like the overhead might be absurd from constructing these things again and again (and you can't use TypeBuilder without first creating a dynamic assembly and module).

I really hope they alter course and go with ICustomTypeDescriptor instead (or even IDynamicMetaObjectProvider if that is feasible). I really don't understand how they expect the current system to work for "dynamic properties" because there is nothing dynamic at all about a System.Type instance. The best it can hope to be is a snapshot of the metadata from a dynamic object as of some point in time.


Keith Rome
Senior Consultant and Architect
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS
Wintellect | 770.617.4016 | [hidden email]
www.wintellect.com


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff Hardy
Sent: Thursday, April 14, 2011 4:11 PM
To: Discussion of IronPython
Cc: Chad Brockman
Subject: Re: [IronPython] IronPython for Silverlight 5?

On Thu, Apr 14, 2011 at 11:03 AM, Dino Viehland <[hidden email]> wrote:

> Jeff wrote:
>> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
>> wrote:
>> > I see Silverlight 5 now has something besides simple reflection
>> > (ICustomTypeProvider) -
>> >
>> > http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>> >
>> > Will we see an update to Iron*/DLR to support binding to dynamic
>> > objects any time soon? This will open fantastic options for using
>> > IronPython in Silverlight.
>>
>> If someone provides a patch, yes.
>>
>> We actually need someone with an interest in Silverlight to keep an
>> eye on it and make sure that we don't break SL support and new
>> features like this. We don't have anyone in that role right now.
>
> If anyone's interested on working on this it'd probably mean adding an
> implementation of this onto OldInstance as well as adding it onto our
> new-style instances whose classes are created by NewTypeMaker.  Adding
> the interface is probably pretty easy, making it return useful things may be a little more difficult.
>
> I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.

Are you really surprised? :)

It is still in Beta. Maybe there's a slight chance their minds could be changed? I'm guessing they don't have the rest of System.ComponentModel either, so they didn't want to add just one interface.

- Jeff
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Tomas Matousek
Couldn't you just subclass Type? It's methods are virtual and can be overridden. I don't think you need to emit a real RuntimeType.

Tomas

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Keith Rome
Sent: Thursday, April 14, 2011 3:30 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython for Silverlight 5?

After looking into what it takes to implement ICustomTypeProvider it seems like it would be a nightmare for dynamic object support. You have to produce actual custom Type instances, presumably using TypeBuilder and emitting IL opcodes to handle the getter/setter accessors. If the databinding system caches those dynamically-created Types then it could cause problems because what happens when we add a new member via expando after binding once (or remove one that previously existed)? But if they don't cache the Type objects then it seems like the overhead might be absurd from constructing these things again and again (and you can't use TypeBuilder without first creating a dynamic assembly and module).

I really hope they alter course and go with ICustomTypeDescriptor instead (or even IDynamicMetaObjectProvider if that is feasible). I really don't understand how they expect the current system to work for "dynamic properties" because there is nothing dynamic at all about a System.Type instance. The best it can hope to be is a snapshot of the metadata from a dynamic object as of some point in time.


Keith Rome
Senior Consultant and Architect
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | [hidden email] www.wintellect.com


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff Hardy
Sent: Thursday, April 14, 2011 4:11 PM
To: Discussion of IronPython
Cc: Chad Brockman
Subject: Re: [IronPython] IronPython for Silverlight 5?

On Thu, Apr 14, 2011 at 11:03 AM, Dino Viehland <[hidden email]> wrote:

> Jeff wrote:
>> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
>> wrote:
>> > I see Silverlight 5 now has something besides simple reflection
>> > (ICustomTypeProvider) -
>> >
>> > http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>> >
>> > Will we see an update to Iron*/DLR to support binding to dynamic
>> > objects any time soon? This will open fantastic options for using
>> > IronPython in Silverlight.
>>
>> If someone provides a patch, yes.
>>
>> We actually need someone with an interest in Silverlight to keep an
>> eye on it and make sure that we don't break SL support and new
>> features like this. We don't have anyone in that role right now.
>
> If anyone's interested on working on this it'd probably mean adding an
> implementation of this onto OldInstance as well as adding it onto our
> new-style instances whose classes are created by NewTypeMaker.  Adding
> the interface is probably pretty easy, making it return useful things may be a little more difficult.
>
> I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.

Are you really surprised? :)

It is still in Beta. Maybe there's a slight chance their minds could be changed? I'm guessing they don't have the rest of System.ComponentModel either, so they didn't want to add just one interface.

- Jeff
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Keith Rome
The docs for System.Type claims that you cannot subclass from it in Silverlight. Is this being relaxed in v5?


Keith Rome
Senior Consultant and Architect
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS

Wintellect | 770.617.4016 | [hidden email]

www.wintellect.com

On Apr 14, 2011, at 6:49 PM, "Tomas Matousek" <[hidden email]> wrote:

> Couldn't you just subclass Type? It's methods are virtual and can be overridden. I don't think you need to emit a real RuntimeType.
>
> Tomas
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Keith Rome
> Sent: Thursday, April 14, 2011 3:30 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython for Silverlight 5?
>
> After looking into what it takes to implement ICustomTypeProvider it seems like it would be a nightmare for dynamic object support. You have to produce actual custom Type instances, presumably using TypeBuilder and emitting IL opcodes to handle the getter/setter accessors. If the databinding system caches those dynamically-created Types then it could cause problems because what happens when we add a new member via expando after binding once (or remove one that previously existed)? But if they don't cache the Type objects then it seems like the overhead might be absurd from constructing these things again and again (and you can't use TypeBuilder without first creating a dynamic assembly and module).
>
> I really hope they alter course and go with ICustomTypeDescriptor instead (or even IDynamicMetaObjectProvider if that is feasible). I really don't understand how they expect the current system to work for "dynamic properties" because there is nothing dynamic at all about a System.Type instance. The best it can hope to be is a snapshot of the metadata from a dynamic object as of some point in time.
>
>
> Keith Rome
> Senior Consultant and Architect
> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | [hidden email] www.wintellect.com
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Jeff Hardy
> Sent: Thursday, April 14, 2011 4:11 PM
> To: Discussion of IronPython
> Cc: Chad Brockman
> Subject: Re: [IronPython] IronPython for Silverlight 5?
>
> On Thu, Apr 14, 2011 at 11:03 AM, Dino Viehland <[hidden email]> wrote:
>> Jeff wrote:
>>> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
>>> wrote:
>>>> I see Silverlight 5 now has something besides simple reflection
>>>> (ICustomTypeProvider) -
>>>>
>>>> http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>>>>
>>>> Will we see an update to Iron*/DLR to support binding to dynamic
>>>> objects any time soon? This will open fantastic options for using
>>>> IronPython in Silverlight.
>>>
>>> If someone provides a patch, yes.
>>>
>>> We actually need someone with an interest in Silverlight to keep an
>>> eye on it and make sure that we don't break SL support and new
>>> features like this. We don't have anyone in that role right now.
>>
>> If anyone's interested on working on this it'd probably mean adding an
>> implementation of this onto OldInstance as well as adding it onto our
>> new-style instances whose classes are created by NewTypeMaker.  Adding
>> the interface is probably pretty easy, making it return useful things may be a little more difficult.
>>
>> I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.
>
> Are you really surprised? :)
>
> It is still in Beta. Maybe there's a slight chance their minds could be changed? I'm guessing they don't have the rest of System.ComponentModel either, so they didn't want to add just one interface.
>
> - Jeff
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Reply | Threaded
Open this post in threaded view
|

Re: IronPython for Silverlight 5?

Tomas Matousek
I think this should be possible in SL4 already:

public abstract class Type : MemberInfo, _Type, IReflect
{
    [SecuritySafeCritical]
    internal protected Type();
}

There seems to be nothing that would prevent from doing so.

Tomas

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Keith Rome
Sent: Thursday, April 14, 2011 4:15 PM
To: Discussion of IronPython
Cc: Discussion of IronPython
Subject: Re: [IronPython] IronPython for Silverlight 5?

The docs for System.Type claims that you cannot subclass from it in Silverlight. Is this being relaxed in v5?


Keith Rome
Senior Consultant and Architect
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS

Wintellect | 770.617.4016 | [hidden email]

www.wintellect.com

On Apr 14, 2011, at 6:49 PM, "Tomas Matousek" <[hidden email]> wrote:

> Couldn't you just subclass Type? It's methods are virtual and can be overridden. I don't think you need to emit a real RuntimeType.
>
> Tomas
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Keith Rome
> Sent: Thursday, April 14, 2011 3:30 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython for Silverlight 5?
>
> After looking into what it takes to implement ICustomTypeProvider it seems like it would be a nightmare for dynamic object support. You have to produce actual custom Type instances, presumably using TypeBuilder and emitting IL opcodes to handle the getter/setter accessors. If the databinding system caches those dynamically-created Types then it could cause problems because what happens when we add a new member via expando after binding once (or remove one that previously existed)? But if they don't cache the Type objects then it seems like the overhead might be absurd from constructing these things again and again (and you can't use TypeBuilder without first creating a dynamic assembly and module).
>
> I really hope they alter course and go with ICustomTypeDescriptor instead (or even IDynamicMetaObjectProvider if that is feasible). I really don't understand how they expect the current system to work for "dynamic properties" because there is nothing dynamic at all about a System.Type instance. The best it can hope to be is a snapshot of the metadata from a dynamic object as of some point in time.
>
>
> Keith Rome
> Senior Consultant and Architect
> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect |
> 770.617.4016 | [hidden email] www.wintellect.com
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Jeff Hardy
> Sent: Thursday, April 14, 2011 4:11 PM
> To: Discussion of IronPython
> Cc: Chad Brockman
> Subject: Re: [IronPython] IronPython for Silverlight 5?
>
> On Thu, Apr 14, 2011 at 11:03 AM, Dino Viehland <[hidden email]> wrote:
>> Jeff wrote:
>>> On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman <[hidden email]>
>>> wrote:
>>>> I see Silverlight 5 now has something besides simple reflection
>>>> (ICustomTypeProvider) -
>>>>
>>>> http://msdn.microsoft.com/en-us/library/gg986857(v=VS.96).aspx#data
>>>>
>>>> Will we see an update to Iron*/DLR to support binding to dynamic
>>>> objects any time soon? This will open fantastic options for using
>>>> IronPython in Silverlight.
>>>
>>> If someone provides a patch, yes.
>>>
>>> We actually need someone with an interest in Silverlight to keep an
>>> eye on it and make sure that we don't break SL support and new
>>> features like this. We don't have anyone in that role right now.
>>
>> If anyone's interested on working on this it'd probably mean adding
>> an implementation of this onto OldInstance as well as adding it onto
>> our new-style instances whose classes are created by NewTypeMaker.  
>> Adding the interface is probably pretty easy, making it return useful things may be a little more difficult.
>>
>> I'm a little surprised they didn't go with the already existing ICustomTypeDescriptor.
>
> Are you really surprised? :)
>
> It is still in Beta. Maybe there's a slight chance their minds could be changed? I'm guessing they don't have the rest of System.ComponentModel either, so they didn't want to add just one interface.
>
> - Jeff
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




_______________________________________________
Users mailing list
[hidden email]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com