HNHacker News
TopNewBestAskShowJobs

kindfellow92

20 karma · joined November 12, 2017

submissionscomments
kindfellow92··on Lisp in fewer than 200 lines of C
Oof, all the macros are broken:

    #define is_space(x)  (x == ' ' || x == '\n')
    #define is_parens(x) (x == '(' || x == ')')
Should be

    #define is_space(x)  ((x) == ' ' || (x) == '\n')
    #define is_parens(x) ((x) == '(' || (x) == ')')
Probably doesn’t matter in practice for this. It could end up being a nasty source of bug later on in the project.
kindfellow92··on Tom Duff on Duff's device (1988)
I agree. If you want user-level threading, just use a stack swapping library like libpth.
kindfellow92··on Tom Duff on Duff's device (1988)
Yeah, I think he’s referring to what’s described in more detail here: https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
← PreviousPage 4 of 4