The IntelliFactory Training Advantage

Intensive F# Trainings

from the World's Foremost F# Experts

Blog articles of IntelliFactory

0
comment
on 12/30/2011 4:09 PM
I discovered a memory leak in Async.StartChild and here discuss a workaround based on a Future abstraction. I noticed what appears to be a memory leak in F# standard library function Async.StartChild. This happened in a context of a socket server, where I attempted to perform socket reading and writing in parallel. It seems that memory use slowly grows and memory profiler points to some CancellationTokenSource-related objects not being released. As a non-leaking alternative, I used my own abstraction[...]
>> Read the full article
.
0
comment
on 12/30/2011 9:30 AM
When WebSharper compiles F# to JavaScript it preserves namespaces, module and class nesting to make it easy to navigate the compiled code from JavaScript shell. Roughly speaking, A.B.C.D.E identifier in F# can be found by typing A.B.C.D.E in JavaScript. This poses a challenge: as you can imagine, emitting long qualified identifiers everywhere is not a good idea for compact code generation. To save space WebSharper 2.4 does class/module interning. The basic idea is to say L=Microsoft.FSharp.Core.ListMod[...]
>> Read the full article
.
0
comment
on 12/29/2011 12:09 PM
Can anyone explain why this code leaks memory? Looks like using Async.StartAsTask makes it complete in constant space.
>> Read the full article
.
0
comment
on 12/23/2011 9:43 AM
Recent FPish FPish discussion focused on some hacks available in F# to write code that resembles using Haskell type classes. I particularly enjoyed the comments by Gustavo Leon and Loic Denuziere. To cut the long story short, before compiling to .NET F# expands methods delcared inline and does overload resolution. This was intended to support flexible operator overloading, but opens up the door for interesting hacks. Even code that generalizes over higher kinds and therefore cannot exist at .NET level [...]
>> Read the full article
.
0
comment
on 12/15/2011 2:43 PM
In this article I discuss why F# Async is a good thing for writing concurrent software on .NET and show how to implement your own Async specialized for low-concurrency use. As a sample application, I look at a simple CML-style blocking channel. 30-50 lines of custom async and threadpool implementation increase the throughput from 100-400 K to 1M messages a second. Concurrency? Again? It is hard to believe that after so many man-years of computer science research anyone would still ha[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper