Last active
December 19, 2015 23:59
-
-
Save kashmervil/6038478 to your computer and use it in GitHub Desktop.
just a scratch for processing strings in file
This file contains hidden or 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 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