PatrickMDev
Re:Adafruit deemed an essential service to make Personal Protection Eq...
on Tuesday March 24, 2020 @02:23AM (#22672488)
I printed these https://budmen.com/ until I ran out of PLA. I don't honestly have any knowledge about their effectiveness, but while my city is under shelter-in-place it seemed as good a way as any to pass the time.
I saw a few different designs for 3D printed PPE out there - I went for this one because the materials were all things I could source and they were one of the only places I saw that would help coordinate matching you up with medical professionals that want what you've printed.
Re:Let's Destroy C
on Thursday January 30, 2020 @03:28AM (#22189817)
#define lambda(ret_type, _body) ({ ret_type _ _body _; })
I found this one really fascinating, they're using both statement expression and nested functions. Their (reformatted) example of: int (*max)(int, int) =
lambda(int, (int x, int y) { return x > y ? x : y; });
macro-expands to int (*max)(int, int) =
({ int _(int x, int y) { return x > y ? x : y;}; });
So they have a statement-expression with just one statement in it - the value of that statement is the value of the whole statement-expression. And the one statement inside the statement expression is a declaration of a nested function named _. Statement-expressions decay their return types, so that function gets converted to a function pointer. And thus your "lambda" is a pointer to a GCC nested function.