9
u/equal_odds Sep 07 '19
Is it just me or does it feel weird to see C++ with VS Code syntax highlighting? Or is this not cpp
2
u/Geend Sep 07 '19
Yes this is vscode with the platformio plugin. Works quiet well out of the box. I'm just wishing for a bit more refactoring support
11
8
Sep 07 '19
Write all my C++ in VS Code. It’s not that hard to set up some tasks to compile it for you, and I did it all manually, including creating folders and headers the way I like to organize my projects.
3
u/equal_odds Sep 07 '19
Ahh I miss having header files. Such a C quirk
7
u/SirNoodlehe Sep 07 '19
As far as I know, it's good practice to use header files for your classes in C++
1
1
4
u/incomingstick Sep 07 '19
Im not a huge fan of the default colorscheme. Im a ricer so I just made my own vscode theme that matches the rest of my desktop/terminal colors
2
u/tcpukl Sep 07 '19
What else would you use? Vi?
3
u/Tynach Sep 07 '19
Dunno about them, but I use Kate.
I don't like the idea of an electron app text editor or IDE.
2
u/TheUnlocked Sep 07 '19
I get why you say that, but VSCode is actually really performant (for normal-sized files) and has a lot of really nice features. I have an instance or two running in the background at all times and ATM they're only eating up about 50MB of RAM each.
1
u/Tynach Sep 07 '19
And they almost always have shitty font rendering on Linux. Usually there's no subpixel anti-aliasing, and the fonts aren't rendered with gamma correction, so the clarity and stroke widths look inconsistent and janky.
Additionally, 50 MB is not the worst in the world I suppose, but Chrome (and Electron) tend to start many background processes that are separate from the main process. Be careful how you get those numbers - they're likely higher than you think.
1
u/tcpukl Sep 07 '19
I've never even heard of Kate. But we use visual studio in the games industry.
2
u/Tynach Sep 07 '19
Visual Studio Code is not the same as Visual Studio. Except for the name, the two are practically unrelated.
Kate is an advanced text editor that's part of the KDE project. There's a Windows version, but most of the time it's used on Linux.
17
30
12
u/caguiclajmg Sep 07 '19
I used to do a similar thing when I was working with a janky GSM module for an embedded project. Just let the (watch)dog bite your ass and everything is hunky-dory.
5
27
u/heyf00L Sep 07 '19
I learned recently that infinite loops are undefined behavior in C++. So who knows what this does.
11
Sep 07 '19
The current form is UB but I believe that while(I) { ... } is legal bc it has observable effects.
236
u/[deleted] Sep 07 '19
This is a valid technique in embedded. Watchdog assisted reset.