Fastai has a guide how to write Whitney-style code in Python [2].
Thre is a relevant thread in HN [3].
[1] https://github.com/kevinlawler/kona/wiki/Coding-Guidelines#t...
Fastai has a guide how to write Whitney-style code in Python [2].
Thre is a relevant thread in HN [3].
[1] https://github.com/kevinlawler/kona/wiki/Coding-Guidelines#t...
https://code.jsoftware.com/wiki/Essays/Incunabulum
I think a lot of the reason people have difficulty is that you need to read the macros first; jumping into the middle won't make any sense. The macros are very mnemonic and there's only 5 of them. For example, I found the DO macro to be particularly elegant because it expresses "repeat something n times", and one of the features of array languages which makes them terse and powerful is this implicit repetition.
[1]: https://bitbucket.org/ngn/k/src/b54eb5cfea5eb821fe1de68d2a8a...
across operating systems: it works on linux and freebsd as-is (thanks bakul), and with a few changes on windows+libc (thanks ktye) - https://github.com/ktye/i/tree/master/_/ngn though i personally never use windows
But http://dbp-consulting.com/tutorials/debugging/linuxProgramSt...
does suggest zeroing the top-most frame (%ebp) and making sure the stack is 16-byte aligned might also be worth doing. (Possibly it’s already 16-byte aligned already because you jmp to main instead of calling it though?)
Yep, it marks function frame boundaries. If you don't particularly care, you may want to consider compiling with -fomit-frame-pointer and the compiler will return this register back to the set of general purpose ones for it to use.
> i'm not sure if alignment makes any measurable difference. if it does, it'll be worth doing.
It will if you end up emitting any SSE instructions, because they will cause loads and stores that need to be aligned.
a=arg1 b=arg2 k c.k