Skip to content

PeachQ 0.91: a q)) debugger, and 31 q projects graded

PeachQ 0.91 brings a q)) debugger: an error inside a function suspends with a caret under the primitive that failed, and Ctrl-C pauses a long calculation instead of ending it. We also now run open-source q projects with their own tests and publish how each one does.

What's new

  • The q)) debugger: carets on every frame, reading and writing locals in any frame of the stack, stack navigation, resume with a value, and Ctrl-C that suspends and continues. See the new debugging guide.
  • 31 q projects, graded: from embedPy, qstats and q-sino to TorQ, each run with its own tests on the compatibility page.
  • Standard library namespaces load when you first read them, and never into a namespace you created yourself.
  • Display: .Q.S and .Q.s2; -3!, 0N! and .Q.s1 fit the console line; a clipped table's footer gives its size.
  • Faster arithmetic and sorting: vectorised float and integer element-wise operations, and sorting a symbol column ranks only the symbols it holds.
  • Behaviour changes: a global used as a local is now 'name at definition, with its location, and library settings are set by calling their setter.
  • q conformance reaches 91.0% (89.0% at 0.89, on a suite that has since grown by 2,477 tests), and Windows matches Linux on all 1158 measured suites (32 more are skipped as not portable).

Find the bug where it happened

An error inside a function now stops where it happened. The caret sits under the primitive that failed, and the q)) prompt lets you inspect that frame:

q)batchTotal batch
'type
  [2]  orderValue:{[o] o[`qty]*o`price}
                              ^
q))o
id   | 3
qty  | 200
price| `tbd

From there ` and . walk up and down the stack, .Q.bt[] prints the whole backtrace, :value resumes with a value of your choice, and \ abandons the call. Ctrl-C in a long loop suspends inside it; check the loop counter, then a bare : carries on:

The q)) debugger in the PeachQ terminal: .Q.bt[] marks the current frame, :0f resumes the batch, and Ctrl-C suspends a loop that a bare : then finishes

From the debugging recording (3 minutes): the backtrace, a resume with :0f, and a loop interrupted with Ctrl-C and continued.

Traps catch Ctrl-C too, so @[f;x;handler] receives stop. The debugging guide walks through all of it with one failing batch calculation.

Real q code on the compatibility page

Conformance tests measure individual q behaviours. Real projects measure whether those behaviours add up to code that runs. The compatibility page now lists 32 open-source q projects, run at their latest upstream commit with their own tests and graded Works, Mostly, Loads or Broken. In the latest run 11 work, 6 mostly work, 8 load and 6 are broken, with one not yet measured; 13,082 of the 14,600 tests we could count pass (89.6%). A grade below Works means PeachQ does not run that project fully yet; it is not a fault in the project.

Maintain a q project? Use Add your project on the compatibility page to ask for it to be included. Each listed project can show its grade with a badge in its README.

The largest gap for an existing kdb+ installation remains on-disk storage: flat files and splayed tables work, but partitioned and segmented databases do not load yet. If that is what stands between your team and an evaluation, tell us what you need.

Download

Download 0.91 from the download page. The full list of changes is in the release notes.