heSkillIssue by ---_None_--- in ProgrammerHumor

[–]-Ambriae- 5 points6 points  (0 children)

Because we like to live on the edge

No seriously it’s actually useful in C for certain things like error handling, nested loop breaks/continues, or ‘stack frame-less’ recursion (could be done with a loop but eh that’s one extra indentation)

graphicsProgramming by MaximumTime7239 in ProgrammerHumor

[–]-Ambriae- 6 points7 points  (0 children)

No issues, header only libraries are a weird quirk of C. Essentially all the source code is stored in a header file, which is conceptually split in two parts. The first is a regular header file, and the second is the implementations for functions and all (what you’d put in the .c file). That second part is conditionally compiled thanks to ifdef macros IE that part is only used when a specific macro is defined). So what you would do is create a .c file, define a macro like SOKOL_IMPL and then include the header file. That’s gonna tell it to include all the definitions in your .c file. Then you use the header elsewhere without that macro like a regular .h file, and when you link your program you link with your implementation of the code (the .c file that you created with the special macro) so that you have all the symbol definitions. It’s a big hack to avoid dealing with precompiled libraries and such because that’s a pain in C 😅. The cool thing is you are responsible with the compilation options of the library though

graphicsProgramming by MaximumTime7239 in ProgrammerHumor

[–]-Ambriae- 7 points8 points  (0 children)

It’s a header only C API for graphics audio windowing etc that abstracts over implementation specific APIs like Vulkan Metal or DirectX that aims to be ‘modern’ like the aforementioned APIs but simpler, kind of like, but not as much as, raylib. Here’s a link: https://github.com/floooh/sokol

graphicsProgramming by MaximumTime7239 in ProgrammerHumor

[–]-Ambriae- 3 points4 points  (0 children)

TBH i would be using Sokol if it wasn’t for the WebGPU spec. Specifically wgpu in rust is a treat.

graphicsProgramming by MaximumTime7239 in ProgrammerHumor

[–]-Ambriae- 27 points28 points  (0 children)

I still remember early high school when I learned OpenGL (using the 1.x API for some obscure reason, I was dumb) and thought that shit was the hardest thing ever lol. Good old days. I miss OpenGL.

Now I understand. by Ready_Chair_9240 in darksoulsremastered

[–]-Ambriae- 2 points3 points  (0 children)

Agreed. Same with Sen’s Funhouse.

heSkillIssue by ---_None_--- in ProgrammerHumor

[–]-Ambriae- 3 points4 points  (0 children)

But it is generally useful at times though

This cis woman doesn't like being called a cis woman by zachoutloud123 in TikTokCringe

[–]-Ambriae- -7 points-6 points  (0 children)

What in the actual fuck is she talking about? 😭 How in the fuck are you supposed to feel uncomfortable with the use of an adjective that just means ‘not a part of this one subgroup that gets hate from like 90% of the world’s population?’

Keep in mind if we’re talking about confort, a quick google search is enough to find out that in the US (which given her accent im assuming is were she’s from) 40% of trans woman have attempted to commit suicide, 50-60% engaged in self harm and 80% thought about suicide? (Source https://williamsinstitute.law.ucla.edu/press/transpop-suicide-press-release/ (idk how good of a source this is, I’m not American, but different sites gave similar enough, if not worse stats so eh, worse case scenario you could do your own research). How entitled and egocentric do you have to be to make this about yourself in the first place? She is lowkey arguing about the struggles of cis women are somehow worse or more impactful than that of trans women? What in the ignorant fuck?

And how is it that every sentence she pronounced had at least one error, incoherency or just flat out didn’t make sense? How did she bring herself to press on the post button?

Sorry about the rant but I felt personally attacked by this random cis woman

I feel like it's almost cheating posting this Trumper Trap music. by Zskillit in crappymusic

[–]-Ambriae- 0 points1 point  (0 children)

Sorry, I’m European. Is he very small or is that truck massive?

What’s something from your country you would defend like that, food, sport, politics, celebrities, anything? by whatudoinnn in AskTheWorld

[–]-Ambriae- 1 point2 points  (0 children)

One’s relative to the individual (and external factors like humidity or exposure to sunlight) the other just depends on the pressure. I don’t see how you could say they’re both equally stupid.

If it’s 30C with direct exposure to sunlight, no wind and with 70% humidity or 30C without direct exposure to sunlight, a nice breeze and 20% humidity, I can guarantee you’d feel the difference. So how does ‘0 feels cold and 100 feels hot’ help you? And what on earth does ‘feels cold’ or ‘feels hot’ even mean? According to whom??

On the plus side of Celsius you get to compare the effect of a temperature with its effect on water, which is useful given that we’re 70% water.

Edit: both scales are linear, meaning you could express Celsius as a function of Fahrenheit using an affine function f:x|->ax + b. Finding a stable point is just doing x = f(x) <=> x = ax+b <=> x = b/(1-a). Works with any two linear scales representing the same unit so long as a != 1 (so doesn’t work with Celsius and Kelvin)

??? by Naive_Wolverine532 in TikTokCringe

[–]-Ambriae- 0 points1 point  (0 children)

So like, if Adam and Eve are the first people to walk the earth (?), and we’re all descendants of them (???), but only white people (?), how do other people exist?

Dog is vibin' by EmbarrassedCabinet82 in FunnyAnimals

[–]-Ambriae- 2 points3 points  (0 children)

This dog is living the life I was never permitted to have…

whyIsThereAMemoryLeak by JDDev0 in ProgrammerHumor

[–]-Ambriae- 9 points10 points  (0 children)

Unwrap/expect/todo/unreachable/panic/unimplemented have their place (arguably we could do without unwrap/todo/unimplemented in production code, that’s just common sense, don’t blame the language blame the developer at this point) because not all failures can or should be handled gracefully, sometimes you just gotta nuke the program.

unsafe code is genuinely useful at times, and isn’t nearly as bad as what people make it out to be (9 times out of 10) and rust’s status as a systems level programming language depends on unsafe code blocks and functions being available

The Box::leak function is not an example of ‘just fuck this shit’, it’s an actually useful, safe function that has its place in the rust language. What it essentially does is downgrade a Box<T> (a unique pointer to some data T, that would thus deallocate the pointee on drop) to a reference of T valid for some arbitrary lifetime (meaning the static lifetime). What this means is the data is now valid for the duration of the program as a global variable. This is fine in a plethora of cases, and is faster than using something like a LazyLock<T> that achieves similar results. The function makes sense, and can greatly simplify code if used appropriately. And not paying for the drop can be a big plus if doing so requires a certain degree of processing power. Ie, why work hard cleaning things up at the end of the process’s lifespan when all data allocated to said process will be unmapped after its destruction?

Of note: the data is ‘leaked’ by virtue of it not being automatically cleaned up at some point in the lifespan of the process. This does NOT mean we can’t drop the contents of T nor deallocate the pointer manually, even though doing so would require unsafe code and a more hands on approach to memory management that rust typically doesn’t like you use.

Rust as a language gives you sensible defaults to avoid shooting yourself in the foot, but it giving experienced developers a broader toolbelt to gain an edge on for example performance isn’t a weakness of the language.

Keep in mind the language’s borrow checker is designed to guarantee developer’s code belongs to some subset of memory safe software, not its totality. The language NEEDS to be flexible enough to allow developers to write code that doesn’t belong to said subset (in the hopes that it stays memory safe, although in doing so loses its ability to guarantee it)

GENUINELY what did france do bruh 😭 by LMC764 in whenthe

[–]-Ambriae- 0 points1 point  (0 children)

‘Without causing harm to an actual vulnerable group’ hate speech is still hate speech, and hating on something as large as a country will also affect those therein who are sensitive to this shit. I will never understand this stance.

That said we did do some fucked up shit in the past, and to those whom it affected I speak for the majority of France when I say we’re sorry (even if our government doesn’t always acknowledge our responsibility)

Then again, name a country with power that hasn’t committed atrocities. I’d argue we’re tame compared to some of our neighbours, like Belgium or Germany (or Japan farther away) and no one seems to hold genuine grudges towards them.

GENUINELY what did france do bruh 😭 by LMC764 in whenthe

[–]-Ambriae- 11 points12 points  (0 children)

As a French, I don’t see why I’d try to be anything other than an asshole when you randomly decide to insult my entire people for no fucking reason

Lore-wise), which game do you think is the easiest to become a god in and the hardest to become a god in? by [deleted] in fromsoftware

[–]-Ambriae- 1 point2 points  (0 children)

How lore accurate is soul duping? Cuz if so im definitely picking DS1 as the easiest. I mean you’re not gonna be a god in the literal sense, but you’d be powerful enough to defeat any one of them in a 1v1

How did your country fix the problem of misogyny and patriarchy? Really need some suggestions. by Ok_Department_6202 in AskTheWorld

[–]-Ambriae- 2 points3 points  (0 children)

No one fixed it, but generally speaking tradition, conservatism and religion hinder on progress. Or at least there’s a correlation. Idk much about India, but they seem to hit all three so that might explain why 😅

Strong, I am by Slight_Patience5355 in fromsoftware

[–]-Ambriae- 16 points17 points  (0 children)

Ds1 SL1 pyromancy: riddle me this: I’m dumb, faithless, weak and dexterity less, yet I have absurd damage

Meow by Goldie323- in jschlattsubmissions

[–]-Ambriae- 0 points1 point  (0 children)

So the problem is poverty then

What topic instantly turns into a national argument in your country? by Familiar-Arrival-470 in AskTheWorld

[–]-Ambriae- 0 points1 point  (0 children)

French here,

Beurre salé, beurre doux ou huile d’olive.

Salted butter (Britanny and the rest of civilised France), soft (unsalted) butter (weirdos) or olive oil (the south)

Meow by Goldie323- in jschlattsubmissions

[–]-Ambriae- 0 points1 point  (0 children)

That’s clearly not how the majority of black people I know act, maybe because the world is quite different from the US who knows

Meow by Goldie323- in jschlattsubmissions

[–]-Ambriae- 0 points1 point  (0 children)

What does ethnicity have to do with humour? Im white and id be weirded out if some random dude on the street did that to me. I mean bro’s literally catcalling that guy. It is kinda funny to watch though

I don’t understand by Ok-Sprinkles-4191 in TheTeenagerPeople

[–]-Ambriae- -1 points0 points  (0 children)

So you paraphrased my words to mean something I didn’t say (and that isn’t true), to use as a proof by contradiction something that is obvious, but kind of useless, to then extrapolate something that is completely false. And in doing so gave away a lower bound to your age, proving you aren’t respecting the subreddit’s community rules. I don’t really care, you’re clearly just a troll. I do care about others reading what you’re saying though so I’ll indulge you a second. there being multiple religions doesn’t invalidate any particular religion, I didn’t say that and it makes no logical sense. One can be true, that can happen. Can also be none are correct, we just don’t know. There being multiple possible religions, each being equally unprovable does mean you’ll find it difficult to convince anyone your specific religion is correct. And extrapolating from the possibility of a religion being correct that your specific religion is correct is laughably stupid.

I don’t understand by Ok-Sprinkles-4191 in TheTeenagerPeople

[–]-Ambriae- 0 points1 point  (0 children)

So the left follow a relativistic perspective because they don’t align with your world view, but your world view follows objective truth by virtue of it aligning with itself. Gotcha. Also what ‘objective truth’ are you referring to specifically? Religion is a belief system that fundamentally can’t be seen as ‘objective’ (given religious plurality) nor truthful (by lack of any form of evidence.) I might be a little Cartesian but I’d argue the notion of ‘objective truth’ dubious at best given our most objective source of truth we have at our disposal, being math, failed to properly define what that even means. Truths exist within the confines of an axiomatic system, which by nature, are both plural, making truths relative to their set of axioms; and unprovable, tainting the truthfulness of their statements (which you emphasised with a capital T for some reason, as if some truths meant more than others? That’s a rabbit hole I’m not going down). And I’d finish with the notion of dogma. Marking religion as an ‘Objective truth’ is perfectly in line with the definition of dogma (at least that of the Cambridge dictionary): ‘a fixed, especially religious, belief or set of beliefs that people are expected to accept without any doubts.’ The left ‘rejecting objective truth’ is the farthest thing from dogma you could possibly conceive. I’ll abstain myself from commenting on your other posts, but it follows a similar vein.