.TH "jx_repl" 1 "" "CCTools 8.0.0 DEVELOPMENT" "Cooperative Computing Tools" .SH NAME .LP \fBjx_repl\fP - interactive command line tool to explore the JX language. .SH SYNOPSIS .LP \FC\fBjx_repl\fP\FT .SH DESCRIPTION .LP \fBjx_repl\fP is an interactive tool to explore the JX language. \fBjx_repl\fP will read in a JX expression, evaluate it, print the result, then save both the query and the result to the context. Results of previous expressions can be referenced via the out_%d` symbol, and their corresponding query via the `in_%d` symbol. The program will exit on EOF or when the user enters 'quit' or 'exit. .PP \fBjx_repl\fP also reserves certain symbols in the context to act as commands when entered: .IP \(bu 4 \fBhelp\fP display a help message which lists details on reserved commands. .IP \(bu 4 \fBfunctions\fP display a list of functions supported by the JX language. .IP \(bu 4 \fBvalues\fP display a list of values supported by the JX language. .IP \(bu 4 \fBoperators\fP display a list of operators supported by the JX language. .IP \(bu 4 \fBcatalog\fP fetch the catalog data. .IP \(bu 4 \fBexit\fP exit the program. .IP \(bu 4 \fBquit\fP same as 'exit'. .SH EXIT STATUS .LP Will always return 0 .SH EXAMPLES .LP Simply run \fBjx_repl\fP with no parameters: .fam C .nf .nh .IP "" 8 % jx_repl Welcome to the JX Language Explorer. Type 'help' for help in_0 >>> .fi .hy .fam .P Enter any valid JX expression: .fam C .nf .nh .IP "" 8 % jx_repl ... in_0 >>> [ "file" + x + ".txt" for x in range(3) ] out_0 <<< [ "file0.txt", "file1.txt", "file2.txt" ] .fi .hy .fam .P Fetch the catalog data: .fam C .nf .nh .IP "" 8 % jx_repl ... in_1 >>> catalog out_1 <<< [ { "name":NAME, "lastheardfrom":1620308581, "address":ADDRESS, ... "type":"wq_factory" }, ... ] .fi .hy .fam .P Perform operations on previous output .fam C .nf .nh .IP "" 8 % jx_repl ... in_2 >>> select(type=="wq_master", out_1) out_2 <<< [ { "name":NAME, "lastheardfrom":1620308755, "address":ADDRESS, "tasks_total_disk":0, "tasks_total_memory":0, ... "type": wq_master } ... ] .fi .hy .fam .P Do more operations on previous output .fam C .nf .nh .IP "" 8 % jx_repl ... in_4 >>> join(project(name, out_2), ", ") out_4 <<< NAME_1, NAME_2, NAME_3, ..., NAME_N .fi .hy .fam .P Now, fetch the query used to attain that output .fam C .nf .nh .IP "" 8 % jx_repl ... in_5 >>> in_4 out_5 <<< join(project(name,select(type=="wq_master",fetch("http://catalog.cse.nd.edu:9097/query.json"))),", ") .fi .hy .fam .P Call one of reserved commands .fam C .nf .nh .IP "" 8 % jx_repl ... in_7 >>> help help display this message functions display a list of functions supported by the JX language values display a list of values supported by the JX language operators display a list of operators supported by the JX language in_# the #'th input query out_# result of in_# catalog alias to fetch catalog data quit|exit exit program .fi .hy .fam .P .SH COPYRIGHT .LP The Cooperative Computing Tools are Copyright (C) 2005-2019 The University of Notre Dame. This software is distributed under the GNU General Public License. See the file COPYING for details.