4 ms·
And specifically in that example, using an external database when defending the speed of the language kdb isn't written in an external language. Has he? Could
by kick 7y ago
And specifically in that example, using an external database when defending the speed of the language
kdb isn't written in an external language.
Has he? Couldn't find anything (I'd like to see it, honestly, seems a fun experiment).
Not entirely him, of course. There are a few remaining files on kparc.com:
kparc.com/z/
kparc.com/$/
so on.
Not free software, and they seem reluctant to show it off. 'geocar has done a live demo of a primitive version, though: https://www.youtube.com/watch?v=kTrOg19gzP4 https://www.youtube.com/watch?v=kTrOg19gzP4 (2014)
The archive is more interesting:
https://web.archive.org/web/20130830071750/http://kparc.com:80/ https://web.archive.org/web/20130830071750/http://kparc.com:...
- gjulianm 7y ago> kdb isn't written in an external language. But it's an external database with its code and its optimizations. In this case it seemed that it was just doing a binary search, but it was using an already sorted dataset that the OP of that comment wasn't using. > kparc.com/$/ Well, I can't get anything out of this. See http://kparc.com/$/file.k http://kparc.com/$/file.k. The language is cryptic and the variable names are even more cryptic. It's really hard to see what does this code even do. I can't honestly believe anyone that says that's a good way to create code.
- kick 7y agoBut it's an external database with its code and its optimizations. In this case it seemed that it was just doing a binary search, but it was using an already sorted dataset that the OP of that comment wasn't using. I again point to the C standard library. Modern standard-compliant C can do almost nothing without it. I don't even think it can handle IO without it. The language is cryptic and the variable names are even more cryptic. You're thinking of it in a light that doesn't help you understand; don't think of it as a variable, think of it as a definition. "jk is defined as..."
- gjulianm 7y ago> You're thinking of it in a light that doesn't help you understand; don't think of it as a variable, think of it as a definition. "jk is defined as..." I was just trying to read the code for "file" and see if I understood a little bit of the implementation they did. In this case I don't even know where even is the function that opens a file or writes to a file. I don't think that's good code and I don't believe that thinking of it in terms of a definition is going to help.
- geocar 7y ago> But it's an external database with its code and its optimizations. You're completely mistaken. It's not an "external database". That's a regular, ~600kb interpreter download from kx.com Those lines are all the lines typed into a q) prompt one at a time on my laptop (A 1.6ghz macbook air). > In this case it seemed that it was just doing a binary search, Yes. That's all okon does as well, they just do it over a B-tree instead of a contiguous list. If you read the writeup you'll see the author actually eschewed using a contiguous list for reasons of random insertion then took to a B-tree generation algorithm that couldn't handle unsorted input. I suppose they just forgot what they were doing at some point. > but it was using an already sorted dataset that the OP of that comment wasn't using. Again, you're mistaken. The author (Stryku) might not have known the sorted file existed, but the first thing they tried to do was sort it. They just had a problem sorting a 22GB file because they were using terrible tools. They had to make tools because they didn't have any good ones. The rest of their algorithm took advantage of the fact the input (to these later stages) was sorted. > Well, I can't get anything out of this. > I can't honestly believe anyone that says that's a good way to create code. I spent 5 minutes to write something (in q) someone else wrote over twenty days (in C++). I can't honestly believe anyone that thinks spending twenty days on a problem is better than five minutes. If you can't get there, it's going to be really hard to talk about what's amazing in k!
- gjulianm 7y ago> I can't honestly believe anyone that thinks spending twenty days on a problem is better than five minutes. Nobody thinks that and I didn't say that. I was talking about that specific file (although the rest of them are equally unapproachable). > If you can't get there, it's going to be really hard to talk about what's amazing in k! Well, the thing is that at this point the only amazing things that have been talked about is that it's fast (in some specific use cases of data queries) and extremely concise. What more there is to K? What more reasons are there to use it, and with which downsides does it come with?
- geocar 7y ago> Nobody thinks that and I didn't say that. I was talking about that specific file I hope nobody thinks that, but unless you can come to terms with the fact that you're wrong, and that this is a completely fair comparison, you're going to be the guy who writes okon2 at some point instead of using a better tool. > the only amazing things that have been talked about is that it's fast (in some specific use cases of data queries) Those weasel words are preventing you from seeing what should be obvious: The k program is faster, shorter, obviously correct, and it took less time to write. That's the amazing thing. Who doesn't want that? > What more reasons are there to use it? This is the wrong way to think about things, because there's an infinity of such reasons. Instead, invert it: You should always use the best tool you can. If you don't know k, it can never be used even if it would otherwise be the best tool. I don't recommend people use k (except when it works), but I recommend people learn k because it'll make them better programmers. > which downsides does it come with? The biggest downside is that you don't know it, and the only person who can fix that is you