

pgyorok
Forum Replies Created
-
The “char” type can only hold a single character. So if you try to convert an input string that contains more than one character, such as “10”, it becomes the null value for char which is the space character. This is similar in principle to trying to convert a non-numeric string into a number.
-
This reply was modified 3 days, 1 hour ago by
pgyorok.
-
This reply was modified 3 days, 1 hour ago by
-
This is very little to go on. You could check the official documentation of the IPC protocol at Interprocess communication | Developing | kdb+ and q documentation – kdb+ and q documentation. A Python implementation supporting protocol version 6 is qPython/qpython/qreader.py at main · finos/qPython · GitHub.
If this is about on-disk serialization, that format is not documented and the only supported way to read it is to launch a q process and use the built-in function `get`.
code.kx.com
Interprocess communication | Developing | kdb+ and q documentation - kdb+ and q documentation
TCP/IP is used for communicating between processes. The protocol is extremely simple, as is the message format.
-
Indeed the doc is inaccurate in that it’s not the byte or character type itself that can hold unicode characters, but the lists of these types can by virtue of having a character span multiple elements of the list.
-
Unfortunately I’m not familiar with the library code, but “getaddrinfo ENOTFOUND” would indicate that the host name that you provided is incorrect. If this is appearing consistently, check if the host name is correct. If it’s intermittent, you might have a problem with the DNS in your environment.
For the “cb” error, it could either come from the connection library or be returned as an error message from the server. Can you try to connect using a plain q process to see if you get the same error? It might be coming from the client query handlers that try to access a variable named “cb” when it’s not defined – do you have handlers such as .z.ps and .z.pg set on the server?
-
Can you please share your code?
-
File compression | Database | kdb+ and q documentation – kdb+ and q documentation (kx.com)
- Use set and not gzip: they produce different results.
code.kx.com
File compression | Database | kdb+ and q documentation - kdb+ and q documentation
How to work with compressed files in kdb+
-
Without seeing your code, it is hard to determine what the problem is, but most likely you are reaching the limit on local variables, constants or global references in the function.
Errors | Basics | kdb+ and q documentation – kdb+ and q documentation (kx.com)
code.kx.com
Errors | Basics | kdb+ and q documentation - kdb+ and q documentation
Errors signalled by the interpreter, and what triggers them
-
Do you have the QHOME environment variable set to the directory with the license file?
-
pgyorok
MemberAugust 5, 2024 at 9:11 am in reply to: Process requests before continuing with scriptIn order to process incoming connections, the q interpreter must be in its main loop, which will not happen if it is executing code (e.g. the while loop). So if you have code that must be run after such interaction, you will have to come up with a dependency system to execute the code after certain conditions are fulfilled. One example of this is inithook (kdb/q/inithook at main · finos/kdb · GitHub).
The q process will stay alive as long as it has at least one input handle open – that could be the IPC port but also stdin, so if you make sure that your process has a stdin (e.g. by running it in docker with the -it options) it will stay alive. However there should not be a problem with opening a port just to keep it alive. Use \p 0W to open a random port without the risk of hitting a “port already in use” error. If the concern is random processes connecting, you could use firewall rules to block incoming connections or set the .z.ac/.z.pw handlers to always return false so all connections are rejected.
-
You can find some details here:
Interprocess communication | Developing | kdb+ and q documentation – Kdb+ and q documentation (kx.com)
Serialization examples | Knowledge Base | kdb+ and q documentation – Kdb+ and q documentation (kx.com)code.kx.com
Interprocess communication | Developing | kdb+ and q documentation - Kdb+ and q documentation
TCP/IP is used for communicating between processes. The protocol is extremely simple, as is the message format.
-
The meaning of / depends on the arity of the function being modified. If it’s a unary function, that function gets called again and again passing in the result from one invocation as the argument to the next one.
For a binary function, the meaning would be to apply the function between the accumulator and the next element in the input list – however in this case when you call the iterated function, you have to pass in an initial value and the list to iterate over. If you just pass in one argument, you create a projection.
-
This is the standard behavior. Over only returns the last element, while scan returns the result after each step in the computation.
Accumulators – Reference – kdb+ and q documentation – Kdb+ and q documentation (kx.com)
-
It’s the type indicator for “long”. You can omit it as that is the default type, but only for 0N with a capital N (0n would be float).
-
I think those are for IPC serialization, which is completely different from the on-disk format. Some types are represented on disk with multiple files – how would that information come back from the serialization function or be passed into the deserialization function if they only return/accept one byte array?
-
pgyorok
MemberAugust 12, 2024 at 9:17 am in reply to: Process requests before continuing with scriptHandle 0 triggers .z.ps, not .z.pg.