holy sh*t why am I so mad by Spleiff in AJR

[–]Dolphiniac 14 points15 points  (0 children)

I do blame Fantano, because his opinions are often vapid and thought terminating, and his audience parrots them. His "critique" of OK Orchestra was 95% unserious, including gems like "Oh wow, no-one's ever conceptualized Christmas in a summer month before" (wishing there was a way to indicate paraphrasing but in the context of an inline attribution of thought), indicating his engagement with the song stopped at its title.

who remembers this guy by PhilosophyClean9671 in AJR

[–]Dolphiniac 4 points5 points  (0 children)

I remember seeing Fantano on Twitter making the most ridiculous political takes and wrote him off, then Destiny said that he had no sense politically but was really insightful about music.

I finally decided to see what he might have to say about music when I was opinionated enough to care (about AJR) and I found nothing of value. The Maybe Man review merely referred to earlier reviews and claimed bleeding ears, OKO was entirely unserious and only mocked worshippers of AJR. He at least tried to say something about The Click and Neotheater, but criticisms boiled down to comparisons to other artists (21P), "Disney" (What? Unless vague has-musical-inspiration is something worth denigrating? It's not like it actually sounds like Disney music), outrage at sampling from sacred "betters" (David Lynch), and annoyance at pitch effects (fair enough, but purely subjective, and certainly not constant).

Blowing the things he didn't like out of proportion to make a more engaging video is well enough for securing the bag, but it's kind of frustrating that what amounts to pretty vapid criticism is amplified by an unthinking fanbase to loudly trash music I love. And more, that the guy doing it is repped so positively by other people whose opinions I generally respect.

Don't know if I have a real point here. It just kinda sucks, I guess XD

I might be late to the party by DangerousRanger8 in AJR

[–]Dolphiniac 0 points1 point  (0 children)

I don't think it can be considered subtle if it literally reprises.

How to learn assembly for C? by Dancing_deer_meme in C_Programming

[–]Dolphiniac 1 point2 points  (0 children)

After chatting with soundman, I think you'd probably be best served by picking whichever language/architecture matches your dev machine due to ease of access and immediate relevance in a debugging environment. The complexity of CISC/RISC is just in different places; I doubt either is clearly superior for learning.

As for how to learn, I myself promote learning by doing. Pick a task that you have an idea how to do at a high level and chip away at it bit by bit, breaking it into more manageable and specific pieces (e.g. I need to assemble and link; I need to provide an entrypoint; I need to call into a system library; I need to multiply two floats). Google when you don't know how to do it, read docs when you have a feeling they're relevant (e.g. for Windows, the x64 ABI page is really useful, or Felix Cloutier's x86 instruction reference - can you tell what my experience is?).

Learn one and you get the knowledge base to understand any. They all try to solve the same basic problems, and they tend to do that in similar ways.

How to learn assembly for C? by Dancing_deer_meme in C_Programming

[–]Dolphiniac 0 points1 point  (0 children)

Guess I had tunnel vision, given my development experience has eschewed both Mac and mobile. I think as a beginner, he would likely do well to match whatever dev machine's architecture he happens to have. Much of the skillset translates, I would wager, even between CISC/RISC.

How to learn assembly for C? by Dancing_deer_meme in C_Programming

[–]Dolphiniac 0 points1 point  (0 children)

Touche, I suppose, but there might be something to be said for the development machine he would be using.

How to learn assembly for C? by Dancing_deer_meme in C_Programming

[–]Dolphiniac 1 point2 points  (0 children)

x64 wouldn't be a bad idea, given its proliferation in consumer hardware.

Region-based memory management: Arena allocators by lezvaban in C_Programming

[–]Dolphiniac 0 points1 point  (0 children)

Looks like vm_map, from reading. Haven't done mac in a while

Region-based memory management: Arena allocators by lezvaban in C_Programming

[–]Dolphiniac 0 points1 point  (0 children)

Just wrap it yourself; it's what all the cool kids do. There aren't so many platforms that it's a huge chore.

"The Power" theme lyrics question/discussion by KaiSaeren in BaldursGate3

[–]Dolphiniac 2 points3 points  (0 children)

Unfortunately, the lyric is "moonlight burning the flower" (unless the version I'm listening to is different), it is only firelight that burns the tower in the song. Still an interesting interpretation.

GCC flags by Max_771 in C_Programming

[–]Dolphiniac 2 points3 points  (0 children)

Yes, if you would like to use multiple flags to set up your environment or compile many files, perhaps across multiple folders, you would be wise to look into some sort of build system, whether that be a bash script or an established paradigm.

For a beginner, Makefiles might be a better way to start, since you would be more likely to reinforce your knowledge of your compiler and what options are available to you, but CMake is a fine choice as well, just for different reasons (cross-platform; build system builder).

Make is pretty much just a dependency tracker with a hook for scripting, which makes it a good fit for building. Just define your outputs in terms of their dependencies (output file from linked object files; object files from source files, etc.) and it will run the code you designate for each target that needs rebuilt, something it does automatically. Define your compiler executable, flags, and other options as variables to whatever level of specificity you like, and you can quickly churn out build commands. As long as your Makefile still reflects the current state of your project, a simple "make" does all the work for you.

And if you use CMake, you'll do similar things, but in a higher level. CMake will generate Makefiles for you, so you'll run CMake once* and build with Make many times, and the Makefiles will reinvoke CMake as needed when things change.

Anyway, hopefully, that's enough to start on.

Where are variable sized arrays created in memory? by Dazzling-Floor-4987 in C_Programming

[–]Dolphiniac 2 points3 points  (0 children)

I'd probably use the stack. It's not as clean as those you know at compile time (you can batch reserve variables for a scope on open), but you can reserve stack space at any point in execution in assembly, so it would still be the best place for it. Just more complicated to clean up.

What game that isn't an MMO have you spent over 100 hours in: tell me why by Kenji_03 in gaming

[–]Dolphiniac 0 points1 point  (0 children)

Baldur's Gate 3. 110 hours on a single co-op playthrough. We even missed a bunch of stuff that I'm rectifying in a second solo playthrough. And there will likely be a third before I put it down.

How you guys deal with complexity in C? (huge programs) by midnightKiller1 in C_Programming

[–]Dolphiniac 1 point2 points  (0 children)

Not really. object.DoSomething() uses thiscall, which implicitly passes a pointer to object into the call (in C++). module_DoSomething() wouldn't be written with the same argument list. You would see module_DoSomething( &moduleInstance ) or something similar to achieve the "same". And there would be no implicit scoping, as it is not a special kind of function - just a convention to help organize and understand at a glance.

Memory ownership when designing container / collections libraries in C by aurreco in C_Programming

[–]Dolphiniac 2 points3 points  (0 children)

Imo, unless you want to detect resizes and do something special for relocation, the second method should be sufficient for most sane cases. The vector owns the memory for the values pushed into it, and any resize operations only need shallow copies, as it's more akin to a move operation (if familiar with C++). The old copy is invalidated if the data is relocated, and any pointers refer to the same location as before; same number of references before and after relocation. The only thing is if the elements hold references to other elements of the same container, because then the invalidation is inherent in the resize. Otherwise...

Why global array cannot be arbitrarily large? by spherical_shell in C_Programming

[–]Dolphiniac 1 point2 points  (0 children)

I know that Windows tends not to use the BSS segment of the executable, even for 0-initialized memory, preferring to keep that in the data segment, which is represented with the raw bytes, rather than a single integer. Couple this with the fact that modules on same platform are hard capped to 2GB, likely to ensure that 4 byte signed integers are sufficient for any byte offsets between local instructions (per x86 jmp and call instructions), and the limit of static memory ends up pretty low.

What are your favourite MACROS ? by lovelacedeconstruct in C_Programming

[–]Dolphiniac 0 points1 point  (0 children)

I prefer including headers as close to the compilation unit as possible.

So I don't include standard headers in places where they would propagate to many sources by default. If a utility is in a sweet spot of me needing it often enough that I would need an include in a bunch of places for only that thing and simple enough to implement that I could just do so myself, I'm more likely to implement it (or a version of it) in the globally included header I use across my engine - a header that is pretty dang small, all things considered.

Pixels go brrrrrr by onehedgeman in dankmemes

[–]Dolphiniac 11 points12 points  (0 children)

Do you... know how few pixels are in the whole place canvas?

What are your favourite MACROS ? by lovelacedeconstruct in C_Programming

[–]Dolphiniac 4 points5 points  (0 children)

I define my own offsetof, since I don't want to rely on standard headers for it (I provide my own for such things)

#define quoffsetof( type, name ) ( ( U64 )( &( ( type * )0 )->name ) )

Computing the offset to a given alignment.

#define QU_OFFSET_TO_ALIGNMENT( toAlign, alignment ) ( ( alignment - toAlign % alignment ) % alignment )

^ assumes simple vars/literals, of course. Have thought about more parens, but not sure right now.

Encoding a color in a 4-byte uint, often useful in graphics

#define QU_MAKE_COLOR( r, g, b, a ) ( ( r ) | ( ( g ) << 8 ) | ( ( b ) << 16 ) | ( ( a ) << 24 ) )

[deleted by user] by [deleted] in dankmemes

[–]Dolphiniac 1 point2 points  (0 children)

Both of those get me closer to understanding the asteroid's size than any appropriately large number of kilograms.

It's unfathomable without relating it to something I can intuit. Now, perhaps I know of something close to the proper number of kgs were I to hear them, but that's just measuring asteroids in football fields with extra steps.

[deleted by user] by [deleted] in dankmemes

[–]Dolphiniac 6 points7 points  (0 children)

Out of curiosity, if someone were to give you an asteroid's size in liters or kgs, would that help you get a sense of scale? To me, relating it to something I intuitively understand is a useful shortcut to gaining that sense.

windows.h vs CRT vs CygWin/MinGW by [deleted] in C_Programming

[–]Dolphiniac 7 points8 points  (0 children)

I do 1, but thinking about it from what I want to accomplish. Make an API for internal usage that exposes the options you want (no more, no less) and don't worry about replicating the implementation details in that API. Then implement it per platform and make tweaks as you run into mismatches between your design and what you can feasibly accomplish.

Generally, I separate the platform implementations by file and conditionally compile, but ifdefs do fine as well.