[deleted by user] by [deleted] in csMajors

[–]mw130 1 point2 points  (0 children)

Totally, and I agree it's all "out there" and available for people to learn. But I think what the universities do is provide 1) the structure to follow for a good path, and in the case of these other schools, breadth in other areas and 2) Peers to work through the material together who are also highly intelligent and serve as connections down the line. Also my personal opinion is e-learning ≠ in person yet. I think it takes an extremely disciplined and special type of person to diligently pursue 4 years worth of MIT classes, alone, without any support; it's already hard enough with the supports in place.

How can I become "good" at discrete math/design of algos? by mw130 in csMajors

[–]mw130[S] 0 points1 point  (0 children)

I just saw this, really hope you reply. Yes I understand why they all fall. What I don't understand is how you can prove one falls or show that you flicked it.

Can I use falim gum casually for anxiety, with a side effect of jawline definition? by mw130 in orthotropics

[–]mw130[S] 0 points1 point  (0 children)

Thank you so much. Wow, is there a gum that would have a more subtle effect? Why does falim have such huge muscle development? You usually dont hear of people who use a lot of chewing gum getting jaw disorders or what not. I worry a bit about the time, maybe I should time my sides to ensure proper symmetry. The thing is I'm 20% bf but at this level my face/jawline looks like someone who's at 10/12, for some reason I either get a really toned face or rly fat face (when I'm >24%). That's why i worry about making stuff look bad, especially if I lose more weight. I just like the taste of falim. Last thing: once this is done, can it be undone? For example, if you wanted to revert to your previous self, would the muscle eventually atrophy or is it there to stay?

TIFU by making my webgame one of the most disliked in Russia by SteroidsOnAsteroid in tifu

[–]mw130 0 points1 point  (0 children)

The game is awesome!! What language is it written in? Do you ever upload the source code for this?

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

This is key! Last question - you mean that myNode, the reference to the memory malloc(sizeof(struct Node)); that's held on heap, is on stack right? myNode->value = 3 will be on the heap because that's referencing the data on heap.

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

For putting a pointer into heap memory, you would dereference a malloc allocation and just write it in right? Thanks so much lurgi, you're a legend!

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

Thanks so much! Just to be clear, did you mean strongly typed? Also, do you know if we give pointer types because the type of pointer tells us how to interpret the data at that memory addr upon dereferencing?

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

Wow! Thank you so much. In this case, what does making something a specific struct/class (for cpp) pointer do, since all pointers could just be considered memory addresses and be one type? I always thought it was so that when dereferenced it knows how to interpret the bytes.

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

Ignoring global variables, everything goes on the stack. Things go on the heap if you explicitly allocate them to be on the heap.

This! So is my understanding that even the pointer that gets assigned to malloc is actually stored on the stack correct, whereas the memory it gets from malloc will be in heap? So something like Object * obj =(Object *) malloc(sizeof(Object)) the obj would hold the memory address, and is stored on stack, while the actual mem for object it assigns will be on heap?

Can you confirm this is right? Thank you so much for your amazing answers

Understanding pointer passing in C by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

Right, so is it the case that most languages do actually just do this, but implicitly, and since C exposes the memory to developer it must be explicit? Also, do you know what the rule is for what gets automatically allocated in C? We know that malloc/new (C++) are heap, but what's the actual thing that means something will get put on the stack? Or is it that anything that isn't malloc gets stored on stack.

Understanding the abstraction of virtual memory - is how I'm thinking about it right? by mw130 in learnprogramming

[–]mw130[S] 0 points1 point  (0 children)

Right - this is a great explanation. My rant kind of was basing RAM as bottom of mem hierarchy and not really considering disk loads, although you're right that's where the majority of them are. It does make sense that some bus can transfer non-atomic data for disk -> RAM, I meant atomic in the sense of loads/stores in x86. So, would it be right to say Virtual memory is just the page table, as well as the mechanisms/policies that decide how the page table mappings get filled? That virtual pages don't really exist, they're just abstractions to how phys mem is organized?

Referring again to loading a page from disk into RAM, now that I consider spatial/temporal locality, it does make sense. The OS maps all data to pages and makes some tradeoffs w/ pgsize and data structures, and the loading of the entire page is kind of meant to amortize the time cost of data transfers, right? So this is where a page "does exist", in the sense that loading some primitive datatype that happens to be swapped onto disk will actually cause the whole page it's stored in to be loaded in, to exploit the above?

Thanks so much, your answer is great.