Re: [Factor-talk] potential memory issue

2015-10-02 Thread HP wei
First, In factor's listener terminal (not in the gui window, though), Jon Harper suggested to hit Control-C and t to terminate a long running code. I hit Control-C in below case (1), it brings out a low level debugger (what a pleasant surprise). Let me ask a question first before I write more

[Factor-talk] how to error trapping 'link-info'

2015-10-01 Thread HP wei
As suggested by John, I test out the following action to get the total file sizes of a disk volume. 0 "a_path_to_big_folder" [ link-info dup symbolic-link? [ drop ] [ size>> + ] if ] each-file Our big-folder is on a netapp server shared by tens of people. Many small files get updated every

[Factor-talk] Fwd: how to error trapping 'link-info'

2015-10-01 Thread HP wei
l_size += get_fize(file_info) except: pass continue HP -- Forwarded message -- From: HP wei <hpwe...@gmail.com> Date: Thu, Oct 1, 2015 at 9:36 AM Subject: how to error trapping 'link-info' To: factor-talk@lists.sourceforge.net As suggeste

[Factor-talk] remote listener over tcp

2015-10-01 Thread HP wei
The objective: we have several linux machines that I need to check on certain status (--- disks, update-jobs etc). My plan is, if feasible, to run a remote factor-listener on each of those machines and run a 'master' factor on a machine that collects all info and presents

[Factor-talk] potential memory issue --- Fwd: how to error trapping 'link-info'

2015-10-01 Thread HP wei
memory on the machine. I guess there might be some memory (leak) issue somewhere ??? --HP -- Forwarded message -- From: HP wei <hpwe...@gmail.com> Date: Thu, Oct 1, 2015 at 9:36 AM Subject: how to error trapping 'link-info' To: factor-talk@lists.sourceforge.net

Re: [Factor-talk] potential memory issue --- Fwd: how to error trapping 'link-info'

2015-10-01 Thread HP wei
e to provide feedback there rather than > the mailing list: > > https://github.com/slavapestov/factor/issues/1483 > > > > > On Thu, Oct 1, 2015 at 8:38 AM, HP wei <hpwe...@gmail.com> wrote: > >> Well, I just checked the running factor session that f

Re: [Factor-talk] A bug ?

2015-10-01 Thread HP Wei
many entries, this > is not a performance issue. But, like anything with software, if you have a > different use case we can adapt the code to it. > > > On Sep 30, 2015, at 1:59 PM, HP wei <hpwe...@gmail.com > <mailto:hpwe...@gmail.com>> wrote: > >> I see.

Re: [Factor-talk] A bug ?

2015-09-30 Thread HP wei
Coleman <doug.cole...@gmail.com> wrote: > You can do link-info instead. > > On Wed, Sep 30, 2015, 13:42 HP wei <hpwe...@gmail.com> wrote: > >> While trying out the word each-file, I bumped into presumably >> a bug in >> >> file-info ( path -- info )

[Factor-talk] to get total file size for millions of files

2015-09-28 Thread HP wei
-file" ascii [ V{ } [ quot ] each-line ] with-file-reader The collected info is on the stack after the above finishes. To go through a huge directory (folder), do you know if the current factor can set up something similar ?

Re: [Factor-talk] how to run-pipeline

2015-09-22 Thread HP Wei
r/render.factor#L62-L67> > > Granted, all of those are building a single process, not a pipeline. But the > same principles apply: > > : cmd1 ( -- ) ... ; > : cmd2 ( -- ) ... ; > > [ cmd1 , cmd2 , ] { } make run-pipeline > > On Mon, Sep 21, 2015 at 9:21 PM, HP

[Factor-talk] how to run-pipeline

2015-09-21 Thread HP Wei
} run-pipeline Adding cmd2, I could write ${ my_b >>b get-cmd1 my_c >>c get-cmd2 } run-pipeline But this looks ugly. Is there a simpler way ? Thanks HP Wei --

[Factor-talk] newbie question: how to collect info from a stream

2015-09-01 Thread HP Wei
I am just starting to learn factor. In ocaml or python, when I open a file stream, I usually set up an object with an accumulator class variable where I collect the selected info while walking through the stream (file). I am trying to look at various places to find an equivalent way of doing