Arthur Whitney's 'B' Language
71–80 of 109 posts
Re: Arthur Whitney's 'B' Language
#72This 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.
b[Ii]{h:#x;l:0;while(h>l)$[y>x[i:/l+h];l:i+1;h:i];l}
b -> function name
[Ii] -> type declaration
h:#x;l:0; -> initial definitions
And the rest of it are bog-standard binary search operations with implicit return of l. Honestly, it's more understandable than Java with annotations or other magic constructsRe: Arthur Whitney's 'B' Language
#73This 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.
If you don't know the language, of course most things will seem understandable b[Ii]{h:#x;l:0;while(h>l)$[y>x[i:/l+h];l:i+1;h:i];l} b -> function name [Ii] -> type declaration h:#x;l:0; -> initial definitions And the rest of it are bog-standard binary search operations with implicit return of l. Honestly, it's more understandable than Java with annotations or other magic constructs
Re: Arthur Whitney's 'B' Language
#74Earlier quoted context omitted.
Binaries can now be obtained from Anaconda: https://anaconda.org/shaktidb/shakti Not sure what was on gitlab, I assume not source?
The install for Anaconda is over 500MB. If it is anything like k, the "shakti" binary is probably small, maybe under 260KB. Is there a way to download just the shakti binary? What are the restrictions on the trial version of shakti? Is it time-limited (e.g., 30 days)? Does it need an internet connection to be able to phone home? (I think FD/Kx started doing this with their 64bit trial.) The backstory for all this is…
No phoning home etc. although license does say you're limited to 30 days (although remains to be seen if/how that is enforced)
FWIW, kx didn't _have_ a 64bit trial before they released it with the phone-home stuff, before that trial was limited to 32bit only (still available & no connection required)
Re: Arthur Whitney's 'B' Language
#75Re: Arthur Whitney's 'B' Language
#76Earlier quoted context omitted.
If you don't know the language, of course most things will seem understandable b[Ii]{h:#x;l:0;while(h>l)$[y>x[i:/l+h];l:i+1;h:i];l} b -> function name [Ii] -> type declaration h:#x;l:0; -> initial definitions And the rest of it are bog-standard binary search operations with implicit return of l. Honestly, it's more understandable than Java with annotations or other magic constructs
itsnotthatitcantbereadbysomeonewhoknowsthelanguageitsthatitsincrediblydenseandhardtoreadandlacksanymeaningfulcontextclues
At first glance, it looks unsightly but when one actually starts reading it (all of it, not just looking for "clues"), how it looks makes little difference.
These threads that mention k are always entertaining. There is usually some amount of comments like yours.
There is this concept called "Tall Poppy Syndrome". I am not sure what we might call this stuff here (it should have name), but we see some of it every time k comes up in a thread on HN.
Fortunately we also see people commenting who like APL or at least are curious. Not everyone is trying to cut Arthur Whitney down for being good at what he does.
Re: Arthur Whitney's 'B' Language
#77Earlier quoted context omitted.
It sure does: http://kparc.com/b/b.c
I'm so tempted to just respond with "wanker", though I know HN norms don't allow that. Either the code is for human consumption (in which case, fulfil that goal) or you're writing demoscene assembler which displays virtuosity without any positive impact on society.
Re: Arthur Whitney's 'B' Language
#78Programming 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.
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 might be overly sensitive about how source code looks before even attempting to read it.
I am just a hobbyist writing programs for myself. There is no "next programmer".
Re: Arthur Whitney's 'B' Language
#79Earlier quoted context omitted.
Now I think you're right, but there is two strategies which boils down to the following: "you can either make a program that's so complex there is no obvious defect, or you can make a program so simple it's obvious there is no defect." What it says is that the hard part to make the next programmer understand what the machine does is not reading code, it's code complexity. Training yourself to read terse code is O(1),…
I did, once, when I was at school. It was great - everything was so fast to type, the program (a somewhat complex game) would fit in on two screens. I almost finished it in a week. And the I had exams, and did not touch the computer for two weeks. When I came back, I forgot it all. Cx? Dzy? Those names were meaningless. This was a very importantly lesson - programs must be maintaineable. Unless you want to spend your…
There is nothing inherently disadvantagous to using abbreviations as long as you have a key to the abbreviations.
Re: Arthur Whitney's 'B' Language
#80Earlier quoted context omitted.
Binaries can now be obtained from Anaconda: https://anaconda.org/shaktidb/shakti Not sure what was on gitlab, I assume not source?
The install for Anaconda is over 500MB. If it is anything like k, the "shakti" binary is probably small, maybe under 260KB. Is there a way to download just the shakti binary? What are the restrictions on the trial version of shakti? Is it time-limited (e.g., 30 days)? Does it need an internet connection to be able to phone home? (I think FD/Kx started doing this with their 64bit trial.) The backstory for all this is…