jx_repl(1)
π jx_repl β the manual, but make it a group chat π
okay bestie, so this is the jx_repl(1) page from the Cooperative Computing Tools set, and I'm about to make it make sense, no cap. grab a strawberry π and let's go.
β¨ NAME β¨
jx_repl β an interactive command line tool to explore the JX language. that's it, that's the whole vibe. it's giving "REPL but make it JX" π
πΈ SYNOPSIS πΈ
jx_repl
like. that's literally all of it. no flags, no args, no drama. just type the name and go, queen π
π¦ DESCRIPTION π¦
jx_repl is an interactive tool to explore the JX language. here's the loop, and honestly the way it works is so satisfying:
- it reads in a JX expression
- it evaluates it
- it prints the result
- it saves both the query and the result into the context
so every single thing you type? remembered. every answer? also remembered. iconic behaviour tbh.
here's the part that makes it actually useful for real work β the memory situation:
- results of previous expressions can be referenced via the
out_%dsymbol - their corresponding query can be referenced via the
in_%dsymbol
(the %d is a number, iykyk. so out_0, in_0, out_1, in_1, etc.)
the program will exit on EOF, or when the user enters quit or exit. so like, Ctrl-D out, or just say the word, both work π«Ά
π reserved symbols (the secret menu) π
jx_repl also reserves certain symbols in the context to act as commands when entered. so if you type one of these instead of an expression, it does a thing:
helpβ display a help message which lists details on reserved commands.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.catalogβ fetch the catalog data.exitβ exit the program.quitβ same asexit.
not me making "quit" and "exit" both available because we deserve options π
β EXIT STATUS β
Will always return 0. always. no matter what. she does not do error codes, she does not do beef. zero, every time, periodt. π
π EXAMPLES π
just run it with no parameters, bestie
% jx_repl
Welcome to the JX Language Explorer.
Type 'help' for help
in_0 >>>
the prompt is literally sitting there waiting for you, main character energy π
enter any valid JX expression
% jx_repl
in_0 >>> [ "file" + x + ".txt" for x in range(3) ]
out_0 <<<
[
"file0.txt",
"file1.txt",
"file2.txt"
]
look at that list comprehension go. ate and left no crumbs π₯
fetch the catalog data
% jx_repl
in_1 >>> catalog
out_1 <<<
[
{
"name":NAME,
"lastheardfrom":1620308581,
"address":ADDRESS,
...
"type":"wq_factory"
},
...
]
one word, catalog, and suddenly you have the whole catalog. the way that works. πβ¨
perform operations on previous output
% 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
}
...
]
see how it reaches back into out_1? that's the whole point of the numbered memory thing. it's giving β¨continuityβ¨
do more operations on previous output
% jx_repl
in_4 >>> join(project(name, out_2), ", ")
out_4 <<< NAME_1, NAME_2, NAME_3, ..., NAME_N
chaining on chaining on chaining. obsessed. π§
now, fetch the query used to attain that output
% jx_repl
in_5 >>> in_4
out_5 <<< join(project(name,select(type=="wq_master",fetch("http://catalog.cse.nd.edu:9097/query.json"))),", ")
yes. you can ask it what did I type to get here by referencing in_4. the receipt is right there. π
call one of reserved commands
% 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
there it is, the whole cheat sheet, exactly as help prints it. in_# is the #'th input query, out_# is the result of in_#, and catalog is just an alias to fetch catalog data. slay.
π COPYRIGHT π
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.
(so like, it's free software, respect the license, that's the vibe πΈ)
okay and that's the whole page!! π this was CCTools 8.0.0 DEVELOPMENT, and the page itself is jx_repl(1). go forth and explore the JX language, bestie β you're gonna do amazing πβ¨π¦
π¦ where this page comes from
- debian bookworm: coop-computing-tools 9.9-2+b4 Β· GPL-2.0-only
- ubuntu jammy: coop-computing-tools 9.9-2ubuntu3 Β· GPL-2.0-only
- ubuntu noble: coop-computing-tools 9.9-4ubuntu4 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms