Contents¶
Published in HTML by Kx Systems, by permission. Please notify any errors in this edition to librarian@kx.com. |
Q for Mortals
An introduction to q programming
by Jeffry A. Borror, q4m LLC
Version 3.1
- Preface
- 0. Overview
- 1. Q Shock and Awe
- 1.1 Starting q
- 1.2 Variables
- 1.3 Whitespace
- 1.4 The Q Console
- 1.5 Comments
- 1.6 Assignment
- 1.7 Order of Evaluation
- 1.8 Data Types 101
- 1.9 Lists 101
- 1.10 Functions 101
- 1.11 Functions on Lists 101
- 1.12 Example: Fibonacci Numbers
- 1.13 Example: Newton’s Method for nth Roots
- 1.14 Example: FIFO Allocation
- 1.15 Dictionaries and Tables 101
- 1.16 q-sql 101
- 1.17 Example: Trades Table
- 1.18 File I/O 101
- 1.19 Interprocess Communication101
- 1.20 Example: Asynchronous Callbacks
- 1.21 Websockets 101
- 2. Basic Data Types: Atoms
- 3. Lists
- 3.0 Overview
- 3.1 Introduction to Lists
- 3.2 Simple Lists
- 3.3 Empty and Singleton Lists
- 3.4 Indexing
- 3.5 Combining Lists
- 3.6 Lists as Maps
- 3.7 Nesting
- 3.8 Iterated Indexing and Indexing at Depth
- 3.9 Indexing with Lists
- 3.10 Elided Indices
- 3.11 Rectangular Lists and Matrices
- 3.12 Useful List Operations
- 4. Operators
- 4.0 Operators and Keywords Are Functions
- 4.1 Operator Precedence
- 4.2 Match (~)
- 4.3 Equality and Relational Operators
- 4.4 Basic Arithmetic: +, -, *, %
- 4.5 Greater (|) and Lesser (&)
- 4.6 Amend (:)
- 4.7 Exponential Primitives: sqrt, exp, log, xexp, xlog
- 4.8 More Numeric Primitives
- 4.9 Operations on Temporal Values
- 4.10 Operations on Infinities and Nulls
- 4.11 Alias (::)
- 5. Dictionaries
- 6. Functions
- 7. Transforming Data
- 8. Tables
- 9. Queries: q-sql
- 10. Execution Control
- 11. I/O
- 12. Workspace Organization
- 13. Commands and System Variables
- 14. Introduction to Kdb+
- Appendix A. Built-in Functions
- A.0 Overview
- A.1 acos
- A.2 all
- A.3 and
- A.4 any
- A.5 asc
- A.6 asin
- A.7 atan
- A.8 attr
- A.9 avg
- A.10 avgs
- A.11 bin
- A.12 binr
- A.13 Roll/Deal (?)
- A.14 Enum Extend (?)
- A.15 cor
- A.16 count
- A.17 cov
- A.18 cross
- A.19 cut
- A.20 Cut (_)
- A.21 deltas
- A.22 desc
- A.23 dev
- A.24 differ
- A.25 distinct
- A.26 enlist
- A.27 eval
- A.28 except
- A.29 exit
- A.30 Fill (^)
- A.31 Find (?)
- A.32 fills
- A.33 flip
- A.34 getenv
- A.35 group
- A.36 gtime
- A.37 iasc
- A.38 identity
- A.39 idesc
- A.40 in
- A.41 inter
- A.42 inv
- A.43 Join (,)
- A.44 key
- A.45 like
- A.46 lower
- A.47 lsq
- A.48 ltime
- A.49 ltrim
- A.50 mavg
- A.51 max
- A.52 maxs
- A.53 mcount
- A.54 md5
- A.55 mdev
- A.56 med
- A.57 min
- A.58 mins
- A.59 mmax
- A.60 mmin
- A.61 mmu
- A.62 msum
- A.63 next
- A.64 null
- A.65 or
- A.66 over
- A.67 parse
- A.68 peach
- A.68.1 Threads
- A.68.2 Distributed peach
- A.69 prd
- A.70 prds
- A.71 prev
- A.72 prior
- A.73 rank
- A.74 ratios
- A.75 raze
- A.76 reval
- A.77 reverse
- A.78 rload
- A.79 rotate
- A.80 rsave
- A.81 rtrim
- A.82 scan
- A.83 scov
- A.84 sdev
- A.85 setenv
- A.86 sin
- A.87 ss
- A.88 ssr
- A.89 string
- A.90 sublist
- A.91 sum
- A.92 sums
- A.93 sv
- A.94 svar
- A.95 system
- A.96 Take/Reshape (#)
- A.97 tan
- A.98 til
- A.99 trim
- A.100 ungroup
- A.101 union
- A.102 upper
- A.103 value
- A.104 var
- A.105 vs
- A.106 wavg
- A.107 where
- A.108 within
- A.109 wsum
- A.110 xbar
- A.111 xprev
- A.112 xrank
- Appendix B. Error Messages