F# Snippets

Recently added snippets

  • Automatically compile LaTeX documents

    A simple script that automatically recompiles LaTeX documents when they are saved. Works nicely when editing papers in Atom and using SumatraPDF for preview (Sumatra automatically reloads PDF documents). Does not report errors or anything clever (!)

    Posted: 8 days ago by Tomas Petricek

  • Memoize Async Function

    Cache a function's asynchronously-computed result for each argument to reduce expensive and repetitive computation of an asynchronous operation. Uses a concurrent dictionary for backing storage, and at-least-once invocation semantics per key.

    Posted: 14 days ago by Jonathan Leaver

  • How to implement conference calling for a SIP softphone in C#?

    A conference call is a meeting, conducted over the phone using audio, between two or more people and usually for the purposes of discussing a particular topic. In my former snippets I dealt with text-to-speech and speech-to-text functionalities. So the implementation of conference calling can sound a little bit strange as compared with my previous tutorials. But I thought it provides a good opportunity for a new challange, so I thought I share my upshot expectedly that it will be useful for you. A softphone with built-in conference call feature can be greatly used in business communication as well as in companionship. The source code below is ready for use, so you only need to copy&paste it to your Visual Studio, then modify the necessary fields. (Do not forget to add the necessary DLL file providing the VoIP background to your references: http://www.voip-sip-sdk.com) This program will be a console application that functions as a softphone making conference calling possible. This solution assumes that you have a PBX with some SIP extensions installed previously. After creating the necessary using lines and objects, you need to define your PBX and provide the appropriate SIP account details in order to be able to register your application to the phone system. When you have created all the required methods for SIP calling, you need to initialize the conference room and handle the related events. AddToConference is used to add new party to the conference room and RemoveFromConference is used when the call is ended. Have a good time!

    Posted: 18 days ago by warnerBro19

Popular snippets

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    164 people like this
    Posted: 4 years ago by Tomas Petricek

  • A beautiful fixed-point finding function

    We start with an initial value and then applying f repeatedly, until the value does not change anymore.

    266 people like this
    Posted: 4 years ago by Nick Palladinos

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    79 people like this
    Posted: 4 years ago by fholm

Snippets by tags

Algorithms (23) Learning F# (15) web (15) computation builder (13) Sequence (28) DSL (21) fold (15) sequences (43) WPF (15) string (15) f# (33) Lists (13) async (79) Seq (44) math (29) monad (18) Design Patterns (18) reflection (18) Collections (15) MailboxProcessor (22) parsing (21) tryfsharp (44) recursion (24) list (43) SilverLight (21) game (24) lazy (17) agent (19) Kata (16) tutorial (15)
View all..

Snippets by authors

View all..

Database contains 1614 snippets out of which 1184 are public.