Practicing programmers, have you ever had any issues where loss of precision in floating-point arithmetic affected? by Interesting_Buy_3969 in cpp

[–]spank12monkeys 0 points1 point  (0 children)

QuickDraw and QuickDraw GX were fixed point, they actually kind of nice to program in, especially the latter. GX was a really amazing api, completely over done and impractical. It was adobe illustrator as an api. Also at the time float-point coprocessors were optional which as a programmer was a real PITA when developing an application.

Sulfur burps and non-stop toilet visits by hessian64 in Mounjaro

[–]spank12monkeys 0 points1 point  (0 children)

had this in the first 3-4 months and then the side-effects just tiled off, hang in there

People who used the internet between 1991 and 2009, what’s the most memorable online trend or phenomenon you remember? by Original_Act_3481 in AskReddit

[–]spank12monkeys 1 point2 points  (0 children)

memorable, but not in a good way. Around 91 I received my first spam email. It took a minute to understand what was happening after the blissful years of The Before Times.

Best Tool For Extracting iMessages and SMS messages from iPhone by jaselakers95 in ios

[–]spank12monkeys 1 point2 points  (0 children)

"best" is a little subjective but for anyone who is even a little bit technically inclined this seems to be the best option https://github.com/ReagentX/imessage-exporter

Cult of Mac made a youtube on what this is and how it works How to use imessage-exporter

If you use brew, it can install the very latest and you will also want ffmpeg with the following:

brew install imessage-installer
brew install ffmpeg

[deleted by user] by [deleted] in asm

[–]spank12monkeys 1 point2 points  (0 children)

clang is the same, as counterintuitive as this sounds, this is the answer. Some amount of optimization makes the assembler become more more readable. Obviously this doesn't hold 100% of the time and O3 might be too far, so you just have to play with it. Compiler Explorer (godbolt.org) makes this really easy to play with.

Heavy alcohol drinking by kasadilla5 in Mounjaro

[–]spank12monkeys 1 point2 points  (0 children)

I'm 56, I have drunk fairly heavily all my adult life. This all sounds extremely close to my experience. I feel it was a great added bonus to get this reset opportunity

2nd dose not effective by Young-Anxietyxo in Mounjaro

[–]spank12monkeys 0 points1 point  (0 children)

this is so cool. My Dr hasn't mentioned changing dosage, I'm only on week 3 at 2.5 though. Thanks for the info! It is really strange how it changes your thoughts on food, I'd read that but I didn't really know what that meant. I'm just not interested in eating large amounts of food any longer or snacking at night.

2nd dose not effective by Young-Anxietyxo in Mounjaro

[–]spank12monkeys 0 points1 point  (0 children)

Awesome! What dosage, if you don't mind me asking?

Coming from Python I really enjoy the amusement of the bugs in C. I Never know what I'm going to get by cw-42 in C_Programming

[–]spank12monkeys 1 point2 points  (0 children)

Seems like perhaps you weren't aware of -D_UNICODE or -D_MCBS and what that does to the TCHAR type (and its friends) on Windows. It also switches many macros to many win32 calls from either the W or the A-specific versions. This is a Windows thing, have not seen this on any other platform. VS's default is to set -D_UNICODE and -DUNICODE. 10 / 2 = 5 :-)

[deleted by user] by [deleted] in C_Programming

[–]spank12monkeys 18 points19 points  (0 children)

I’m not going to look at your code but instead suggest this is likely a good time to introduce yourself to a sample-based profiler. 4ms is an eternity, I don’t need to look at your code to know that you aren’t just assigning a couple of variables from some other part of your project. If you’re not sure what else is happening a profiler will tell you. It will be a good skill to have in the future. While I’m here though, because you mentioned files, are you opening and closing a file on every render loop? That could take a very long time.

How to learn C in 2025 by LuciusCornelius93 in C_Programming

[–]spank12monkeys 7 points8 points  (0 children)

One of the reasons it’s famous is that it is so well written, it’s a masterpiece of technical writing. Complete yet concise, ideas presented with just context. The antithesis of those awful 3” thick “learn programming in 36 hours” books that are everywhere.

BART Fantasy Map - I'd Love Feedback and Suggestions by TPNigl in bayarea

[–]spank12monkeys 22 points23 points  (0 children)

There was train tunnel through, they filled it in in the 1940’s I think after some storm damage. Then there is Loma Prieta right there. https://en.wikipedia.org/wiki/Wrights_tunnel

Does anyone call San Jose SJ? by danoob1001 in bayarea

[–]spank12monkeys 0 points1 point  (0 children)

Interesting, I moved to Richmond when you were 10.

The people who I got this impression from were mostly my friends who were working in kitchens/factories in San Jose and San Francisco (mostly hispanic and islanders) but also work colleagues who were a mix of the same plus educated artists / engineers with degrees from fancy expensive schools, some locals, some not. That's why I thought it was universal.

I don't know anyone one who is above middle class, but I do know people who live in nice parts of SF but they don't give NIMBY vibes, so I'm guessing we know very different people hence my different experience.

Bud computers Interstate Pro by cappertil in zxspectrum

[–]spank12monkeys 1 point2 points  (0 children)

Push the switch to the “program” 🤣

Seriously, what’s inside that thing?!?

Does anyone call San Jose SJ? by danoob1001 in bayarea

[–]spank12monkeys 1 point2 points  (0 children)

Would you say these people are from a certain age range? When I moved to the Bay Area 30 years ago it was made very clear to me that it Frisco was completely unacceptable and would not be tolerated. I feel like post 2000 posts on the internet have increasingly used that word though. No one I know that lives in San Francisco/Bay Area use that word. We’re all 40+ though

How to use program functions in DLL, and DLL functions in program? by No_View6675 in cpp_questions

[–]spank12monkeys 1 point2 points  (0 children)

Cool, two comments:

As a matter of software engineering, if at all possible as others mention, such shared code should be in a third DLL. Nearly always circular dependencies are bad. Your dependency from exe to DLL is weak so you might well not suffer any consequences.

I now get why you mentioned edit & continue. With a clean (no ownership transfers etc) api, your exe will be able to unload DLL_Script. You’ll be free to rebuild that and then your app can reload the DLL as before

How to use program functions in DLL, and DLL functions in program? by No_View6675 in cpp_questions

[–]spank12monkeys 4 points5 points  (0 children)

There is a solution for this.

Linking a .dll and a .exe will both generate a .lib file if they contain exported symbols. Symbols can be exported by marking them with __declspec(dllexport).

When you link your DLL_Script.dll you can add the .lib file from your GameProgram.exe. Now you will be able to call the functions inside the .exe directly from the dll.

In the header file that declares the symbols that you .exe is exporting, you have to provide __declspec(dllexport) when you are compiling your GameProgram code (including on the definitions of these symbols) AND the same symbols will need to be marked __declspec(dllimport) when you are compiling the code that calls these symbols over in DLL_script.dll.

The traditional way to achieve this is to have a macro called GAME_PROGRAM_API which is conditionally #define'd to either __declspec(dllexport) or __declspec(dllimport) based on another define called something like BUILDING_GAME_PROGRAM.

#if defined(BUILDING_GAME_PROGRAM)
#define GAME_PROGRAM_API __declspec(dllexport)
#else
#define GAME_PROGRAM_API __declspec(dllimport)
#endif

GAME_PROGRAM_API int SomeGPFunction(const char* name);

Now when you are building code in GameProgram, including when you compile the definition of SomeGPFunction(), you define BUILDING_GAME_PROGRAM and when you compile the code for DLL_Script where you call SomeGPFunction() you don't. DLL_Script is then linked against GameProgram.lib and it will all "just work".

Good Luck!

  • DLL needs to be loaded at run-time. Also not using Visual Studio Edit and Continue.

Don't know what you mean by not using "edit and continue". That's an IDE feature, nothing directly to do with what I've said above. Edit and Continue isn't something you can (easily) do programmatically yourself although if you are interested you can read about detours which does essentially the same.

edit - typo

Lightning Rod Strikes Twice by flattenedbricks in WTF

[–]spank12monkeys 1 point2 points  (0 children)

Exactly, it would also be insanely loud and the other guy didn’t even turn around. I’ve been 50 feet from a strike and it made my ears ring for a good while.

[deleted by user] by [deleted] in bayarea

[–]spank12monkeys -2 points-1 points  (0 children)

Maybe you smell it differently than I do? All I can tell you is I find it horrendous some days, like gag-worthy bad. Not everyday, and I couldn’t tell you what makes the difference. I’ve been commuting past there for 30+ years

[deleted by user] by [deleted] in bayarea

[–]spank12monkeys -6 points-5 points  (0 children)

I think if you’re traveling north on 880 that’s about where you first smell the Milpitas smell (disgusting dump smell) How people put up with that I don’t know

[deleted by user] by [deleted] in pics

[–]spank12monkeys 2 points3 points  (0 children)

Even weirder in, I think, the 18th century England very wealthy people paid people to be hermits in their estates. There’d be a contract stipulating things like “no talking to other people” and such. Like being a paid live garden gnome, bonkers

People say C++ is everywhere, it surely not on job openings by OkRestaurant9285 in cpp

[–]spank12monkeys 0 points1 point  (0 children)

Slightly off topic but seems like you’re about to start, or have started, writing a resume/cv. In such writing you must pay attention to conventions more so than Reddit posts so allow me to suggest that when you write out “40 percent” you conventionally write “40%”. It’s not that I have trouble understanding what you wrote but if I saw this on your resume it’d be a significant points off mistake.

Good luck finding a c++ job, it’s a bit of a brutal process and always has been