News for hackers. Stuff that matters.
Re:Arthur Whitney's 'B' Language by nemo1618 on Tuesday March 26, 2019 @04:39PM (#19495811)
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.
Re:Arthur Whitney's 'B' Language by userbinator on Wednesday March 27, 2019 @07:54AM (#19499951)
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 of people already find that too terse; the "normal" style these days seems to be gradually getting more and more verbose (look at typical C# or Java, for example.)

IMHO the readability argument in favour of verboseness is a bit of a misnomer --- you can easily "understand" a file full of extremely verbosely named functions all consisting of a single line, but that doesn't help at all with seeing the big picture. Judging by the amount of file-flipping and stack-jumping when I have to debug a project in that style, it probably hinders it.

On the other hand, this is "code with a learning curve". You can't glance at it and understand immediately, but once you do take the time to read it carefully, you can understand more of the whole than if it was written in a more verbose style.

Re:Arthur Whitney's 'B' Language by bunderbunder on Wednesday March 27, 2019 @10:26AM (#19501063)
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 by jonathanhd on Tuesday March 26, 2019 @05:54PM (#19496381)
If you think this is horrifying you should see what people-who-aren't-Whitney write when they're copying his style, or adding to his codebase.
Re:Arthur Whitney's 'B' Language by yiyus on Tuesday March 26, 2019 @06:20PM (#19496533)
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 myself, I would love a FOSS version of k, but I am sure as hell I would patch a couple of things, and I am sure I would write much worse code than Whitney's (in his style or in my style).

Re:Arthur Whitney's 'B' Language by ploxiln on Tuesday March 26, 2019 @06:24PM (#19496554)
I think the closest thing is https://github.com/kevinlawler/kona
Re:Arthur Whitney's 'B' Language by 4thaccount on Tuesday March 26, 2019 @08:58PM (#19497333)
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.
Re:Arthur Whitney's 'B' Language by scottlocklin on Wednesday March 27, 2019 @11:48AM (#19502099)
FWIIW jd is pretty good and is definitely more affordable than Kx or Kerf.
Re:Arthur Whitney's 'B' Language by 4thaccount on Wednesday March 27, 2019 @12:02PM (#19502271)
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 by scottlocklin on Thursday March 28, 2019 @03:50PM (#19515874)
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 by 4thaccount on Thursday March 28, 2019 @09:43PM (#19518443)
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 by scottlocklin on Friday March 29, 2019 @12:05PM (#19522827)
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 by 4thaccount on Friday March 29, 2019 @02:24PM (#19524210)
I've heard of obverse, but had forgotten about it. That is neat. Thanks for sharing.
Re:Arthur Whitney's 'B' Language by sansnomme on Tuesday March 26, 2019 @08:03PM (#19497059)
A more up to date version: https://github.com/JohnEarnest/ok