Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kindfellow92
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
kindfellow92
9y ago
GCC extensions make my brain hurt :( Should just use C++ at that point: template<class T> bool is_space(const T & x) { return x == ‘ ‘ || x == ‘\n’; }
92.
▲
by
kindfellow92
9y ago
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)
93.
▲
by
kindfellow92
9y ago
I agree. If you want user-level threading, just use a stack swapping library like libpth.
94.
▲
by
kindfellow92
9y ago
Yeah, I think he’s referring to what’s described in more detail here: https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html