Reference card¶
Keywords¶
By category¶
.Q.id
(sanitize),
.Q.res
(reserved words)
Operators¶
. |
Apply, Index, Trap, Amend | @ |
Apply At, Index At, Trap At, Amend At | ||||
$ |
Cast, Tok, Enumerate, Pad, mmu |
||||||
! |
Dict, Enkey, Unkey, Enumeration, Flip Splayed, Display, internal, Update, Delete | ||||||
? |
Find, Roll, Deal, Enum Extend, Select, Exec, Simple Exec, Vector Conditional | ||||||
+ - * % | Add, Subtract, Multiply, Divide | ||||||
= <> ~ | Equals, Not Equals, Match | ||||||
< <= >= > |
Less Than, Up To, At Least, Greater Than | ||||||
| & | Greater (OR), Lesser, AND | ||||||
# |
Take, Set Attribute | _ |
Cut, Drop | : |
Assign | ||
^ |
Fill, Coalesce | , |
Join | ' |
Compose | ||
0: 1: 2: | File Text, File Binary, Dynamic Load | ||||||
0 ±1 ±2 ±n | write to console, stdout, stderr, handle n |
Iterators¶
maps accumulators
'
Each, each
, Case /:
Each Right /
Over, over
':
Each Parallel, peach
\:
Each Left \
Scan, scan
':
Each Prior, prior
Execution control¶
Other¶
` pop stack :: identity \x system cmd x . push stack generic null \ abort global amend \\ quit q set view / comment
() precedence [;] expn block {} lambda ` symbol (;) list argt list ; separator `: filepath ([]..) table
Attributes¶
g grouped p parted s sorted u unique
Command-line options and system commands¶
file | |||
\a | tables | \r | rename |
-b | blocked | -s \s | secondary processes |
\b \B | views | -S \S | random seed |
-c \c | console size | -t \t | timer ticks |
-C \C | HTTP size | \ts | time and space |
\cd | change directory | -T \T | timeout |
\d | directory | -u -U \u | usr-pwd |
-e \e | error traps | -u | disable syscmds |
-E \E | TLS server mode | \v | variables |
\f | functions | -w \w | memory |
-g \g | garbage collection | -W \W | week offset |
\l | load file or directory | \x | expunge |
-l -L | log sync | -z \z | date format |
-o \o | UTC offset | \1 \2 | redirect |
-p \p | listening port | \_ | hide q code |
-P \P | display precision | \ | terminate |
-q | quiet mode | \ | toggle q/k |
-r \r | replicate | \\ | quit |
system
Command-line options,
System commands,
OS commands
Datatypes¶
Basic datatypes n c name sz literal null inf SQL Java .Net ------------------------------------------------------------------------------------ 0 * list 1 b boolean 1 0b Boolean boolean 2 g guid 16 0Ng UUID GUID 4 x byte 1 0x00 Byte byte 5 h short 2 0h 0Nh 0Wh smallint Short int16 6 i int 4 0i 0Ni 0Wi int Integer int32 7 j long 8 0j 0Nj 0Wj bigint Long int64 0 0N 0W 8 e real 4 0e 0Ne 0We real Float single 9 f float 8 0.0 0n 0w float Double double 0f 0Nf 10 c char 1 " " " " Character char 11 s symbol ` ` varchar 12 p timestamp 8 dateDtimespan 0Np 0Wp Timestamp DateTime (RW) 13 m month 4 2000.01m 0Nm 14 d date 4 2000.01.01 0Nd 0Wd date Date 15 z datetime 8 dateTtime 0Nz 0wz timestamp Timestamp DateTime (RO) 16 n timespan 8 00:00:00.000000000 0Nn 0Wn Timespan TimeSpan 17 u minute 4 00:00 0Nu 0Wu 18 v second 4 00:00:00 0Nv 0Wv 19 t time 4 00:00:00.000 0Nt 0Wt time Time TimeSpan
Columns:
n short int returned by type
and used for Cast, e.g. 9h$3
c character used lower-case for Cast and upper-case for Tok and Load CSV
sz size in bytes
inf infinity (no math on temporal types); 0Wh
is 32767h
RO: read only; RW: read-write
Other datatypes 20-76 enums 77 anymap 104 projection 78-96 77+t – mapped list of lists of type t 105 composition 97 nested sym enum 106 f' 98 table 107 f/ 99 dictionary 108 f\ 100 lambda 109 f': 101 unary primitive 110 f/: 102 operator 111 f\: 103 iterator 112 dynamic load
Above, f
is an applicable value.
Nested types are 77+t (e.g. 78 is boolean. 96 is time.)
Cast $
: where char
is from the c
column above char$data:CHAR$string
dict:`a`b!…
table:([]x:…;y:…)
date.(year month week mm dd)
time.(minute second mm ss)
milliseconds: time mod 1000
Namespaces¶
.h
¶
Markup output for HTTP
.h.br linebreak .h.cd CSV from data .h.code code after Tab .h.d delimiter .h.fram frame .h.ed Excel from data .h.ha anchor .h.edsn Excel from tables .h.hb anchor target .h.hc escape lt .h.ht Marqdown to HTML .h.hr horizontal rule .h.hta start tag .h.iso8601 ISO timestamp .h.htac element .h.jx table .h.htc element .h.td TSV from data .h.html document .h.tx filetypes .h.http hyperlinks .h.xd XML .h.nbr no break .h.xs XML escape .h.pre pre .h.xt JSON .h.text paragraphs .h.xmp XMP
.h.he HTTP 400 .h.c0 web color .h.hn HTTP response .h.c1 web color .h.hp HTTP response pre .h.HOME webserver root .h.hy HTTP response content .h.logo KX logo .h.sa anchor style .h.hu URI escape .h.sb body style .h.hug URI map .h.ty MIME types .h.sc URI-safe .h.val value .h.uh URI unescape
.j
¶
De/serialize as JSON
.m
¶
.Q
¶
Utilities: general, environment, IPC, datatype, database, partitioned database state, segmented database state, file I/O
General Datatype addmonths btoa b64 encode bt backtrace j10 encode binhex dd join symbols j12 encode base 36 def M long infinity f format ty type ff append columns x10 decode binhex fmt format x12 decode base 36 ft apply simple fu apply unique Database gc garbage collect chk fill HDB gz GZip dpft save table id sanitize dpfts save table with sym qt is table dsftg load process save res keywords en enumerate varchar cols s plain text ens enumerate against domain s1 string representation fk foreign key sbt string backtrace hdpf save tables trp extend trap qt is table ts time and space qp is partitioned u date based V table to dict v value Partitioned database state view subview bv build vp ind partitioned index Constants cn count partitioned table A uppercase alphabet MAP maps partitions a lowercase alphabet D partitions b6 bicameral alphanums par locate partition nA alphanums PD partition locations pd modified partition locns Environment pf partition field k version pn partition counts opt command parameters qp is partitioned w memory stats pt partitioned tables x non-command parameters PV partition values pv modified partition values IPC vp missing partitions addr IP address fps fpn streaming algorithm Segmented database state fs fsn streaming algorithm D partitions hg HTTP get P segments host hostname u date based hp HTTP post l load
.z
¶
System variables, callbacks
System information Callbacks .z.a IP address .z.ac HTTP auth from cookie .z.b dependencies .z.bm msg validator .z.c cores .z.exit action on exit .z.D/d date shortcuts .z.pc close .z.e TLS connection status .z.pd peach handles .z.ex failed primitive .z.pg get .z.ey arg to failed primitive .z.ph HTTP get .z.f file .z.pi input .z.h host .z.po open .z.i PID .z.pp HTTP post .z.K version .z.pq qcon .z.k release date .z.ps set .z.l license .z.pw validate user .z.N/n local/UTC timespan .z.ts timer .z.o OS version .z.vs value set .z.P/p local/UTC timestamp .z.wc WebSocket close .z.pm HTTP options .z.wo WebSocket open .z.q quiet mode .z.ws WebSockets .z.s self .z.T/t time shortcuts .z.u user ID .z.W/w handles/handle .z.X/x raw/parsed command line .z.Z/z local/UTC datetime .z.zd zip defaults