Skip to content

Instantly share code, notes, and snippets.

View IvanRainbolt's full-sized avatar

Ivan Rainbolt IvanRainbolt

View GitHub Profile
@IvanRainbolt
IvanRainbolt / crazyivan_TheFirstGeneralJournalAttempt.fsx
Last active July 30, 2022 00:55
The first General Journal attempt | Using F# to model Financial Accounting
// related to blog post:
// The first General Journal attempt
// Using F# to model Financial Accounting
// https://crazyivan.blog/the-first-general-journal-attempt
open System
type Transaction = exn
type AccountData = { AccountName : string }
@IvanRainbolt
IvanRainbolt / crazyivan.Starting from ZERO.fsx
Last active July 24, 2022 15:23
Starting from ZERO | Using F# to model Financial Accounting
// related to blog post:
// Starting from ZERO
// Using F# to model Financial Accounting
// https://crazyivan.blog/starting-from-zero
open System
type Transaction = exn
type AccountData = { AccountName : string }
@IvanRainbolt
IvanRainbolt / Loop.fs
Last active October 3, 2020 02:10
Simple Background task running
namespace UI.FLib
module Loop =
// Loop that keeps running forever until an exception happens
let rec loop () = async {
do! Async.Sleep(5000)
printfn "Working"
return! loop () }
@IvanRainbolt
IvanRainbolt / TryScreenShot.fsx
Created August 24, 2020 02:26
Attempt at screen shot using fsx/F# canopy
#if INTERACTIVE
#r @"C:\Users\netaz\.nuget\packages\canopy\2.1.5\lib\netstandard2.0\canopy.dll"
#r @"C:\Users\netaz\.nuget\packages\selenium.webdriver\3.141.0\lib\netstandard2.0\WebDriver.dll"
#r @"C:\Users\netaz\.nuget\packages\newtonsoft.json\12.0.3\lib\netstandard2.0\Newtonsoft.Json.dll"
#r @"D:\OneDrive\T\canopy.experiment\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll"
#endif
open System
open canopy.classic
open canopy.runner.classic
@IvanRainbolt
IvanRainbolt / todo-app.js
Created June 15, 2020 19:55 — forked from ivenmarquardt/todo-app.js
Functional Reactive Programming (FRP) implemented with a couple rules, types and combinators
// Based on this blog post: https://medium.com/@iquardt/taming-the-dom-50c8f1a6e892
/* RULES
* Only the program may manipulate the output display, never the user
* User input is presented in the form of events
* GUI elements generate events only in response to user input, never in response to program output
*/
@IvanRainbolt
IvanRainbolt / basicUI.fs
Last active March 7, 2020 04:16
Very basic F# command line UI
//Very basic F# command line UI
//trying to get a global state
open System
let mutable x = "NoUser"
let printPrompt () =
printfn "Current State: %s" x
printf "command:>"