Skip to content

Instantly share code, notes, and snippets.

@kashmervil
Last active December 19, 2015 23:59
Show Gist options
  • Save kashmervil/6038478 to your computer and use it in GitHub Desktop.
Save kashmervil/6038478 to your computer and use it in GitHub Desktop.
just a scratch for processing strings in file
open System
open System.IO
open Mono.Unix
open System.Reactive
open System.Reactive.Linq
open System.Reactive.Subjects
let Filestream = new Mono.Unix.StdioFileStream("/home/alex/testFile",FileAccess.Read)
//testFile is output for 'history' command in Shell
let timer = Observable.Interval(TimeSpan.FromMilliseconds(100.0))
let ObsStream = Filestream.ToObservableLines(new Text.ASCIIEncoding(), timer)
let observ = Observer.Create(fun x -> printfn "next rand is %A" x)
//let ObsStream = EnumStream.ToObservable()
let DisStream = ObsStream.Subscribe(observ)
Console.ReadLine() |> ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment