301 karma · joined July 25, 2011
Twiter: http://twitter.com/hamidp Trello: http://trello.com/hamid
Why the outrage?
I was part of the team that did this and we went to great lengths to make sure that we were in full compliance with the relevant RFCs.
The only .NET thing I would recommend C# over F# for is UI.
Having more than one machine is very handy for when you need to run VMs to test different versions, and not risk getting your own main machine into a bad state. If you work on services, the VM runs a local copy of the service.
Disclosure: I'm a dev at MSFT.
Guess which one will work better with a wider range of devices?
For CS it's a little more practical but a degree is still fundamentally a signal. As is an active github account, blog, etc...
What about real-world usages in large systems?
let (|>) a b = b a ;; open System
open System.Collections.Generic
open System.Reflection
type Config = string
type ISuperPlugin =
abstract member Name : string
abstract member Initialize : Config -> unit
let loadedPlugins = Dictionary<string,ISuperPlugin>()
let isPlugin (tp: Type) =
tp.GetInterfaces()
|> Seq.exists (fun t -> t.GetType() = typeof<ISuperPlugin>)
let isPluginLoaded plugin =
match loadedPlugins.TryGetValue(plugin) with
| true, v -> true
| _ -> false
let loadPlugin typ = () // implement this
let LoadPluginsFromAssembly path =
let asm = Assembly.LoadFrom path
asm.GetTypes()
|> Seq.filter isPlugin
|> Seq.filter (fun t -> not (isPluginLoaded t.Name))
|> Seq.map loadPlugin
|> ignore
let loadAllPlugins plugins =
plugins
|> Seq.map (fun p -> async { LoadPluginsFromAssembly p })
|> Async.Parallel
|> ignore
Loads a bunch of plugins from assemblies in parallel. Haven't tested it but it should work with minor modifications to make it thread-safe.The real value of Bio-O isn't knowing how to prove that red-black trees have O(1) amortized insert but rather understanding the tools used and the code written better.