"Kerf is a programming language built on pragmatism, borrowing ideas from many popular tools. The syntax
of Kerf will be familiar enough to anyone who has programmed in C, Python or VBA. Data is described
using syntax from JSON (JavaScript Object Notation), a text-based data interchange format. Queries to
search, sort and aggregate data can be performed using SQL syntax. Kerf’s built-in commands have aliases
which allow programmers to use names and terms they are already used to."
seems vaguely parasitic to be using github to distribute closed-source binaries, not just for the bandwidth hit, but more so for trying to use the open source ecosystem to gain mindshare for a closed product.
Market segmentation, premium pricing, signalling, etc. Basically, when your product is good, you can charge more for it. Free is a great price to get exposure, but unnecessary for extraordinary profitability (see Kx).
Ha! I've asked the question about existence of something like Kerf quite a while ago[1]. Good to finally have an answer other than "it is not really needed".
Nial is a good example of a Kerf-like language, but I don't think you can download it at present.
There's a way to make J look more readable, but by the time you're able to accomplish this, you can read the J runes, and have realized the syntax sugar just slows down the parser.
Syntax sugar also slows down the REPL experimenting way of "growing" J scripts.
Yes, it's harder to read... You can combine wise naming scheme with good use of spaces - and also short lines, which anyway carry a lot of work - to make programs more readable. Comments are also available :) - in fact, I found that J really encourages the literate programming style. As they say, "in APL you solve a problem in 5 minutes, then spend an hour trying to write a most elegant and short solution". Indeed.
thanks. I've seen that before, but for some reason I kept assuming that it was different than an actual k interpreter because none of their docs refer to the K language.
Good intro Scott. I just start playing with Kerf and it seems to me a pretty well written piece of software with potential. I like the json style assignment. Will keep an eye on this.
I don't think the authors claim that "The only thing comparable to it from an engineering standpoint are the other APL based databases such as KDB and Jd" is correct, at least not based on this blog post. Numpy+pandas also seems pretty similar, as is breeze, and Julia has similar features also.
Let me emphasize that while I'm about to implement most of his blog post in numpy/pandas, I don't mean to come off as critical or dismiss building a new one. Kerf looks pretty cool. I just don't think this post gives much reason to believe there is nothing comparable to it.
arange(1,6) is equivalent to his range(5), and full((5,), 1) is equivalent to repeat(5,1).
The SQL-ish engine looks fairly similar to pandas:
df = pandas.DataFrame({'a' : arange(5), 'b' : ['a', 'b', 'c', 'd', 'e']})
#Result is:
a b
0 0 a
1 1 b
2 2 c
3 3 d
4 4 e
df[df.a > 2]
#Result is
a b
3 3 d
4 4 e
Pandas similarly has joins, averages and other aggregates, etc. E.g.:
SELECT * FROM df1 INNER JOIN df2 ON df1.a = df2.b;
Syntactically it's a bit different (embedded SQL is pretty cool) but from this blog post I don't see any major semantic differences.
However, if there are important differences under the hood, I'd love to hear about them. Again, I'm really not trying to criticize Locklin for rolling his own, I'm just disputing a minor point.
There are lots of "table" like solutions out there: R's data.frame and data.table are obvious examples.
Speed, the ability to persist data as an actual database system, and the ability to work with data "out of core" would be the advantages over Pandas. I'll be releasing various performance comparisons over coming weeks to demonstrate these advantages.
Cool, any chance you'll write a blog post discussing that? Being a good column oriented DB combined with a decent vectorized language is definitely not something so easy to find - blaze purports to be that system (sort of), but it isn't really living up to the hype.
Gonna grab the current binary to play around with, I love learning new styles of programming and kerf seems rather approachable compared to the others in it's family.
25 comments
[ 0.32 ms ] story [ 58.4 ms ] thread"Kerf is a programming language built on pragmatism, borrowing ideas from many popular tools. The syntax of Kerf will be familiar enough to anyone who has programmed in C, Python or VBA. Data is described using syntax from JSON (JavaScript Object Notation), a text-based data interchange format. Queries to search, sort and aggregate data can be performed using SQL syntax. Kerf’s built-in commands have aliases which allow programmers to use names and terms they are already used to."
Kerf github: https://github.com/kevinlawler/kerf
[1] https://news.ycombinator.com/item?id=7890931
There's a way to make J look more readable, but by the time you're able to accomplish this, you can read the J runes, and have realized the syntax sugar just slows down the parser.
Yes, it's harder to read... You can combine wise naming scheme with good use of spaces - and also short lines, which anyway carry a lot of work - to make programs more readable. Comments are also available :) - in fact, I found that J really encourages the literate programming style. As they say, "in APL you solve a problem in 5 minutes, then spend an hour trying to write a most elegant and short solution". Indeed.
This version is technically unrestricted, but cannot be used for commercial purposes.
Let me emphasize that while I'm about to implement most of his blog post in numpy/pandas, I don't mean to come off as critical or dismiss building a new one. Kerf looks pretty cool. I just don't think this post gives much reason to believe there is nothing comparable to it.
Idiomatic numpy:
Less idiomatic, but analogous to kerf or J: arange(1,6) is equivalent to his range(5), and full((5,), 1) is equivalent to repeat(5,1).The SQL-ish engine looks fairly similar to pandas:
Pandas similarly has joins, averages and other aggregates, etc. E.g.: is equivalent to: Syntactically it's a bit different (embedded SQL is pretty cool) but from this blog post I don't see any major semantic differences.However, if there are important differences under the hood, I'd love to hear about them. Again, I'm really not trying to criticize Locklin for rolling his own, I'm just disputing a minor point.
That's what the APL world brings to the table.
FWIIW, you can read about my comparing Jd (another APL related columnar database) to a Blaze like tool (Spark bigDF) on the J list:
http://jsoftware.com/pipermail/database/2015-May/000076.html
Gonna grab the current binary to play around with, I love learning new styles of programming and kerf seems rather approachable compared to the others in it's family.