Re: [IronPython] Compiling IronPython for .NET 3.5

2011-05-06 Thread Tomas Matousek
Do not change any project settings. Just select build configuration v2Debug 
or v2Release. The default configuration Debug builds for V4.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Raghavendra 
Chandrashekara
Sent: Friday, May 06, 2011 5:26 PM
To: users@lists.ironpython.com
Subject: [IronPython] Compiling IronPython for .NET 3.5

Hi All,

I am trying to compile IronPython for .NET Framework v 3.5. I have downloaded 
the source code from https://github.com/IronLanguages/main/zipball/ipy-2.7. 
After opening the IronPython solution file I tried to change the target 
framework to 3.5 in the IronPython project properties page. After doing this I 
got a message from VS 2010 that changing the target framework requires the 
project to be closed and then reopened, so I clicked Yes to confirm the change. 
However, when I opened the project properties again the framework version had 
reverted back to v 4.0. Am I doing something wrong? Please can anyone direct me 
as to how I should compile IronPython for .NET 3.5?

Thanks,

Raj
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython for Silverlight 5?

2011-04-14 Thread 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: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] 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 | 
kr...@wintellect.com www.wintellect.com


-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] 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 di...@microsoft.com wrote:
 Jeff wrote:
 On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman cha...@slb.com
 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
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython for Silverlight 5?

2011-04-14 Thread 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: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] 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 | kr...@wintellect.com

www.wintellect.com

On Apr 14, 2011, at 6:49 PM, Tomas Matousek tomas.matou...@microsoft.com 
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: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] 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 | kr...@wintellect.com www.wintellect.com
 
 
 -Original Message-
 From: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] 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 di...@microsoft.com wrote:
 Jeff wrote:
 On Wed, Apr 13, 2011 at 11:14 PM, Chad Brockman cha...@slb.com
 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
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
 
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
 
 
 
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] Writing cross-language libraries that appear native

2011-04-04 Thread Tomas Matousek
Re: 1.

MutableString is convertible to String, so why would you need an object 
parameter?

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Doug Blank
Sent: Monday, April 04, 2011 8:25 AM
To: Discussion of IronPython
Subject: [IronPython] Writing cross-language libraries that appear native

I'm working on writing C# libraries which can be imported by a variety of .NET 
languages, DLR and otherwise, which appear native to the language importing 
them.

For example, writing a C# function that can be used naturally in IronPython as 
if it were written in Python, IronRuby as if it were written in Ruby, and F# as 
if it were written in F#, etc.

I've encountered some gotchas that I thought I'd share, and looking for any 
other points of advice in writing cross-language libraries.

1. IronRuby strings aren't really strings, so you need to pass them in as an 
object, and call .ToString().

public static string expects_string(object val) {
return val.ToString();
}

2. F# 2.0 doesn't seem to automatically convert a type to the associated 
nullable type, so avoid nullable types as parameters.

// AVOID:
public static double? expects_nullable(double? var1=null) {
return var1;
}

// BETTER:
public static double? expects_nullable() {
return null;
}
public static double expects_nullable(double var1) {
return var1;
}

3. IronPython and IronRuby lists and dictionaries implement IList and 
IDictionary, so no problem with those.

public static IDictionaryobject,object make_dict(object val) {
if (val as IDictionaryobject,object != null) {
return ((IDictionaryobject,object)val);
} else
throw new System.ArgumentException(object is not a dictionary);
}

public static IListobject make_list(object val) {
if (val as IListobject != null) {
return ((IListobject)val);
} else
throw new System.ArgumentException(object is not a list);
}

Any other suggestions?

-Doug
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-25 Thread Tomas Matousek
It's fixed - a trivial change: 

https://github.com/IronLanguages/main/commit/a8d9bc96aefcdb30bfd93a091b60ffb8fa4a8e4a


Tomas

-Original Message-
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Friday, March 25, 2011 4:54 AM
To: Tomas Matousek
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Thu, Mar 24, 2011 at 1:30 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 It seems that we just need to disable XML warning in Microsoft.System.Core 
 project.

Ok. If you can provide a bit more information about this, I'll take a stab, or 
report an issue in the tracker. It sounds like support for IronPython 2.7 using 
the 2.0 framework under Mono is getting close!

-Doug

 Tomas




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] The return value (out)

2011-03-25 Thread Tomas Matousek
This should work:

result, pick = EntityPick(entity)

That is, out arguments are returned bundled in a tuple with the result of the 
method.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Afan Olovcic
Sent: Friday, March 25, 2011 6:56 PM
To: users@lists.ironpython.com
Subject: [IronPython] The return value (out)

Hi,

Can somebody help me to solve this problem please ?

in the .NET Assembly there is C# function:
public static extern int EntityPick(out TPick pick, TEntity entity, float range 
= 100, float radius = 0, int collisionType = 0, PickFilterCallback pickfilter = 
null);

how to call that function in ironPython and get return value of pick

I can't find working solution

Thanks
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-24 Thread Tomas Matousek
Done.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Tomas Matousek
Sent: Wednesday, March 23, 2011 5:27 PM
To: Doug Blank
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

I'll add them. 

Tomas

-Original Message-
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Wednesday, March 23, 2011 4:51 PM
To: Tomas Matousek
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Wed, Mar 23, 2011 at 6:26 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 I see, I guess I forgot to add these configs to IronPython.Mono.sln. But they 
 shoud certainly be there.

Ok. I tried but couldn't guess my way to a working system. Can you add them, or 
should an issue be filed?

Thanks!

-Doug

 Tomas




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-24 Thread Tomas Matousek
It seems that we just need to disable XML warning in Microsoft.System.Core 
project.

Tomas

-Original Message-
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Thursday, March 24, 2011 10:00 AM
To: Tomas Matousek
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Thu, Mar 24, 2011 at 12:30 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 Done.

Thanks! Having some issues under Mono 2.10 with 
Microsoft.Scripting.Ast.Expression, and System.Runtime.CompilerServices.

Here is my output, with a fresh IronPython git main. Any ideas?

Also, if anyone builds IronPython 2.7 for .NET 2.0 under Windows and wants to 
make the binaries available, that would be useful to see if those work on Mono 
as well.

-Doug

$ xbuild Solutions/IronPython.Mono.sln /p:Configuration=v2Release
XBuild Engine Version 2.10.1.0
Mono, Version 2.10.1.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Build started 3/24/2011 12:49:58 PM.
__
/tmp/main/Solutions/IronPython.Mono.sln:  warning : Project file 
/tmp/main/Hosts/SilverLight/Microsoft.Scripting.SilverLight/Microsoft.Scripting.Silverlight.csproj
referenced in the solution file, not found. Ignoring.
/tmp/main/Solutions/IronPython.Mono.sln:  warning : Project file 
/tmp/main/Hosts/SilverLight/Chiron/Chiron.csproj referenced in the solution 
file, not found. Ignoring.
Project /tmp/main/Solutions/IronPython.Mono.sln (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration v2Release|Any CPU.
Target Build:
Project 
/tmp/main/Runtime/Microsoft.Scripting.Metadata/Microsoft.Scripting.Metadata.csproj
(default target(s)):
Target PrepareForBuild:
Configuration: v2Release Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target 
GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Skipping target CoreCompile because its outputs are 
up-to-date.
Done building project
/tmp/main/Runtime/Microsoft.Scripting.Metadata/Microsoft.Scripting.Metadata.csproj.
Project 
/tmp/main/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj
(default target(s)):
Target PrepareForBuild:
Configuration: v2Release Platform: AnyCPU
Target GenerateSatelliteAssemblies:
No input files were specified for target 
GenerateSatelliteAssemblies, skipping.
Target CoreCompile:
Tool /opt/bin/gmcs execution started with 
arguments: /noconfig /debug:full /keyfile:/tmp/main/Solutions//Key.snk 
/optimize+ /out:obj/v2Release/Microsoft.Scripting.Core.dll Actions/CallInfo.cs 
Actions/CallSiteOps.cs Actions/IInvokeOnGetBinder.cs 
Actions/InvokeMemberBinder.cs Actions/BinaryOperationBinder.cs 
Actions/CallSite.cs Actions/CallSiteBinder.cs Actions/CallSiteHelpers.cs 
Actions/ConvertBinder.cs Actions/DeleteIndexBinder.cs Actions/DynamicObject.cs 
Actions/ExpandoObject.cs Actions/ExpandoClass.cs Actions/GetIndexBinder.cs 
Actions/CreateInstanceBinder.cs Actions/DeleteMemberBinder.cs 
Actions/GetMemberBinder.cs Actions/IDynamicMetaObjectProvider.cs 
Actions/InvokeBinder.cs Actions/DynamicMetaObject.cs 
Actions/DynamicMetaObjectBinder.cs
Actions/BindingRestrictions.cs Actions/RuleCache.cs Actions/SetIndexBinder.cs 
Actions/SetMemberBinder.cs Ast/Expression.DebuggerProxy.cs 
Ast/IArgumentProvider.cs Ast/ListArgumentProvider.cs 
Actions/UnaryOperationBinder.cs Ast/ExpressionStringBuilder.cs 
Compiler/BoundConstants.cs Ast/DebugInfoExpression.cs Ast/SymbolDocumentInfo.cs 
Compiler/DelegateHelpers.cs Compiler/DelegateHelpers.Generated.cs
Ast/GotoExpression.cs Compiler/LabelInfo.cs Compiler/AnalyzedTree.cs 
Compiler/OffsetTrackingILGenerator.cs Compiler/RuntimeVariableList.cs 
Actions/UpdateDelegates.Generated.cs Ast/DynamicExpression.cs 
Ast/BinaryExpression.cs Ast/BlockExpression.cs Ast/CatchBlock.cs 
Ast/ConditionalExpression.cs Ast/ConstantExpression.cs Ast/DefaultExpression.cs 
Ast/ElementInit.cs Ast/Expression.cs Ast/ExpressionType.cs 
Ast/IndexExpression.cs Ast/InvocationExpression.cs Ast/LabelTarget.cs 
Ast/LabelExpression.cs Ast/LambdaExpression.cs Ast/ListInitExpression.cs 
Ast/RuntimeVariablesExpression.cs Ast/LoopExpression.cs Ast/MemberAssignment.cs 
Ast/MemberBinding.cs Ast/MemberExpression.cs Ast/MemberInitExpression.cs 
Ast/MemberListBinding.cs Ast/MemberMemberBinding.cs Ast/MethodCallExpression.cs 
Ast/NewArrayExpression.cs Ast/NewExpression.cs Ast/ParameterExpression.cs 
Ast/SwitchCase.cs Ast/SwitchExpression.cs Ast/TryExpression.cs 
Ast/TypeBinaryExpression.cs Ast/TypeUtils.cs Ast/UnaryExpression.cs Comp
 iler/Closure.cs Compiler

Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Tomas Matousek
 However, it appears that building the v2... targets doesn't work right now

This should be fixed now.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Wednesday, March 23, 2011 8:05 AM
To: Doug Blank
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Wed, Mar 23, 2011 at 7:13 AM, Doug Blank doug.bl...@gmail.com wrote:
 Questions:

 1) How to build a Release version rather than Debug?
 2) How to set the framework to use 2.0 rather than 4.0?

1) msbuild Solutions/Dlr.sln /p:Configuration=Release
2) msbuild Solutions/Dlr.sln /p:Configuration=v2Debug (or v2Release)

I assume xbuild's command line matches msbuild's.

However, it appears that building the v2... targets doesn't work right now, 
which I was kinda afraid of. I think there's a discrepancy between the 
Microsoft.Scripting DLR and the .NET 4 DLR.

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Tomas Matousek

4) You don't need to do this. Use IronPython.Mono.sln to build IronPython and 
IronRuby.sln to build IronRuby. Those 2 solutions should work on Mono. DLR is 
built by both as it is a dependency. No need to build Dlr.sln: it includes both 
languages plus additional test projects  - as you noticed some of the test 
assemblies are not buildable on Mono yet.

Tomas

-Original Message-

4) Edit IronPython/Solutions/Dlr.sln
Removed anything that said test and other parts that aren't needed.
(One test had a file that Mono wouldn't read the .il code correctly
(./Test/ClrAssembly/Src/typeforwarder2.il) and some filenames in csproj files 
that had the wrong case, which doesn't work too well on a case-sensitive file 
system. I started to fix those, but left that for now).

5) Delete IronPython/bin/Debug/*.dll

6) Build it:
cd IronPython/Solutions/
xbuild Dlr.sln
xbuild IronPython.sln

7) Test:
$cd ../bin/Debug/
$ mono ipy.exe
IronPython 2.7 DEBUG (2.7.0.40) on .NET 4.0.30319.1 Type help, copyright, 
credits or license for more information.
 1 + 1
2
 ^d

It is still in gray colors, but that works.

Questions:

1) How to build a Release version rather than Debug?
2) How to set the framework to use 2.0 rather than 4.0?

 We won't provide binaries for 2.7/.NET2, but we don't want to prevent 
 someone building their own either. 3.0, however, will drop support for 
 .NET 2 entirely.

I will add this information to the wiki so that people can do exactly that.

-Doug

 - Jeff

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Tomas Matousek
It seems like your quotes are weird:

/p:Configuration=¨v2Release¨

Try use w/o quotes. Also, Mono 2.8 xbuild might not be able to build the 
solution due to bugs in xbuild. Mono 2.10 should be fine.

Tomas

-Original Message-
From: Vernon Cole [mailto:vernondc...@gmail.com] 
Sent: Wednesday, March 23, 2011 11:48 AM
To: Discussion of IronPython
Cc: Tomas Matousek; Jeff Hardy
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

Just learning ... perhaps I missed a step with git or something? ...
but trying to follow along on this.  I am trying to build an IronPython 2.7 
which will run on Ubuntu using the stock 2.6.7 mono -- so .NET 2 compatible.

I just built and am running a copy of openSUSE 11.4, so in theory I have a good 
enough mono and compiler, etc.
I believe I have the latest source.
git log gives:
v v v v v
commit a04ffe823a7f21da622044532644157b038b21d8
Author: Tomas Matousek tomas_matou...@hotmail.com
Date:   Wed Mar 23 09:08:15 2011 -0700

Fixes IronPython CLR2 build.
^ ^ ^ ^ ^
My build attempt ends in an error.
Am I doing it wrong, or is something still missing?
v v v v v
vernon@linux-0sza:~/IronLanguages-main/Solutions xbuild IronPython.Mono.sln 
/p:Configuration=¨v2Release¨ XBuild Engine Version 2.8.2.0 Mono, Version 
2.8.2.0 Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2009.
/home/vernon/IronLanguages-main/Solutions/IronPython.Mono.sln:
warning : Project file
/home/vernon/IronLanguages-main/Hosts/SilverLight/Microsoft.Scripting.SilverLight/Microsoft.Scripting.Silverlight.csproj
referenced in the solution file, not found. Ignoring.
/home/vernon/IronLanguages-main/Solutions/IronPython.Mono.sln:
warning : Project file
/home/vernon/IronLanguages-main/Hosts/SilverLight/Chiron/Chiron.csproj
referenced in the solution file, not found. Ignoring.

Build started 3/23/2011 12:25:50 PM.
__
Project /home/vernon/IronLanguages-main/Solutions/IronPython.Mono.sln
(default target(s)):

Target ValidateSolutionConfiguration:
/home/vernon/IronLanguages-main/Solutions/IronPython.Mono.sln: error :
Invalid solution configuration and platform: ¨v2Release¨|Any CPU.
^ ^ ^ ^ ^ ^
Do I need to update mono to 2.10 on openSUSI, too?
--
Vernon

On Wed, Mar 23, 2011 at 10:21 AM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:

 4) You don't need to do this. Use IronPython.Mono.sln to build IronPython and 
 IronRuby.sln to build IronRuby. Those 2 solutions should work on Mono. DLR is 
 built by both as it is a dependency. No need to build Dlr.sln: it includes 
 both languages plus additional test projects  - as you noticed some of the 
 test assemblies are not buildable on Mono yet.

 Tomas




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Tomas Matousek
I see, I guess I forgot to add these configs to IronPython.Mono.sln. But they 
shoud certainly be there.

Tomas

-Original Message-
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Wednesday, March 23, 2011 3:16 PM
To: Tomas Matousek
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Wed, Mar 23, 2011 at 12:13 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
  However, it appears that building the v2... targets doesn't work right 
 now

 This should be fixed now.

Do we need to change the IronPython.Mono.sln too? Looking through 
Solutions/IronPython.Mono.sln, I only see Debug and Release configurations (and 
those both work great).

I'm new to git, so maybe I have the wrong code, but I'm getting an error on 
v2Release and v2Debug:

# yesterday:
$ git clone https://github.com/IronLanguages/main.git
$ cd main
# today:
$ git pull
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 14 (delta 11), reused 0 (delta 0) Unpacking objects: 100% 
(14/14), done.
From https://github.com/IronLanguages/main
   4e7a828..a04ffe8  master - origin/master
Updating 4e7a828..a04ffe8
Fast-forward
 .../IronPython/IronPython/Runtime/PythonTuple.cs   |2 +-
 Runtime/Microsoft.Dynamic/Math/BigIntegerV2.cs |   16 +++-
 Runtime/Microsoft.Dynamic/Math/BigIntegerV4.cs |   10 +++---
 Runtime/Microsoft.Dynamic/Utils/MathUtils.cs   |   12 ++--
 4 files changed, 29 insertions(+), 11 deletions(-) $ git status # On branch 
master nothing to commit (working directory clean) $ xbuild 
Solutions/IronPython.Mono.sln /p:Configuration=v2Release
...
Project /tmp/main/Solutions/IronPython.Mono.sln (default target(s)):
Target ValidateSolutionConfiguration:
/tmp/main/Solutions/IronPython.Mono.sln: error : Invalid solution configuration 
and platform: v2Release|Any CPU.
Task Error execution -- FAILED
Done building target ValidateSolutionConfiguration in project
/tmp/main/Solutions/IronPython.Mono.sln.-- FAILED Done building project 
/tmp/main/Solutions/IronPython.Mono.sln.-- FAILED

Build FAILED.

-Doug

 Tomas

 -Original Message-
 From: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
 Sent: Wednesday, March 23, 2011 8:05 AM
 To: Doug Blank
 Cc: Discussion of IronPython
 Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

 On Wed, Mar 23, 2011 at 7:13 AM, Doug Blank doug.bl...@gmail.com wrote:
 Questions:

 1) How to build a Release version rather than Debug?
 2) How to set the framework to use 2.0 rather than 4.0?

 1) msbuild Solutions/Dlr.sln /p:Configuration=Release
 2) msbuild Solutions/Dlr.sln /p:Configuration=v2Debug (or 
 v2Release)

 I assume xbuild's command line matches msbuild's.

 However, it appears that building the v2... targets doesn't work right now, 
 which I was kinda afraid of. I think there's a discrepancy between the 
 Microsoft.Scripting DLR and the .NET 4 DLR.

 - Jeff
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com









___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Tomas Matousek
I'll add them. 

Tomas

-Original Message-
From: Doug Blank [mailto:doug.bl...@gmail.com] 
Sent: Wednesday, March 23, 2011 4:51 PM
To: Tomas Matousek
Cc: Discussion of IronPython
Subject: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

On Wed, Mar 23, 2011 at 6:26 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 I see, I guess I forgot to add these configs to IronPython.Mono.sln. But they 
 shoud certainly be there.

Ok. I tried but couldn't guess my way to a working system. Can you add them, or 
should an issue be filed?

Thanks!

-Doug

 Tomas




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 3.x Development

2011-03-16 Thread Tomas Matousek
Yes, you can do it and w/o any glue - the version of the assembly is a part of 
the name, so the assemblies are in fact not named identically. Only the files 
are and they can be either in GAC or in a different subdirectory of your app. 
Your App.config can specify subdirectories used to look for assemblies [1]. 

To choose the namespace/class from one assembly or the other use extern aliases 
[2] in your code.

Tomas

[1] http://msdn.microsoft.com/en-us/library/823z9h8w(VS.80).aspx
[2] 
http://www.davidarno.org/c-howtos/aliases-overcoming-name-conflicts-part-2-extern-alias/


-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Markus Schaber
Sent: Wednesday, March 16, 2011 12:24 AM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython 2.7.1  3.x Development

Hi,

Von Tomas Matousek

 As I wrote, we host IronPython inside our application, so shebang
and
 file name suffixes are irrelevant - but we could use the shebang as
a
 marker for python 3 (given that we can host both versions
 side-by-side) and parse the source manually to find out which
version
 to use - at least for a specific grace period.
 
 I think we can support this - it would be no different than using 
 IronPython and IronRuby side by side, if we do it right. We'd
probably
 have to rename IronPython.dll to IronPython3.dll as well, but that's
not a
 big deal.
 The assemblies are strongly named so I don't think that the name
change
 would be necessary.

Maybe we will need some tricks to solve the reference problems - I don't know 
whether you can reference two identically named assemblies containing 
identically named classes from the same C# dll, even if they are signed 
differently. But I think some kind of glue layer dlls could easily solve that.

Thanks,
Markus
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 3.x Development

2011-03-15 Thread Tomas Matousek
The assemblies are strongly named so I don't think that the name change would 
be necessary.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Tuesday, March 15, 2011 11:08 AM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython 2.7.1  3.x Development

On Tue, Mar 15, 2011 at 9:55 AM, Markus Schaber m.scha...@3s-software.com 
wrote:
 As I wrote, we host IronPython inside our application, so shebang and 
 file name suffixes are irrelevant - but we could use the shebang as a 
 marker for python 3 (given that we can host both versions 
 side-by-side) and parse the source manually to find out which version 
 to use - at least for a specific grace period.

I think we can support this - it would be no different than using IronPython 
and IronRuby side by side, if we do it right. We'd probably have to rename 
IronPython.dll to IronPython3.dll as well, but that's not a big deal.

How you decide which to use would be up to you, though.

Would this be useful for anyone else as well?

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython Hosting ?

2011-02-28 Thread Tomas Matousek
Let's file Hosting API feature requests, ranging from simple helpers, useful 
tweaks or something more complex, as work items on IronPython or IronRuby 
CodePlex site, so that we can track them.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Monday, February 28, 2011 1:38 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython Hosting ?

On Mon, Feb 28, 2011 at 1:58 PM, Mark Senko mse...@completegenomics.com wrote:
 *Bill, what are your goals for asking how we use hosting?

While I can't speak for Bill, I can say hosting is something that hasn't been 
given much thought in the last little while because I've been focused on 
getting the engine and stdlib up to par, and because the hosting APIs are, in 
general, very good. If there are specific use-cases that aren't covered, it 
would be good to know.

 *I'm still discovering the features I have available, and lamenting 
 those I don't.

What don't you have available? What would you like to see added to the hosting 
API? It's too late to get changes into 2.7, but 3.x is open season as far as 
changes are concerned, no matter how crazy.

My use case: a WSGI implementation for serving web sites. It basically just 
mooks for a callable in a .py file and calls it with particular arguments. I 
have very few issues with the hosting API, although there are a few missing 
helpers that would be nice to have.

What I think is missing the most is documentation - or if it exists, I'm not 
sure where to find it. Especially for using other AppDomains, as that comes up 
a lot.

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Silent install of IronPython

2011-02-22 Thread Tomas Matousek
Binaries are installed into the GAC.
Use http://ironpython.codeplex.com/releases/view/61395#DownloadId=210406 if you 
need x-copy deployment (i.e. just copy files w/o running an installer).

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of haniti grk
Sent: Tuesday, February 22, 2011 5:06 PM
To: users@lists.ironpython.com
Subject: [IronPython] Silent install of IronPython

Hi All,

This may have been asked before but I could find it in the mailing list archive.

Anyway, I would like to mass install IronPython on a specific folder, say 
C:\IPY, how can I do this?

I tried:

IronPython-2.7RC1.msi /qn INSTALLDIR=c:\ipy

but not all files are there, binaries where installed somewhere else.

-haniti
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Road to IronPython 2.7 (update)

2011-02-21 Thread Tomas Matousek
IronPython.Mono.sln should build fine on Mono 2.10 RC2.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Tristan Zajonc
Sent: Monday, February 21, 2011 6:11 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Road to IronPython 2.7 (update)

There seems to be some regressions between 2.6 and 2.7 for OSX/Mono.  In 
particular, in addition to the traceback bug, the uuid module still has a 
problem:

http://ironpython.codeplex.com/workitem/28904

Given that uuid appears all over the place, this is relatively serious, I 
think.  I'd look into these, but the standard IronPython solution doesn't 
compile on OSX/Mono.

Tristan


On Mon, Feb 21, 2011 at 7:31 PM, Jimmy Schementi 
ji...@schementi.commailto:ji...@schementi.com wrote:
I can do a quick test pass of the silverlight support.
~Jimmy



On Mon, Feb 21, 2011 at 7:01 PM, Steve Dower 
s.j.do...@gmail.commailto:s.j.do...@gmail.com wrote:
 The tools problem seems to be to do with the installer. IPyTools
 (PythonRuntimeHost.cs:89-100) tries to load the installed path from
 HKLM\SOFTWARE\IronPython\2.7\(default). On my machine (Win7 x64, IPy
 2.7 RC1 installed without IPyTools, which were built from source) this
 is actually in HKLM\SOFTWARE\Wow6432Node\IronPython\2.7\(default)
 which contains ipy64, which is then combined (PythonStarter.cs:69)
 with ipy.exe to make ipy64\ipy.exe as the interpreter path (which
 doesn't exist).

 If I set HKLM\SOFTWARE\Wow6432Node\IronPython\2.7\(default) to my
 actual install path (where ipy.exe is) it works fine. I assume this
 should be done in the installer.


 Steve

 On Tue, Feb 22, 2011 at 10:12, Jeff Hardy 
 jdha...@gmail.commailto:jdha...@gmail.com wrote:
 Hi all,
 The following issues are blockers for IronPython 2.7:

 * #29841 - sysconfig traceback when starting 2.7B1 -
 http://ironpython.codeplex.com/workitem/29841
 I don't know enough about Mono/MacOS/POSIX to fix this one properly. I
 haven't yet chercked what the Mono guys did to get it working on
 Linux.

 * (no issue) - Visual Studio tools
 The Visual Studio tools are basically broken right now - I can't
 launch or debug even the default console program. I think it's because
 it can't find the interpreter, but I thought I fixed that already.

 * (no issue) - silverlight support
 I have no idea what the status of the silverlight support is.

 Once these are resolved (one way of another) I think 2.7 will be ready to go.

 - Jeff

 P.S. In all honesty I would have preferred to call the latest release
 Beta 3 instead of RC1, but I had already changed the version strings
 and didn't want to change them back :|.
 ___
 Users mailing list
 Users@lists.ironpython.commailto:Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

 ___
 Users mailing list
 Users@lists.ironpython.commailto:Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-11 Thread Tomas Matousek
The expected layout is:

/usr/lib/ironruby/bin
   ir.exe
   IronRuby.dll
   IronRuby.Libraries.dll
   IronRuby.Libraries.Yaml.dll
   Microsoft.Scripting.dll
   Microsoft.Dynamic.dll
   Microsoft.scripting.Metadata.dll  

/usr/lib/ironruby/Lib - StdLib directory
  ironruby
 digest
 mathn
 test
 yaml
 ...
  ruby
 1.9.1
 gems
 site_ruby

It is indeed possible to change it but this is the simplest setup that requires 
no additional configuration.
Would it work for you?

Tomas
 
-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Friday, February 11, 2011 8:05 AM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

For now it looks like this:
/usr/bin/ir # etc., wrapper scripts to call mono /usr/lib/ironruby/ir.exe # etc.
/usr/lib/ironruby/IronRuby.dll # etc.
/usr/lib/ironruby/Lib/ironruby # etc. contents pulled from Languages/Ruby/StdLib

When I strace'd running ir and typing require 'foo' it said it was looking in 
various directories that make sense if you're running from the source build.

On Thu, Feb 10, 2011 at 4:01 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 What is your installation dir/file layout?

 -Original Message-
 From: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew 
 Jorgensen
 Sent: Thursday, February 10, 2011 2:52 PM
 To: Discussion of IronPython
 Cc: ironruby-c...@rubyforge.org
 Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

 Okay, we're making some great progress here now. Last issue I see 
 immediately is that ir.exe crashes hard when trying to require a 
 library, also it looks for it in all the wrong places on mono. Ideally
 (IMHO) it would first look under a Lib directory under the directory ir.exe 
 lives in.
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-11 Thread Tomas Matousek
Yes, it is possible. You shouldn't need to change the config file. We don't 
have a config file in the Windows installation.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Friday, February 11, 2011 5:07 PM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

Oh, nevermind, now I see this is configured in the .config files, I can 
probably fix this myself.

On Fri, Feb 11, 2011 at 5:59 PM, Andrew Jorgensen and...@jorgensenfamily.us 
wrote:
 It still looks in the wrong place for the libraries, as you can see 
 from this strace log

 grep date log
 read(0, require 'date'\n, 1024)       = 15 
 stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/home/ajorg/packages-provo/Mono/ironruby/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 lstat(/home/ajorg/packages-provo/Mono/ironruby/date.rb,
 0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
 stat(/home/ajorg/packages-provo/Mono/ironruby/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/home/ajorg/packages-provo/Mono/ironruby/date.dll,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/home/ajorg/packages-provo/Mono/ironruby/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/home/ajorg/packages-provo/Mono/ironruby/date.so,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 stat(/home/ajorg/packages-provo/Mono/ironruby/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
 lstat(/home/ajorg/packages-provo/Mono/ironruby/date.exe,
 0x7fff01eb9580) = -1 ENOENT (No such file or directory)

 On Fri, Feb 11, 2011 at 5:43 PM, Andrew Jorgensen 
 and...@jorgensenfamily.us wrote:
 Yes, that should be fine, I'll give it a try and see if it can load anything.

 On Fri, Feb 11, 2011 at 10:23 AM, Tomas Matousek 
 tomas.matou...@microsoft.com wrote:
 The expected layout is:

 /usr/lib/ironruby/bin
   ir.exe
   IronRuby.dll
   IronRuby.Libraries.dll
   IronRuby.Libraries.Yaml.dll
   Microsoft.Scripting.dll
   Microsoft.Dynamic.dll

Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-11 Thread Tomas Matousek
The directory should be called Lib, not StdLib. The repo has it under StdLib 
but the installer creates Lib.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Friday, February 11, 2011 4:59 PM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

It still looks in the wrong place for the libraries, as you can see from this 
strace log

 grep date log
read(0, require 'date'\n, 1024)   = 15
stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ironruby/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/site_ruby/1.9.1/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/usr/lib/Languages/Ruby/StdLib/ruby/1.9.1/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/home/ajorg/packages-provo/Mono/ironruby/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
lstat(/home/ajorg/packages-provo/Mono/ironruby/date.rb,
0x7fff01eb9510) = -1 ENOENT (No such file or directory) 
stat(/home/ajorg/packages-provo/Mono/ironruby/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/home/ajorg/packages-provo/Mono/ironruby/date.dll,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/home/ajorg/packages-provo/Mono/ironruby/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/home/ajorg/packages-provo/Mono/ironruby/date.so,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
stat(/home/ajorg/packages-provo/Mono/ironruby/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory) 
lstat(/home/ajorg/packages-provo/Mono/ironruby/date.exe,
0x7fff01eb9580) = -1 ENOENT (No such file or directory)

On Fri, Feb 11, 2011 at 5:43 PM, Andrew Jorgensen 
and...@jorgensenfamily.usmailto:and...@jorgensenfamily.us wrote:
 Yes, that should be fine, I'll give it a try and see if it can load anything.

 On Fri, Feb 11, 2011 at 10:23 AM, Tomas Matousek
 tomas.matou...@microsoft.commailto:tomas.matou...@microsoft.com wrote:
 The expected layout is:

 /usr/lib/ironruby/bin
   ir.exe
   IronRuby.dll
   IronRuby.Libraries.dll
   IronRuby.Libraries.Yaml.dll
   Microsoft.Scripting.dll
   Microsoft.Dynamic.dll
   Microsoft.scripting.Metadata.dll

 /usr/lib/ironruby/Lib - StdLib directory
  ironruby
 digest
 mathn
 test
 yaml
 ...
  ruby
 1.9.1
 gems
 site_ruby

 It is indeed possible to change

Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-11 Thread Tomas Matousek
Yes, but the .config file doesn't need to be there at all. ../Lib is the 
default value.

The files in Config directory are for development env only.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Friday, February 11, 2011 6:44 PM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

On Fri, Feb 11, 2011 at 7:28 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 Yes, it is possible. You shouldn't need to change the config file. We don't 
 have a config file in the Windows installation.

This comes from Config/Signed/App.config (which becomes ir.exe.config), which 
has the following line
  set language=Ruby option=StandardLibrary
value=..\..\Languages\Ruby\StdLib/
which must be changed to
  set language=Ruby option=StandardLibrary value=..\Lib/ for ir.exe 
to find libraries. Of course the first is correct for the built copy, just not 
correct when installed.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-11 Thread Tomas Matousek
Might be. You can compare your layout with the one for Windows - this zip file 
has the right layout:

http://ironruby.codeplex.com/releases/view/55250#DownloadId=206131

Just exclude .bat files and Samples, Silverlight and WP7 directories.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Friday, February 11, 2011 7:14 PM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

On Fri, Feb 11, 2011 at 8:03 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 Yes, but the .config file doesn't need to be there at all. ../Lib is the 
 default value.

 The files in Config directory are for development env only.

Ah, see I was just copying all the contents of bin/Configuration to 
/usr/lib/ironruby

Are there other files I should /not/ be installing?
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-10 Thread Tomas Matousek
What is your installation dir/file layout?

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Thursday, February 10, 2011 2:52 PM
To: Discussion of IronPython
Cc: ironruby-c...@rubyforge.org
Subject: Re: [IronPython] Contents of Lib (packaging for RPM)

Okay, we're making some great progress here now. Last issue I see immediately 
is that ir.exe crashes hard when trying to require a library, also it looks for 
it in all the wrong places on mono. Ideally
(IMHO) it would first look under a Lib directory under the directory ir.exe 
lives in.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Contents of Lib (packaging for RPM)

2011-02-09 Thread Tomas Matousek
[Including IronRuby list].

We have a script in Msi directory called harvest.rb. This is used by another 
scripts Msi\Python\generate_wxis.rb and Msi\Ruby\generate_wxis.rb that launch 
it with Python and Ruby specific parameters, respectively. The generated .wxi 
files fully describe the files and directory hierarchy that is created by the 
Windows installer on the target machine. I think you can easily run them thru a 
script that converts them to whatever format you need. They are just XML files.

Would it be possible to create a script (Python or Ruby) that builds RPM 
package and runs on Windows as well? This would allow us to build new releases 
in one pass on a single machine and just publish the Mac packages on CodePlex 
next to .msi's.

Let me know if you had any issues.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Andrew Jorgensen
Sent: Wednesday, February 09, 2011 12:42 PM
To: users@lists.ironpython.com
Subject: [IronPython] Contents of Lib (packaging for RPM)

Hello Folks,

First let me thank you for making IronPython easy to compile on Mono.
I'm the release manager for the Mono Project at Novell and I'm currently 
working on packaging IronPython and IronRuby for openSUSE (also to be included 
in the Mono Mac framework package). Where I've run into trouble is the stdlibs 
for both. I can see that the -Bin.zip contains a Lib directory with various 
standard libraries in it but I don't see how I can reliably and repeatably get 
that exact content into my RPM packages (short of including the -Bin.zip in the 
build).

Is there a script of some sort that takes the appropriate files from the 
correct source and puts them where I need them (the script used to build the 
-Bin.zip perhaps?)

Thanks!
Andrew Jorgensen
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] [Ironruby-core] Preparing 1.1.2 release

2011-02-07 Thread Tomas Matousek
Re binaries - 3 flavors are currently built:


1)  Desktop CLR 4.0 (.NET FW 4.0, Mono 2.10)

2)  Core CLR 4.0 (Silverlight 4.0, Moonlight)

3)  Core CLR 3.0 (Windows Phone 7)

So yes, the binaries should be equivalent. They won't be byte-for-byte equal, 
but should functionally be the same. So should be binaries built on Windows 
using Microsoft C# compiler or Mono C# compiler.

Re packaging and build automation: Sync with Jeff Hardy who maintains 
IronPython. We should have one solution for both languages.

Tomas

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Thibaut Barrère
Sent: Monday, February 07, 2011 3:33 PM
To: ironruby-c...@rubyforge.org
Subject: Re: [Ironruby-core] Preparing 1.1.2 release

Great! I spent some time to make xbuild happy :), I'm glad it works on 
non-Windows boxes as well.

Thanks for that really :)

I've got a question wrt the build script we could set up: are the resulting 
binaries different if I compile from Mac OS X, as compared with Ubuntu ?

If they are identical, I could work on provisioning a Vagrant box with all that 
is required to generate the builds on Ubuntu automatically.

This would let anyone with access to Vagrant (and I think it works on Windows 
too for the host) with the ability to automate the builds and tests for 
IronRuby on *nix, and we could also push this to a VPS instance later on so 
that we keep fresh automated binaries for OS X / Ubuntu etc.

Are the resulting binaries identical ?


I filed a couple of Mono bugs (crashes) yesterday:
So this might be hitting one of them. Or another. I guess we can either wait 
until these are fixed and try again or try to narrow the Rubygems crash down to 
a simpler repro.

I'll wait a bit, given my current free time, but I will definitely try again 
later on (feel free to ping me if you want to try things out later on, by email 
or gtalk thibaut.barr...@gmail.commailto:thibaut.barr...@gmail.com).

-- Thibaut

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Switching DLR tests from MSTest to NUnit

2011-02-01 Thread Tomas Matousek
I have an experience with xUnit.net 
(http://xunit.codeplex.com/wikipage?title=WhyDidWeBuildXunitreferringTitle=Home),
 so I would personally prefer that one. It has a pretty good VS integration. I 
haven't used NUnit. If you prefer it I don't have objections.

One comment on the placement of the framework dlls - a better place than 
/Runtime/Tests/Lib would be /Util/NUnit.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Tuesday, February 01, 2011 2:37 PM
To: Discussion of IronPython
Subject: [IronPython] Switching DLR tests from MSTest to NUnit

There's a pull request (https://github.com/IronLanguages/main/pull/10)
pending that changes the unit tests for the DLR from MsTest to NUnit.
The advantage of doing this is that NUnit test can be run without having Visual 
Studio installed on the machine, which will make it much easier to run tests in 
a CI environment, and I presume for running on Mono as well. The downside is 
that MsTest has an integrated test runner in VS, and NUnit doesn't out of the 
box (but there are some available).

Since I don't work on the DLR code, I wanted to make sure this change is 
acceptable to those that do. Tomas, Dino - thoughts?

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] codeplex-dlr solution

2011-01-30 Thread Tomas Matousek
Yes, some code is missing. I'll add Sympl today. Also CodePlex-DLR.sln is not 
needed any more (some changes might be needed to remove it, I plan to look at 
it).

Dlr.sln   - solution that rebuilds everything 
(Ipy, Irb, test assemblies, etc)
IronPython.sln  - All Ipy assemblies that ship and their 
dependencies
IronPython.Mono.sln- Same as IronPython.sln but excludes .Net specific 
projects (WPF)
Ruby.sln   - All Irb assemblies that ship and their 
dependencies
IronStudio.sln- All tooling (Ipy, Irb + shared components)

IronPythonTools.sln   - Ipy tooling - I think we should remove this
CodePlex-DLR.sln- We should remove this
IronRuby.Rack.sln- IronRuby Rack... not sure what the state is.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Richard Nienaber
Sent: Sunday, January 30, 2011 9:02 AM
To: Discussion of IronPython
Subject: [IronPython] codeplex-dlr solution

I've been trying to get all the solutions to compile in the source code and I'm 
stuck on Codeplex-DLR.sln. It references a few projects that are not there 
namely:

Samples
ET_Sample1_CS
ShapeScript
Sympl
Sympl35
Sympl35cponly
examples
python

If I delete these projects then the solution builds fine but I'm just wondering 
if there's some code that's been missed out and still needs to be committed to 
github?

Richard
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Proposed Release Schedule for 2.7

2011-01-30 Thread Tomas Matousek
I propose we sync IronRuby releases with IronPython as follows:

IronRuby - IronPython - date
1.1.2 - Beta 2 - February 6
none - RC1 - February 20
none - RC2 - February 27
1.1.3 - RTM - March 6

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Friday, January 28, 2011 3:39 PM
To: Discussion of IronPython
Subject: [IronPython] Proposed Release Schedule for 2.7

I'd like to propose the following release schedule for IronPython 2.7:

Beta 2 - February 6
RC1 - February 20
RC2 - February 27
RTM - March 6

The need for a Beta 3 release could push those dates back by up to two weeks. 
Also, I may reevaluate based on the rate of bugs being fixed - if lots of fixes 
are coming in, delaying the release may be worthwhile. Obviously, any 
showstoppers would have an affect as while, but I don't believe there are any 
of those at the moment. The only current blocker for release is that the test 
suite does not pass 100%.
That will need to be sorted prior to RTM.

It's an aggressive schedule, but I think IronPython has gone too long without a 
release. I'm expecting there to be 2.7.x releases every 4-6 weeks if there are 
sufficient contributions (like new modules).

I want to get the 2.x series behind us so that work can begin on 3.2/3.3. 
Compatibility with 3.x is going to be much better than 2.x, and with most 
Python stuff needing porting effort anyway getting IronPython support will be 
easier. That's going to require some work in the innards, and I'm not sure too 
many people are familiar with those parts or IronPython yet.

I've already updated the version numbers to Beta 2 and fixed the installer bugs 
that prevented Beta 1 from installing over Alpha 1. At this point, the bugs 
that get fixed will probably be the ones that have patches, or at least solid 
repros, attached to them.

If you've got a bug that you think *must* be fixed, bring it up here.

Does anyone else think this is doable?

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Proposed Release Schedule for 2.7

2011-01-30 Thread Tomas Matousek
Yes, there have been changes to outer ring. I'm changing the version right now 
:)

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Sunday, January 30, 2011 12:49 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Proposed Release Schedule for 2.7

Sounds good to me. Does the DLR version still need to be bumped?

- Jeff

On Sun, Jan 30, 2011 at 1:37 PM, Tomas Matousek tomas.matou...@microsoft.com 
wrote:
 I propose we sync IronRuby releases with IronPython as follows:

 IronRuby - IronPython - date
 1.1.2 - Beta 2 - February 6
 none - RC1 - February 20
 none - RC2 - February 27
 1.1.3 - RTM - March 6

 Tomas

 -Original Message-
 From: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
 Sent: Friday, January 28, 2011 3:39 PM
 To: Discussion of IronPython
 Subject: [IronPython] Proposed Release Schedule for 2.7

 I'd like to propose the following release schedule for IronPython 2.7:

 Beta 2 - February 6
 RC1 - February 20
 RC2 - February 27
 RTM - March 6

 The need for a Beta 3 release could push those dates back by up to two weeks. 
 Also, I may reevaluate based on the rate of bugs being fixed - if lots of 
 fixes are coming in, delaying the release may be worthwhile. Obviously, any 
 showstoppers would have an affect as while, but I don't believe there are any 
 of those at the moment. The only current blocker for release is that the test 
 suite does not pass 100%.
 That will need to be sorted prior to RTM.

 It's an aggressive schedule, but I think IronPython has gone too long without 
 a release. I'm expecting there to be 2.7.x releases every 4-6 weeks if there 
 are sufficient contributions (like new modules).

 I want to get the 2.x series behind us so that work can begin on 3.2/3.3. 
 Compatibility with 3.x is going to be much better than 2.x, and with most 
 Python stuff needing porting effort anyway getting IronPython support will be 
 easier. That's going to require some work in the innards, and I'm not sure 
 too many people are familiar with those parts or IronPython yet.

 I've already updated the version numbers to Beta 2 and fixed the installer 
 bugs that prevented Beta 1 from installing over Alpha 1. At this point, the 
 bugs that get fixed will probably be the ones that have patches, or at least 
 solid repros, attached to them.

 If you've got a bug that you think *must* be fixed, bring it up here.

 Does anyone else think this is doable?

 - Jeff
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Adding Unit Tests

2011-01-11 Thread Tomas Matousek
IronRuby doesn't use the test runner. IronRuby's harness is written in Ruby 
(Languages\Ruby\Tests\Scripts\irtests.rb). It's run by a previous IronRuby 
version checked in to Util\IronRuby.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Tuesday, January 11, 2011 8:03 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Adding Unit Tests

On Mon, Jan 10, 2011 at 8:11 PM, Dino Viehland di...@microsoft.com wrote:
 We don't have to stick to this test runner BTW - it was just an easy 
 way to export what we were running in our internal gated checkin 
 system which we couldn't publish.  We could export the data to 
 something else or we could update it to something more Linux and OS/X 
 friendly (as they probably don't have cmd.exe to run bat files J).

Maybe we should just use unittest2 as the test runner, and wire it into the 
existing one if the IronRuby guys want to keep using it.
Besides, I hear Michael knows a little bit about unittest2, so he might be able 
to help.

- Jeff
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] how to build ironpython on ubuntu from sources?

2011-01-08 Thread Tomas Matousek
Miguel, is a Windows installer available for 2.10? I'm working on fixing the 
issues that block IronRuby and IronPython build on Mono. I use 2.8.2 right now, 
but would like to try 2.10.

BTW, is SecurityManager.GetStandardSandbox implemented on 2.10? It is missing 
from 2.8.2, which blocks Ruby's test suite build.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Miguel de Icaza
Sent: Saturday, January 08, 2011 9:23 AM
To: Discussion of IronPython
Subject: Re: [IronPython] how to build ironpython on ubuntu from sources?

Hello,
how to build ironpython on ubuntu from sources? Nothing works, no
success with xbuild ./Solutions/Ironpython.sln, or with 'build all' on
monodevelop.

These zip files contain our patch, spec files and source that we are using to 
build IronPython, IronRuby and F# on Linux and MacOS X.   This is what will 
serve as the basis for the Mono 2.10 release, when we bundle these with Mono by 
default:

http://dl.dropbox.com/u/281316/ironpython.zip
http://dl.dropbox.com/u/281316/ironruby.zip
http://dl.dropbox.com/u/281316/fsharp.zip

Miguel
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] how to build ironpython on ubuntu from sources?

2011-01-08 Thread Tomas Matousek
So, how do I create a sandboxed app-domain based on Silverlight model on Mono?

Wouldn't it be better to add the method and throw NotSupportedException so that 
programs can compile and at runtime decide not to call the method? I guess a 
workaround would be to use dynamic calls...

Tomas

From: miguel.nov...@gmail.com [mailto:miguel.nov...@gmail.com] On Behalf Of 
Miguel de Icaza
Sent: Saturday, January 08, 2011 5:30 PM
To: Tomas Matousek; Sebastien Pouliot
Cc: Discussion of IronPython
Subject: Re: [IronPython] how to build ironpython on ubuntu from sources?

Hello,
Miguel, is a Windows installer available for 2.10? I'm working on fixing the 
issues that block IronRuby and IronPython build on Mono. I use 2.8.2 right now, 
but would like to try 2.10.

We have not done a 2.10 build yet, we are going to branch early next week, and 
should have preview installers soon after that.

BTW, is SecurityManager.GetStandardSandbox implemented on 2.10? It is missing 
from 2.8.2, which blocks Ruby's test suite build.

We do not implement this, and we wont likely be implementing it, as we do not 
support CAS.  We only support Silverlight's security sandbox.

CAS would be too large of a project for us to complete.

Miguel
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] FW: Writing a Compiler framework: Static typing use of the DLR

2011-01-05 Thread Tomas Matousek
Forwarding to d...@microsoft.com.

I'm not sure I understand what you want to achieve. Could you describe 
functionality your framework provides? 

Every language that integrates with DLR might use a different way of expressing 
late bound calls. C#'s dynamic type is one way of doing that. The code that 
actually performs the dynamic dispatch via DLR call sites usually looks like:

// Lazy-initialize a dynamic call-site object; provide a language specific 
binder that performs the runtime binding
if (site == null) { site = CallSiteFuncCallSite, T1, .. Tn, 
TResult.Create(runtime_binder); }

// call the Target delegate of the site.
result = Site.Target(Site, args);

The runtime_binder for the site carries information about the dynamic operation 
available at compile-time. This includes e.g. a method name, the current 
accessibility context, etc.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Alexander Morou
Sent: Wednesday, January 05, 2011 6:39 AM
To: Iron Python Mailing List
Subject: [IronPython] Writing a Compiler framework: Static typing use of the DLR

Hello,

I'm not really sure where to ask this question, so I figured I'd ask on the 
mailing list of the project that largely started the DLR (assuming memory 
serves correctly.)  I'm writing a compiler framework, and I was wondering what 
kind of work, in AST rewrites I would need to perform, or classes from the DLR 
object model I would need to use, in order to support, what C# calls, a static 
type dynamic?  From what I can tell of C#, it uses its own model to wrap some 
of the concepts provided by the DLR, so I'm not exactly sure how to handle the 
late-bound dispatch so that it's marshaled by the appropriate language binder 
for a given object instance.  I could go deeper into how C# does it, but I 
don't really like the idea of looking at the code that was written by someone 
else (since the only way I can look at it is through a disassembler), my own 
code rewritten by C#'s compiler is fine, but the innards of what that code 
uses: no.

I understand the basic concept behind the DLR, but it's too complex to go over 
with a fine tooth comb.  Search algorithms aren't sophisticated enough to ask 
questions like this through google or bing (especially on, largely intangible, 
intent in code), which is why I ask here.  I originally asked Jeff Hardy
(http://jdhardy.blogspot.com/) for insight, and he suggested I look here.

Any insight anyone here can provide into this is appreciated.

Thanks,

-Allen [Alexander Morou] Copeland Jr.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] SciPy

2010-12-20 Thread Tomas Matousek
You don't necessarily need to make this choice. IronPython and IronRuby mostly 
talk to each other (modulo bugs, which I would be happy to fix if possible :-). 
You can write your helpers in Python and let your users call them from Ruby 
(and vice versa). Or your helpers could be written in C# or VB. Granted, 
helpers designed specifically for one particular language might be easier/nicer 
to use from that language, but you can go pretty far with language interop.



Tomas




From: users-boun...@lists.ironpython.com [users-boun...@lists.ironpython.com] 
on behalf of Pascal Normandin [pas...@travobject.com]
Sent: Monday, December 20, 2010 1:53 PM
To: 'Discussion of IronPython'
Subject: Re: [IronPython] SciPy

Hello,

Just to add to Oleksii’s comment, I’m also in a similar situation where I’d 
like to make an application scriptable with any of my good Iron language friend.

I have been using IronPython and IronRuby for side projects for quite some time 
but not embedded in an application distributed to users.

I will probably be embedding both languages but at some point I will need 
choose one for my users as I will need to create some helpers.  I’m still 
hesitating between both languages so I’d like to know what others think about 
this.

* I prefer the expressiveness of Ruby but I think Python me be easier to learn 
(for a non programmer technical person)
* IronPython seems to perform much better than IronRuby but performance is not 
an issue in my case (compared to numerical computation)
* Since the Iron languages have been released to the community I’m afraid they 
will not be equally supported or even stop to evolve and support new .net 
features.  It seems to me that the IronPython community is bigger, so it might 
have a greater chance to survive or be able to continue evolve.

Thanks;
Pascal



From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Oleksii Bidiuk
Sent: December-20-10 4:05 PM
To: Discussion of IronPython
Subject: Re: [IronPython] SciPy

Hi All,

I am not intended to add oil to the fire, but I am curious whether somebody can 
comment on the statement of Mark

 Our company uses C#.  I quickly discovered that C# and Python don’t play 
 well together ….

I have a similar situation, meaning C# application that needs to be a) 
scriptable b) usable for image/data processing using e.g. NumPy and SciPy. 
While IronPython seems to be the 'easy bet', I wonder if it is also a 'safe 
bet' for the long term future and whether there are tangible alternatives like 
e.g. PythonNET (I hope there are others, preferrably backed up by some 
heavyweight/commercial players).

Can anyone comment on this one? Anybody is using or going to use IronPython in 
commercial apps?

Thanks in advance.



--
Oleksii
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython code to call IronRuby fails; equivalent? C# code works

2010-04-16 Thread Tomas Matousek
The problem is probably caused by assembly load (IronRuby/DLR assemblies are 
loaded in a different context).

To fix this you can install IronPython and IronRuby to GAC. Using gacutil tool 
(http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx) from elevated 
command line

gacutil /i IronPython.dll
gacutil /i IronPython.Modules.dll
gacutil /i IronRuby.dll
gacutil /i IronRuby.Libraries.dll
gacutil /i IronRuby.Libraries.YAML.dll
gacutil /i Microsoft.Dynamic.dll
gacutil /i Microsoft.Scripting.Debugging.dll
gacutil /i Microsoft.Scripting.dll

Then you can use
clr.AddReference(IronRuby)

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Friday, April 16, 2010 3:12 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython code to call IronRuby fails; equivalent? 
C# code works

Is this IronPython 2.6.1 and IronRuby 1.0?

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of john.caw...@rkeng.com
Sent: Friday, April 16, 2010 2:20 PM
To: Users@lists.ironpython.com
Subject: [IronPython] IronPython code to call IronRuby fails; equivalent? C# 
code works

I'm at the beginning stages of calling IronRuby from IronPython, but am having 
difficulty creating the ruby engine.

This code works from C# in VS2008:

// with referenced assemblies IronRuby, IronRuby.Libraries, 
IronRuby.Libraries.YAML, Microsoft.Scripting,
// Microsoft.Scripting.Core from the IronRuby bin\ directory
var engine = IronRuby.Ruby.CreateEngine();
String s = engine.ToString();
MessageBox.Show( s, test);
// successfully returns 
Microsoft.Scripting.Hosting.ScriptEngine

Trying to do the identical logic with this IronPython code:

import clr, sys
clr.AddReferenceToFileAndPath( 
C:/Apps/IronRuby/bin/IronRuby.dll )   # after initially failed, tried adding 
specific path to IronRuby DLLs ...
clr.AddReferenceToFileAndPath( 
C:/Apps/IronRuby/bin/IronRuby.Libraries.dll )
clr.AddReferenceToFileAndPath( 
C:/Apps/IronRuby/bin/IronRuby.Libraries.YAML.dll )
clr.AddReferenceToFileAndPath( 
C:/Apps/IronRuby/bin/Microsoft.Scripting.dll )
clr.AddReferenceToFileAndPath( 
C:/Apps/IronRuby/bin/Microsoft.Scripting.Core.dll )
import IronRuby

for r in clr.References: print ref, r   # to verify I have 
the correct assemblies loaded
print 

print fence 0
engine = IronRuby.Ruby.CreateEngine()   # fails here
print fence 1

print engine

This gives this output:

ref mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089
ref System, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089
ref IronRuby, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35
ref IronRuby.Libraries, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35
ref IronRuby.Libraries.Yaml, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35
ref Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35
ref Microsoft.Scripting.Core, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35

fence 0
Traceback (most recent call last):
StandardError: Failed to load language 'IronRuby': Could not 
load type 'Microsoft.Scripting.Interpreter.ILightCallSiteBinder' from assembly 
'Microsoft.Dynamic, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35'.

I also added a reference to IronRuby's version of the Microsoft.Dynamic.dll, 
but it still failed similarly. The logic I'm trying to execute is brief enough 
that there shouldn't be much that could go wrong, but ...

Thanks in advance for any insights!
--John
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CodeContext went from language-independent to IronPython-specific

2010-03-21 Thread Tomas Matousek
Could you be specific about your scenario? What exactly is an 
application-defined context and the classes that would need an access such 
object?

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Paul Felix
Sent: Sunday, March 21, 2010 5:54 PM
To: users@lists.ironpython.com
Subject: [IronPython] CodeContext went from language-independent to 
IronPython-specific

Hi,

I am embedding IronPython in an application for scripting. I'm also making some 
C# classes dynamic by implementing the special DLR methods like 
GetBoundMember. My signatures for those special methods include the code 
context:

[System.Runtime.
CompilerServices.SpecialName]
public object GetBoundMember(CodeContext codeContext, string name)
{
. . .
}

I make use of the code context to get access to an object that essentially 
represents an application-defined context. I like the idea of being able to 
support other dynamic languages like IronRuby in the future, and I was 
bolstered by the fact that I could implement the special DLR methods with 
Microsoft.Scripting namespaces only (no IronPython namespaces).

But in the newer versions of IronPython, the CodeContext type has been moved to 
an IronPython namespace, thus locking me in to IronPython. To remain 
independent of any dynamic language, am I going to have to implement the 
special DLR methods without the code context and find some other way to get at 
my app object?

Thanks,
Paul
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Running the IronPython tests (on Mono)

2010-02-22 Thread Tomas Matousek
To run IronRuby tests you can use Merlin\Main\Languages\Ruby\Scripts\irtests.rb.
But it won't run on Linux as is due to dependencies on various batch files. We 
should replace all of them by Ruby scripts in future so that it runs on Linux 
as well.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of C.J. Adams-Collier
Sent: Sunday, February 21, 2010 10:50 PM
To: users@lists.ironpython.com
Subject: [IronPython] Running the IronPython tests (on Mono)

Hey folks,

I'm trying hard to shoehorn IronPython (and IronRuby) into Ubuntu Lucid, the 
next long-term stable release.  They're asking if I can get the test suite to 
execute as part of the package build script.

Can someone walk me through running the test suite?

The one caveat is that this is a snapshot from git as of 08/05/2009.
I've been working on this version since then in order to get it packaged up.  
It shouldn't take quite so long to get releases packaged up in the future.

Let me know if you need a shell on ironruby.colliertech.org and when/if you can 
help me walk through getting the test suite going.

Thanks in advance,

C.J.

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Using ruby module from python.

2009-12-08 Thread Tomas Matousek
I have filed a bug to track these issues:

http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3279

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Pavel Suhotyuk
Sent: Tuesday, December 01, 2009 5:27 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Using ruby module from python.

I try your example. It's really work, but have some problem with ruby
objects:
1) Can't call RubyObject methods.
  import clr
  wsdl = clr.Use('wsdl.rb', 'rb')
  factory = wsdl.get_factory()
  client =
factory('http://localhost/PaymentsBroker/Manager/ProviderService.asmx?WSDL').create_rpc_drive()
Traceback (most recent call last):
   File string, line 1, in module
AttributeError: 'RubyObject' object has no attribute 'create_rpc_drive'
  client =
getattr(factory('http://localhost/PaymentsBroker/Manager/ProviderService.asmx?WSDL'),
'create_rpc_driver')()
 

2) Calling methods without parameters possible.
  client.GetProviders(None)
IronRuby.Builtins.RubyObject object at 0x002F 
[#SOAP::Mapping::Object:0x0006dd2]

But I don't understand how call methods with parameters. In ruby I can call 
like this:
  print client.GetBalance(:providerId = 3).getBalanceResult().balance 
  60663.89= nil In python it's not work:
  client.GetBalance(3)
Traceback (most recent call last):
   File string, line 1, in module
SystemError: SOAP::Mapping::MappingError   client.GetBalance(provider=3) 
Traceback (most recent call last):
   File string, line 1, in module
TypeError: RubyMethod is not callable
  getattr(client, 'GetBalance')(3)
Traceback (most recent call last):
   File string, line 1, in module
SystemError: SOAP::Mapping::MappingError   getattr(client, 
'GetBalance')(provider=3) Traceback (most recent call last):
   File string, line 1, in module
TypeError: RubyMethod is not callable
  getattr(client, 'GetBalance')({'providerId':3}) Traceback (most recent 
  call last):
   File string, line 1, in module
SystemError: SOAP::Mapping::MappingError   getattr(client, 
'GetBalance')({'providerId':3}) Traceback (most recent call last):
   File string, line 1, in module
SystemError: SOAP::Mapping::MappingError   getattr(client, 
'GetBalance')({':providerId':3}) Traceback (most recent call last):
   File string, line 1, in module
SystemError: SOAP::Mapping::MappingError

Tomas Matousek wrote:
 Our Python-Ruby interop is not quite done yet so you need to use some 
 workarounds.
 
 The easiest way how to get WSDL factory instance would be to write a simple 
 Ruby script that loads it:
 
 == wsdl.rb ==
 
 require 'soap/wsdlDriver'
 
 def get_factory
   SOAP::WSDLDriverFactory
 end
 
 ===
 
 And then you can do:
 import clr
 wsdl = clr.Use('wsdl.rb', 'rb')
 factory = wsdl.get_factory()
 print factory(x.wsdl)
 Traceback (most recent call last):
   File stdin, line 1, in module
 SystemError: Cannot connect to x.wsdl (Not HTTP.)
 
 
 get_factory method is exposed on the wsdl module so that Python can call 
 it. IronRuby doesn't yet implement dynamic protocols for constant access so 
 you need the get_factory helper for accessing Ruby constants.
 Also we have some work to do to make clr.Use work better with libraries of 
 other DLR languages.
 Let us know if you hit some other issues.
 
 Tomas
 
 
 -Original Message-
 From: users-boun...@lists.ironpython.com 
 [mailto:users-boun...@lists.ironpython.com] On Behalf Of Pavel 
 Suhotyuk
 Sent: Monday, November 30, 2009 2:38 AM
 To: Discussion of IronPython
 Subject: [IronPython] Using ruby module from python.
 
 Hello.
 
 I want try to use ruby library (soap) in python code.
 I found method Use(str) in clr module for load the specified module searching 
 all languages in the loaded ScriptRuntime, but don't understand how to used 
 it.
 
 I try to call this method in any variants, but nothing happends.
 
   import clr
   clr.Use('soap/wsdlDriver')
 Traceback (most recent call last):
File string, line 1, in module
 ValueError: couldn't find module soap/wsdlDriver to use   
 clr.Use('soap.wsdlDriver') Traceback (most recent call last):
File string, line 1, in module
 ValueError: couldn't find module soap.wsdlDriver to use   
 clr.Use('soap/wsdlDriver.rb') Traceback (most recent call last):
File string, line 1, in module
 ValueError: couldn't find module soap/wsdlDriver.rb to use   
 clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''',
 'rb')
 module '?' (built-in)
   m =
 clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''', 
 'rb')   m module '?' (built-in)   dir(m) ['__builtins__']
 
 
 Thanks.
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] Using ruby module from python.

2009-11-30 Thread Tomas Matousek
Our Python-Ruby interop is not quite done yet so you need to use some 
workarounds.

The easiest way how to get WSDL factory instance would be to write a simple 
Ruby script that loads it:

== wsdl.rb ==

require 'soap/wsdlDriver'

def get_factory
  SOAP::WSDLDriverFactory
end

===

And then you can do:
 import clr
 wsdl = clr.Use('wsdl.rb', 'rb')
 factory = wsdl.get_factory()
 print factory(x.wsdl)
Traceback (most recent call last):
  File stdin, line 1, in module
SystemError: Cannot connect to x.wsdl (Not HTTP.)


get_factory method is exposed on the wsdl module so that Python can call it. 
IronRuby doesn't yet implement dynamic protocols for constant access so you 
need the get_factory helper for accessing Ruby constants.
Also we have some work to do to make clr.Use work better with libraries of 
other DLR languages.
Let us know if you hit some other issues.

Tomas


-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Pavel Suhotyuk
Sent: Monday, November 30, 2009 2:38 AM
To: Discussion of IronPython
Subject: [IronPython] Using ruby module from python.

Hello.

I want try to use ruby library (soap) in python code.
I found method Use(str) in clr module for load the specified module searching 
all languages in the loaded ScriptRuntime, but don't understand how to used it.

I try to call this method in any variants, but nothing happends.

  import clr
  clr.Use('soap/wsdlDriver')
Traceback (most recent call last):
   File string, line 1, in module
ValueError: couldn't find module soap/wsdlDriver to use   
clr.Use('soap.wsdlDriver') Traceback (most recent call last):
   File string, line 1, in module
ValueError: couldn't find module soap.wsdlDriver to use   
clr.Use('soap/wsdlDriver.rb') Traceback (most recent call last):
   File string, line 1, in module
ValueError: couldn't find module soap/wsdlDriver.rb to use   
clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''',
'rb')
module '?' (built-in)
  m =
clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''', 'rb')   
m module '?' (built-in)   dir(m) ['__builtins__']


Thanks.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] problems to migrate from Ipy 1.1 to 2.6rc1

2009-10-14 Thread Tomas Matousek
 Tomas, is there anything you did to make our tools less strict about the 
version # (I thought not)

No, there is nothing special needed, just VS2008 SP1. I have no idea why VS2008 
refuses to open them. What error do you get?

Tomas

-Original Message-
From: Jimmy Schementi 
Sent: Wednesday, October 14, 2009 7:39 PM
To: Discussion of IronPython
Cc: Tomas Matousek
Subject: RE: [IronPython] problems to migrate from Ipy 1.1 to 2.6rc1

Ernesto Cullen wrote:
 I need the assemblies signed, so I have to build the sources

With any key, or your own key? The IronPython 2.6 RC1 contains signed 
assemblies with the key we always sign releases with, so if you just need them 
to be signed those are the ones I'd suggest using; you do not need to build 
from source. 

Feel free to read on if there is some other reason to build from sources ...
...
...
...

 The projects are saved with ToolsVersion=4.0, and VS2008sp1 refuses to 
 open them. I had to change manually all project files to ToolsVersion=3.5

We all use .NET 3.5 and VS2008 SP1 on our dev machines here, so I know the 
project files will open; the 4.0 tools version is just a hack to make the 
same project files build on .NET 4.0 as well. It may complain about the version 
number, but it will definitely open and build. Tomas, is there anything you did 
to make our tools less strict about the version # (I thought not).

 I had to change manually the references to 'MSSharedLibdelaySigned.snk' in 
 Src directory, is that key ok? I do not set the option 'delay sign'.

That is only a public key; you'd need your own public/private key to fully sign 
the assemblies yourself. Even though you are trying to fully sign them, they 
will be left in a delay-signed state since there is no public key. I assume you 
just want them signed with the key the releases are signed with, so again I 
suggest just using those.

 But then I cannot load these assemblies, i get a Strong Name 
 validation exception

These assemblies are now delay-signed, so you need to tell .NET not to care 
about that and treat them as fully signed; sn.exe does that for you:

sn -Vr *,31bf3856ad364e35

If sn.exe is not on your path, it's located on my 32-bit machine here: 
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\sn.exe. This 
skips-verification for ANY assembly with that public key token, so it may be a 
bit overkill, so feel free to specify the exact assemblies if you want.

~Jimmy
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CallTargetX delegates

2009-09-14 Thread Tomas Matousek
We’ve made change recently (last week) on .NET 2.0 you’ll need to use a 
different namespace and assembly:

import clr
clr.AddReference(‘Microsoft.Scripting’)
from Microsoft.Scripting.Utils import Func
Func[object, object](targetCallableHere)

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Monday, September 14, 2009 11:04 AM
To: Discussion of IronPython
Cc: Discussion of IronPython
Subject: Re: [IronPython] CallTargetX delegates



--
http://www.ironpythoninaction.com

On 14 Sep 2009, at 18:59, Dino Viehland 
di...@microsoft.commailto:di...@microsoft.com wrote:
To use Func you just need to do:

import clr
clr.AddReference(‘System.Core’)
from System import Func
Func[object, object](targetCallableHere)

This is equivalent to CallTarget1.  You can add more “object, “ or you can 
replace object with some other type.

It is of course dependent on .NET 3.

Michael





From: 
users-boun...@lists.ironpython.commailto:users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Brian Curtin
Sent: Monday, September 14, 2009 10:53 AM
To: Discussion of IronPython
Subject: Re: [IronPython] CallTargetX delegates

How would someone replace CallTargetX with Func... within a script? For 
example, how would you change the Invoke calls in onChanged and onRenamed here: 
http://www.ironpython.info/index.php/Invoking_onto_the_GUI_%28Control%29_Thread

I've never seen how to use Func within an IP script, just within C#.


On Wed, Sep 2, 2009 at 04:59, Davy Mitchell 
daftspan...@gmail.commailto:daftspan...@gmail.com wrote:
Could someone pop an example of this on http://www.ironpython.info?
Sounds like it could be a common 'gotcha' especially for newbies
running old example code.

Cheers,
Davy

On Wed, Sep 2, 2009 at 6:38 AM, David 
Escobardavidesco...@ieee.orgmailto:davidesco...@ieee.org wrote:
 Ok cool. I've used Func from C# before. That did the trick. Thanks.


 On Tue, Sep 1, 2009 at 6:19 PM, Dino Viehland 
 di...@microsoft.commailto:di...@microsoft.com wrote:

 Yes.  CallTarget’s were really a part of IronPython’s internal calling
 convention for used defined functions.  We kept CallTarget0 around because
 we knew lots of users had come to depend on that one when they needed a
 delegate type.  But we removed all the others and switched to using Func…
 internally.  Ideally you can switch to using Func as well.



 From: 
 users-boun...@lists.ironpython.commailto:users-boun...@lists.ironpython.com
 [mailto:users-boun...@lists.ironpython.commailto:users-boun...@lists.ironpython.com]
  On Behalf Of David Escobar
 Sent: Tuesday, September 01, 2009 5:41 PM
 To: Discussion of IronPython
 Subject: [IronPython] CallTargetX delegates



 In IronPython 2.6 beta 2, did the CallTargetX delegates get moved to
 another module or were they simply removed altogether? The only delegate in
 IronPython.Compiler is CallTarget0. I checked IronPython 2.0.2 and it has up
 to CallTarget16.

 ___
 Users mailing list
 Users@lists.ironpython.commailto:Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com





--
--
 Davy Stuff  - http://daftspaniel.blogspot.com
 Geeky Stuff  - http://daftpython.blogspot.com
 Davy's Ironpython Editor - http://code.google.com/p/davysironpythoneditor/
___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CallTargetX delegates

2009-09-14 Thread Tomas Matousek
Func/Action delegates are in System.Core assembly and System namespace in CLR4.
So you need to import them conditionally based on current .NET version.

If you use IronPython on .NET 3.5 you'll get 2 different Func/Action delegate 
sets - one in [Microsoft.Scripting]Microsoft.Scripting.Utils and the other in 
[System.Core]System.
It shouldn't matter much which ones do you use. 

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Monday, September 14, 2009 1:19 PM
To: Discussion of IronPython
Subject: Re: [IronPython] CallTargetX delegates

Tomas Matousek wrote:

 We’ve made change recently (last week) on .NET 2.0 you’ll need to use 
 a different namespace and assembly:

  

 import clr

 clr.AddReference(‘Microsoft.Scripting’)

 from Microsoft.Scripting.Utils import Func

 Func[object, object](targetCallableHere)


Will this work cross-version? (i.e. will it also work on .NET 3  4?)

Michael

  

 Tomas

  

 *From:* users-boun...@lists.ironpython.com
 [mailto:users-boun...@lists.ironpython.com] *On Behalf Of *Michael 
 Foord
 *Sent:* Monday, September 14, 2009 11:04 AM
 *To:* Discussion of IronPython
 *Cc:* Discussion of IronPython
 *Subject:* Re: [IronPython] CallTargetX delegates

  

  

  

 --

 http://www.ironpythoninaction.com


 On 14 Sep 2009, at 18:59, Dino Viehland di...@microsoft.com 
 mailto:di...@microsoft.com wrote:

 To use Func you just need to do:

  

 import clr

 clr.AddReference(‘System.Core’)

 from System import Func

 Func[object, object](targetCallableHere)

  

 This is equivalent to CallTarget1.  You can add more “object, “ or
 you can replace object with some other type.

  

 It is of course dependent on .NET 3.

  

 Michael

  

  



  

 *From:* users-boun...@lists.ironpython.com
 mailto:users-boun...@lists.ironpython.com
 [mailto:users-boun...@lists.ironpython.com] *On Behalf Of *Brian 
 Curtin
 *Sent:* Monday, September 14, 2009 10:53 AM
 *To:* Discussion of IronPython
 *Subject:* Re: [IronPython] CallTargetX delegates

  

 How would someone replace CallTargetX with Func... within a script? 
 For example, how would you change the Invoke calls in onChanged and 
 onRenamed here:
 http://www.ironpython.info/index.php/Invoking_onto_the_GUI_%28Control%
 29_Thread

 I've never seen how to use Func within an IP script, just within C#.


 On Wed, Sep 2, 2009 at 04:59, Davy Mitchell daftspan...@gmail.com 
 mailto:daftspan...@gmail.com wrote:

 Could someone pop an example of this on http://www.ironpython.info?
 Sounds like it could be a common 'gotcha' especially for newbies 
 running old example code.

 Cheers,
 Davy


 On Wed, Sep 2, 2009 at 6:38 AM, David Escobardavidesco...@ieee.org 
 mailto:davidesco...@ieee.org wrote:
  Ok cool. I've used Func from C# before. That did the trick. Thanks.
 
 
  On Tue, Sep 1, 2009 at 6:19 PM, Dino Viehland di...@microsoft.com
 mailto:di...@microsoft.com wrote:
 
  Yes.  CallTarget’s were really a part of IronPython’s internal 
  calling convention for used defined functions.  We kept CallTarget0 
  around
 because
  we knew lots of users had come to depend on that one when they 
  needed a delegate type.  But we removed all the others and switched 
  to using
 Func…
  internally.  Ideally you can switch to using Func as well.
 
 
 
  From: users-boun...@lists.ironpython.com
 mailto:users-boun...@lists.ironpython.com
  [mailto:users-boun...@lists.ironpython.com
 mailto:users-boun...@lists.ironpython.com] On Behalf Of David 
 Escobar
  Sent: Tuesday, September 01, 2009 5:41 PM
  To: Discussion of IronPython
  Subject: [IronPython] CallTargetX delegates
 
 
 
  In IronPython 2.6 beta 2, did the CallTargetX delegates get moved 
  to another module or were they simply removed altogether? The only
 delegate in
  IronPython.Compiler is CallTarget0. I checked IronPython 2.0.2 and
 it has up
  to CallTarget16.
 

  ___
  Users mailing list
  Users@lists.ironpython.com mailto:Users@lists.ironpython.com
  http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
 
 



 --
 --
  Davy Stuff  - http://daftspaniel.blogspot.com  Geeky Stuff  - 
 http://daftpython.blogspot.com  Davy's Ironpython Editor - 
 http://code.google.com/p/davysironpythoneditor/
 ___
 Users mailing list
 Users@lists.ironpython.com mailto:Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

  

 ___
 Users mailing list
 Users@lists.ironpython.com mailto:Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

 --
 --

 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users

Re: [IronPython] IronPython and IronRuby interop with IronRuby 0.9

2009-08-22 Thread Tomas Matousek
This works:

import clr
clr.AddReference('IronRuby')

from IronRuby import Ruby
from System import Array

paths = [r'C:\Binaries\IronRuby\lib\IronRuby', 
r'C:\Binaries\IronRuby\lib\ruby\1.8']
array = Array[str](paths)

engine = Ruby.CreateEngine()
engine.SetSearchPaths(array)

scope = engine.CreateScope()
source = engine.Execute('''
require 'date'

def d
  Date::civil(2003, 4, 8)
end
''', scope)

print scope.d()
print engine.Runtime.Globals.Date

---

Top-level methods, not local variables, are published in the scope.
Classes and modules are published in Runtime.Globals scope.

And this works too (the value of the last expression is returned):
print engine.Execute('''
require 'date'
Date::civil(2003, 4, 8)
''')

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Saturday, August 22, 2009 8:46 AM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython and IronRuby interop with IronRuby 0.9

Hehe - well I can fish the contents of the library I required from 
engine.Runtime.Globals, which seems right as I'm requiring it in the global 
namespace. I'm still surprised the ScriptScope is empty.

Michael


Michael Foord wrote:
 Ok, so setting the engine search paths solves the failure to find the
 library, but the ScriptScope is still coming back empty. In the
 example below I would have expected to see 'd' in the ScriptScope.

 c:\Binaries\IronRuby\binipy.exe interop.py []

 From this code:

 import clr
 clr.AddReference('IronRuby')
 clr.AddReference('Microsoft.Scripting')

 from System import Array

 paths = [r'C:\Binaries\IronRuby\lib\IronRuby',
 r'C:\Binaries\IronRuby\lib\ruby\1.8']
 array = Array[str](paths)

 source_code = require 'date'\nd = Date::civil(2003, 4, 8)\n

 from Microsoft.Scripting import SourceCodeKind from IronRuby import
 Ruby engine = Ruby.CreateEngine()
 engine.SetSearchPaths(array)
 source = engine.CreateScriptSourceFromString(source_code,
 SourceCodeKind.Statements)
 scope = engine.CreateScope()
 source.Execute(scope)

 print dir(scope)

 Michael

 2009/8/22 Michael Foord fuzzy...@voidspace.org.uk
 mailto:fuzzy...@voidspace.org.uk

 Hello all,

 I've played a little bit with IronPython and IronRuby interop with
 the IronRuby 0.9 binaries.

 A very basic example works as expected:

 IronPython 2.6 Beta 2 (2.6.0.20) on .NET 2.0.50727.4927
 Type help, copyright, credits or license for more information.
  import clr
  clr.AddReference('IronRuby')
  from IronRuby import Ruby
 
  engine = Ruby.CreateEngine()
  source = engine.CreateScriptSourceFromString(puts 'Hello from
 Ruby')
  scope = engine.CreateScope()
 
  source.Execute(scope)
 Hello from Ruby
 


 However my attempts to use a Ruby library fails. The same code
 works when executed from ir.exe:

  import clr
  clr.AddReference('IronRuby')
  clr.AddReference('Microsoft.Scripting')
 
  from Microsoft.Scripting import SourceCodeKind
  from IronRuby import Ruby
  engine = Ruby.CreateEngine()
  source = engine.CreateScriptSourceFromString(require 'date',
 SourceCodeKin
 d.Statements)
  scope = engine.CreateScope()
  source.Execute(scope)
 Traceback (most recent call last):
  File stdin, line 1, in module
 Exception: no such file to load -- date
 

 I tried adding a reference to IronRuby.Libraries to the runtime
 associated with the Ruby engine (using runtime.LoadAssembly) but
 this didn't help.

 Requiring Ruby modules I've written myself doesn't blow-up but
 doesn't populate the scriptscope they are executed in with
 anything. Likewise calling engine.ExecuteFile('foo.rb') returns an
 empty ScriptScope.

 Any ideas?

 All the best,

 Michael Foord

 --
 http://www.ironpythoninaction.com/
 http://www.voidspace.org.uk/blog





 --
 http://www.ironpythoninaction.com/


 --
 --

 ___
 Users mailing list
 Users@lists.ironpython.com
 http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Preloading An Engine Instance With References

2009-08-09 Thread Tomas Matousek
You can load assemblies to the runtime via ScriptRuntime.LoadAssembly.

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jesse Wiles
Sent: Sunday, August 09, 2009 10:17 PM
To: users@lists.ironpython.com
Subject: [IronPython] Preloading An Engine Instance With References

Hi,

I would like to preload an engine instance with references to .NET namespaces, 
such that using clr.AddReference in a script is unnecessary.  To be simple, 
I've created an engine instance with all the scope variables that I want, but 
within a script executed by the instance, I am finding that 
clr.AddReference('System') is required to import System.  Can I handle the 
adding of the reference in the construction of the engine instance and if so, 
how?

Thanks,
Jesse Wiles
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Project versions updated to 2010

2009-07-29 Thread Tomas Matousek
We have just updated ToolsVersion attribute in .csproj files included in 
IronPython and IronRuby solutions to 4.0. This change will soon show up in 
CodePlex and GIT sources.

It allows to open these projects in Visual Studio 2010 (using IronPython4.sln 
or Ruby4.sln). The binaries produced by both builds (from VS2008 and VS2010) 
still have dependency only on .NET 2.0 assemblies so there is no change in that.

You'll need Service Pack 1 installed in order to build Ruby.sln or 
IronPython.sln from VS2008. When you build from VS2008 you'll get a bunch of 
msbuild warnings:

Project file contains ToolsVersion=4.0, which is not supported by this 
version of MSBuild. Treating the project as if it had ToolsVersion=3.5.

This is expected, you can ignore them.

Thanks,
Tomas


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Fwd: [Mono-dev] Current 'xbuild' status

2009-06-10 Thread Tomas Matousek
It would be great if we could also build IronRuby.

It currently crashes:

C:\M1\Merlin\Main\Languages\RubyC:\Program Files\Mono-2.4.2\bin\xbuild.bat 
Ruby.sln
XBuild Engine Version 0.1
Mono, Version 2.4.2.0
Copyright (C) Marek Sieradzki 2005. All rights reserved.

Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
Parameter name: path
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding 
encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x0
]
  at System.IO.StreamReader..ctor (System.String path) [0x0]
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
  at Microsoft.Build.BuildEngine.Project.Load (System.String projectFileName) 
[0x0]
  at Microsoft.Build.BuildEngine.Engine.RegisterDefaultTasks () [0x0]
  at Microsoft.Build.BuildEngine.Engine..ctor (System.String binPath) [0x0]
  at Mono.XBuild.CommandLine.MainClass.Execute () [0x0]

Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Seo Sanghyeon
Sent: Tuesday, June 09, 2009 6:08 PM
To: Discussion of IronPython
Subject: [IronPython] Fwd: [Mono-dev] Current 'xbuild' status

FYI.

From: Ankit Jain radi...@gmail.com
Date: 2009/6/10
Subject: [Mono-dev] Current 'xbuild' status

Current xbuild status:

It can handle solutions (.sln) now, thanks to Jonathan Chambers,
with C#, VB.net projects. Handles embedded resources, satellite
assemblies, project references etc.

Eg. Paint.Net 3 ( builds completely with it now, IronPython (2.0.1)
builds, IronPython svn (builds with compile time errors) etc.

Only .net 2.0 projects are supported currently though. I will start
adding support for newer versions very soon, also ASP.NET, Silverlight
etc projects.

This is part of the mono 2.4.2 release
(http://mono.ximian.com/monobuild/preview/download-preview/)
and is a *big* improvement over xbuild in the last release.
Would be really helpful to get feedback and bug reports on this :)
You can file bugs at : http://www.mono-project.com/Bugs

-- 
Seo Sanghyeon
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Running Ruby code from Python, which is running in Ruby

2009-05-11 Thread Tomas Matousek
There are still some issues (running Python code in Ruby didn't seem to work)

If you run into any issues let us know - ideally file a bug at 
http://ironruby.codeplex.com or http://ironpython.codeplex.com including a 
repro. We would like to make the language interop as smooth as possible.

Thanks,
Tomas

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Douglas S. Blank
Sent: Monday, May 11, 2009 10:06 AM
To: Discussion of IronPython
Subject: [IronPython] Running Ruby code from Python, which is running in Ruby

Perhaps you've seen this, but I ran across Tomáš Matoušek's blog this 
weekend http://blog.tomasm.net/category/ironruby/ where he describes a 
little interactive Ruby shell that works something like:

$ irb.exe repl.rb
rb class C
rb|   def say_hello caller
rb| puts #{caller} says hello to Ruby
rb|   end
rb| end
= nil

Now, he switches languages on the fly:

rb #py

Now, from Python he imports and runs the Ruby class in Python:

py import C
py c = C()
py c.say_hello(Python)
Python says hello to Ruby

I thought I'd try this in the educational DLR editor/shell that we're 
developing in C# (at http://pyjamaproject.org/Pyjama ) and it works! 
There are still some issues (running Python code in Ruby didn't seem to 
work), and you need the latest drop of the DLR (I used 23458):

http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx

which isn't stable. But, the proof of concept is fantastic to see after 
all of the hard work. Best of all, the same DLLs allow all this to work 
on Linux and Mac OSX too, thanks to Mono.

This means that you can write and compile a library *once* in whatever 
language you want, use it from other languages, on whatever operating 
system you want. Wow.

Thank you to all those that are making this possible! (And more on our 
DLR IDE soon...)

-Doug

-- 
Douglas S. Blank
Director, Institute for Personal Robots in Education (IPRE)
http://www.roboteducation.org
Chair, and Associate Professor, Computer Science, Bryn Mawr College
http://cs.brynmawr.edu/~dblank  (610)526-6501
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Global and Local ScriptScope

2009-01-06 Thread Tomas Matousek
The current scope chaining is rather a remnant of a legacy technique of using 
Scopes for local variables in IronPython and JScript. The hosting API doesn't 
support chaining by design (this might change in future). The best option for 
you for now, I think, is to implement IAttributesCollection. That is the way 
the host should customize scope variable lookup. What we need to do on our side 
is to simplify this interface.

Tomas

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Tuesday, January 06, 2009 12:40 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Global and Local ScriptScope

Scopes are intended for the language-implementation side of things.  Languages 
like Ruby and Javascript support nested lexical scoping but Python does not. 
Even if we were to expose a mechanism in the hosting API that let you create 
ScriptScopes which reference nested Scopes, there's no guarantee that Python's 
name resolution would automatically work with this.

You shouldn't need to define your own implementation of IAttributesCollection.  
Can't you just use the SymbolDictionary defined in Microsoft.Scripting and fill 
it manually?
On Tue, Jan 6, 2009 at 12:07 PM, Caspar Lessing 
caspar.less...@gmail.commailto:caspar.less...@gmail.com wrote:
You are right, it is basically a from pricy_scope import * for each one of my 
local scopes.

I considered doing that, but decided against it as I'm really loathe to copy 
the context a whole bunch of times. The number of symbols _should_ not be 
excessive but the pricy_scope setup script is configuration and eventually 
could have a fair amount of symbols. The number of local contexts however will 
be fairly high. Thousands to 10s of thousands. So copying gets multiplied by 
that. So I am trying hard not do the copying thing.

However the Scope Parent mechanism is perfectly suited for wat I need. So I was 
hoping I could use that which means no copying required.


On Tue, Jan 6, 2009 at 4:56 PM, Curt Hagenlocher 
c...@hagenlocher.orgmailto:c...@hagenlocher.org wrote:
How many symbols are there in this shared global context?  Can't you just 
initialize them in one ScriptScope and then copy the symbols into the other 
ScriptScopes where you want to use them?  This would be analogous to saying 
from pricy_scope import * at the beginning of each module.
On Tue, Jan 6, 2009 at 5:58 AM, Caspar Lessing 
caspar.less...@gmail.commailto:caspar.less...@gmail.com wrote:
Hello People

I use an embedded instance of IronPython.
My program spends effort to create a global context. It then continues to to 
execute statements inside a local context which need resolve the items in the 
global context as well. Think of python functions' local context and its 
interaction with the module context.

In an older version of IronPython I had a EngineModule which I used for my 
global context and I could use a Dictionarystring,object for my locals.

This allowed my to do the following:

PythonEngine pe = new PythonEngine();
Context = pe.CreateModule();
pe.Execute(ExpensiveGlobalSetupScript,Context);
Dictionarystring,object[] locals = new 
Dictionarystring,object[ScriptList.Length];
for(int i = 0; i  ScriptList.Length; i++)
{
  locals[i] = new Dictionarystring,object()
  pe.Execute(ScriptList[i], Context, locals[i]);
}

I am having trouble doing something similar with ScriptScope. I have explored 
some avenues:
1. Copying the global context into each local one. It seems too expensive. 
Possibly it is only the cloning of some form of dictionary, but still.
2. Implementing a new CustomSymbolDictionary and overriding TryGetExtraValue. 
Problem is that it is called before trying to resolve symbols internally (Which 
leads to globals being resolved rather than locals)
3. Creating my own implementation of IAttributesCollection (Seemed too complex 
after discovering the Parent mechanism in Scope)

I eventually found the Parent mechanism inside Scope. However I do not have 
access to create a new ScriptScope (Internal constructor) based on a Parent 
Scope.
I had to create a new Factory method inside ScriptEngine which looks as follows:

public sealed class ScriptEngine
{
  .
public ScriptScope CreateScope(ScriptScope parent)
{
  ContractUtils.RequiresNotNull(parent, parent);
  return new ScriptScope(this, new Scope(parent.Scope,null));
}
  
 }

My question if whether this is a sensible addition to ScriptEngine or am I 
missing something?

Much appreciated
Caz
___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



Re: [IronPython] app.config for ipy script?

2008-11-30 Thread Tomas Matousek
You need to edit ipy.exe.config next to ipy.exe.

Tomas

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yash Ganthe
Sent: Sunday, November 30, 2008 4:00 AM
To: users@lists.ironpython.com
Subject: [IronPython] app.config for ipy script?

I would like to invoke WCF service and hence would like to define the endpoints 
in a config file. If I am running the python script as :
C:\Mytestsipy program.py
Where should the app.config file be placed?

Thanks,
Yash
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] SystemExitException ?

2008-11-21 Thread Tomas Matousek
It's handled for you in ExecuteProgram and the exit code is returned. It's this 
handling that makes the difference between Execute and ExecuteProgram. 
ExecuteProgram is designed to process any program exit mechanism that the 
language has so that the host doesn't need to care and could be language 
independent.

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Orestis Markou
Sent: Friday, November 21, 2008 5:24 AM
To: Discussion of IronPython
Subject: [IronPython] SystemExitException ?

Hello,

In Resolver, we have our own RSIronPython.exe that sets up the
environment (PATH and other things) and executes a program. It's not
interactive - just a wrapper aroung ExecuteProgram, really.

We used to do this:

try
{
 ScriptSource source =
engine.CreateScriptSourceFromFile(Path.Combine(currentDir,
(string)args[0]));
 source.ExecuteProgram();
}
catch (SystemExitException e)
{
 object o;
 return e.GetExitCode(out o);
}
catch (Exception e)
{
 ExceptionOperations eo = engine.GetServiceExceptionOperations();
 Console.Write(eo.FormatException(e));
 return 1;
}
return 0;

But then we realised that we always returned 0, because
SystemExitException was never raised, even if a PythonScript did an
exlicit sys.exit or raised SystemExit. So we now return the result of
source.ExecuteProgram().

I'm just wondering if we should care about SystemExitException (a quick
grep of the source is indicating that it's only used in
PythonCommandLine), or if it's handled for us at a lower level.

Thanks,
Orestis
--
Orestis Markou
Software Engineer,
Resolver Systems Ltd.
[EMAIL PROTECTED]
+44 (0) 20 7253 6372

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2: Oddity with Hosting API from within IronPython

2008-11-01 Thread Tomas Matousek
I think nobody answered this question yet:

 As a minor supplementary question, how do I get a reference to the
 default ScriptScope on an engine? Is there any performance advantage in
 using the default one, can I replace it, and does replacing it remove
 any performance benefits we might have got? (OK, so strictly speaking
 that wasn't just one question...)

There is no default scope associated with an engine (other than Global scope on 
ScriptRuntime).
All methods that operate on a scope yet don't take one create a new empty scope 
each time called.

Tomas
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Oddity with Setting Output Stream

2008-11-01 Thread Tomas Matousek
You can also pass new UTF8Encoding(false) instead of Encoding.UTF8.

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland
Sent: Saturday, November 01, 2008 3:18 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Oddity with Setting Output Stream

I pinged Tomas on this and he thinks this is by design and I'm tending to agree 
(even though it is just a side effect of us using a StreamWriter).  You can 
always pass a Stream and a TextWriter instead to get full control over this 
behavior.

Good test though and I'll follow up w/ Bill to make sure this behavior gets 
spec'd.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Foord
Sent: Friday, October 31, 2008 7:35 AM
To: Discussion of IronPython
Subject: [IronPython] Oddity with Setting Output Stream

Hello guys,

Another oddity with the IronPython 2 hosting API. This one may be the
correct behaviour, but it is different from IronPython 1.

When we set a UTF8 output stream on a runtime we see a UTF8 BOM being
written with the first output. I'm sure this didn't happen with
IronPython 1 because I now have failing tests!

The following code that traps standard out using a custom stream prints:

out: u'\ufeff'
out: 'foobar'
out: '\r\n'
out: 'foobar'
out: '\r\n'

import sys
import clr
clr.AddReference('IronPython')
clr.AddReference('Microsoft.Scripting')

from IronPython.Hosting import Python
from Microsoft.Scripting import SourceCodeKind
from System.Text import Encoding
from System.IO import MemoryStream

class CustomStream(MemoryStream):
def __new__(cls, prefix):
return MemoryStream.__new__(cls)

def __init__(self, prefix):
self._prefix = prefix

def Write(self, buffer, offset, count):
print self._prefix,
print repr(Encoding.UTF8.GetString(buffer, offset, count))

engine = Python.CreateEngine()
engine.Runtime.IO.SetOutput(CustomStream('out:'), Encoding.UTF8)

source = engine.CreateScriptSourceFromString('print foobar\r\n',
SourceCodeKind.Statements)
scope = engine.CreateScope()
code = source.Compile()

code.Execute(scope)
code.Execute(scope)

All the best,

Michael Foord

--
http://www.ironpythoninaction.com/

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Specified language provider type is not registered.

2008-09-02 Thread Tomas Matousek
The problem in your code is that you update setup variable after it is passed 
to ScriptRuntime. You need to first initialize the setup and then pass it to 
runtime ctor (the ctor uses the setup object to create and configure DLR and 
once that done no changes are possible).

setup.LanguageSetups.Add(Python.CreateLanguageSetup(null));
ScriptRuntime runtime = new ScriptRuntime(setup);

Does this work?

Tomas

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher
Sent: Monday, September 01, 2008 10:26 PM
To: [EMAIL PROTECTED]; Discussion of IronPython
Subject: Re: [IronPython] Specified language provider type is not registered.

Get the ScriptEngine directly from IronPython.Hosting.Python instead of going 
through the runtime.
On Mon, Sep 1, 2008 at 10:19 PM, KE [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:
Hi, I've compiled IronPython from the latest source code, and added some
strong name keys to run in a partial trust AppDomain, but I can't quite get
the ScriptEngine created:

System.ArgumentException: Unknown language name: 'py'
  at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngine(String
languageName)
  at mycode

The code creating this is:

ScriptRuntimeSetup setup = new ScriptRuntimeSetup();
ScriptRuntime runtime = new ScriptRuntime(setup);
setup.LanguageSetups.Add(Python.CreateLanguageSetup(null));
runtime.LoadAssembly(assembly);
runtime.IO.SetOutput(ms, writer);
ScriptEngine engine = runtime.GetEngine(py);
ScriptScope scope = engine.CreateScope();


I would prefer to do this programmatically, without any external .config
files, if possible.
Thanks!

___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Specified language provider type is not registered.

2008-09-02 Thread Tomas Matousek
Right. That's expected behavior. The exception is caught there, isn't it?
DLR can be tweaked so that it dumps debugging information about generated IL, 
trees, etc. Compiler developers building their own language on top of DLR might 
want to use DLR_* options while debugging their compilers to get useful 
information out of DLR.

Tomas

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of KE
Sent: Tuesday, September 02, 2008 3:34 PM
To: Tomas Matousek; 'Discussion of IronPython'
Subject: Re: [IronPython] Specified language provider type is not registered.

Oh D'uh, Thanks!

It got further now, but I had built the binaries in Debug mode and there was an 
Environment permission exception in:

internal static class DebugOptions {
private static string ReadDebugString(string name) {
#if DEBUG  !SILVERLIGHT
try {
return Environment.GetEnvironmentVariable(DLR_ + name);

Of course, I will go back and build in Release mode, but I thought it's 
something you should know - the assembly acts differently in partial trust 
based on the type of release mode.
Thanks,


From: Tomas Matousek [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2008 12:25 PM
To: Discussion of IronPython; [EMAIL PROTECTED]
Subject: RE: [IronPython] Specified language provider type is not registered.

The problem in your code is that you update setup variable after it is passed 
to ScriptRuntime. You need to first initialize the setup and then pass it to 
runtime ctor (the ctor uses the setup object to create and configure DLR and 
once that done no changes are possible).

setup.LanguageSetups.Add(Python.CreateLanguageSetup(null));
ScriptRuntime runtime = new ScriptRuntime(setup);
Does this work?

Tomas

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher
Sent: Monday, September 01, 2008 10:26 PM
To: [EMAIL PROTECTED]; Discussion of IronPython
Subject: Re: [IronPython] Specified language provider type is not registered.

Get the ScriptEngine directly from IronPython.Hosting.Python instead of going 
through the runtime.
On Mon, Sep 1, 2008 at 10:19 PM, KE [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:
Hi, I've compiled IronPython from the latest source code, and added some
strong name keys to run in a partial trust AppDomain, but I can't quite get
the ScriptEngine created:

System.ArgumentException: Unknown language name: 'py'
  at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngine(String
languageName)
  at mycode

The code creating this is:

ScriptRuntimeSetup setup = new ScriptRuntimeSetup();
ScriptRuntime runtime = new ScriptRuntime(setup);
setup.LanguageSetups.Add(Python.CreateLanguageSetup(null));
runtime.LoadAssembly(assembly);
runtime.IO.SetOutput(ms, writer);
ScriptEngine engine = runtime.GetEngine(py);
ScriptScope scope = engine.CreateScope();


I would prefer to do this programmatically, without any external .config
files, if possible.
Thanks!

___
Users mailing list
Users@lists.ironpython.commailto:Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CodeContext

2008-08-25 Thread Tomas Matousek
I see. We probably should have a method on ExceptionOperations that returns a 
list of stack frame information given an exception.
There is also a private method on PythonOps that creates the traceback object 
and doesn't require CodeContext: CreateTraceBack. We might consider making it 
public. Curt?
Meanwhile, you can use GetExceptionInfoLocal  with a default context from 
DefaultContext.Default. The only place where the context is used is to do some 
magic with StringException, but that doesn't influence the traceback object.

Tomas

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Huzaifa
Sent: Saturday, August 23, 2008 8:31 PM
To: users@lists.ironpython.com
Subject: Re: [IronPython] CodeContext

I am try to get traceback object , for that i am trying different things
Tomas Matousek wrote:
The class might be actually be called ExceptionService in your bits. It was 
renamed recently. Tomas -Original Message- From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Tomas Matousek Sent: Saturday, August 
23, 2008 7:53 PM To: Discussion of IronPython Subject: Re: [IronPython] 
CodeContext Does ExceptionOeprations class provide you the information you need 
or is something missing? You can get an instance via engine.GetService(). Tomas 
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Huzaifa Sent: Saturday, August 23, 2008 4:56 PM To: 
users@lists.ironpython.com Subject: [IronPython] CodeContext how to get 
CodeContext from ScriptRuntime ,ScriptScope or ScriptEngine . basically i am 
try use this function: public static PythonTuple/*!*/ 
GetExceptionInfoLocal(CodeContext/*!*/ context, Exception ex) -- View this 
message in context: http://www.nabble.com/CodeContext-tp19126500p19126500.html 
Sent from the IronPython mailing list archive at Nabble.com. 
___ Users mailing list 
Users@lists.ironpython.com 
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com 
___ Users mailing list 
Users@lists.ironpython.com 
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com 
___ Users mailing list 
Users@lists.ironpython.com 
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


View this message in context: Re: 
CodeContexthttp://www.nabble.com/CodeContext-tp19126500p19127475.html
Sent from the IronPython mailing list 
archivehttp://www.nabble.com/IronPython-f14449.html at Nabble.com.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CodeContext

2008-08-23 Thread Tomas Matousek
Does ExceptionOeprations class provide you the information you need or is 
something missing? You can get an instance via 
engine.GetServiceExceptionOperations().

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Huzaifa
Sent: Saturday, August 23, 2008 4:56 PM
To: users@lists.ironpython.com
Subject: [IronPython] CodeContext


how to get CodeContext from ScriptRuntime ,ScriptScope or ScriptEngine .

basically i am try use this function:


public static PythonTuple/*!*/ GetExceptionInfoLocal(CodeContext/*!*/
context, Exception ex)



--
View this message in context: 
http://www.nabble.com/CodeContext-tp19126500p19126500.html
Sent from the IronPython mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] CodeContext

2008-08-23 Thread Tomas Matousek
The class might be actually be called ExceptionService in your bits. It was 
renamed recently.

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tomas Matousek
Sent: Saturday, August 23, 2008 7:53 PM
To: Discussion of IronPython
Subject: Re: [IronPython] CodeContext

Does ExceptionOeprations class provide you the information you need or is 
something missing? You can get an instance via 
engine.GetServiceExceptionOperations().

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Huzaifa
Sent: Saturday, August 23, 2008 4:56 PM
To: users@lists.ironpython.com
Subject: [IronPython] CodeContext


how to get CodeContext from ScriptRuntime ,ScriptScope or ScriptEngine .

basically i am try use this function:


public static PythonTuple/*!*/ GetExceptionInfoLocal(CodeContext/*!*/
context, Exception ex)



--
View this message in context: 
http://www.nabble.com/CodeContext-tp19126500p19126500.html
Sent from the IronPython mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] How to call a function passing parameters

2008-08-22 Thread Tomas Matousek
You can do:

var runtime = ScriptRuntime.Create();
var scope = runtime.CreateScope(python);

scope.Execute(@
def test(a):
  return a
);

var test = scope.GetVariableFuncstring, string(test);

Console.WriteLine(test(my_a));

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fernando Correia
Sent: Friday, August 22, 2008 1:32 PM
To: Discussion of IronPython
Subject: [IronPython] How to call a function passing parameters

Please help me to call an IronPython function passing parameters from
a C# method.

Let's say I have a ScriptEngine and also a ScriptScope. In the scope I
have a Python function like this:

def test(a):
return a

Then in some C# method I have something like:

string my_a = A;

How can I call that function passing to it my_a in place of the a
parameter? I want to pass the actual object, not just its value, so I
can pass complex objects and manipulate them in IronPython.

Without passing parameters, I can already do this:

var functionCall = string.Format({0}(), FunctionName);
ScriptSource function =
engine.CreateScriptSourceFromString(functionCall,
SourceCodeKind.Expression);
function.Execute(scope);

Thanks for any help.
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Horrible performance regression of exec on IP2

2008-08-11 Thread Tomas Matousek
The heuristics for function definitions won't actually be a good one.
You actually *want* function and classes definitions to be evaluated since they 
are executed once unless you reload a module.
We should really have a counter on methods that counts the number of calls and 
compile the code if the counter reaches some threshold.

Tomas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shri Borde
Sent: Monday, August 11, 2008 1:57 PM
To: Dino Viehland; Discussion of IronPython
Subject: Re: [IronPython] Horrible performance regression of exec on IP2

Done

Thanks,
Shri


-Original Message-
From: Dino Viehland
Sent: Monday, August 11, 2008 1:54 PM
To: Shri Borde
Subject: RE: [IronPython] Horrible performance regression of exec on IP2

Sounds like a good plan - do you want to add those comments to the bug? :)

-Original Message-
From: Shri Borde
Sent: Monday, August 11, 2008 1:53 PM
To: Dino Viehland
Subject: RE: [IronPython] Horrible performance regression of exec on IP2

I believe that when Jacob enabled interpretation for exec, we used to compile 
code for exec if it had loops in it. That code no longer seems to be around, 
and now we will interpret the same. We could put back that heuristic. It would 
not help with Seo's example as it has a recursive function definition, but we 
can add class and function definitions to the list of heuristics as well. We 
could restrict interpretation to straight line code consisting of statements - 
which would still satisfy the main scenario of good per fro exec/evaling of 
simple code snippets.

Thanks,
Shri


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland
Sent: Monday, August 11, 2008 1:29 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Horrible performance regression of exec on IP2

This is probably because we'll interpret code that is executed using exec.  So 
anything very computationally heavy will be slow in exec.  Maybe we need a way 
to disable that.

If you want to see what it'd be like if we weren't interpreting you could use 
compile() first.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Seo Sanghyeon
Sent: Monday, August 11, 2008 1:20 PM
To: users@lists.ironpython.com
Subject: [IronPython] Horrible performance regression of exec on IP2

This is just to let you know that I filed a CodePlex issue on this
topic. Please comment (and vote!) there.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=17781

In particular, I am interested in the result of execfib.py on .NET.
Current data is on Mono.

--
Seo Sanghyeon
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Sample disclaimer text
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com