Earlier quoted context omitted.
On a possibly unhelpful tangent, I'm expecting it to look something like this: https://code.jsoftware.com/wiki/Essays/Incunabulum
It sure does: http://kparc.com/b/b.c
Arthur Whitney's 'B' Language
51–60 of 109 posts
Re: Arthur Whitney's 'B' Language
#52Earlier 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.
That code is extremely readable - if you assume it will take just as long to understand as the entirety of the GCC compiler: https://github.com/gcc-mirror/gcc
Re: Arthur Whitney's 'B' Language
#53Earlier quoted context omitted.
I think this is one of the reasons he does not release his code. K is such a small language, with a very limited number of primitives, that were chosen for the task they wanted to solve. Every user would want to change that one he never uses for that one he uses the whole time, so we would have lots of k implementations, each of them with its own mesh of spaghetti code and slightly different behaviors. Talking for my…
I think the closest thing is https://github.com/kevinlawler/kona
Re: Arthur Whitney's 'B' Language
#54I seen a few bits and pieces from Geocar but never seen a release or download.
Re: Arthur Whitney's 'B' Language
#55Earlier quoted context omitted.
I wish* exist a simplified implementation of this (or APL) in "normal" looking code. Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work. Also, the community live in a parallel world! So when asked about stuff, redirect me to https://code.jsoftware.com/wiki/Essays/Incunabulum or https://github.com/kevinlawler/kona as if it somehow…
> Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work. Have you tried looking at APL books? There are dozens of books on APL you can find. There are journals and conference proceedings from ACM, IBM, Dyalog, and Vector UK. I started to get into APL more seriously last year and lack of resources is definitely not a problem in my exp…
Re: Arthur Whitney's 'B' Language
#56Earlier quoted context omitted.
I think this is one of the reasons he does not release his code. K is such a small language, with a very limited number of primitives, that were chosen for the task they wanted to solve. Every user would want to change that one he never uses for that one he uses the whole time, so we would have lots of k implementations, each of them with its own mesh of spaghetti code and slightly different behaviors. Talking for my…
I think the closest thing is https://github.com/kevinlawler/kona
Re: Arthur Whitney's 'B' Language
#57Programming 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.
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),…
Re: Arthur Whitney's 'B' Language
#58Earlier 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…
APLers use extremely consistent, stereotypical naming conventions which also carry semantic information. Think "Hungarian Notation" except it's just the prefix part. With consistently applied terse names, the same idea will result in the same code. Easier to visually pattern-match.
It's also worth considering that longer names are not necessarily more meaningful. It's pretty common for everyday programmers to use single letters for something like a loop induction variable. Sometimes longer is just... longer. Consider these three semantically identical K definitions:
a:{x*x}
b:{[n]n*n}
c:{[number]number*number}
Is that third version really clearer than the first?Re: Arthur Whitney's 'B' Language
#59Earlier quoted context omitted.
> Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work. Have you tried looking at APL books? There are dozens of books on APL you can find. There are journals and conference proceedings from ACM, IBM, Dyalog, and Vector UK. I started to get into APL more seriously last year and lack of resources is definitely not a problem in my exp…
Well there are books like "Mastering Dyalog APL", but they don't help you think in the language. There is the "Finnish APL Idioms" book which helps a bit. APL and J certainly have libraries, but a lot of functions and libraries that are builtin to most languages are omitted from APL as you can replicate with 3 characters. That's where knowing idioms helps. I am just a novice, but really enjoy writing APL & J. Aaron H…
Re: Arthur Whitney's 'B' Language
#60Earlier quoted context omitted.
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.
I think the problem is, we intuitively estimate the readability of code based on the space it takes up, when we should take into account the information density. That code is extremely readable - if you assume it will take just as long to understand as the entirety of the GCC compiler: https://github.com/gcc-mirror/gcc
It is the mathematical notation, put into, as Dijkstra expressed, "technologies of the past", completed (to be Turing-complete) and made executable.
At least, I think, this is the basic idea.