Our great sponsors
data_jd | jsource | |
---|---|---|
6 | 16 | |
12 | 565 | |
- | 2.1% | |
2.8 | 9.2 | |
19 days ago | 1 day ago | |
J | 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.
data_jd
-
Random walk in 2 lines of J
I suspect the J package Jd is probably the most non-trivial public codebase. I don’t love the coding style (functions are long and scripted) and it doesn’t make use of newer lambda functions (“direct definitions”) which are easier to read. https://github.com/jsoftware/data_jd
-
Jd
An example J file because this link doesn't say much:
https://github.com/jsoftware/data_jd/blob/master/csv/csv.ijs
Here's one of the more central files that ties into how a Jd database is laid out:
https://github.com/jsoftware/data_jd/blob/master/base/common...
Not that I claim anyone in particular can read it of course. Jd uses a hierarchy of folder, database, table, column that's handled with an object system to share code between them. A folder is just a place to put databases and hardly needs to add anything, while the other levels have a lot of extra functionality. As an inverted database, Jd stores each column in a file, and accesses it using memory mapping.
https://github.com/jsoftware/data_jd/blob/master/base/folder...
https://github.com/jsoftware/data_jd/blob/master/base/table....
(I designed this system when I did some of the early work to turn JDB into Jd as a summer intern)
I found this license for jd itself. It is free only for non-commercial use:
https://github.com/jsoftware/data_jd/blob/master/doc/License...
The link you mentioned only applies to the jsource folder: the jengine code.
-
Denigma is an AI that explains code in understandable English. Test it for yourself... Today!
A longer piece from GitHub: csvreportsummary=: 3 : 0 t=. <;.2 fread PATHLOGLOGFILE b=. (<,LF)=t b=. b+.(<'!')={.each t b=. b+.(<'src: ')=5{.each t b=. b+.(<'snk: ')=5{.each t b=. b+.(<'elapsed: ')=9{.each t b=. b+.(<'rows: ')=6{.each t b=. b+.(<'error: ')=7{.each t ;b#t )
jsource
-
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.
-
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?
-
if you code in J for 6 months, you will no longer think in loops, and if you stay with it for 2 years, you will see that looping code was an artifact of early programming languages, ready to be displayed in museums along with vacuum tubes
good first issue
Looking at the j source code, this might fall under the rule against posting crazy people.
-
Embedding J
The original header defining the signatures (somewhat cryptically): https://github.com/jsoftware/jsource/blob/master/jsrc/jlib.h
What are some alternatives?
tinygrad - You like pytorch? You like micrograd? You love tinygrad! ❤️
ancient-c-compilers - Very old C compilers
b-decoded - arthur whitney's b interpreter translated into a more traditional flavor of C
kdb - Companion files to kdb+ and q
ZLib - A massively spiffy yet delicately unobtrusive compression library.
j - j language (Ken Iverson & Roger Hui) from https:/jsoftware.com
jprez - A presentation tool written in J
Singeli - High-level interface for low-level programming
afternoon-lang - A language I made as a self-challenge to create an interpeter in 24 hours.
jpl-mode - J and emacs get hitched
teco - TECO - Text Editor and COrrector, an old classic, reimplmented in Pascal
j - various toys in j