Live data from Hacker News

Arthur Whitney's 'B' Language

kparc.com

91–100 of 109 posts

Re: Arthur Whitney's 'B' Language

#91
post #78
post #27

Programming is not telling the machine what to do. That's the easy part. What programming is about, and what's hard, is telling the next programmer what the machine does. This makes the easy part a bit easier, and the hard part much harder, than using C. And I already disliked C to begin with, for similar reasons.

"Programming is not telling the machine what to do." What is that called then? I am interested in controlling hardware, whatever that is called. I think Torvalds once said in a comment that is why he wrote his own kernel. He wanted better control of his hardware. Something like that. "... telling the next programmer what the machine does." You mean what the code does? This sounds like drudgery. I can see why one migh…

Unless you are writing one-off programs that you never come back to -- which is certainly possible! -- it's possible that "future you" is the next programmer.

Re: Arthur Whitney's 'B' Language

#92
post #83
post #70

Earlier quoted context omitted.

Just download it ‘manually’ https://anaconda.org/shaktidb/shakti/files and tar -xf bin/k is 185K

Thank you! Exactly what I was looking for. Even give us a static binary. Alas, I am getting "Illegal instruction (core dumped)". Will have to try another kernel.

You need avx

Re: Arthur Whitney's 'B' Language

#93

This code is a horrid abomination. I don't care if this guy is a genius and could single-handedly write the best OS in the history of computing; his code is write-only, unmaintainable garbage. There's nothing elegant or praiseworthy about this at all.

In your opinion. I have no issues with it. But it helps if you work a lot with k/j I guess. It is not write only at all; it just feels like it more as it is so terse that if you change something, it will generally affect more % of the code than in other languages. And the readability; again it is so terse that it probably will take you more time to inderstand an A4 of this than an A4 of C#, however, I find it easier…

I, too, hate scrolling in code (and almost never used Visual Studio's "jump to X" navigation helpers) but the reality is that each and every non-trivial program we write (which is practically ALL of them) will never come close to fitting on our screens. The real problem is always the limit of our ability to hold the mental model of the code within our mindscape as we operate on the patient. For me, having another abstraction to wade through on the screen is just another murky impediment to my reshaping the model.

As an inveterate simplifier of code and its formatting for clarity, I have gone to only doing a single thing on a single line, even variable declarations [Note I only have personal projects now]. The primary purpose behind this is that such extreme simplification will make it easier to process algorithmically, for both meta-code (i.e. IDEish) work and to narrow the horizontal extent of its format on both paper and screen.

Now that I think about it, it seems that Whitney's perspective might flow from his not using a code-folding editor, where each chunk of code can be collapsed to its header comment that states what it does. Aren't we usually dealing with the higher-level flow of logical chunks instead of the itty-gritty details of each?

Re: Arthur Whitney's 'B' Language

#94
post #25

Earlier quoted context omitted.

I would love to take a look at your notes. I'm fascinated by this and would greatly appreciate any help approaching it

Here it is for anyone who wants to have a look: https://docs.google.com/document/d/1W83ME5JecI2hd5hAUqQ1BVF3... I recommend you to keep the original files at hand for reference. Once you have understood it the first time, they are a better reference than my many pages document. When AW says he hates scrolling, it is not because he is lazy, it just doesn't go well with this style. I am sure there are mistakes. If you…

> b.c

> That was the easy part. Now it gets complicated.

Haha lol'ed. These notes are amazing. Thank you!

Re: Arthur Whitney's 'B' Language

#95

Q is one most important language here at BitMEX. Complicated or not, it's on KDB that all our trades happen, up to $8B in 24H volume last summer - it's highly efficient at its task, and never made us or any of our customers, loose a single Satoshi.

With all due respect, requests to BitMEX during times of high load have >50% probability of hitting a 503 Service Unavailable error. Meanwhile, competitors with similar volume/activity don't have this problem.

They've done studies, you know. They say 60% of the time, it works every time.

Re: Arthur Whitney's 'B' Language

#96

Whitney is so fascinating to me. His code is simultaneously awe-inspiring and horrifying. It's like he struck a Faustian bargain to gain programming powers beyond the ken of mere mortals, and is now cursed to write transcendently beautiful code that manifests as unintelligible gibberish to everyone else.

Everything surrounding APL gives me that feeling, but then I remind myself that, just like Chinese (which appears just as baffling to those who haven't learned the language but have experience with Latin family ones only), there's a not-insignificant number of people who use the language every day and are highly productive at it. I like terse code and my style is closer to the early UNIX/K&R, yet I've noticed a lot o…

My sense is that, once you get to a certain size of project, it becomes both impossible and undesirable for everyone in the project to be able to keep the whole thing in their head. And that this boundary is something of an event horizon in terms of what's desirable in a coding style - up becomes down and down becomes up.

There's also a lot of code that's so tightly coupled to some business domain that it's natural to write it in the language of the business. That way you don't have to maintain separate mental models and translate between them.

Re: Arthur Whitney's 'B' Language

#97
post #39

Earlier quoted context omitted.

I think the closest thing is https://github.com/kevinlawler/kona

Kevin Lawler and Scott Locklin (posts on here sometimes) tried to make a tsdb similar to kdb+ called kerf I think. I don't think it worked out, but it would've been nice to have a more affordable competitor.

FWIIW jd is pretty good and is definitely more affordable than Kx or Kerf.

Re: Arthur Whitney's 'B' Language

#98
post #78

Earlier quoted context omitted.

"Programming is not telling the machine what to do." What is that called then? I am interested in controlling hardware, whatever that is called. I think Torvalds once said in a comment that is why he wrote his own kernel. He wanted better control of his hardware. Something like that. "... telling the next programmer what the machine does." You mean what the code does? This sounds like drudgery. I can see why one migh…

Unless you are writing one-off programs that you never come back to -- which is certainly possible! -- it's possible that "future you" is the next programmer.

Bingo.

Re: Arthur Whitney's 'B' Language

#99

Earlier quoted context omitted.

Kevin Lawler and Scott Locklin (posts on here sometimes) tried to make a tsdb similar to kdb+ called kerf I think. I don't think it worked out, but it would've been nice to have a more affordable competitor.

FWIIW jd is pretty good and is definitely more affordable than Kx or Kerf.

Thanks Scott! I remember reading one of your posts somewhere talking about Jd. I'm curious if you still use it, or if it or your admittedly non-expert J knowledge made sticking with R, Torch7, Lush, Tensorflow...etc more tenable. I figure you might also use Kerf. Speaking on that subject, would you and Kevin ever open-source the code if you're not selling it anymore?

Re: Arthur Whitney's 'B' Language

#100
post #41
post #14

Earlier quoted context omitted.

Got it. I guess that answers my question but leaves my eyebrow raised.

Is that the only thing that makes you raise your eyebrow? :)

If I’m honest, I think it’s the most intelligible file in the folder (besides the readme) so its issues were more accessible to me.
Post reply on HN