This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let product address (observable : 'a Observable) : ('a * 'b) Observable = | |
let subscribe = fun world -> | |
let subscriptionKey = World.makeSubscriptionKey () | |
let subscriptionKey' = World.makeSubscriptionKey () | |
let subscriptionAddress = !+ [acstring subscriptionKey] | |
let subscriptionAddress' = !+ [acstring subscriptionKey'] | |
let (address', unsubscribe, world) = observable.Subscribe world | |
let unsubscribe = fun world -> | |
let world = unsubscribe world | |
let world = World.unsubscribe subscriptionKey world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Prime | |
open System | |
[<AutoOpen>] | |
module RandModule = | |
/// Implements an immutable random number generator using the xorshift* algorithm. | |
/// NOTE: this is POORLY tested - would not recommend using until tested properly! | |
type [<StructuralEquality; NoComparison>] Rand = | |
{ Current : uint64 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
[<AutoOpen>] | |
module LoggerModule = | |
/// A fake logger type. | |
type Logger = | |
private { __ : unit } | |
[<RequireQualifiedAccess; CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A tic-tac-toe piece, or the absence thereof. | |
type Piece = U | X | O | |
/// Tic-tac-toe board position. | |
type Position = { X : int; Y : int } | |
[<AutoOpen>] | |
module GameModule = | |
/// A tic-tac-toe game implemented as a Pure ADT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open FSharpx.State | |
/// A tic-tac-toe piece, or the absence thereof. | |
type Piece = U | X | O | |
/// Tic-tac-toe board position. | |
type Position = { X : int; Y : int } | |
[<AutoOpen>] | |
module GameModule = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open FSharpx.Reader | |
[<AutoOpen>] | |
module LoggerModule = | |
/// A fake logger type. | |
type Logger = | |
private { __ : unit } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace YourNamespaceHere | |
open System | |
open System.Diagnostics | |
open System.Threading | |
open System.Threading.Tasks | |
/// The 'Sync' builder for evaluating expressions in a synchronous style to aid debugging. | |
type [<Sealed>] Sync () = | |
member inline this.Bind (x, f) = f x | |
member inline this.Return x = x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Marvel | |
open System | |
open System.Diagnostics | |
open System.Threading | |
open System.Threading.Tasks | |
open Marvel | |
/// The 'Vsync' (AKA, 'Variable Synchrony') monad. | |
/// Runs code synchronously when the 'Venom/System/Sync' Consul variable is 'True', in parallel otherwise. | |
/// NOTE: to reference how all this stuff works in F#, see here - https://msdn.microsoft.com/en-us/library/dd233182.aspx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find all "TODO", Match case, Whole word, Subfolders, Find Results 1, Entire Solution, "" | |
C:\FPWorks\Nu\Nu\Nu\RQueue.fs(12): /// TODO: replace all usage with Queue from FSharpx.Collections. | |
C:\FPWorks\Nu\Nu\Nu\Address.fs(15):/// TODO: implement custom comparison. | |
C:\FPWorks\Nu\Nu\Nu\Math.fs(12):/// TODO: for consistency with other math constructs, consider making this a struct. | |
C:\FPWorks\Nu\Nu\Nu\Math.fs(118): /// TODO: See if we can expose an SDL_RenderCopyEx from SDL2(#) that takes floats instead. | |
C:\FPWorks\Nu\Nu\Nu\Overlay.fs(116): // TODO: see if this can be decomposed | |
C:\FPWorks\Nu\Nu\Nu\Assets.fs(28):/// TODO: consider if we could / should use a TypeCarrier (phantom type) here. | |
C:\FPWorks\Nu\Nu\Nu\Assets.fs(200): /// TODO: test this function! | |
C:\FPWorks\Nu\Nu\Nu\Assets.fs(241): /// TODO: test this function! | |
C:\FPWorks\Nu\Nu\Nu\Physics.fs(538): /// TODO: see if AlgebraicConverter can be used here instead of this shitty custom syntax. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nu Game Engine. | |
// Copyright (C) Bryan Edds, 2013-2015. | |
namespace Nu | |
open System | |
open System.IO | |
open System.Xml | |
open OpenTK | |
open Prime | |
open Nu |
OlderNewer