Live data from Hacker News

Arthur Whitney's 'B' Language

kparc.com

101–109 of 109 posts

Re: Arthur Whitney's 'B' Language

#101
post #59

Earlier quoted context omitted.

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…

"J for C programmers" is, in my opinion, an excellent resource for how to think in array-oriented style. http://www.jsoftware.com/help/jforc/contents.htm

I've flipped through it before, but didn't remember it being very enlightening (note that I didn't read the full thing and do all the excercises). I'll have to give it another shot. Thanks for the tip!

Re: Arthur Whitney's 'B' Language

#102
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.

That is true. There are some I never edit as long as they continue to work. Others I am continuously editing on a regular basis. Others are really "one-offs" that I keep just in case. If I need them again in the future, I might rewrite from scratch if my learning has changed significantly since the last edit.

I have found the best thing I can do for the "future me" is to keep programs relatively small and keep the number of files low. This is one reason I like terseness and the idea of keeping "everything" (almost) on one page/screen.

I am just not capable of understanding a large project as deeply as I would like. I thought this paragraph summarises the issue well:

"To them, once you've sufficiently studied that screen or two of code, you can understand all of it at the same time. If it's spread out over thousands of files, it's very difficult to understand all of it, which leads to bugs, unnecessary abstraction, and the need for advanced tooling just to work with your own project's code."

This is from https://github.com/tlack/b-decoded

Re: Arthur Whitney's 'B' Language

#103
post #92
post #83

Earlier quoted context omitted.

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

I guess I need to try a different CPU. Cheers.

Re: Arthur Whitney's 'B' Language

#104
post #86

I think a good introduction to this style of coding is the first "proof of concept" prototype interpreter for a small subset of J, also written by Whitney: https://code.jsoftware.com/wiki/Essays/Incunabulum Once I realized it was K&R C, I thought it was pretty straightforward.

I ran it through gcc -E and clang-format. https://pastebin.com/21qiRDi5

And not surprisingly that makes it less readable. It is a lot harder to have one-character names when you need to scroll across many pages to look up what they mean. So the more code you have, the longer code you need. As Eric Evans points out, naming things in computer code is difficult and important; wrong names can be misleading. This style avoids the problem by avoiding names.

Re: Arthur Whitney's 'B' Language

#105
post #23

I studied this code for a long time. I have lots of notes, going through everything almost line by line. I would be embarrassed of making them public because I never finished (at some point, I was just rewriting the x64 reference), but if somebody is interested I do not mind sharing. I would recommend everyone doing C to have a very careful look at this. The code is full of nice tricks and you start appreciating the…

I assume you actually managed to compile the code and run t.b? What invocation did you use?

Re: Arthur Whitney's 'B' Language

#106

Earlier quoted context omitted.

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?

I use jd on my side projects; it's great. J in general is what I invest in for side projects; powerful tool, best user community and decent support for the types of things I need.

Re: Arthur Whitney's 'B' Language

#107

Earlier quoted context omitted.

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?

I use jd on my side projects; it's great. J in general is what I invest in for side projects; powerful tool, best user community and decent support for the types of things I need.

Thanks for the recommendation. I'll keep that in mind. If you ever get the chance I'd love to read some more J related articles as I find the language weirdly fascinating even though it ain't easy. The community doesn't write a lot of marketing junk either. I've been reading through "J the Natural Language for Analytic Computing" to scratch the itch when it comes up. I'm always impressed when I find that it has things like derivatives as a native primitive.

Re: Arthur Whitney's 'B' Language

#108

Earlier quoted context omitted.

I use jd on my side projects; it's great. J in general is what I invest in for side projects; powerful tool, best user community and decent support for the types of things I need.

Thanks for the recommendation. I'll keep that in mind. If you ever get the chance I'd love to read some more J related articles as I find the language weirdly fascinating even though it ain't easy. The community doesn't write a lot of marketing junk either. I've been reading through "J the Natural Language for Analytic Computing" to scratch the itch when it comes up. I'm always impressed when I find that it has thing…

That's a really badass trick when you look at how it is implemented. Another cool thing to look at is Obverse. https://code.jsoftware.com/wiki/Vocabulary/Inverses

There's a lot of material on their website, though it's not well organized and some of it is out of date.

https://code.jsoftware.com/wiki/Main_Page

I find it rewarding to screw around with, though the only jobs you're gonna get are K/Kx related.

Re: Arthur Whitney's 'B' Language

#109

Earlier quoted context omitted.

Thanks for the recommendation. I'll keep that in mind. If you ever get the chance I'd love to read some more J related articles as I find the language weirdly fascinating even though it ain't easy. The community doesn't write a lot of marketing junk either. I've been reading through "J the Natural Language for Analytic Computing" to scratch the itch when it comes up. I'm always impressed when I find that it has thing…

That's a really badass trick when you look at how it is implemented. Another cool thing to look at is Obverse. https://code.jsoftware.com/wiki/Vocabulary/Inverses There's a lot of material on their website, though it's not well organized and some of it is out of date. https://code.jsoftware.com/wiki/Main_Page I find it rewarding to screw around with, though the only jobs you're gonna get are K/Kx related.

I've heard of obverse, but had forgotten about it. That is neat. Thanks for sharing.
Post reply on HN