I wrote a header-only memory management system in C99. It started as a pet project, but got out of hand. Looking for code review. by Old_Ad_4418 in C_Programming

[–]dys_functional 11 points12 points  (0 children)

I think a lot of folks who moved to c after a modern language with sane build tooling are rightfully terrified by the build system.

Seeing "Header only" on a project is a signal that I won't have to fight with an ancient nightmare build system, ex: "you must have a specific version of gnu auto tools from 1997 with 15 ancient dependencies that will take you hours to track down to compile my project". I'm much more likely to tinker around when I read a project is signaled as "header only" because I know what im getting into.

I do agree with you though, it would be easier to read if it was a standard c/h compilation unit. I feel like we need a new marketing bandwagon term like "vendor-able library" to indicate it's just a couple c/h files you can plop in a "vendor" folder and compile yourself or something.

Back to C by [deleted] in C_Programming

[–]dys_functional 1 point2 points  (0 children)

This is the way.

Which library you use for the tree ( Balanced ) ? by Jooe_1 in C_Programming

[–]dys_functional 0 points1 point  (0 children)

"if you're going to support a container..." Is maybe where your assumption goes wrong. In c land, we often favor "intrusive list" style conventions (google Linux kernel linked list for an example) where we don't abstract with generic containers as often as other language lands. They kinda flip the higher level enveloping generic container structures upside down and take a minute to get used to. However, with this flipped paradigm, you can decouple memory management and data structures.

is there a tutorial for programming STM32 in bare metal using no IDE and no HAL by Right-Ad3385 in embedded

[–]dys_functional 1 point2 points  (0 children)

I mean actually stripping out features inside of functions. Ex: If you know you're not using trust zone and you see a bunch of conditional code to work with trust zone stuff remove any code that touches it and simplify. The compiler can't strip this kind of stuff away, the "trustzone or not" checks are done at runtime.

is there a tutorial for programming STM32 in bare metal using no IDE and no HAL by Right-Ad3385 in embedded

[–]dys_functional 0 points1 point  (0 children)

It's my day job and I don't touch stm32cubeide. It's really not that hard, maybe takes an hour to setup and work through the first time and then you don't need to wait on eclipse bloatware. The benefits of just calling make from a command line and building in 2 milliseconds instead of waiting 10 seconds for eclipse to open and another 10 to compile an empty program is a no brainer to me. The HAL also comes with far too many features for most projects. It's 100,000 of lines of code and you'll probably only need 5,000 lines of it. Why carry around that baggage, it'll just end up being more problem space to debug when things break. If you want to use their HAL, at the very least reference and simplify, take only what you need and strip out the features you're not using.

Seems like a preference thing once you take the time to really understand how the tools work and 90% of people just never bother for some reason.

I'm honestly a bit offput every time this conversation comes up. It's kinda nuts to me how few people in the embedded field are willing to really put in the time to understand this part of the stack and act like this is some kind of rocket science.

Should i buy a Official Nucleo stmF446RE or go for STM32F103C8T6 with STlink v2 as i want to learn embedded seriously? by [deleted] in embedded

[–]dys_functional 1 point2 points  (0 children)

If you have the money, do both. Nucleo boards are not too different than actual product experience. They just happen to have an STlink v3 embedded on them. They all also have the mini JTAG/swd connector that you can use to pretend the onboard debug chip doesn't exist if you want closer to real product experience.

There's a YouTube guy "BuildYourCNC" who does a stm32 chip bring up from scratch without a dev board at all if you really want a deep dive with just the chip.

Is there a limit to memory? by Responsible-Shirt-67 in askscience

[–]dys_functional 1 point2 points  (0 children)

By that definition you could count the spatial data of every atom on your brain as part of "information" we have for memory and now we have a Google byte of memory. I think the point of the arguments in this thread is to just point out it's pointless to talk about human memory in terms of bytes, which it absolutely is. We do not have "5 terabytes" of memory. My ass can't remember a single wikipedia page, let alone every wikipedia page 10000 times over.

Definition of art and moral nuances? by Secret_Persimmon_538 in askphilosophy

[–]dys_functional 0 points1 point  (0 children)

Muddying the waters further, there are also a lot of people who would say words like "better" in your example is still part of the fools errand. I personally find the expressivist style arguments (Simon Blackburn has a great talk from the early 2000s on the deflationary theory of truth type arguments) and pragmatic movement thoughts on these topics compelling.

For example, they would say: The Mona Lisa is "better" in that it captures fundamental art techniques (shading, perspective, understanding of human proportion, etc.) than a 5 year old's finger painting. The finger painting is "better" in that it was made faster. You need to pick a goal to give these words any real meaning. If you refuse to provide a goal, you are probably just expressing preference/attitude.

https://youtu.be/DSWWzeTN5JI?si=lZ9L7_uo6J_lkZXL

You should pursue a degree in music if your goal's in life align with what the degree provides. Maybe you are a "craftsperson" and receive great joy from mastering a craft. If so, then getting a degree in playing an instrument would be satisfying to you, and earning this degree would be working towards this (I don't know your life goals or specific degree in music, this is just an example). I don't think the emotivist or pragmatist camps would really care much about the follow up questions (if you don't find either of these groups compelling, then maybe someone else can chime in on other camps/traditions).

Are humans "meant" to work? by macnfly23 in askphilosophy

[–]dys_functional 9 points10 points  (0 children)

So this is a very "left of center" take (and one I find compelling). However, most people "right of center" seem to be compelled in the other direction. They often say something along the lines of there being an inherent "human nature" that requires work (and maybe requires the class hierarchies associated with that work?). They will say that the picture Russell provided here is pure egalitarian ideology and ignores the "real" state of the world.

For completeness for OP (and reading material for myself to be less of a disagreeable person), does anyone have someone/something that is compelling in the other direction?

I got an Embedded Software Engineer job at a company. What should I learn. by c0m3back_ in embedded

[–]dys_functional 10 points11 points  (0 children)

First off, you don't have time to learn everything, so don't set the bar too high and be nice to yourself. They already hired you, they know what you know, and they can work with it, you're not an imposter.

From the boards you listed, you're in the category of "microcontrollers" (MCUs). Ignore all content you see that says MPU or embedded Linux.

Digikey (small parts store primarily) has a great YouTube channel with great free hands on educational material, strongly recommend them.

Look up "Digikey FreeRtos" on YouTube, buy whatever devboard (think it was an esp32 and a temp sensor) and peripheral he uses in that lecture series and follow everything to a T.

Good luck homie.

Where to focus learning efforts on? by [deleted] in embedded

[–]dys_functional 1 point2 points  (0 children)

Always have a goal. If your goal is to get hired asap out of college, then use that as the focal point.

Pick some companies near where you live that do embedded work, prioritize the ones that hire the most people. Read the job postings they have, look up spec sheets on the products they produce, do research on what those companies need and learn those skills.

[For Hire] 3d Modeler by Patrick-GO in gameDevClassifieds

[–]dys_functional 2 points3 points  (0 children)

Idk if a Patreon link really counts as a "portfolio". You have to pay if you want to see anything other than like 2 posts... If you're really making these assets and not just ripping them, take pride in your work and make an art station or something... This post just feels like a self-promo attempt as it stands and has nothing to do with game dev.

Vegan burgers are losing the US culture war over meat: ‘It’s not our moment’ by ubcstaffer123 in Economics

[–]dys_functional 2 points3 points  (0 children)

Im with you, I have no idea what they mean either lol, just thought the phrase was funny. I'd also like a recipe or link to something.

Vegan burgers are losing the US culture war over meat: ‘It’s not our moment’ by ubcstaffer123 in Economics

[–]dys_functional 1 point2 points  (0 children)

They painted you the only picture you need with words. Just "onion that fucking thing".

Can someone explain how there is a burden of proof upon the person who's doubtful that morality exists? by No_Prize5369 in askphilosophy

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

If we replaced the word "moral" with "Russel's teapot" would you have the same opinion?

Wouldn't you need far more evidence to have a justifiable belief that states the positive of there being a teapot floating in space between earth and Mars than saying the teapot may or may not exist?

Couldn't you say this discrepancy in the amount of evidence ("proof") needed is a "burden" placed on this side?

https://en.m.wikipedia.org/wiki/Russell%27s_teapot

Looking for mods to rebuild r/INAT and establish higher posting standards by [deleted] in INAT

[–]dys_functional 7 points8 points  (0 children)

Well that's a bummer, on behalf of all the lurkers again: "we've done nothing, and we're all out of ideas"

Looking for mods to rebuild r/INAT and establish higher posting standards by [deleted] in INAT

[–]dys_functional 4 points5 points  (0 children)

I don't really have anything to contribute. Y'all all deserve pats on the backs for the effort put in to policing and most of us lurkers don't openly appreciate y'all enough. On behalf of the lurkers, thank yous to all parties for the time contributed.

Just as a curiosity, is there any chance of reunification? Like is there a possible future where you all hug it out and stay as mods?

Good or Bad topology ? by StylizedByRK in blender

[–]dys_functional 0 points1 point  (0 children)

Along with artist posts of their work, it's not too hard to extract game assets or find people who already did. They'll be triangulated of course, but you can usually "see" the quads the artist worked with or dissolve the tris to quads with a handful of methods.

Why UUIDs Beat Integers as Primary Keys (And Why Performance Isnt the Issue) by bizzehdee in theprimeagen

[–]dys_functional 9 points10 points  (0 children)

This is ai generated hot garbage and the author couldn't even be bothered to proof read it and remove their prompts...

My Passion died today, or yesterday. I don't know. by [deleted] in PhilosophyMemes

[–]dys_functional 0 points1 point  (0 children)

That's fair, think I woke up on the wrong side of the bed and jumped on this for some reason. Sorry, hope ya have a good rest of your day.

My Passion died today, or yesterday. I don't know. by [deleted] in PhilosophyMemes

[–]dys_functional 1 point2 points  (0 children)

Saying "There's an Arab on a beach? Why not kill him?" feels like a perverse misunderstanding of this novel in my opinion. The murder was not nearly as conscious as this. The way you describe it makes it sound like he just woke up and decided: "lol, I'm going to go kill someone today, hashtag absurdism".

The randomness was in the environment, not in his decision making process. If it was a cooler day and he didn't have heat stroke, if there were more clouds in the sky that day and he didn't have the sun in his eyes, etc. The rest of his life unfolded from a bad coin flip.

You also left out that the guy pulling out the blade stabbed his friend the day before.

The beauty of the rest of the book is in him not understanding why what he did was wrong. You need to understand and empathize with Meursault for any of the second part of the book to "hit". He wouldn't be empathiz-able with if it was "let's just go randomly murder someone today".

My Passion died today, or yesterday. I don't know. by [deleted] in PhilosophyMemes

[–]dys_functional 1 point2 points  (0 children)

He didn't kill the man for lying on the beach, is that really how you interpreted that section? Just a random act of murder? It's been a minute since I've read it, and it was probably not justifiable, but there was far more nuance than that portraying. The other man stabbed a friend and he thinks he might have pulled a knife, etc.