You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/basics/debug.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ q)). / down
98
98
q))
99
99
```
100
100
101
-
In a debugger session, `.z.ex` and `.z.ey` are set to the failed primitive and its argument list.
101
+
In a debugger session, [`.z.ex`](../ref/dotz.md#zex-failed-primitive) and [`.z.ey`](../ref/dotz.md#zey-argument-to-failed-primitive) are set to the failed primitive and its argument list.
102
102
103
103
```q
104
104
q)).z.ex
@@ -159,7 +159,7 @@ q)):17
159
159
160
160
## Abort
161
161
162
-
Use `\` to exit the debugger and abort execution.
162
+
Use [`\`](syscmds.md#terminate) to exit the debugger and abort execution.
163
163
164
164
```q
165
165
q))\
@@ -247,7 +247,7 @@ View calculations and system commands, including [`\l`](syscmds.md#l-load), corr
247
247
248
248
### Trap
249
249
250
-
[`.Q.trp[f;x;g]`](../ref/dotq.md#trp-extend-trap-at) extends `trap at` (`@[f;x;g]`) to collect backtrace. Along with the error string, `g` gets called with the backtrace object as a second argument. You can format it with `.Q.sbt` to make it legible.
250
+
[`.Q.trp[f;x;g]`](../ref/dotq.md#trp-extend-trap-at) extends [`trap at` (`@[f;x;g]`)](../ref/apply.md#trap-at) to collect backtrace. Along with the error string, `g` gets called with the backtrace object as a second argument. You can format it with [`.Q.sbt`](../ref/dotq.md#sbt-string-backtrace) to make it legible.
Copy file name to clipboardExpand all lines: docs/basics/errors.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,10 @@ description: Errors signalled by the interpreter, and what triggers them
11
11
12
12
<style>dt {color:#F23A66}</style>
13
13
14
+
{directory}/q.k. OS reports: No such file or directory
15
+
16
+
: Using the environment variable `QHOME` (or `<HOME DIRECTORY>/q` if not set), `q.k` was not found in the directory specified. Check that the `QHOME` environment variable is correctly set to the directory containing `q.k`, which is provided in the kdb+ installation files.
17
+
14
18
[](){#access}
15
19
access
16
20
@@ -623,15 +627,15 @@ error | explanation
623
627
{timestamp} couldn't connect to license daemon | Could not connect to KX license server ([kdb+ On Demand](../learn/licensing.md#licensing-server))
624
628
[](){#cores}cores | The license is for [fewer cores than available](../learn/licensing.md#core-restrictions)
625
629
[](){#cpu}cpu | The license is for fewer CPUs than available
626
-
[](){#exp}exp | License expiry date is prior to system date
630
+
[](){#exp}exp | License expiry date is prior to system date. The license has expired. Commercial license holders should have their Designated Contacts reach out to licadmin@kx.com or contact sales@kx.com to begin a new commercial agreement.
627
631
[](){#host}host | The hostname reported by the OS does not match the hostname or hostname-pattern in the license.<br><br>If you see `255.255.255.255` in the kdb+ banner, the machine likely cannot resolve its hostname to an IP address, which will cause a `host` error.<br><br>Since 4.1t 2022.07.01,4.0 2022.07.01 the detected hostname is printed. It can be used to compare with the hostname used within the license.
628
-
[](){#k4.lic}k4.lic | `k4.lic` file not found, check contents of environment variables[`QHOME`](../learn/install.md#step-2-put-kdb-in-qhome) and [`QLIC`](../learn/licensing.md#keeping-the-license-key-file-elsewhere)
632
+
[](){#k4.lic}k4.lic | `k4.lic` file not found. If the environment variable[`QLIC`](../learn/licensing.md#keeping-the-license-key-file-elsewhere) is set, check it is set to the directory containing the license file. **Note** that it should not be set to the location of the license file itself, but to the directory that contains the license file. If `QLIC` is not set, check that the directory specified by the environment variables [`QHOME`](../learn/install.md#step-2-put-kdb-in-qhome) contains the license file.
629
633
[](){#os}os | Wrong OS or operating-system error (if runtime error)
630
634
[](){#srv}srv | Client-only license in server mode
631
635
[](){#upd}upd | Version of kdb+ more recent than update date, _or_ the function `upd` is undefined (sometimes encountered during ``-11!`:logfile``)
632
636
[](){#user}user | Unlicensed user
633
-
[](){#wha}wha | System date is prior to kdb+ version date
634
-
[](){#wrong-q.k-version}wrong q.k version | `q` and `q.k` versions do not match
637
+
[](){#wha}wha | System date is prior to kdb+ version date. Check that the system date shows the correct date.
638
+
[](){#wrong-q.k-version}wrong q.k version | `q` and `q.k` versions do not match. Check that the `q.k` file found in the directory specified by the `QHOME` environment variable is the same version as that supplied with the q binary.
635
639
636
640
637
641
License-related errors are reported with the prefix `licence error: ` since V4.0 2019.10.22.
Resolve a [type](datatypes.md) number to an [enum](enumerations.md) vector and check if it is available.
@@ -174,9 +180,31 @@ q)-16!a
174
180
```
175
181
176
182
177
-
## `-18!x` (compress byte)
183
+
## `-18!x` (compress bytes)
184
+
185
+
Returns the IPC byte representation of `x` according to [`-8!x`](#-8x-to-bytes), applying compression based on [IPC compression rules](ipc.md#compression):
186
+
187
+
* Uncompressed serialized data has a length greater than 2000 bytes
188
+
* Size of compressed data is less than ½ the size of uncompressed data
189
+
190
+
```q
191
+
q)count -8!til 1000 / uncompressed
192
+
8014
193
+
q)count -18!til 1000 / compressed
194
+
3276
195
+
```
178
196
179
-
Returns compressed IPC byte representation of `x`, see notes about network compression in [Changes in V2.6](../releases/ChangesIn2.6.md)
197
+
[-9!x](#-9x-from-bytes) can be used to uncompress and deserialise.
198
+
199
+
```q
200
+
q)a:til 1000 / original data to convert
201
+
q)x:-18!a / serialize and compression to bytes using IPC serialisation
202
+
q)a~-9!x / test if deserialised version is same as original
Copy file name to clipboardExpand all lines: docs/basics/ipc.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -386,7 +386,7 @@ For releases since 2012.05.29, kdb+ and the C-API will compress an outgoing mess
386
386
- Connection does not resolve to being localhost (since 4.1t 2021.06.04)
387
387
- Size of compressed data is less than ½ the size of uncompressed data
388
388
389
-
The compression/decompression algorithms are proprietary and implemented as the `compress` and `uncompress` methods in `c.java`. The message validator does not validate the integrity of compressed messages.
389
+
The compression/decompression algorithms are proprietary and implemented as the `compress` and `uncompress` methods in the [Java API](https://github.com/kxsystems/javakdb). The message validator does not validate the integrity of compressed messages.
390
390
391
391
!!! note "Enumerations are automatically converted to values before sending through IPC."
Q functionality can be extended using dynamically-loaded modules.
11
+
Q functionality can be extended using dynamically-loaded modules, allowing C/C++ functions to be called directly from the q language.
12
12
13
-
To make a function `foo` defined in a shared object `bar.so` available in a q session, we use [2:](../ref/dynamic-load.md) to load the function dynamically.
13
+
For example, to make a function `foo` defined in a shared object `bar.so` available in a q session, we use [2:](../ref/dynamic-load.md) to load the function dynamically.
Compression algoritm `2` uses Gzip. Source and algorithm details can be found [here](http://zlib.net).
238
+
The following libraries are required by kdb+:
245
239
246
-
=== ":fontawesome-brands-apple: macOS"
240
+
| :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
241
+
---|---|---
242
+
libz.so.1 | libz.dylib<br>(pre-installed) | zlibwapi.dll<br>(32-bit and 64-bit versions available from [WinImage](http://www.winimage.com/zLibDll/index.html"winimage.com"))
247
243
248
-
To install Snappy or Lz4 on macOS, use a package manager such as [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/):
244
+
### Snappy
249
245
250
-
# install with MacPorts
251
-
sudo port install snappy +universal
252
-
export LD_LIBRARY_PATH=/opt/local/lib
246
+
Compression algoritm `3` uses Snappy. Source and algorithm details can be found [here](http://google.github.io/snappy/).
247
+
The following libraries are required by kdb+:
253
248
254
-
=== ":fontawesome-brands-windows: Windows"
249
+
| :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
250
+
---|---|---
251
+
libsnappy.so.1 | libsnappy.dylib<br>(available via package managers such as [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/)) | snappy.dll
255
252
256
-
Build the `liblz4-dll` project on Windows as outlined in the [README at GitHub](https://github.com/lz4/lz4/tree/release/build).
253
+
### LZ4
257
254
255
+
Compression algoritm `4` uses LZ4. Source and algorithm details can be found [here](https://github.com/lz4/lz4).
256
+
The following libraries are required by kdb+:
257
+
258
+
| :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
259
+
---|---|---
260
+
liblz4.so.1 | liblz4.dylib<br>(available through package managers such as [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/)) | liblz4.dll <br>(build the `liblz4-dll` project on Windows as outlined in the [README at GitHub](https://github.com/lz4/lz4/tree/release/build))
258
261
259
262
!!! danger "Certain releases of `lz4` do not function correctly within kdb+"
We recommend using the latest `lz4` [release](https://github.com/lz4/lz4/releases) available.
266
269
270
+
### Zstd
271
+
272
+
Compression algoritm `5` uses zstd (Zstandard). Source and algorithm details can be found [here](https://github.com/facebook/zstd).
273
+
The following libraries are required by kdb+:
274
+
275
+
| :fontawesome-brands-linux: Linux | :fontawesome-brands-apple: macOS | :fontawesome-brands-windows: Windows
276
+
---|---|---
277
+
libzstd.so.1 | libzstd.1.dylib<br>(available via package managers such as [Homebrew](https://brew.sh/) or [MacPorts](https://www.macports.org/)) | libzstd.dll
0 commit comments