Live data from Hacker News

The Q Language

code.kx.com

141–150 of 161 posts

Re: The Q Language

#141
post #139

Earlier quoted context omitted.

My background is I know too many languages and don't get enough shit done and my need is probably to stop it and get back to work. :) Being slightly more serious, I do web dev, mostly backend, for a radio astronomy observatory. I don't know anything about the science, but I wind up executing their routines in the cluster and doing typical database apps. I don't have much time on the side but I have been enjoying tryi…

I also dabble in Dyalog APL. I have an inexplicable bias for the symbols, however I really like J and the commmunity. I have played with Jd with a trial license, and as said above, J is free and the source is available for scrutiny. I have played with using the J DLLs in my C code. I am always amazed at my takeaway understanding of a mathematics problem after working it out in J. It somehow gels it in my mind, and fi…

I like the APL symbols, but I think we could probably do better today, since we're not as limited by what we can come up with using overstriking.

Re: The Q Language

#142

Earlier quoted context omitted.

I'm confused what the relation is between alt-right ideology ("red pill") and the usual things one does for high performance.

Red pill is originally a Matrix reference...

Yes, and just like Pepe, it has been adopted by a community and no longer means what it originally means.

Re: The Q Language

#143
post #64
post #51

Earlier quoted context omitted.

>My C code has become faster, simpler, shorter and less buggy after I dabbled in K. Interesting. Can you explain why you think that has happened?

Several things: 1. K (and the entire APL family) eschew many of the layers upon layers of abstraction that modern software engineering uses, whether they are justified or not. It turns out, that they are mostly not justified. K gently pushes you toward thinking in a lower level of "what's really happening here?"; I'm not sure I can give a good example here - but the world looks different after taking the red pill. e.…

Also, I had been looking at J (again) recently, and noticed that it has a similar concept of composing operations as K does. I guess it is because both are from the APL family of languages, as shown in the "Influenced" section here:

https://en.wikipedia.org/wiki/APL_(programming_language)

Re: The Q Language

#144
post #117

I worked in Pascal, C/C++, Java, Python, R, Nim, Clojure, Rust, Go, Js, and created various projects in these languages. However, I couldn't get used to Q. I understand that it is fast, and I also started to like the functional programming aspect of it. But oh boy, there is no proper error messages (no, "`type" is not helpful). The short versions of various map and apply were handy, but there are no equivalent versio…

I have worked in C (twenty-five years), C++, Python, Perl (twenty years), JavaScript, Common Lisp (for ten years), OCaml, forth, postscript, and also q/Kdb. I think a lot can be done to improve teaching q/Kdb. The current “best practice” is to change you until it makes sense but this takes time- anywhere from 6 months to a couple years based on your other experiences. And you still have to want to “get it”. I want th…

It might help if it was open-sourced, but I guess experts don't need to trust their tools, merely to use them.

As it is, I give any tool which I can only trust to spy on me a hard pass.

Re: The Q Language

#145
post #143
post #64

Earlier quoted context omitted.

Several things: 1. K (and the entire APL family) eschew many of the layers upon layers of abstraction that modern software engineering uses, whether they are justified or not. It turns out, that they are mostly not justified. K gently pushes you toward thinking in a lower level of "what's really happening here?"; I'm not sure I can give a good example here - but the world looks different after taking the red pill. e.…

Also, I had been looking at J (again) recently, and noticed that it has a similar concept of composing operations as K does. I guess it is because both are from the APL family of languages, as shown in the "Influenced" section here: https://en.wikipedia.org/wiki/APL_(programming_language)

Yes, APL is the ancestor; Arthur Whitney wrote A, a miniature APL interpreter which inspired Roger Hui’s implementation of J (designed by Ken Iverson who previously designed APL).

J optimized for purity, K for practicality.

I remember reading a commentary from Iverson that, despite J’s beauty and theoretical niceness, at least two practical choices made by K turned out to be better:

1. Doing left-to-right scan and fold; this is inconsistent with parsing, but turns out to be significantly more useful

2. K’a minimalistic currying (juxtaposition) is not as nice theoretically as J’a trains and forks, but turn out to be much more useful in practice.

However, I don’t remember where I read that and cannot find the source now.

Re: The Q Language

#146
post #123

Earlier quoted context omitted.

You are right. There is an impassable abyss. I will never agree with anyone who believes that good error messages, analysis tools, or debuggers are not worth having.

> I will never agree with anyone who believes that good error messages, analysis tools, or debuggers are not worth having. Even if they can do things you cannot do? What are you doing here if so freely admit you have a closed mind?

[deleted]

Re: The Q Language

#147
post #21

Earlier quoted context omitted.

> why isn't there an open/libre alternative? see here: http://t3x.org/klong/

I like this "apljk" language one the most. It can feel at times a bit dumbed down compared to K, but it has a more regular syntax.

And it got projection and infix functions recently, so some of its initial clumsiness (compared to K) is gone now.

Re: The Q Language

#148
post #117

I worked in Pascal, C/C++, Java, Python, R, Nim, Clojure, Rust, Go, Js, and created various projects in these languages. However, I couldn't get used to Q. I understand that it is fast, and I also started to like the functional programming aspect of it. But oh boy, there is no proper error messages (no, "`type" is not helpful). The short versions of various map and apply were handy, but there are no equivalent versio…

I have worked in C (twenty-five years), C++, Python, Perl (twenty years), JavaScript, Common Lisp (for ten years), OCaml, forth, postscript, and also q/Kdb. I think a lot can be done to improve teaching q/Kdb. The current “best practice” is to change you until it makes sense but this takes time- anywhere from 6 months to a couple years based on your other experiences. And you still have to want to “get it”. I want th…

I like the q/kdb spirit but not the syntax. I'm building a toy lang based on the ideas.

So, what about build a transpiler? Make a more verbosed variant and transpile to q/kdb.

Re: The Q Language

#149
post #30
post #17

what makes kdb so special and why isn't there an open/libre alternative?

But there are: k variants: kona (C, interpreter): https://github.com/kevinlawler/kona klong (C, interpreter): http://t3x.org/klong/ kuc (C++, JITted): http://althenia.net/kuc oK (JS, interpreter): https://github.com/JohnEarnest/ok (see also iKe by John Earnest) cousins: J (C, interpreter) http://jsoftware.com/ A+ (C, interpreter, unmaintained): http://www.aplusdev.org/index.html Gnu APL (C, interpreter): https://www.…

I will love to have a verbosed variant of the interpreter, like if "Q" were a eso-lang. This for understanding how it work on the internals.

Also, maybe thinking what if make Fortran-like arrays or similar.

Re: The Q Language

#150

Earlier quoted context omitted.

The difference between "#define Z static" and Japanese is that Japanese is an effective method of communicating between 125 million people.

And k/q is an effective method of writing very fast software for domains such as finance understood by thousands of people. Just because you find it strange, it does not mean it's strange. I'm sure you'd find languages in Papua New Guinea difficult at times, and you'd argue English is "better" because more people speak it, and there is a richer literature in it, but the ideas expressed in those languages - and how th…

No one here said it was strange. The original word was 'unhealthy'.

I'd be very interested to learn more about which semantics of APL-derivatives correspond to which of the 4 or 5 distinct meanings of the keyword 'static' in C.

Post reply on HN