kdb+/q & k9 professional extension for vscode
kdb+/q extension for vscode
A zero dependency javascript Node.js package to interface with kdb+/q (v2.6+).
vscode kdb+/q extension
License: GNU General Public License v3.0
There seems to be a half a second delay before displaying the result of any query, even to a local q server. For example, the query might take 5ms to execute but it takes much longer to show the result in the q Console. The low responsiveness masks the visual interpretation of the responsiveness of the query, which hurts development.
Do you know if this a VS Code limitation or something that can be fixed inside the extension?
I checked https://github.com/jshinonome/vscode-q/blob/v2.3.6/src/client/modules/query-console.ts#L27 but couldn't find any artificial delay.
Fails to initialize language server if no permission to 'stat' folder.
mainThreadExtensionService.ts:66 Error: Request initialize failed with message: EPERM: operation not permitted, stat 's:\afolder/hdb'
at c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:65923
at c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:66217
at Immediate.<anonymous> (c:\dev\vscode_extensions\extensions\jshinonome.vscode-q-1.7.1\dist\q-ext.js:3:66576)
at processImmediate (internal/timers.js:439:21)
steps to reproduce:
create 2 q file:
fist.q
fun:{[a;b] a+b}
second .q
fun[1;2]
go to second.q -> f12 -> all will be ok
rename first.q -> first_renamed.q
go to second.q -> f12 -> Unable to open 'first.q': Unable to read file '........first.q'
Ability to copy a single cell or multiple rows would be great in query Grid view using ag-grid
I am using VS Code January 2021 (version 1.53) with vscode-q v2.1.1
I added some remote and local sever and created table, I can run query but where is "Query View" mentioned in document? It will be great if you could please mention or am I missing additional extension.
Could I have a setting option to disable output console when I open a q file?
I just edit a q file。😂️
A lot of devs write q code as one unformatted line.. sometimes it's quite hard to parse)).. will be good to have code formatting as in other popular languages like java,c,....
There is an issue with
enlist `d`p!(2019.11.24;2019.11.24D)
Feature request
It would be great if you could have a folder structure in the server list for better organization.
When querying the timestamp field in table, if the timestamp value has .999 in it.
In the q console:
q)t2:2016.01.13D17:11:29.99900 2016.01.13D17:11:29.9900 2016.01.13D17:11:29
and in VS Code:
([] time: t2)
Also when you save the table to csv the timestamp value is stored as -1
This only appears to impact the query view tab for the table. The console view returns the timestamp correctly.
Would be good to have Ctrl+q automatically advance the cursor to the next line, so that I can execute line by line using only Ctrl+q, without having to move the cursor myself.
A stretch goal (but I think this may be more challenging) is to have the language server recognize the boundaries of an expression, which may exist across multiple lines, and have Ctrl+q execute the expression that the current line is a part of, and then move the cursor to the start of the next expression.
When using the virtualization and run some query to show the table details, like "select from tb where date=.z.D-5", the query itself is finished in kdb, but the status still shows running in vscode side. In result, neither could I see the results of query, nor could I run other queries.
Is there a way to stop the running in vscode side? What I can do in this case is just close the vscode and restart a new one, which is quite annoying.
Thank you in advance if you can help on this issue!
Enhance q grid
Hey just started using this extension. Really helpful, thanks a lot for sharing.
Had one problem that seems to be takes very long time on initial connection to server to recursively build the server explorer table, code for that appears to be defined here:
vscode-q/src/client/items/q-dict.ts
Line 105 in be600e1
Lazy fix would be if someway to have option to disable this server explorer.
Will take a closer look to see what part is taking so long and try and replicate.
Thanks
Prerequisite:
When the user resumes from sleep, the extension still thinks the q server is connected, and allows you to execute a query. Once doing so, it immediately says "Lost connection to..." but the query remains in executing state on the extension's side. Because of this, even after reconnecting, it says "Still executing last query" and the only solution is to restart VS Code.
Could this be improved so that the busy attribute
vscode-q/src/client/modules/q-conn-manager.ts
Line 147 in 97714fd
Additionally, the extension should attempt to gracefully reconnect to the server if the connection was lost to make this an even more pleasant developer experience.
Hi, I think you need to add new tool for data visualization or modify Query View because 50% of data in Query View and console are different ... i understand that it's by design but not expected ....
I can use console but in 30% cases console is not really useful because i have a lot of columns…..
regarding Query View again ...
as an example I can't compare bid ,ask, price ....
t:([]bid:1.443 1.443 1.443; ask: 1.447 1.448 1.446)
vscode-q is cool.
Would be good to be able to choose a q server from the server list via keyboard. Be able to stay completely in the keyboard without moving the mouse would be nice.
Hello,
Thank you for creating this wonderful extension! I was wondering if you would consider adding a configurable shortcut for at least the "run selected line(s)" command:
I used qStudio for a long time which uses CTRL+E (CMD+E on macOS), and there is another vscode extension https://github.com/real-xidaozu/vscode-kdb-q that follows this tradition. It would be helpful for any users who prefer to keep using their muscle memory.
If it is already possible to configure shortcuts for these, would you mind pointing me in the right direction to do that? :)
Also, two more related things:
Thanks again for your time.
Connect to a remote box with a different timezone, the time on Data View looks weird...
The root cause could be with the new version vscode, I will investigate.
will be really useful to add some tools like debugger, breakpoints , watcher...
FYI : You can use open source debugger from Andrey K https://github.com/quintanar401/dbg
.Q.bs[function name; position of characters of function string def]
This can only be triggered after the function is defined.
I get Failed to find any source files using the glob "**/src/**/*.q,**/qcode*/**/*.q". Some feature will not be available.
warning every time I open different folders in vscode. Can this extension be silent on the projects that don't have q code?
Tip: you can set activation point to opening q-lang file instead of traversing entire project.
It seems that the newest update which changed the server create UI has a regression.
No matter what address I put in the hostname field, it always ends up creating the entry against 127.0.0.1. For example, if I choose 192.168.1.1 as the hostname and 6000 as the port, it will create it as 127.0.0.1:6000 and the connection will fail.
When I go back to re-edit, it shows a blank hostname with "localhost" as default text. I tried re-entering the hostname and then using create/update, but after submitting the issue persists and upon re-checking, the hostsname field continues to be empty.
Hi Jo,
Thanks again for the continuous help. I was wondering if it makes sense to you for the below features (let me know if I missed it and it's already there). Totally open to discussion and np at all if not feasible for this extension. :)
Bob
Hi Jo,
Thanks a lot for the great extension. I installed the 2.2.4 version (the latest version that is compatible with my VS Code ver 1.56.2 Windows PC at work), all features work fine (e.g. ssh to linux box, code highlighting, editing/saving files on the linux box, etc) except for connecting to q/kdb session launched on the same remote linux box.
I specified hostname/port/user/password in the dialogue to add server, and once I hit create, I got below error (actual contents in '[]' are omitted).
error accepting token gss major 589824 invalid token was supplied, gss minor 0 unknown error
gss error authenticating user
a connection failed with following information user
host`handle!([myusername];[myhost];[myhandle])
With another IDE kdbStudio, I verified that the host/port/username/password I put in are correct: if I set auth method to "username and password", I got exactly the same error as above. But if I set auth method to 'Kerberos', it connected to remote q session fine. So I was suspecting if it's the same auth method problem that caused the failure in connecting to q session with your extension.
Could you please kindly shed some light? And if it's indeed the auth method problem, would you be able to add Kerberos as an option for auth method, so user can not only specify host/port/username/password etc but also auth method ('username & pasword' or 'Kerberos')? Many thanks!
Bob
PS: one punch man rocks!
For example in a menu when right-clicking on a server or via toolbar button(s).
For comparison, KDB Studio has 3 different ways to choose what to send to the server using 2 different commands:
All 3 have their uses, e.g. full text to load an entire script into an empty q process, selected text to send a multiline function, and single-line to execute simple statements as it’s easier to put the cursor just somewhere on the line than selecting the line from start to end.
I think your recent change for customized auth requires jshinonome.vscode-q to be published to the marketplace.
When I attempt a server connection:
Customized Auth Plug(jshinonome.vscode-q-auth) is not found or not activated yet
i guess you are using label as unique id in the server list instead of tag + label...
so steps to reproduce:
I have
TAG1 -> myLabel->localhost:1444
TAG2 -> myLabel->remote host:1444
i will always connect to same server
as workaround i can use different labels
Hello,
recently (maybe since 2 weeks ago?) I just found that I kept getting the error notification saying "Unable to fetch variables from [my q port number]". Besides that, querying and everything else seem working just fine. I'm wondering if this is a known issue or maybe I'm missing something?
I don't have any major changes in q (company managed) or vscode so far as I know.
Is there any further information that I can provide to better diagnose this problem?
Would be good to get syntax highlighting and ctrl+* functions to work with .quke files.
Stretch goal would be to integrate the test results into the gui somehow.
To analyze files loaded by
\l
system "l ..."
aim to make a webview to show data profile like this
https://pandas-profiling.github.io/pandas-profiling/examples/master/features/website_inaccessibility_report.html
If possible...
Hello, thanks so much for your work.
Recently, I tried to highlight "attention" and "todo". I followed all the steps in https://github.com/jshinonome/vscode-q#enable-highlight-for-attention-and-todo-of-comments . But apparently, red attention highlight is not working for me.
Any suggestions? tyvm
GIFs are not the best choice for presenting the functionality of the plugin in the readme. The best would be a series of screenshots, with (searchable) text in between that explains what is happening. But even an embedded video is better than a GIF because then you at least get to start/stop/rewind etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.