4 ms·
After having spent some of my free time lately studying the b interpreter by Arthur Whitney (http://www.kparc.com/b/b.c http://www.kparc.com/b/b.c), this looks
by yiyus 8y ago
After having spent some of my free time lately studying the b interpreter by Arthur Whitney (http://www.kparc.com/b/b.c http://www.kparc.com/b/b.c), this looks quite straightforward to me.
That said, it is indeed tiny. Very nice project, as usual from FB.
- exikyut 8y agoYou'll need to click through to the parent comments for this to properly make sense, but this is the most relevant bit of a subthread I think you may find interesting: https://news.ycombinator.com/item?id=16368271 https://news.ycombinator.com/item?id=16368271
- yiyus 8y agoThank you. I have already found a few interesting threads, mostly with contributions from geocar, who seems to be working in kos. However, I have the impression everything is kept quite secret around this, and I respect that. My current interest in studying this code is more the journey than the result, but I am quite sure I will have to try to approach someone more familiar with the code at some point.
- exikyut 8y agoI too have a journey-focused interest in studying the code, heh. I must admit I'm mildly sad about the secrecy (and requirement to participate, presumably to deter lurkers with indeterminable motives), but I suspect it's mostly because K itself is used in finance (eg, http://archive.vector.org.uk/art10501320 http://archive.vector.org.uk/art10501320, ^F "brightly", end of that paragraph and all of the next small one), and it's reasonable to consider that if it doesn't cost a lot of money that'll categorically impact its relevancy :) I guess this is also why Kona is generally regarded dismally - I wonder if that view isn't carefully cultured/spread for similar reasons. In any case the implementation is heavily tied to the success (which is interesting in and of itself), which also ties the implementation to the niche, and I guess I lament the impact the language's resulting general accessibility and reach because things won't be changing anytime soon. Eh, I guess the selfish(?)/survivalist(?) view is to clear the calendar and say hi while Whitney's still teaching :P (I've been meaning to do exactly this, but my, er, calendar (life, really) doesn't permit me the confidence to say I'd definitely be able to keep up.) In the video it's mentioned there's not much optimization in kos. That's mildly encouraging, from a general systems perspective and also from an architectural standpoint (eg, functional programming can be interesting/novel/weirdly-aesthetic and "efficient enough" (or even more than) with eg UI latency).
- dman 8y agoAny tips on how you went ahead trying to dissect and understand b.c?
- yiyus 8y agoUnderstanding c.h, a.[ch] and A.S was not too difficult, I can share my notes with you if you are interested. I am still working in b.c itself. I have started from the entry point and try to make sense of it following different simple examples, with help from an opcodes table and other references. It is a very interesting exercise, and I think I have already found some bug, but it is not an easy task. I am not sure I will ever totally decipher it. I would like to make public what I have so far and ask for help, but since this code does not have a public license, I would not feel comfortable doing that. My plan is to try to get as far as possible (I have only been working on it for a couple of weeks so far), and ask for permission to make it public from Whitney, though I am not sure what to expect.
- avhon1 8y agoAny idea what terms the b compiler is licensed under?
- yiyus 8y agoThere is no license file in kparc.com, neither a single comment about it, or even about its authorship. Nevertheless, it seems to have been developed by Arthur Whitney, so I guess you could ask him. The kx forums may also be a good place to ask.