• Shri Borde's WebLog

    Tail call performance on x86

    • 12 Comments
    MSIL includes the tail. prefix to be used with call instructions ( call, callvirt, calli ), and also the specialized form jmp . The tail. prefix is a hint that the stack frame of the current method should be popped from the stack before transferring control...
  • Shri Borde's WebLog

    Saving a file to the local disk in Silverlight

    • 7 Comments
    All user code in Silverlight runs in a sandbox. Hence, for security reasons, there are no APIs to directly open local files from disk. However, there is a OpenFileDialog class which allows a Silverlight app to open files on disk. Human intervention is...
  • Shri Borde's WebLog

    CLS compilation of IronPython

    • 5 Comments
    One of the common feature requests for IronPython is to support static compilation. While the feature looks like a no-brainer initially, it does have a few wrinkles when you look at the details. Here are the different forms that a related question might...
  • Shri Borde's WebLog

    IronPython cannot call AutomationElement.FromHandle

    • 4 Comments
    If you use IronPython to call AutomationElement.FromHandle , it will return null. This happens because FromHandle uses Assembly.GetCallingAssembly and expects to get a statically compiled assembly with references to the correct version of the UIAutomation...
  • Shri Borde's WebLog

    OLE automation (IDispatch) support in IronPython

    • 4 Comments
    IronPython 1.X IronPython 1.X supported COM interop by building on top of the COM interop support built into the CLR. This relies on the use of interop assemblies for managed code to access COM objects. The interop assembly can be accessed in different...
  • Shri Borde's WebLog

    Using IReflect to expose a type as IDispatch to COM

    • 4 Comments
    The CLR supports marshalling of objects that support the IReflect interface as IDispatch COM objects. Similarly, IExpando gets marshalled as IDispatchEx . Here is a sample of a managed type called ManagedIDispatch which is used from VBScript and used...
  • Shri Borde's WebLog

    OLE Automation support ON in IronPython 2.0 Beta 4

    • 3 Comments
    As I had mentioned in a previous post , we have added support in IronPython for accessing OLE Automation objects using the IDispatch interface, without having to rely on interop assemblies. This was enabled with the "ipy.exe -X:PreferComDispatch" command...
  • Shri Borde's WebLog

    Proposed spec for Ruby's Thread.critical=

    • 2 Comments
    Ruby has green threads , and so its implementation of Thread.critical= is speced as follows: Sets the status of the global ``thread critical ’’ condition and returns it. When set to true , prohibits scheduling of any existing thread. Does not block new...
  • Shri Borde's WebLog

    GitDiff.bat - power-diffing with GIT

    • 1 Comments
    As mentioned in the GIT documentation , you can set the environment variable GIT_EXTERNAL_DIFF to use a custom diff utility. Try doing "set GIT_EXTERNAL_DIFF=echo" and running a "git diff" command to see how GIT_EXTERNAL_DIFF works. One limitation of...
  • Shri Borde's WebLog

    Accessing IronPython objects from native JScript (using IReflect)

    • 1 Comments
    The DLR aims to enable dynamic languages like IronPython and IronRuby to access and minipulate objects created by each other. But what about dynamic languages like JScript implemented using unmanaged code? It is sometimes useful for IronPython and native...
  • Shri Borde's WebLog

    Signals on Windows

    • 1 Comments
    While looking at signal support in IronRuby, I played with the signal and raise functions that are available in the C runtime. It turns out that these functions are much more limited than their Unix counterparts. On Unix, kill can be used to send a signal...
  • Shri Borde's WebLog

    What if a C# snippet does not work when transliterated to IronPython?

    • 0 Comments
    Say you have a working piece of C# code. You want to include it in your IronPython app. So you transliterate it to IronPython code. And it stops working. What do you do? You might feel lost at this point since the IronPython code is "supposed" to work...
  • Shri Borde's WebLog

    Oleview hangs on Vista when run from elevated cmd prompt

    • 0 Comments
    Oleview has been hanging and taking up all the CPU when I tried to open a typelib on a Vista machine. I saw http://support.microsoft.com/kb/176938 and tried to follow the recommended solution (regsvr32 iviewers.dll), but that did not fix it either. It...
  • Shri Borde's WebLog

    Late-binding and ByRef parameters

    • 0 Comments
    VB, VBA, and VBScript pass arguments by reference by default. A subroutine definition can explicitly override the default by specifying that a parameter should be passed by value. This does raise two issues in the face of late-binding: How are arbitrary...
Page 1 of 1 (14 items)