|
what does this mean Hughmoris posted:Do modern C books, tutorials etc... promote safe C coding or is it really that easy to shoot yourself in the foot? Short answer, yes. I guess with the addition of all the bounds-checked functions that they added in C11 (such as gets_s), you could argue that "modern C" is trying to be more safe. But C still lets you do a lot of crazy things that you shouldn't do and that you didn't intend to do. Also, I don't think anyone uses all those functions that end in _s.
|
# ¿ Aug 31, 2018 04:03 |
|
|
# ¿ May 3, 2024 19:45 |
|
Dren posted:Speaking of CMake do I need to buy their book if I really want to get what the hell is going on? The online references are ok but they tell you nothing of best practices. You can try googling "Modern CMake" for best practices. Here was the top result: https://cliutils.gitlab.io/modern-cmake/ Looks to be decent.
|
# ¿ Dec 11, 2018 04:59 |
|
Khorne posted:but most people don't know cmake well enough to do that so they just say "gently caress cmake it's awful" tbf even people who know cmake say this
|
# ¿ Dec 14, 2018 06:44 |
|
This book might be worth checking out: https://www.elsevier.com/books/msp430-microcontroller-basics/davies/978-0-7506-8276-3 As for the watchdog timer, some microcontrollers have it on by default and others don't. The MSP430 has it on by default so unless you disable it or reset the timer periodically, your system will reset after the limit has been reached.
|
# ¿ Jul 8, 2019 06:39 |
|
Dawncloack posted:
This doesn't compile. If you really mean unsigned int8_t, then just write uint8_t. Same goes for the int32_t. For current_state_func, if that isn't taking any arguments, leave out the * next to void. Dawncloack posted:- Should I use the restrict or register keywords on the members of the array ? I think restrict on function pointers doesn't work, but I am a beginner. Dawncloack posted:- Is it ok to try and bind an inbuilt function into a function pointer like so ?
|
# ¿ Dec 8, 2019 20:32 |
|
Powershell thread is here: https://forums.somethingawful.com/showthread.php?threadid=3286440
|
# ¿ Mar 1, 2020 19:30 |
|
lifg posted:I learned Vi because one job I worked at gave me an option between Emacs and Vi. I think I flipped a coin. lol why should they have even cared? do you just get fired if you don't pick either?
|
# ¿ Mar 14, 2020 04:35 |
|
Dominoes posted:You also have sections of C coding, like embedded, that are tied to IDEs to make the toolchains more manageable, or provide low-level visual aids for pins, memory etc. That seems like an odd conflation to me, eg of language editor and hardware aid. Notepad++ is a step up from "embedded" IDEs as far as text editing goes. I've tried Keil, IAR, and multiple Eclipse knockoffs and they're all uniformly awful.
|
# ¿ Jul 23, 2020 05:25 |
|
you're right, that wasn't very helpful
|
# ¿ Mar 9, 2021 19:38 |
|
Dominoes posted:The Witness is my fav single-player game, so Jai's got to be good, right?
|
# ¿ Aug 13, 2021 05:25 |
|
ultrafilter posted:From the terminal explorer.exe $dirname will do what you want. I assume there's nothing weird about invoking it programmatically but Windows so who knows? There shouldn't be, this exact usage is mentioned in the WSL docs: https://docs.microsoft.com/en-us/windows/wsl/setup/environment#file-storage
|
# ¿ May 17, 2022 03:08 |
|
I personally read books and watch conference talks. The talks give a sense of what the current practice is and where things are headed, but the books make better reference material than any video. Paid books tend to be higher quality than free ones and random blog posts, but of course there are exceptions.
|
# ¿ Sep 25, 2022 18:22 |
|
bigperm posted:At some point it seems like all I can think of is a O(n^2) solution and then I look and someone did it all in one line of bash and I feel like an idiot and that's when I usually give up. me when doing leetcodes
|
# ¿ Dec 3, 2022 23:42 |
|
I thought the C++ extension for VSCode actually uses Intellisense and not LSP? At least that's how I remember it being marketed as. Also, why would you need to exit in order to test? Just create a new terminal tab.
|
# ¿ Feb 5, 2023 20:45 |
|
I used your last command with the code snippet and it worked fine for me. Which version of vim are you using?
|
# ¿ Feb 24, 2023 05:18 |
|
|
# ¿ May 3, 2024 19:45 |
|
Ranzear posted:Like, what is the double slash divide? Is that actually a thing or just an extraneous escape character being glossed over by everyone? If the code is Python, that should be a flooring divide as normal Python 3 division is always in floating point. e: beaten
|
# ¿ Apr 23, 2024 04:17 |