F# Weekly #51, 2012

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Blogs & Tutorials

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #50

F# for heating

Sometimes, when you feel really alone and want a bit of heat then F# can help you here.

All you need is a laptop and F#. Just type the following snippet into FSI and wait for a minute. =)

[|1..999|] |> Array.Parallel.iter (fun _ ->
    while true do ignore())

Wish you warm Christmas!

P.S. The same solution works when you are freezing.

F# Weekly #50, 2012

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Blogs & Tutorials

Upcoming events

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #49

F# Weekly #49, 2012

Welcome to F# Weekly,

A roundup of F# content from this past week:

News

Blogs & Tutorials

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #48

F# Weekly #48, 2012

Welcome to F# Weekly,

F# shines like a diamond in the daily coding routine. Piece of that shine from this past week:

News

  • Zach Bray announced FunScript. (F# to JavaScript compiler with JQuery etc. mappings through a TypeScript type provider)
  • The Nuget team fixed the F# compatibility bugs. You can use the nightly build.
  • F# works with MonoDroid.(more details)
  • Voting began for better F# support in NuGet.

Blogs & Tutorials

Upcoming events

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #47

SharePoint 2013 Development Environment

Talbott Crowell's avatarTalbott Crowell's Software Development Blog

In this post, I’m going to describe my setup and some of the software and system requirements I needed for getting a SharePoint 2013 development environment up and running.  I’ll try to update this post as new releases of the Microsoft Office Developer Tools for Visual Studio 2012 are released or I make major changes or discoveries as time progresses.

sharepoint2013

Development Environment Setup

I’ve been using CloudShare for some of my SharePoint 2013 development ever since I purchased my new MacBook Air 11 inch which is maxed out at 8 GB and running Parallels so I can run Windows 7.  But recently I’ve decided to pull out my old Dell Precision M6500 laptop which has 16 GB to get a SharePoint 2013 development environment set up locally.  This beast is a great laptop for SharePoint development, but it is very heavy (the power supply is heavier then my MacBook Air). …

View original post 1,930 more words

F# Weekly #47, 2012

Welcome to F# Weekly,

A roundup of F# content from this past week:

Blogs & Tutorials

Resources & Books

Upcoming events

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #46

F# Weekly #46, 2012

Welcome to F# Weekly,

It’s time to read Mission Statement and join F# Software Foundation! Now you can enjoy new portion of F# weekly:

Blogs & Tutorials

Resources & Books

That’s all for now.  Have a great week and remember you can message me on twitter (@sergey_tihon) with any F# news.

Previous F# Weekly edition – #45

Accessing Local Variable Information in FSI

It’s time to make first steps to the new improved FSI. I feel that I should start looking for ways to implement something from My wish list for FSI. Let’s begin from #3 and try to find a list of declared variables and functions.

Before execution of any piece of code, FSI compiles it and creates a new type in current assembly. This type contain all named variables as properties and named function as function. The latest unnamed variable/function stores in property that called ‘it‘. So, it means that we can collect all required information using reflection.

Below you can find my implementation of the function objects() that prints lists of declared variables and functions.

let objects() =
  let methods =
    System.Reflection.Assembly.GetExecutingAssembly().GetTypes()
      |> Seq.filter (fun t ->
        t.CustomAttributes |> Seq.exists (fun a ->
          a.AttributeType = typeof<Microsoft.FSharp.Core.CompilationMappingAttribute>))
      |> Seq.sortBy (fun t -> t.Name)
      |> Seq.map (fun t ->
        t.GetMethods() |> Seq.filter(fun m -> not(m.IsHideBySig)))
      |> Seq.concat
      |> List.ofSeq
  let var, func =
    Map.empty<string, System.Reflection.MethodInfo>
      |> List.foldBack (fun (m:System.Reflection.MethodInfo) map ->
              let name = if (not(m.IsSpecialName)) then m.Name
                         else m.Name.Substring(4)
              if ((m.IsSpecialName && (m.GetParameters().Length > 0)) ||
                  map.ContainsKey(name)) then map
              else map.Add(name, m))
         methods
      |> Map.toList
      |> List.partition (fun (_,m) -> m.IsSpecialName)

  let printList title ls =
    printfn "%s : %A" title ( ls |> List.map fst |> List.sort )
  var  |> printList "Variables"
  func |> printList "Functions"

Now let’s look at a real-life example on the screenshot below.