Live data from Hacker News

K7 Tutorial

shakti.com

31–40 of 44 posts

Re: K7 Tutorial

#31
post #29
post #26

Does anyone understand if this is fully compatible with Kdb+? been learning q & it would be nice to add vanilla K7 to the list

It is not. Every k version is in fact a new language (and rewritten from scratch every time). That said, I guess they may implement some kind of compatibility layer at some point.

has been suggested on google group: https://groups.google.com/d/msg/shaktidb/184DnAJrwKU/HnNm3Dd...

Re: K7 Tutorial

#32
post #11

What's the benefit using k vs. c, cpp or java for the same? Does it run or compile faster? The article says you can do the same with cpp and some extra libraries, but I wouldn't immediately think cpp or java was easily beatable -- manjana wonders --

K is interpreted, not compiled. You can run your code the instant it's written.

As other's have said, K (the language and the interpreter) is highly optimized for processing tabular data. I've heard of it outperforming C in processing billions of rows of financial data. (Which, by my understanding, is K's primary market.)

Lastly, K (like APL, J, A+, Klong, Kona, etc.) is very terse. A phrase I've seen online is "one line of K is roughly equivalent to 100 lines of C". K programs, like APL & co., very often fit entirely into a screenful of text, but require close and complete reading to understand. There are lots of videos on youtube of people writing literate sudoku solvers or conway's game of life in a dozen lines or so, and terse solutions in a dozen or so characters.

People who like these programming languages tend to like their terseness -- they can view the entire program all at once (no scrolling or searching), and refactor or rewrite the program in a few seconds of minutes of typing.

Re: K7 Tutorial

#33
post #15

Earlier quoted context omitted.

Have you had a look through the tutorial? Which parts of the tutorial made you feel as if you needed to be a genius to understand it?

Well, the part where it says: > Arthur Whitney's k and its derivatives have served a small number of highly skilled programmers Doesn't exactly start off with an inclusive tone.

As a k programmer myself I'd say to take that statement with a grain of salt and at least give the language a chance if you have some spare time. It's certainly true that the community is small and it's certainly true that there are plenty of really sharp programmers in the community but that doesn't mean that you need to be a genius to write k code.

Re: K7 Tutorial

#35
post #19

Earlier quoted context omitted.

Just in case you want to look at the sources of something similar, here is a good one: https://github.com/JohnEarnest/ok

I like oK because it allows nice toying around with graphics in the browser but while k is incredibly fast, oK is really slow. It is nice to play with and learn from but anything beyond, better check out Kona or another APL like like A+ or J.

I'm not aware of too many folks using A+ anymore as it is pretty ancient and hasn't been updated in a very long time.

Array languages I would consider for actual work are mostly:

Dyalog APL, J, and K if I could afford kdb+.

If I wanted to play with implementations I agree that Ok and Klong are pretty cool.

Re: K7 Tutorial

#36
post #17

Can someone compare this to Dyalog APL?

Dyalog uses non ASCII symbols which are really cool to me and make the primitives very easy to learn. Check out tryapl.org to get a feel for it. You can also download a trial version and there is a free book. They have decent library support and full .NET support too as well as easy parsing for CSV, JSON, XML...etc. They have Dyalog APL notebooks, database access, multiplatform support, parallel and tacit features...etc. If it wasn't $1k a year for a license (honestly pretty reasonable) I'd use it pretty often. It just feels like they love their product and support it from the annual coding competitions, monthly webinars...etc.

J uses ASCII symbols and has a small community of very intelligent users that are stats smart, software smart, math smart...etc. It has great bindings to Lapack, built in graphs (well Dyalog does too) and tutorials called labs. The community is much smaller though and it doesn't have any parallel primitives. J is free to use, but the Jd columnar database is commercial, but very reasonably priced.

Honestly, both are awesome, fun, powerful, and plain cool.

Re: K7 Tutorial

#37
post #9

Alternatively, you can look at the completely free www.Aplusdev.org, "A+" language that was also created by Whitney. There is also GNU APL which I have been playing with and has some good ideas also, including the ability to create scripts.

I would like to recommend Kona[1] as well. It is an open-source K implementation, with some small differences. [1] https://github.com/kevinlawler/kona

Thanks for the reminder. I had seen it before, but I now see that it is active, with the last commit 8 days ago. I compiled it on my Linux box quickly and will be testing it out...

Re: K7 Tutorial

#38
post #17

Can someone compare this to Dyalog APL?

Dyalog uses non ASCII symbols which are really cool to me and make the primitives very easy to learn. Check out tryapl.org to get a feel for it. You can also download a trial version and there is a free book. They have decent library support and full .NET support too as well as easy parsing for CSV, JSON, XML...etc. They have Dyalog APL notebooks, database access, multiplatform support, parallel and tacit features...…

Thanks - my next sabbatical is going to be Rust + APL

Re: K7 Tutorial

#39
post #15

Earlier quoted context omitted.

Have you had a look through the tutorial? Which parts of the tutorial made you feel as if you needed to be a genius to understand it?

Well, the part where it says: > Arthur Whitney's k and its derivatives have served a small number of highly skilled programmers Doesn't exactly start off with an inclusive tone.

It answers this question: if the language is so great and has been around for so long, why haven't we heard about it?

Re: K7 Tutorial

#40
post #3

"Customer shall not, directly or indirectly, and shall not authorize any third party to: (i) decompile, disassemble, reverse engineer, or otherwise attempt to derive the source code of, reconstruct, or discover any hidden or underlying elements of the Software" Looks like I don't want to spend the effort learning it.

Perhaps Nial would be of interest: https://github.com/danlm/QNial7
Post reply on HN