Showing posts with label Unquote. Show all posts
Showing posts with label Unquote. Show all posts

Thursday, June 14, 2012

Unquote 2.2.2 released!

Unquote 2.2.2 has been released! From the the release notes:
Make all custom exception types serializable so that they may pass AppDomain boundaries. Other minor fixes and enhancements.
Very happy I made the effort to document the release process recently, and it definitely helped speed things up and keep my confidence!

Sunday, May 20, 2012

Unquote 2.2.0 release

Unquote 2.2.0 has been released. This release includes several enhancements around operator decompilation.

Saturday, April 28, 2012

Quick way to convert a space delimited list to a literal F# data structure

Today, while working on this Unquote issue, I needed to create a literal set of reserved words from a space delimited list found in the F# 2.0 specification. Thanks to the F# interactive and it’s printer, I didn’t need to manually create the literal set by laboriously inserting quotations around each word.

First, I copied and pasted the list of words from the specification into a .fs file and easily made it into a literal multi-line string. Taking care to add an extra space at the end of each line so that the last and first words of two consecutive lines didn’t run together when ultimately split.
let reservedWords = "\
    atomic break checked component const constraint constructor \
    continue eager fixed fori functor include \
    measure method mixin object parallel params process protected pure \
    recursive sealed tailcall trait virtual volatile"

I submitted that to FSI.
val reservedWords : string =
  "atomic break checked component const constraint constructor c"+[156 chars]

Then, in FSI, I set the fsi.PrintLength to 1000 so that I could see the complete list in the output and split by ‘ ‘ and converted to a set.
>  fsi.PrintLength <- 1000;;
val it : unit = ()

> reservedWords.Split(' ') |> set;;
val it : Set<string> =
  set
    ["atomic"; "break"; "checked"; "component"; "const"; "constraint";
     "constructor"; "continue"; "eager"; "fixed"; "fori"; "functor"; "include";
     "measure"; "method"; "mixin"; "object"; "parallel"; "params"; "process";
     "protected"; "pure"; "recursive"; "sealed"; "tailcall"; "trait";
     "virtual"; "volatile"]
You can see that the resulting FSI output is directly usable F# code completing my task.

Sunday, April 15, 2012

Experimenting with precompiled regexes in Unquote

Today I spent some time experimenting with precompiled regexes in Unquote: https://unquote.googlecode.com/svn/branches/precompiled-regex. However, I was not able to show any measurable performance improvements from this work. Perhaps this was to be expected, considering Unquote only uses 5 compiled regexes currently and the upfront cost of compiling those on the fly must be small compared to the actual regex matching performed across all of Unquote’s nearly 500 unit tests (though Unquote uses a relatively small number of regexes, they are used frequently). So, for now, we’ll stick with normal compiled-on-the-fly regexes, unless we gain a large number of regexes in the future. But, it is worth noting the compiling on-the-fly does increase the performance of Unquote by 2x.

Thursday, April 12, 2012

Unquote 2.1.1 released

After an 8-month break, a new version of Unquote has been released. This is mostly a maintenance release, but notable features and bug fixes include the addition of the raisesWith operator, and improved printing of function and None values. See the release notes for a full listing.

Note that the Unquote logo will not be visible on the NuGet gallery this release, due to a change in the way NuGet allows managing packages.

For myself and possible future developers, I’ve also updated the Unquote solution to use NuGet package reference wherever possible and enabled “NuGet package restore” on the solution so that packages don’t need to be committed to the source repository. However, solution level packages such as Statlight tools for running Silverlight tests don’t seem to be restoring. I’ll have to look into that later. For libraries such as NUnit Silverlight builds which don’t have NuGet packages, I’ve committed those to the source repository under a lib folder.