remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / extra / log-viewer / log-viewer.factor
blob08a5eac72d8b2469ce54a957bbbe9d8cc08c8940
1 USING: kernel io io.files io.pathnames io.monitors io.encodings.utf8 ;\r
2 IN: log-viewer\r
3 \r
4 : read-lines ( stream -- )\r
5     dup stream-readln dup\r
6     [ print read-lines ] [ 2drop flush ] if ;\r
7 \r
8 : tail-file-loop ( stream monitor -- )\r
9     dup next-change drop over read-lines tail-file-loop ;\r
11 : tail-file ( file -- )\r
12     dup utf8 <file-reader> dup read-lines\r
13     swap parent-directory f <monitor>\r
14     tail-file-loop ;\r