6

I find that when launching q from cygwin underneath mintty, the console generally seems to work, however the q) prompt is not displayed. I am just met with a blank line.

I have the latest cygwin, and the latest mintty terminal.

Note that when I launch cygwin using cmd, the q) prompt is there. Just not under mintty. So I have a viable, but not ideal workaround. Various aspects of mintty are coded deep into my muscle memory.

mintty's wikipedia entry states:

Since [mintty] is not based on the standard Windows console, however, programs written specifically for that do not work correctly in mintty

So I suspect that is the cause here. But was wondering if anyone has been able to get kdb/q to work in this setup.

In summary, can the q interpreter be made to fully work under mintty?

pamphlet
  • 2,054
  • 1
  • 17
  • 27
  • 3
    This site is so weird. Is this really such a poor question? I could be the 1000000th visitor to ask how to sort a list in Java and people would be climbing all over each other to answer. And all I get here is a drive-by down vote with no suggestion on what's wrong with the question. – pamphlet May 14 '14 at 23:42
  • +1 for good response to a -1 :) I think this could be common problem so deserves an answer. I don't have one though, unfortunately. – Manish Patel May 18 '14 at 10:51
  • 2
    I don't understand your question. Mintty _is_ the default terminal for Cygwin. What do you think is the default terminal, or what are you using for a default? Also, how did you install q? – pak Sep 09 '15 at 04:50
  • Thanks for the feedback, @pak. I've edited the question to clarify... by "default terminal" what I really meant was "cmd". I installed q the typical way (download from kx and unzip). – pamphlet Feb 27 '16 at 21:52
  • Does q still work despite the lack of a prompt? Frankly, I don't know the answer. You might try asking on the [Kdb+ Personal Developers forum](https://groups.google.com/forum/#!forum/personal-kdbplus) and posting back here if you get an answer. – pak Feb 27 '16 at 22:45
  • Thanks, @pak. It works somewhat, but the prompt can contain valuable debugging context, so it's hobbled at best. Thanks for the suggestion about the forum. – pamphlet Mar 02 '16 at 23:56

1 Answers1

2

I realise this is quite an old question, but in case anyone comes across this in future, here's a solution.

You can make use of the "winpty" package from https://github.com/rprichard/winpty/releases

You will want to download the latest 32-bit or 64-bit Cygwin version, depending on which version of Cygwin you have installed. You can then extract the downloaded .tar.gz file into the cygwin installation dir (e.g. C:/Cygwin64)

Once you've done this, you can run q with winpty q e.g.

user@computer ~
$ winpty q
KDB+ 3.5 2017.03.28 Copyright (C) 1993-2017 Kx Systems
w32/ 4()core 4095MB user computer 192.168.1.118 NONEXPIRE

q)1+1
2
q)
Jonathon McMurray
  • 2,881
  • 1
  • 10
  • 22