Settings

Theme

Beebo, a wave simulator written in C

git.sr.ht

63 points by anon25783 2 months ago · 6 comments

Reader

skulk 2 months ago

Interesting use of macros to get a generic "result" thingy:

https://git.sr.ht/~willowf/beebo/tree/master/item/src/result...

I think it's cool that stuff like this works in C but my gut feeling is that this isn't going to play well with LSP tools. Are state-of-the-art C LSP servers aware of the preprocessor?

  • bertylicious 2 months ago

    I don't see an advantage over C's usual error handling, because this type is lacking the support functions (like bind and fmap in functional languages) or syntax integration (like the try operator in rust) that would make it useful.

  • anon25783OP 2 months ago

    I'm using a current version of VS Code with the IntelliSense mode set to `linux-gcc-x64` and it seems to work quite well actually.

  • whou 2 months ago

    yes, C LSP servers can deal with the preprocessor just fine, even the trickier C preprocessor "hacks". clangd is built on top of clang, after all.

schmuckonwheels 2 months ago

Rest in peace, Sky King.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection