2022.03.08 05:27 PM - edited 2022.03.08 05:28 PM
In the following whitepaper: https://code.kx.com/q/wp/rt-tick/
There appears to be a discrepency between what they have placed in the first argument of .Q.hdpf
Here's the two images:
Above it says: `$":"
Below it says: `:localhost:5002
IS " `$":" " A SHORTCUT?
2022.03.08 06:55 PM
The RDB is started via the command line like so:
q tick/r.q localhost:5000 localhost:5002 -p 5001
The first argument to .Q.hdpf refers to the location of the HDB process. The variable .u.x refers to the tickerplant and hdb ports (type string) generated from .z.x (command line args) as seen here https://github.com/KxSystems/kdb-tick/blob/master/tick/r.q#L9
Therefore, joined together, ":",.u.x 1 is ":localhost:5002". This is then casted to a symbol to create `:localhost:5002
q)":",.u.x 1
":localhost:5002"
q)`$":",.u.x 1
`:localhost:5002
2022.03.08 05:52 PM
the first argument is
`$":",.u.x 1
so depending on the first member of .u.x list it might become `:localhost:5002
2022.03.08 06:55 PM
The RDB is started via the command line like so:
q tick/r.q localhost:5000 localhost:5002 -p 5001
The first argument to .Q.hdpf refers to the location of the HDB process. The variable .u.x refers to the tickerplant and hdb ports (type string) generated from .z.x (command line args) as seen here https://github.com/KxSystems/kdb-tick/blob/master/tick/r.q#L9
Therefore, joined together, ":",.u.x 1 is ":localhost:5002". This is then casted to a symbol to create `:localhost:5002
q)":",.u.x 1
":localhost:5002"
q)`$":",.u.x 1
`:localhost:5002
2022.03.12 01:35 AM
The complete call in the white paper is .Q.hdpf[`$":",.u.x 1;`:.;x;`sym]
.
The first argument is `$":",.u.x 1
. From the .Q.hdpf
documentation we see the first argument is a port for the HDB. It looks like .u.x. 1
is that as a string; for example "localhost:5002"
.
`$":",
prefixes a colon and casts to symbol, creating a handle.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.