5 ms·
The repository[0] for J is just as unreadable (albeit with slightly more white space). I don’t know how a project is managed like this. Even the file names look
by KMnO4 6y ago
The repository[0] for J is just as unreadable (albeit with slightly more white space). I don’t know how a project is managed like this. Even the file names look obfuscated.
[0]: https://github.com/tavmem/j https://github.com/tavmem/j
- sndean 6y agoI think this is the main J repo [0]. (Though I’m not sure if it’s any more readable.) Possibly interesting that Tavmem is the maintainer of Kona (open source K3/4). I guess he’s comfortable with all APL/J/K languages. [0] https://github.com/jsoftware/jsource https://github.com/jsoftware/jsource
- geocar 6y ago> The repository[0] for J is just as unreadable People who can read this find it readable. I think it's a mistake to think that because you can't read the code, that it is the code that is somehow unreadable, instead of a language you simply haven't learned to read. > I don’t know how a project is managed like this. It's not dissimilar to working with any proprietary programming language: You have to learn how to read and write this language. The fact that we can use an existing language's compiler can be confusing to people who don't know that language very well, but if you approach it from the perspective of a new (proprietary) language, using an existing language's compiler can be a great way to leverage the benefits of that existing language.
- MontyCarloHall 6y ago>People who can read this find it readable. > I think it's a mistake to think that because you can't read the code, that it is the code that is somehow unreadable, instead of a language you simply haven't learned to read. The same could be said about Brainfuck. With enough effort people can learn to read almost anything; that doesn’t mean that everything is equally readable.
- bidirectional 6y agoBrainfuck is so simple that it is trivial to read. The problem there is a semantic one rather than a syntactic one, you cannot build any abstractions. J-style C has all the semantic expressiveness of C, and chooses a terse, but fairly uniform style.
- AshamedCaptain 6y ago> I think it's a mistake to think that because you can't read the code, that it is the code that is somehow unreadable, instead of a language you simply haven't learned to read. This argument is significantly weakened when simply removing the meaningless macros and adding whitespace improves readability. It's not like it is complicated because it is written in a structurally different language, nor will you actually leverage any benefit from learning this language. It's just obfuscated under the guise of abbreviation.
- avmich 6y ago> This argument is significantly weakened when simply removing the meaningless macros and adding whitespace improves readability. Yes, but for this case adding whitespace actually decreases readability. At least if you know Whitney's hate of scrolling.
- geocar 6y ago> This argument is significantly weakened when simply removing the meaningless macros and adding whitespace improves readability. I disagree wholeheartedly. Whitespace tends to move code further away from the code that uses it; scrolling and tab-flipping requires the developer hold that code in their head where it is most likely to degrade. It is much much better to make them remember as little as possible. It also helps reuse: If you don't scroll, you can see more code, so you can see if something is a good candidate for abstracting, just because you can see them doing the same thing. Macros like this help with that, and so they aren't "meaningless". Less whitespace helps with that, and so it actually improves readability (to those who have to read it!). The trade-off is that you can't hire someone with "C" on their CV and expect them to be productive on their first day, but in a complex codebase, this might not be possible for other reasons.
- AshamedCaptain 6y agoI have a hard time believing that increasing the size of your terminal "helps reuse". First, I do not agree that working memory is any significant limit when analyzing code, specially because one of the first steps is going to create the mental abstraction that allows you to, precisaly, understand the code. The density of that abstraction is definitely uncorrelated to the amount of whitespace. Thus, scrolling is only going to be an issue for the first couple of reads. Second, say your patented steganography mechanism manages to fit 3x the amount of "code" in the same terminal size (and I am being generous). Is this going to increase "code reuse" by any significant amount?
- jpfr 6y agoThat is pretty readable C... for developers from that particular community. The ngn/k implementation of the k language [1] is even more terse. [1] https://git.sr.ht/~ngn/k/tree https://git.sr.ht/~ngn/k/tree