5 ms·
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
by yiyus 8y ago
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 terse style after a while. I understand why this style is not more commonly used, but I really like it.
- jdmoreira 8y agoI would love to take a look at your notes. I'm fascinated by this and would greatly appreciate any help approaching it
- yiyus 8y agoHere it is for anyone who wants to have a look: https://docs.google.com/document/d/1W83ME5JecI2hd5hAUqQ1BVF32wtCel8zxb7WPq-D4f8/edit?usp=sharing https://docs.google.com/document/d/1W83ME5JecI2hd5hAUqQ1BVF3... I recommend you to keep the original files at hand for reference. Once you have understood it the first time, they are a better reference than my many pages document. When AW says he hates scrolling, it is not because he is lazy, it just doesn't go well with this style. I am sure there are mistakes. If you find any, please let me know.
- jdmoreira 8y agoThank you! This is awesome
- v_dev 8y agoYou are a hero
- VictorSCushman 8y agoThank you! This is fantastic!
- gnulinux 8y ago> b.c > That was the easy part. Now it gets complicated. Haha lol'ed. These notes are amazing. Thank you!
- mamcx 8y agoI wish* exist a simplified implementation of this (or APL) in "normal" looking code. Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work. Also, the community live in a parallel world! So when asked about stuff, redirect me to https://code.jsoftware.com/wiki/Essays/Incunabulum https://code.jsoftware.com/wiki/Essays/Incunabulum or https://github.com/kevinlawler/kona https://github.com/kevinlawler/kona as if it somehow make everything so obvious ... P.D*: Because I'm building a language that try to draw some ideas from kdb
- 5166cc9c39fa61 8y ago> Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work. Have you tried looking at APL books? There are dozens of books on APL you can find. There are journals and conference proceedings from ACM, IBM, Dyalog, and Vector UK. I started to get into APL more seriously last year and lack of resources is definitely not a problem in my experience, lack of time to read them all is. Also, it's more about thinking of algorithms in terms of matrix and array operations. A lot of the techniques and algorithms can be easily adapted from Matlab.
- 4thaccount 8y agoWell 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 Hsu has been on a couple of APL related posts on HN that I have linked to multiple times. He is a scheme guru that switched to APL a few years back and wrote the Co-Dfns parallel GPU compiler for Dyalog APL. He has some enlightening talks on YouTube as well. I mention him here as his APL code is extremely terse and similar to Whitney's C, and he did an excellent job defending it in the HN post which changed the way I look at code. Second, as a University TA, he's taught multiple courses on APL as a first programming language and has talked about writing a book that tries to teach how to THINK in APL and not just this is how you transpose the matrix using this symbol...etc. My problem is that I know what the symbols do, but don't know how to switch from imperative/OO thinking to how to think in terms of array primitives (inverse, transpose, sort, outer product...etc).
- aleph- 8y agoI'd love a copy of the notes if you have them.
- patrec 8y agoI assume you actually managed to compile the code and run t.b? What invocation did you use?