3 ms·
1. If you are using a database then it's not an argument for the language, I think. The database is a piece of the language, though, and the language ships wit
by kick 7y ago
1. If you are using a database then it's not an argument for the language, I think.
The database is a piece of the language, though, and the language ships with it. Python has a lot of very complex things in its standard library; C without a standard library is foreign to most programmers. Why do they get a pass while k doesn't?
It can work better for you, yes, but it's very possible that it's just that you're used to it and you don't notice the extra burden of dealing with that code.
It's not like 'geocar is foreign to writing in other languages. His GitHub (github.com/geocar) is full of projects in other languages, some fairly recent. This may make sense as an accusation for someone who doesn't write any other code, but I don't think it's a fair accusation here.
If there was some intense burden from writing k in comparison to ALGOL-like languages, would 'geocar have written an operating system in it rather than C? That doesn't seem apparent to me.
- gjulianm 7y ago> Why do they get a pass while k doesn't? When we are discussing languages, they don't get a pass. Python has a great math library with Numpy, but it doesn't mean that the language itself is optimal for math-related problems. And specifically in that example, using an external database when defending the speed of the language... meh. It's as if I said that Python is very fast and showed a Numpy calculation. > This may make sense as an accusation for someone who doesn't write any other code, but I don't think it's a fair accusation here. It's not about writing or not other languages. It's about being so used to something that you don't notice the burden. I am very familiar with some of the projects and languages I work in and I feel comfortable with the codebase, and I get used to the mental burden of working with them and I end up not noticing it. It doesn't mean it is not there. > would 'geocar have written an operating system in it rather than C? Has he? Couldn't find anything (I'd like to see it, honestly, seems a fun experiment).
- kick 7y agoAnd 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!