How to import static class (or static method) into IronPython (or DLR) using C# code(not python)?
scope.SetVariable("math", ?? typeof(System.Math) ??); or do I need create a module? ...
scope.SetVariable("math", ?? typeof(System.Math) ??); or do I need create a module? ...
hi. I need some DLR help. I am implementing an IDynamicMetaObjectProvider and DynamicMetaObject but I am having some issues getting the expected return type. I am overiding BindInvokeMember in the metaobject, I can see all the args types but no return type. Anyone know how I get to it if possible? I know the return type is dynamic but...
Just curious how is the .NET 4.0 CLR world going to call methods ending in question marks and exclamations? What will the syntax look like calling from C# or VB.NET? ...
I'd like to learn more how to create a language for .NET framework. I think I'd like to build a DLR language. I'm having hard time founding good resources. I found a descent article on MSDN that was written more than a year ago. I also spent couple of hours looking at IronPython source code. Could you please share with your resource...
I'm building a spreadsheet-like application, where a lot of small calculations needs to be stitched together in a tree-structure. These calculations are user-defined and I need a way for the user to enter them at runtime. My current approach is to write a small "expression DSL" in F#, where I parse the input with FParsec, build a syntax...
I'm playing with DLR to get a better understanding of it. I'm not completely familiar yet with all its concepts and its terminology so sorry for any terminological or conceptual mistakes in my question. Basically, the way I understand it is that you pass around objects in expression trees but you use binders in order to expose your obj...
I'm considering embedding a scripting language into one of my software projects and have identified two options: compiling C# at run-time via CodeDOM and embedding a DLR-based scripting language. Both options would give me full access to the .NET Framework. The operation that I'd be scripting would be a user-defined transformation of a...
I'd like to use the Codeplex DefaultBinder from within a Silverlight-deployed DLR project (my own custom language implementation). Is that possible? Is the DefaultBinder compatible with Silverlight 3 and/or 4? ...
I have just started writing my first language for the .NET DLR. I would like to know if it is possible to extend Visual Studio 2008 IntelliSense to handle the syntax of a custom DLR language? EDIT: I have decided to bypass VS2008 and target VS2010 instead. See accepted answer for more information. ...
What it is the most brief and concise way of adding event handlers to UI elements in XAML via an IronRuby script? Assumption: the code to add the event handler would be written in the IronRuby script and the code to handle the event would be in the same IronRuby script. I'd like the equivalent of the following code but in IronRuby. Hand...
I'm wanting to learn more about IL and CLR / DLR under the hood. A friend of mine recommended the book "Inside Microsoft .NET IL Assembler", but since it came out in 2002 I fear it's pretty out of date at this point. Does anyone have any more up-to-date books or websites that can be used by someone who understands .NET languages to lea...
I'm trying to give a short example of IDynamicMetaObjectProvider for the second edition of C# in Depth, and I'm running into issues. I want to be able to express a void call, and I'm failing. I'm sure it's possible, because if I dynamically call a void method using the reflection binder, all is fine. Here's a short but complete example:...
Can anybody explain why DateTime in IronRuby is Object[] sample code IronRuby 0.9.1.0 on .NET 2.0.50727.4927 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'System' => true >>> t = System::DateTime.Now => Thu Dec 03 15:32:42 +05:00 2009 >>> t.is_a?(Time) => true >>> t.is_a?(System::DateTime) => true >>> t.is_a?(S...
Hey folks, hoping you can help me get started with IronRuby. I have several Ruby scripts that I want to execute from my WPF Application (due to the use of several RMagick methods I can't get natively) and I can't find any good info on what references I need in the project. I've installed IronRuby and tried adding Microsoft.Scripting an...
I know that IronPython is a dynamically typed language so what I am asking sounds pretty stupid, but is it possible to do something with an IronPython script to make sure the changing of the CLR libraries it references will not result in a runtime error when the script is executed? The reason I ask is that I have written a library refer...
I'm looking for a high level overview of how one goes from an AST to working code via the DLR, does anyone have (a link for) something like that? ...
I'm working on a large ASP.NET software product. We'd like to allow users to enter expressions rather than constants for certain fields. Typically something like: (Price * 1.175) + 25 The obvious solution seems to be to embed IronPython, create a Scope, pass in the "Price" (and other) variables and then execute the above as IronPython...
Has IronPython gotten to a point where you can just drop it in as a replacement for CPython? To clarify: I mean can IronPython run applications originally written for CPython (no .NET involved, of course) ...
Has anyone successfully executed the source control system Bazaar in IronPython? ...