Uh and then K9 showed up. The K7 community, I think, I don't I don't know really what the state of it is. So now there's there's K7, which at one point had a big community around it, K4, which is behind Q. Yes.
BryceThis is an interesting software governance model.
ConorWelcome to ADSP the podcast, episode 96, recorded on September 19th, 2022. My name is Connor. Today with my co-host Bryce, we talk about the K programming language. Dear listener, we it is September 19th, 2022. The last time we recorded was August 15th, 2022. It's been over a month. Much has happened in the last month. I almost died. Yes, that's right. And then we met up in New York. And then are we gonna talk about the thing?
BryceI think we should do that. I think we should talk about that next time because that's gonna require you're gonna need a good long period of time to troll me.
ConorOh. Okay. Yeah. So are we allowed to are we allowed to get the thing?
BryceMy girlfriend is going through some. There's gonna be some background noise. But you know what? That's part of the show. You get you get my real life.
ConorThat is um, um I'm talking away from the mic now. So wait, are we allowed to give the listener a preview at least of the thing we said we might talk about?
BryceHang on, hang on, hang on. Was that the chocolate? Yes. Alright, bring me some chocolate.
ConorI'm leaving that in the episode. There's that's not getting edited out. You better be careful about what you say here, Bryce. Um this is poor planning on your part, clearly. I happen to be uninterrupted for the next 90 minutes.
BryceWell, okay, so look, look, the plan was for me to go up to a different floor where I could record this. I only get one. Um, but uh I'm I'm gonna be honest. I um I I only really put on underwear today, and I I threw on this this exercise shirt. I just couldn't be bothered to put on clothes to go upstairs.
ConorAlright. Alright, we will uh well we'll let the listener react to that on the Twitter forums, etc. Are we gonna we're gonna preview what we're talking about? We'll just we'll mention the topic, because it is topical.
BryceDrama Shakespeare.
ConorOh no, no, no. That's not even what I was talking about. What were you talking about? I was talking about the other thing. Uh the listener's gonna be upset if this does, if now they're gonna be like, what were they talking about? The thing that I DM'd you about, and I said, Oh, are we gonna be talking about this? And then you replied, all right, he's got his finger up. I'll let him finish eating his chocolate and then he can respond.
BryceYeah, I think we should talk about the Val programm language. And I heard about this other thing called Jaxed. Have you heard about that at all?
ConorIt's Jackta, J-A-K-T. So what was that announced? Uh I mean, Jackta's been a thing dormantly for a while that exists, I believe. Is it in um Andreas Andreas Kling's uh Serenity OS? I think that's where it comes from. And they've been designing this. I mean, I should look that up. Yeah, SerenityOS slash Jacked, a repository in the Serenity OS uh GitHub, um, because that's an org, I'm guessing.
BryceYeah. So so okay. Um sure, we should talk about all the new C successor languages. Um but uh let's talk about Val today. And then what I think we should do.
ConorWait, wait, wait. We're not we're not we're not hopping in, we're just talking about what we're gonna talk about. We're not actually talking about anything yet. So you want to talk about Val today?
BryceUm yeah, but but okay, he here's my broader idea. We should bring Sean Baxter onto the podcast to talk about Circle and all these other new languages, because I know he's checked them all out. And also, Sean Baxter is just a fun time. And we can have Sean tell us about Moby Dick, which is one of Sean's favorite subjects. So I think that's what what we should do.
ConorAlright. So we're not talking about New York today. We're not talking about how I almost died, we're not gonna talk about all the exciting things that have happened recently. What we will talk about, um, oh yes, and I was gonna mention you got put on thin ice last time because you were eating when Kate was here. I'm gonna bring Jason on. I'm gonna test him out for a couple episodes, okay? And uh we're gonna we're gonna see, you know, do I prefer Bryce? Do I prefer Jason?
BryceAnd uh almost almost anybody would be a better co-host than Kate. I'm constantly late. There's constantly background noise.
ConorYou started off, you started off great, and then uh you've just become a lot more late. You did, you did. I mean your mic quality was bad, but uh your uh what do they call it? Punctualness. I'm not even sure if that's the noun version of punctual. Uh punctuality? Who knows? Um but, anyways, we're gonna try out Jason. What happened though? Um I can't remember, you said something that made me think of this. One thing we do have to mention is that on Reddit, uh a few days ago now, someone asked the question are there any good podcasts about C.
BryceOh, this is too meta. This is too meta.
ConorAnd a bunch of people, oh yeah, that's what that's what happened is that you said something about, oh, you know, it's just uh the way our podcast operates, and then made me think about a few of the comments. So I replied, but I'll read my reply after I scan. So um the top comment was by Jake Arkenstahl. I hope they don't mind that we're uh calling out their username on Reddit, and says, for Chatty, ADSP is great. There's a lot off-topic casual content, but that's what podcasts usually are. Thanks, Jake. That's very kind of you to say. But then that was generous. Yeah, then someone else, JV Apen, they said about us, and I thought this was the best like six or seven words summary, uh, maybe other than a discussion with Sean Perrent, which has become less true seeing as we haven't had him on in you know 20 or episodes or so. ADSP the podcast, and then in parentheses, the explanation of us. Chaos and chatting with sprinkles of information. I thought that was fantastic. Um maybe that might add that to the website as like our the byline the byline. Chaos and chatting with sprinkles of information. Um, fantastic. Anyways, I will link this uh Reddit post because there's lots of good stuff. I sort of densified everything and added links to CPP cast, CPP chat, ADSP, Tooth Compliment, TLB, TLB hit, no diagnostic required, and C Club. Didn't actually know about that one, although I managed to listen to all 28 episodes on in two days. Of course you did.
BryceI have a question. Have we actually talked about the K programming language on this podcast before? The K programming language? That's the one that's behind you, right?
ConorUh no, that's Q. I mean, they're tightly related. K programming.
BryceHave we talked about them before?
ConorI don't it's hard to know. In the cinematic universe of my podcasts, I've talked a lot about K and Q, but that's probably mostly been on a raycast. Has it been mentioned? I mean, actually, there's an easy way to check this. Uh well, it might not mean that we haven't mentioned it, but if we go to the tags and we go to is there a K? There's a J, but there is no K. There's a J and a Q on the tags on our website for topics.
BryceFor those of you who don't know, forget about Val, forget about other things that people are doing. I I want you to tell me the story of the K and the Q language, because if I recall correctly, this is the programming language that you have often quoted to me as being one that was sold for some ridiculous large sum of money. Or that that it was the the the highest price per like like um the most dollars per um byte of program sold, or something like that you said.
ConorYes, you are correct, uh like 80%.
BryceSo that's about as much as I want to be correct. I don't want to be more right than that because that means I spent too much time uh researching the thing. I only ever want to be 80% correct, so tell me more.
ConorSo that's this is true. At some point, way back, I want to say probably in our first 10 episodes, closing in on a hundred here, which is pretty crazy. Uh like it doesn't feel like we've recorded a hundred episodes. Um but yeah, in our first ten, I think I mentioned at some point that basically Arthur Whitney, the individual behind many, many programming languages, A, A plus, K, K1, K2, K3, K4, K5, K six, K7, K9.
BryceUm, okay, okay, hang on, hang on just for a second. What all those K languages you just listed, are those evolutions of the same language?
ConorNo.
BryceOkay, all right. Can you I I assume we'll hear more about that later, but continue.
ConorWell, I can quickly because I had the exact same thought. I actually met with the last flight I took before the pandemic was not actually to Prague, which was in February of 2020. Uh, it was to New York at the tail end of February in 2020, and that was to um meeting.
BryceI can't be upset, Wilsoner, about this trip because I did not live in New York at the time.
ConorThis is true, very true. But yeah, I flew to sort of meet with Arthur Whitney and got to have a bunch of conversations with him and a dinner with him. And at one point, I didn't even ask a question, but I said something about K's just being like, you know, versions of each other or evolutions, similar to many other, you know, languages. You could even say C with the different versions, etc. And he corrected me and said, they're not, you know, evolutions of the same. I'm not sure if evolution, I use the word evolution. I'm not sure what he would say to that, but he said they're definitely not versions. It's not like K3 and was an upgrade from K2. They are complete rewrites from scratch. Every single time Arthur creates a new language, he deletes, like straight up deletes. You can't go and find the old executables for K5, 6, and 7 unless if you happen to have downloaded it in the past. And maybe you can find them in the corner of some internet. He just like wipes it off of his computer and then starts from scratch, writing a parser, Lexer, etc. And admittedly, takes what he, you know, there's the quote that, you know, now that I've finished programming this project, I can go back to the beginning and do it the right way because you know, you learn.
BryceOkay, but but uh but what but what if what if you were using the older version of the K language?
ConorSo so there are going to be a number of listeners that listen to both Arraycast and uh ADSP that are gonna have strong thoughts on this because this is a question that I've asked the K community. Literally, just within the last month, maybe a month ago, I went to uh the APL farm, which is a Discord that has channels for all the different sort of Iversonian array languages, J, BQN, uh K, uh, Neow. I'm not sure if I did I miss them all. APL, BQN, J, K, and Neal, I think are the five main ones. And I went to the K, I don't spend much time in the K channel because it's one of the langu the array languages that I know the least about. And I asked, what is what is like the state of K? Because every time Arthur starts on a new K, he just like deletes everything off his computer and starts anew. And if you're wondering why did they skip K8, that's because I was wondering that.
BryceI was about to ask what happened to K8.
ConorDo you know do you have a guess? I know some of our listeners that work.
BryceOh, wait, isn't that like the acronym for like Kubernetes or exactly?
ConorYeah. So they didn't want to, you know, hop step on the toes of Google, even if it would have been fine because no one cares. So they and and some people say that they kind of wanted to get to K9 because it's you know, whatever, cute. But um Yeah, wolf wolf.
BryceOh, yeah. Hang on, hang on. I gotta you continue, I gotta get my dog.
ConorI'll continue talking. Yes, so every time Arthur starts a K, he starts a new one, which sort of leaves the prior K in a state of limbo. And so it's unclear to me what K is the most popular K or the most widely used. Or if someone's gonna start learning K, what should they start learning? So the most recent, you might say, oh, the most recent one is obviously the most recent one, but there's always a stage where it's sort of in development. And the current K, K9, is uh kind of been branded Shakti, and there's been a database in a company. Or do you want to have a woof woof break for Looney? Hey Looney.
BryceCan you say K9 again?
ConorK9. And that kind of got picked up. Looney and I got to meet in New York. You'll hear about that in our New York recap episode, which uh apparently we need more time for in the future. But yeah, so canine. Every K gets abandoned at some point. And so of the K's, in my mind, your options are uh K4, because that's the K that went on to become Q. But the problem is that the company that bought KX, the company, which is what the company that owned uh K4 and Q, um, doesn't have documentation for K4. And apparently there's some command that you have to turn on in order to enable K4. So K, similar to J, is an ASCII-based array language. So your functions and your operations are single ASCII characters. Um, but when first derivatives, the company that bought KX, bought the company single ASCII, you mean combinations of ASCII characters, like single ASC. I think there are certain digraphs, which is two ASCII characters together, but most of the functions and operations are single ASCII characters, which means I think on one of the array cast episodes, it was either Stephen Aptor or Joel Kaplan said, What is Arthur's main motivation for designing?
BryceI'm sorry. This is the only are you allowed to define a function that has a multi-character name?
ConorOh, yes, correct. Yes, definitely.
BryceOkay.
ConorUh yes. Actually, I don't know much about K, so I could be wrong, but like I'm 99% sure that is the case. But all of the built-in functions that come with the language are ASCII characters. That makes more sense. Similar to how all the built-ins and APL are Unicode characters. Okay. Um, but to finish my last thought, um, uh Joel or Steven, whichever one it was, said, you know, Arthur's main motivation for designing K and his prior array languages is the keyboard. Because it's what is available to you on the keyboard in terms of symbols, uh, is what you can use. Anyway, so the the point I'm going on a long-winded thing of like, what is the state of K? It's a question I asked, and in my mind, it's K4. The the language behind Q, the problem with that is that it's not documented on uh the KX website where you can learn about Q. Q is very well documented, just not K. And Q is the word-ified version. So whereas um, you know, slash is uh sort of a reduction in K, uh they the wordified version of that is over. And the backslash, which is a scan, the word-ified version of that is scan. Anyway, so instead of ASCII symbols, KXKX and Arthur put sort of words on it, that became Q. And then for a long time, K7 looked like it was gonna be like sort of the K for the end of all times, and there was wik wikis built around that K, and there was a big community. But then when K7 sort of got ended, uh, and then K9 showed up, the K7 community. I think I don't I don't know really what the state of it is. So now there's there's K7, which at one point had a big community around it, K4, which is behind Q.
BryceBut a community that ended because this guy unilaterally decided, oh no, this thing that you're using, I'm gonna delete it and build a better one.
ConorYes. And and so, like, I'm not, I don't think Arthur is a little bit more.
BryceThis is an interesting software governance model.
ConorI don't I don't I don't think Arthur listens to this, and I if he does, or this reaches his ears somehow, I don't want this to come across because I have a huge amount of respect for Arthur.
BryceYeah, no, I have a huge amount of respect for him because you have a huge amount of respect for him. I'm just like as as somebody that comes from a more traditional software community. Um I just don't like I'm just trying to understand. Like it it's it's it sounds it sounds really out there to me, but I'm sure that for folks in the community and for Arthur, that like there's there's good reasons and probably makes sense. It's just like I don't understand it yet.
ConorSo the reason I was prefacing I have a lot of respect is because I'm about to say something that's kind of critical. It's not for anything you said, it's for what I'm about to say. And that's that I think the biggest problem with the K languages is that that is what Arthur does. He basically starts anew, and then you end up with this language that is better than the prior ones. Um, but not only does he sort of delete everything off his computer and then to a certain extent, whether abandon is the right word to use, abandon the community, he also infamously does not like to give interviews and does not like to document sort of the history of things. So there is, I have this, I'll link it in the show notes and I can even read a little bit about it. No, we've I mean we've asked on a ray cast. I mean, there's a chance um that like in the right sort of setup, we he might be willing to give an interview. Like, I'm not writing it off, but like we've definitely extended the offer.
BryceBut you you you haven't explained why. Like if the language is like yes, why does he why does he delete and then start over?
ConorI mean, if you if you gave a lot of people the opportunity to do that with their software projects, there was a ton of people that given the resources and time would definitely say, yes, let's do it. I mean, I think there's always the the adage of like people underestimate how much work it is to do a rewrite. And so I'd like I'm sort of put that aside. I realize that it's a ton of work, but like, how many people, if you ask them, could you if you had the time the ability to go back and do it over again, do you think you could do it better? Would that be something you're interested in? Like a ton of folks would say yes to that. And Arthur has the means to do that. Like he's a brilliant, like brilliant, like probably one of the top end developers in the world. He basically does, I think, most of the work on his own. He's responsible for one of the fastest languages in the world. His company that he sold, he sold for a hundred million dollars in two different installments once once in 2013 and then uh fully in 2018. And people like the banks that use um Q and KDB Plus, which are sort of the database and wordified version of K that he built, pay a million dollars a year to use the language. Um, and like every, almost every like when I asked like how many firms on Wall Street use this to someone that I I met with in New York, he said, almost almost everyone. Like it's it is a it is like the go-to language. And so like Arthur built this incredibly powerful tool where performance was the only thing that mattered, and people put up with the you know, terseness and the fact that it was ASCII symbols, and if you put some expression, it looks crazy. Because the people that were purchasing it don't care about programming languages and what it looks like, they care about making money on Wall Street like and doing real-time things that need to be done extremely, extremely quickly.
BryceIs it statically compiled?
ConorIt's interpreted.
BryceIt's interpreted.
ConorYes, which shocks a lot of people. People say interpreted languages can't be fast because when people hear about interpreted languages, they think about Python. But yeah, if you write an incredibly you know fast, you know, I I don't even know what goes into K. You know, I don't want to start saying, Do you know do you know how it's compiled?
BryceIs it compiled on to a bytecode or what?
ConorUh I think it's just a single sort of executable. It's written in C, very.
BryceI mean, duh like you say it's interpreted, but does it does it compile the language to a bytecode that then gets run through some bytecode interpreter or I do not know, but I don't think they're not gonna be able to do that. That's more like how like to make Python. Those like dot PYC files that get left behind are the uh byte compile.
ConorIf my understanding's correct, and I'm sure we have a number of listeners that will immediately correct me, feel free to DM me or comment on a Twitter thread or open up a GitHub issue. It's just that each of the primitives have like some specialized code for all the different types, and it's able to recognize quickly if you're operating on some kind of matrix or some time in a kind of time series. And so whenever you invoke some operation, it knows it is able to figure out the type quickly and then dispatch to that statically compiled operation, like previously compiled. So like it is interpreted, but is essentially just ends up invoking specialized very, very fast code. But I could be wrong about that. Like I don't I don't know.
BryceBut that's how the built ins work.
ConorUh yes. Okay. Anyways. So the so why? I mean, he sold the company for and I think even before he was working on K, he did very, very well at Morgan Stanley when he was building A and A, which were basically predecessors to K. And A, and they were, he, those were called APLs, just basically like ASCII versions of APL, which he had learned originally when he worked for IP Sharpen Associates. And yeah, like so if you go to this history of K page, it says that Arthur Whitney left IP Sharpen Associates in 1992 to create a new language. This was formed, uh they formed KX Systems. And uh K2 and K3, K2 and K3 were first commercially developed and supported versions of K, made at KX Systems. K3 came with a complete reference manual that consisted of documentation. KDB Plus was a database system that was sold along with K that provided an in-memory database manageable by K. K4 was released in 2000. It actually says 200, so it's missing a zero. In 2003, along with K4, Q was released as a wrapper around K, providing readability. K4 requires a command to switch from K to Q, and the documentation at code.kx.com does not cover K4. And then Shact, which interestingly now says K7, K9. It was my understanding that the branding of Shact didn't come out until K9, but maybe they have retroactively sort of included K7. And it says Arthur Whitney sold the majority of his stake in KX systems in 2018 and departed along with a few of his associates to create the new company called Shacti, along with which came the creation and development of the K7 and K9 dialects. K7 was maintained for a few years and is no longer available for use. K9 is currently nascent and as per on-site claims, supports fast processing of tables with row numbers in the billions and trillions. Binaries for K9 are available at Shakti.com. So and yeah, when I asked the K channel on the APL Discord what's the state of K, I got sort of varying answers of I'm learning K6. You can find a bunch of open source implementations of the different Ks. So there's Kona, there's OK, but these are all just implementations by individuals, not the actual executable that was released by Arthur when he was developing it, because like I said, he deletes them after he's done using them. And yeah, I mean uh I find K incredibly the story of K and Q and R.
BryceSo these are not open source. So when you say he deletes them, like you mean he deletes like his source and he deletes the binary, or he just deletes his source?
ConorThat is my understanding, and then that's what he told me, and then that's what he's told many people. Wow. Yeah. And uh yeah, I mean, so if you're wondering, sort of if you listen to a ray cast, you know, why do I like APL? I I talk about APL and BQN, those are probably my two favorite languages. I created this Venn diagram, which I'm sure a few of our listeners that follow me on Twitter have seen, of sort of the delineation between array languages and Iversonian languages, and then also there's a circle for combinator languages, and K and Q don't really have support for combinators, and that's like 50% of what I love about array languages. So in order to do a lot of the things that I can do in APL and BQN, and even J, J has rich support for combinators as well. I can't replicate that code in uh Q and Q and K.
BryceWell, what what has made these array languages, this K family, so much more successful than well, is it more successful than other array languages?
ConorWell, so actually, I released so this is we're going back, we're hopping in. If you don't listen to Arraycast, I'm gonna I'm just keep on bringing up things that have been mentioned there. But so there were two meetups that happened, one in Toronto, one in New York, and that was the reason you know Bryce and I got to meet up, was because I was down there for this meetup. And I released the presentation of that, the re-recording on YouTube, and one of the comments I got was Um, why would you learn Q? Because I was including Q in my sort of, it was a comparison of seven different array languages, and I added Q at the last minute for the YouTube recording version. And this comment was, Why are you covering Q? It's a proprietary language that you need to like hand over your email to use, and only then you get like a version that has limited cores. You have to limit your cores to like two or four or something like that. And uh I said, and then I basically linked to this history page and I said, or I linked actually to a pay uh a GitHub repo that tracks the number of companies that are using array languages. So J, APL, um, and like K and Q and KDB plus. And I tallied it, there were 21 using APL and 25 using K, Q, or KDB plus, and which is all the same thing. Just people write it down differently. So four more than were listed. And obviously, this is not an exhaustive list.
BryceOkay, so but I I'm gonna let's just go on the premise that K is successful, because from everything I've heard, it sounds like it is. Why?
ConorPerf. That would be my one word answer. I don't think APL, and to say that people that use APL don't care about perf is I don't think true in all cases. That's interesting.
BryceSo that that sort of that sort of means that like for me to really understand this, I you're the one person for me to talk to. I need to talk to somebody who understands how this thing how this thing is so fast.
ConorI mean, I'm not sure how many people in the world know how K is so fast because there's only one person that works on the source code, and that's Arthur Whitney.
BryceYeah, but but no, people people must have figured out a bit about how this thing operates.
ConorYeah, maybe. Like I'm not sure how many of the Wall Street folks that are using K and Q. I mean, we can get on. I met up with the individual that uses K. We can invite him on and uh I mean we're also supposed to have Marshall on. I said a while ago.
BryceWe don't always deliver on that. Um but but I I I find it interesting that that if really if the differentiator is performance, um my guess would be that it's not just that it's not just in the implementation. There must be aspects of the K language that make it um easier to um compile to interpret efficiently as composed to other languages.
ConorI just think I think that the way it's implemented, it's like the executable executable is incredibly tiny. I mean I think it's larger now, probably.
BryceBut what I'm what I'm saying is that no, I I'm suggesting that the design of the language like the this this need for performance has probably influenced the design of the language. Like if if if A APL has been around for a long time. If people could make a faster APL, they probably would have.
ConorI don't agree with that. No.
BryceUm why not?
ConorI think so there will there will be people that disagree with me. I've I've said this statement to several people. Some people have completely agreed, other people would say that's not the case at all. So just let it be said that varying opinions on this statement, but originally APL was not a programming language. It was a notation for teaching. And that's what Ken Iverson, the person that created the notation, it was called Iverson Notation, cared about. He cared about being a tool for teaching. That's why his paper, when he won the Turing Award in 1979, was called Notation as a Tool of Thought. And it's my impression from all the papers that I've read about Ken and his work with education is that he actually didn't care about performance. It doesn't mean he didn't necessarily think it was important at the end of the day, but like when he was designing J and designing APL, he was thinking about how this affects the way people think, not about how fast is this going to run. And because of that, a large percentage of the array language community, when it comes to APL and J don't care about perf. They care about it as a desktop calculator that can do way more than just you know integer arithmetic, but can do stuff with you know CSV files. And if you need to do something super quickly, it's you know a super good quote unquote tool of thought tool. That being said, I think there are people that do care about perf, and I think dialogue APL has done an incredible amount of work optimizing idiom recognition and stuff. But to say that someone could just, oh, if if someone could create a faster APL, it would have been done. I don't I don't because I agree, except that it it wasn't done, other than maybe like the the APL that we're talking about is K.
BrycePerhaps it wasn't done because of things inherent to the design of the language. Like you're acting as if the language of APL and the language of K are just like interchangeable things, and if the design of the language has no impact on like performance. The design of the language definitely has impact on performance. Now I'm just not qualified to tell you what what different design decisions in K versus APL has performance impacts, because I just don't know enough about those languages.
ConorWell, I do know that one of the things that Arthur is famous for saying is there is no operation in the language that's 10 times slower than any other operation. So every operation is within an order of magnitude because in the past there's been attempts to write high-performance APL machines. I'll link it in the show notes if people want to read about it, but they implemented these extremely fast primitives, but when you ran whole programs, the primitives would be really fast, but you'd spend 99% of your time in this operations that weren't weren't critical.
BryceHow does APL differ from K?
ConorWell, the the number one thing is one's Unicode, one's ASCII, but you can kind of ignore that.
BryceYeah.
ConorThe second thing is that my and I'm sort of, once again, people can correct me. I'm not a case of the case.
BryceAnd for the record, I don't think that the the uh the choice of Unicode sym symbols for uh APL syntax, I do not believe that has any real impact on the uh the speed with which you can interpret the program.
ConorUm probably not, but in in line with what I said earlier about Ken, it does impact the tool of thought, which is why I bring it up, because it's much harder for an ASCII symbol to be uh visually representative or new, is how do you pronounce that, of the operation um than it is for a Unicode symbol that's like tailored. The second thing is that K and Q don't have uh true higher dimensional arrays, and they also don't have a rank operator. They do have the concept of rank, but I think the primary data structure is an array, but also second to that is something called uh a table, I believe, or dictionary. I'm gonna mess up what it's actually called, but it's it's more of a hash map of vectors, where each of the values is a vector that doesn't necessarily have to have the same length. And so you do a lot more with hash maps than you do in other array languages because hash maps don't exist in other array languages. So things like querying and the database. So that's the other thing is KDB plus, the K language and Q language come with an incredibly powerful uh database. And I think it specifically has like a ton of functionality for time series stuff, which obviously if you're on Wall Street, is stuff you want to do. And there is a database that comes with J called JD, I believe, which is kind of supposed to be in the similar vein as what KDB Plus does. But um, yeah, in APL, there are databases, Flipdb, stuff like that, but like nothing that was built like tailor-made for high frequency Wall Street stuff. So the existence of dictionaries, and also too, I've like I've talked to a few people, uh Michael Higginson, who just won the APL um profional tier of the APL contest, and uh another individual, and these folks have been telling me how like you know, I need to learn more about K and Q so I can speak, because there's a bunch of stuff. Like, I think one of the things that uh Michael mentioned, uh, and I apologize, Michael, if I'm gonna get this wrong, but he mentioned that you can have well, so actually, this is something I know for a fact that I didn't get from Michael's that most of the functions in J, APL, BQN are limited to sort of two arguments, unary function and binary function. And when you want to have multiple arguments, I believe the idiomatic thing is to sort of chain them into a list of things and then destructure them. So really you've got unary and binary. Whereas in K, you can you can have any airity functions. They've got a syntax for basically a function and then it is defined by braces, and then at the front of it, you put in brackets and then you just separate with semicolons all of your arguments. So if you want to have an a function with five arguments, you just go ABCDE. And you can do basically, and this is the thing that Michael told me, he says you can, I can't remember if it's called like modifying the valence, but if you basically want to do partial application to any of the arguments, so similar in C when we have, you know, bind front or bind last, or before we had those two, we had bind, you had those like underscore one, underscore two, you know, to place the placeholders for the variables that you would want to take from the return function. You can there's a super convenient syntax for that where basically you can do partial application for so if you want to, if you have a uh five function, five argument function and you want to turn that into a three argument function with the first, third, and fifth uh arg arguments. That's super simple to do. You basically just like fill them in and you can you sort you have first class functions. That's another thing that uh K and Q have, whereas APL and J don't. They have first class functions, and so you can do wait.
BryceAPL doesn't have first class functions?
ConorNo. It has D funds, which are similar to Lambdas.
BryceA bit of an odd.
ConorI mean, you gotta remember APL was created in 1960. Well, first implementation was in 1966. And BQN, the newest Iversonian APL language, does have first class functions and is much more functional in a number of ways. Um yeah. We should we should either have um some of the Q folks that I've talked to, we should bring on Michael, or I should go. I'm thinking. So here's here's I was gonna tease this on a uh a ray cast, but too late now. I'll just say it here. Um I mean I was gonna, but then I left it out. But I'm thinking about for because we've been sort of on a break, my programming language is a virtual meetup for the last couple months since July. And I'm thinking about the next book, just being a dictator and choosing it, usually there's a vote, and making it Q for Mortals, which is a book that's on the KX website for learning Q. Um and uh once I get through that book, I'll be much more informed. Will I know how the implementation and why the language is so fast? I'm not sure. But yeah. We're at like the I don't know, 30-minute mark.
BryceThe brisket is was at 166 when I last chucked, which was about two minutes ago. You got until the brisket's at about 180, and then I really gotta watch it.
ConorWell, I mean, what else do you want to know about uh K slash Q? I mean, uh we basically kind of covered it.
BryceASCII language, dictionary, okay, but you said he created some other languages.
ConorOh, yeah. Like, well, I mentioned A, A. That was when he was at Morgan Stanley. He left um well, actually, it says on this history page that Whitney left IP Sharpen Associates in 1992. I thought he left IP Sharpen Associates to go to Morgan Stanley, and then he worked at Morgan Stanley for a year, and then I thought actually maybe he even worked at another bank before he started KX. But regardless, he worked at a couple banks at some point, worked at IP Sharpen Associates, and when he was at the banks, is when I thought he was working on A and A. He also wrote a language called B, which is actually open source and online. I'll find a link to it, throw it in the show notes. And you'll get a taste for the style of C code, which is very similar to the way that um J is programmed, uh, which is open source, which is very, very macro heavy. I think when I was working on the J source code trying to port it to C, I measured and there was like 10,000 macros. Um so they and they they it's not like oh macros the way we use them in C like they create macros for everything, and then you program in macros basically, like um for a dyadic or a monadic function, aka a unary function or a um binary function, they have v1 and v2, and that's how you define a function that has one or two variables. For four loops, they've got, you know, everything. So everything is a macro, and I think that's similar to how um Arthur Whitney has designed his and famously there's something called the in canabulum, which is actually a word that means a book before it's a book or something. Um, and it's it's called the J in Canabulum. And Ken Iverson wanted Arthur Whitney to work on J with him when basically Ken decided we're done with APL, we're done with Unicode symbols. We've tried for three decades. Unfortunately, they didn't wait for like five more years when like Unicode became a thing.
BryceAnd so they switched to I do not think that Unicode becoming the thing would have substantially improved the uh likelihood of APL seeing widespread adoption.
ConorYeah, you know, we'll never know. But uh the point is that it's a lot easier. That's because you're a C programmer.
BryceIt's not a C specific problem. The state of Unicode support just across software in general, does not lead me to believe that the world, even today, is ready for a language that leans so heavily on Unicode.
ConorUh, yeah, I mean it's a fair take. It's a fair take. Um but yeah, so when Ken was starting work on his new language J, aka L APL 2.0, and even there's a presentation. I'm not sure if it's recorded and online, but I definitely know the slide deck is something, and I believe it's called APL question mark or something. And it's this presentation of this new quote unquote, it was called an APL at the time, but just not with Unicode symbols, and he was presenting it at an APL conference, and kind of everyone was like, whoa, whoa, whoa, you're calling this an APL? This isn't an APL, you know, to the guy who invented the whole thing. Anyways, he went to Ken, or sorry, he went to Arthur to ask him to work on it. Arthur said, no, I've got my own plans, aka plus, you know, K. And, or at that point, maybe he had already done A and A plus and he was about to go on to K. But he went to this farm and there's a Wikipedia page that explains this whole thing. And so even though he was telling Ken no, he said, I'll get you started. And he wrote this single page of J code, and um that was basically the start of the J programming language, and it's called the J Incanabulum, I believe is how you pronounce it.
BryceUm why um okay, so he created A, A plus, B. And why'd he go to K? Like I mean, I mean Like what's the name? Alphabetic, yes, alphabetically.
ConorLike why so A was clearly short just for A plus. Um, and array language is love their single letter stuff. So APL was just a single letter version of APL. And then or sorry, A is a single letter of APL. Yeah. A plus is because they added a GUI to A. So A plus is just A with a GUI.
BryceB follows pretty clearly, yeah.
ConorBut then C was taken.
BryceOkay. What about D? Uh not taken at that time. I don't think D was taken at the time. What about E?
ConorYeah, I don't I don't know about that, but so I think at that time, J, actually, I don't know if K got named first or J after, but the reason J was chosen was because when they were starting on the language and doing work, Roger Huey, the main implementer on it, was told to like get started or whatever, and so he just named the file. If you look at your keyboard, if you're sitting in front of a computer right now, which probably none of you are, what letter on your keyboard has a little thing that you put your index finger? Yeah, index finger is resting. So it was just the easiest letter to type. So he just saved his file as like j.c, and then that's what the name of the language became. YK? I actually don't know. I don't like you know, k comes after J, right?
BryceBoy, the array programming language historian, a rare falter. Alright, you you you you look that up. I'm gonna I'm gonna check on the brisket. We are getting there. 171.3. This is great, great podcast content.
ConorI was gonna say, I'm on the KAPL wiki.com page, and it says this is not answer the question, but I just learned something. K7, the first Shack DK, was the first K to have full Unicode support. Oh, that's not a good one. Wait, wait, okay, so so can we talk so many characters?
BryceSo so he sold he he creates this company.
ConorWho's Chris?
BryceNo, he creates this company.
ConorOh, creates.
BryceThen he sells then it it becomes you know big and popular, then he sells it. Then he goes off and keeps making new K languages.
ConorYes, correct. I think he collected 40 million in like 2013.
BryceAnd like were the people at K uh who bought this this company from him perhaps not thrilled about this?
ConorOh, yeah, probably not. Probably not. I mean, I've I have not talked to anyone directly at first derivatives about like how do you feel about um Arthur continuing to do exactly what he was doing before? Uh but I would imagine that they would have probably been happier if he had just retired. Also, too, uh someone corrected me when I was in New York, said that, you know, it's not Arthur didn't own 100% of the company. So he didn't and he sold the company for a hundred million, but there was obviously other shareholders and stuff. So he he got a percentage of a hundred million, which I said, you know, does that matter? Like forty million, a hundred million. Those those two are the same number to me, and he was clearly not from the yuck. All right, you know. Thanks for listening. We hope you enjoyed and have a great day.