I have a binary file composed of variable-length records with each record starting with a 4 byte record type identifier followed by a 4-byte length (little-endian) then the data.
I’m trying to find the record boundaries. Using this code:
I thought about that too. My problem with DLLs is that you can’t rebuild a DLL as long as any application is using it, so I have to close every q process that has the DLL loaded.
június 19., hétf? 21:31:41 UTC+1 id?pontban Alexander Belopolsky a következ?t írta:
I cannot think of any faster q code, but your C++ code can be trivially modified to define a function that can be called from q:
#include<stdint.h>#include "k.h"K1(tags){ J i = 0; K r = ktn(KJ,0); while (i < xn) { ja(&r,&i); i+=8+*((uint32_t*)(xG+i+4)); } R r;}
Don’t. Make your code perfect the first time you save it. :-)
Save different versions under different names by incorporating the version number in the DLL name.
Give each process its own private copy of the DLL.
While it is possible to modify q code of a running process, it is rarely a good idea. The added benefit of the restriction on rebuilding the DLLs is that it promotes sound software development practices.