4 ms·
Since you're here: I love Decker, it's exactly the sort of thing I want to get my kids playing around with. It's clearly a labor of love, keep up the good work!
by xyzzy_plugh 3y ago
Since you're here: I love Decker, it's exactly the sort of thing I want to get my kids playing around with. It's clearly a labor of love, keep up the good work!!
But how in the hell do you read that source code. I've seen some gnarly C in my time but man what even is that. How are you able to maintain this? It's beyond me. Please explain!
- RodgerTheGreat 3y agoIt's just dense. I use a handful of macros to abstract out repetitive patterns (EACH is a for-loop that iterates over all the elements of a lil list/dict), very short names for the most frequently-used utility functions (lin: lil-is-number? lil: lil-is-list? lmn: lil-make-number, lml: lil-make-list, etc), and typically aim for one idea/process per line, rather than one statement. I find most C code dreadfully verbose, repetitive, and sparse. This style makes much better use of screen real estate and allows me to look at even fairly complex routines all at once, without having to scroll or jump around. Many APL-family languages use similar conventions in their implementations, though often relying much more heavily upon macros and abbreviations than I do.
- trevyn 3y agoI’m curious: How many spaces is the tab size in your editor?
- RodgerTheGreat 3y agoUsually two.