Permalink
Browse files

upgrade to newest DLR langs. Make IronRuby runtime have ruby and python

  • Loading branch information...
1 parent 5b597ab commit bb401fc112cbbedaedf2e67243cae85d3c4e2c8b @jredville committed Jul 22, 2009
View
@@ -0,0 +1,2 @@
+*.cache
+*.suo
View
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{68758A4D-D8C0-4466-9320-5E21C1FE3467}</ProjectGuid>
<OutputType>WinExe</OutputType>
@@ -32,36 +32,64 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+ <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+ <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
- <Reference Include="IronPython, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronPython, Version=2.6.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronPython.dll</HintPath>
</Reference>
- <Reference Include="IronPython.Modules, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronPython.Modules, Version=2.6.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronPython.Modules.dll</HintPath>
</Reference>
- <Reference Include="IronRuby, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronRuby.dll</HintPath>
</Reference>
- <Reference Include="IronRuby.Libraries, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby.Libraries, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronRuby.Libraries.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Dynamic, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby.Libraries.Yaml, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Libs\IronRuby.Libraries.Yaml.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Dynamic, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Dynamic.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting.Core, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting.Core, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.Core.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting.ExtensionAttribute, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting.Debugging, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Libs\Microsoft.Scripting.Debugging.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Scripting.ExtensionAttribute, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.ExtensionAttribute.dll</HintPath>
</Reference>
View
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}</ProjectGuid>
<OutputType>library</OutputType>
@@ -32,36 +32,64 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+ <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+ <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
- <Reference Include="IronPython, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronPython, Version=2.6.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronPython.dll</HintPath>
</Reference>
- <Reference Include="IronPython.Modules, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronPython.Modules, Version=2.6.0.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronPython.Modules.dll</HintPath>
</Reference>
- <Reference Include="IronRuby, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronRuby.dll</HintPath>
</Reference>
- <Reference Include="IronRuby.Libraries, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby.Libraries, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\IronRuby.Libraries.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Dynamic, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="IronRuby.Libraries.Yaml, Version=0.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Libs\IronRuby.Libraries.Yaml.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Dynamic, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Dynamic.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting.Core, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting.Core, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.Core.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Scripting.ExtensionAttribute, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Scripting.Debugging, Version=0.9.6.20, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Libs\Microsoft.Scripting.Debugging.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Scripting.ExtensionAttribute, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Libs\Microsoft.Scripting.ExtensionAttribute.dll</HintPath>
</Reference>
View
@@ -43,9 +43,7 @@ public partial class Repl : UserControl {
// TODO: generalize and refactor this
var path = Environment.GetEnvironmentVariable("REPL_PLUGINS");
if (path == null) {
- var home = Environment.GetEnvironmentVariable("HOME");
- var homeDrive = Environment.GetEnvironmentVariable("HOMEDRIVE");
- path = homeDrive + home;
+ path = (string)CurrentEngine.Execute("File.expand_path(\"~\").to_clr_string");
path = Path.Combine(path, "ReplPlugins");
}
View
@@ -3,18 +3,18 @@
class Object
def as_xaml
- "=> #{self}"
+ "#=> #{self}"
end
end
class NilClass
def as_xaml
- "=> nil"
+ "#=> nil"
end
end
class Array
def as_xaml
- "=> #{self.inspect}"
+ "#=> #{self.inspect}"
end
end
View
@@ -139,11 +139,16 @@ public class RubyEngine : DlrEngine {
}
public override void Reset(ScriptScope scope) {
- _engine = Ruby.CreateEngine((setup) =>
- {
- setup.Options["InterpretedMode"] = true;
- setup.Options["SearchPaths"] = new[] { MerlinPath + @"\libs", BasePath + @"\ruby\site_ruby\1.8", BasePath + @"\ruby\site_ruby", BasePath + @"\ruby\1.8" };
- });
+ var setup = new ScriptRuntimeSetup();
+ var py = new LanguageSetup(typeof(PythonContext).AssemblyQualifiedName, "Python", new[] { "py" }, new[] { ".py" });
+ var rb = new LanguageSetup(typeof(RubyContext).AssemblyQualifiedName, "Ruby", new[] { "rb" }, new[] { ".rb" });
+
+ rb.Options["InterpretedMode"] = true;
+ rb.Options["SearchPaths"] = new[] { MerlinPath + @"\libs", BasePath + @"\ruby\site_ruby\1.8", BasePath + @"\ruby\site_ruby", BasePath + @"\ruby\1.8" };
+ setup.LanguageSetups.Add(py);
+ setup.LanguageSetups.Add(rb);
+ var runtime = new ScriptRuntime(setup);
+ _engine = runtime.GetEngine("rb");
_scope = scope == null ? _engine.Runtime.CreateScope() : scope;
_topLevelBinding = (IronRuby.Builtins.Binding)_engine.Execute("binding", _scope);
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -8,17 +8,26 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Debug|x86.ActiveCfg = Debug|x86
+ {0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Debug|x86.Build.0 = Debug|x86
{0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Release|x86.ActiveCfg = Release|x86
+ {0B50DAA3-3B19-466E-A55C-2ADC7ECBA2DD}.Release|x86.Build.0 = Release|x86
{68758A4D-D8C0-4466-9320-5E21C1FE3467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68758A4D-D8C0-4466-9320-5E21C1FE3467}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {68758A4D-D8C0-4466-9320-5E21C1FE3467}.Debug|x86.ActiveCfg = Debug|x86
{68758A4D-D8C0-4466-9320-5E21C1FE3467}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68758A4D-D8C0-4466-9320-5E21C1FE3467}.Release|Any CPU.Build.0 = Release|Any CPU
+ {68758A4D-D8C0-4466-9320-5E21C1FE3467}.Release|x86.ActiveCfg = Release|x86
+ {68758A4D-D8C0-4466-9320-5E21C1FE3467}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

0 comments on commit bb401fc

Please sign in to comment.