Fundamentals of the q Programming Language
Jan Novotny, Paul Bilokon, Aris Galiotos, Frédéric Délèze · 2019
This chapter starts our journey to programming with q. It aims to equip the reader with the basic concepts and ideas needed to code in q. Providing the first glimpse of the q programming language in action, the chapter introduces its basic elements. The most basic element of the q programming language is the atom, the smallest irreducible element of the language. There is a number of useful basic operators, or verbs, defined in q. These native symbol operators are in fact functions, which are heavily overloaded based on their argument. Symbols can be described as internalised strings or a string pool which efficiently stores strings internally for fast lookups. Matrices are represented in q as nested lists, specifically a list of columns, where the elements of the outer list are the rows of the matrix. The chapter provides an overview of various startup flags used when starting the q session.