Re: Compilation and RAM usage FAQ
Posted: Mon Dec 11, 2017 9:16 pm
Is acquiring knowledge really that painful to you so you have to shy away from it and make other people do your work for you?
Please see the new forum at
https://forum.micropython.org/
Nowhere does it say on the page how to combine two mp_raw_code_t.deshipu wrote:Is acquiring knowledge really that painful to you so you have to shy away from it and make other people do your work for you?
Which section mentions the type mp_raw_code_t in that page you linked to?pythoncoder wrote:@jickster Have you read http://docs.micropython.org/en/latest/p ... ained.html? In particular the section on the heap.
Is acquiring the knowledge that the documentation doesn’t mention how to combine two mp_raw_code_t so painful to you that you have to shy away from it yet repeatedly come back to this thread and incorrectly insist the answer is in the documentation?deshipu wrote:Is acquiring knowledge really that painful to you so you have to shy away from it and make other people do your work for you?
Which of my questions is the section on the heap supposed to address?pythoncoder wrote: ↑Sat Dec 09, 2017 7:19 am@jickster Have you read http://docs.micropython.org/en/latest/p ... ained.html? In particular the section on the heap.
If I run one line (or block) at a time of a `.py` via the REPL API (as in pyexec.c:pyexec_raw_repl()), will I eliminate the issue of running out of RAM during compilation?
i.e. for N lines in a `.py` file, will my peak RAM usage during compilation be more, less, or same if I feed in one line at a time vs compile the entire N lines at once?
I understand it'll be much slower but let's say I was running out of RAM during compilation and didn't care about speed.
deshipu wrote:So far the only person repeating themselves is you. Is that all you can do?
I stated my questions at the beginning of the topic. How else am I supposed to state them?SpotlightKid wrote:@jickster: The help you may get here is provided voluntarily by members of the community. It is expected that you demonstrate some initiative in finding answers to your questions yourself instead of demanding them from others. The way your requests for information are worded comes across as very impatient, to say the least. I suspect if you continue like this, soon nobody will answer you at all anymore.
Take this as a friendly hint, please.
Sorry, but no. Most of MicroPython's code, as well as the git commit log, is so well-written and self-documenting it does not require additional documentation in order to understand it. Though in order to understand it you usually need to know your way around with C and code in general. Now you could argue that is beyond your knowledge, but that argument doesn't really fly: since you're looking to do things like stitching mp_raw_code_t instances together etc, you better learn at least the basics or else you'll have a hard time writing correct code for that.
Well to be honest: looking at the first 5 questions in your first 2 posts in this thread it seems, to me at least, a bunch of those you should be able to answer yourself by simply trying to measure it. It is possible you don't know how, but aksing that - i.e. 'how could I figure this out' - instead of just firing off a train of questions would be just one example of showing initiative. (and an answer: enabling the debug logging in e.g. malloc.c and gc.c and/or running one of the PC ports and inspecting mp_state_ctx.mem in the debugger would give quite some insight into what consumes RAM/stack and what doesn't) Another example of initiative would be if you've said 'ok I read everything on the heap and looked in gc.c but I don't quite understand X and Y, any pointers on that?' instead of bluntly saying 'what section contains all the answers?'.What initiative am I supposed to to demonstrate if the documentation doesn’t exist?