jsource
b-decoded
Our great sponsors
jsource | b-decoded | |
---|---|---|
18 | 7 | |
640 | 93 | |
3.4% | - | |
9.7 | 10.0 | |
2 days ago | over 6 years ago | |
C | C | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jsource
-
Crafting Self-Evident Code with D
The one other example I know that morphs the language to that extent and to the detriment of readability by C programmers is the J interpreter[1,2]. But, once again, nobody (that I’ve read) claims it’s good or clear C. (Good C for those who speak J, maybe; I wouldn’t know.)
For a way to morph C syntax that does make things better, see libmill[3].
[1] https://code.jsoftware.com/wiki/Essays/Incunabulum
[2] https://github.com/jsoftware/jsource/tree/master/jsrc
[3] https://250bpm.com/blog:56/
- Show HN: Gemini client in 100 lines of C
-
Can anyone identify what this code does ?
Oh damn Whitney C representation.
-
C is the most dysfunctional non-esolang on the planet, precisely because everyone insisted on it being "just simple pointers"
I develop J btw
-
Want cleaner code? Use the rule of six
No, it was rhetorical, because it's obviously (to an APL-family programmer), not bad!
Your cultural prejudice is showing. There are good reasons APL is written the way it is, and this example is simply bringing those benefits to C by writing it in the dense APL style. There are other APL derivatives, like J[1] that are written the same way. These projects are well-maintained. They aren't collapsing under a load of technical debt. The style works. To them, it's clean code.
[1]: https://github.com/jsoftware/jsource
-
Ask HN: Is this how anyone programs?
Recently, I wanted to write a simple piece of code in J, but immediately found a bug. I went ahead to fetch the source to see if I can fix it. But, hell no. I couldn't believe my eyes. Is this how someone programs, really? I just can't believe it didn't go through some kind of obfuscator.
Here are some samples, but almost anything in the repository is beyond me:
https://github.com/jsoftware/jsource/blob/master/jsrc/xo.c
-
Jd
You can view the code, but is not open source: https://github.com/jsoftware/jsource/blob/master/license.txt
-
Someone earlier linked to Arthur Whitney's style of coding in the comments. Can we discuss this further? I am disturbed by what I saw.
This is the same dense style used in J.
-
Why does old C code often declare functions or global variables in the scope it's used, rather than at the top of a source file or a header file?
All-in-all this example doesn't seem too bad. It's clear what happens and is easy to follow. If you wan't to see something remarkably terribly, check out Whitney style. It's used in APL/J/K family interpreters. Keep in mind, financial institutions run that code.
- Ask HN: Examples of Unusual Code Formatting Styles?
b-decoded
- found when searching for a way to make a color darker using js
-
Minigames while waiting for builds
Just use b
-
Note, the first time you ever run the render() method, it will download Chromium into your home directory (e.g. ~/.pyppeteer/). This only happens once.
I use b
-
Notation as a Tool of Thought
I used to believe this but i don't anymore.
From https://github.com/tlack/b-decoded
Arthur is famous for his very dense programming style. Most C programmers would scream when seeing this code.
In his view (and others in the terse scene), it is much better to have everything in your application readable on the screen at once than to have great names for things or a lot of white space to comfort the first timer reader.
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.
He wants to see the code "all at once" so he can understand all of its behavior without paging around and shifting his focus to another tab, window, etc. To get there he makes a lot of tradeoffs in terms of the code formatting and naming conventions. He also, in b, creates a dense set of interlocking macros and abstractions that can make the code very hard to follow.
Critics and the uninitiated say that his code is like old school modem line noise: random punctuation intermixed with bits of understandable code. I would suggest that he's actually quite careful with the abstractions he chooses and they are actually not always the most dense, highly compressed code structures available to him. He chooses wisely and his code rewards deep study.
Interview with Arthur Whitney: https://queue.acm.org/detail.cfm?id=1531242
-
Thinking in an Array Language
Here's some links relating to this style of code that you may find useful:
https://docs.google.com/document/d/1W83ME5JecI2hd5hAUqQ1BVF3...
https://github.com/tlack/b-decoded
https://chat.stackexchange.com/rooms/90748/conversation/ngn-...
They're not 1.5 paragraphs per line, but enough to give a taste of the implementation style.
-
20 times a day. 20 x 4 sec = 80 sec = 1min + 20sec. For vim users, this is a lot.
I could write a whole compiler in that time.
-
Someone earlier linked to Arthur Whitney's style of coding in the comments. Can we discuss this further? I am disturbed by what I saw.
Here is a link: https://github.com/tlack/b-decoded
What are some alternatives?
tinygrad - You like pytorch? You like micrograd? You love tinygrad! ❤️ [Moved to: https://github.com/tinygrad/tinygrad]
ngn-k-tutorial - An ngn/k tutorial.
ancient-c-compilers - Very old C compilers
pyppeteer - Headless chrome/chromium automation library (unofficial port of puppeteer)
ZLib - A massively spiffy yet delicately unobtrusive compression library.
krakatoa
kdb - Companion files to kdb+ and q
notation - Collection of quotes on notation design & how it affects thought.
boot - Build tooling for Clojure.
ladybird - Ladybird web browser [Moved to: https://github.com/SerenityOS/ladybird]
data_jd - Jd
teco - TECO - Text Editor and COrrector, an old classic, reimplmented in Pascal