Compilation and RAM usage FAQ

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Compilation and RAM usage FAQ

Post by deshipu » 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?

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Compilation and RAM usage FAQ

Post by jickster » Mon Dec 11, 2017 9:18 pm

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?
Nowhere does it say on the page how to combine two mp_raw_code_t.




Sent from my iPhone using Tapatalk

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Compilation and RAM usage FAQ

Post by jickster » Mon Dec 11, 2017 9:28 pm

pythoncoder wrote:@jickster Have you read http://docs.micropython.org/en/latest/p ... ained.html? In particular the section on the heap.
Which section mentions the type mp_raw_code_t in that page you linked to?


Sent from my iPhone using Tapatalk

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Compilation and RAM usage FAQ

Post by jickster » Mon Dec 11, 2017 9:30 pm

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?
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?

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: Compilation and RAM usage FAQ

Post by jickster » Mon Dec 11, 2017 9:50 pm

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.
Which of my questions is the section on the heap supposed to address?

I don't see anything about combining mp_raw_code_t.

Nothing to answer these questions

Or this
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.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Compilation and RAM usage FAQ

Post by deshipu » Mon Dec 11, 2017 11:26 pm

So far the only person repeating themselves is you. Is that all you can do?

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Compilation and RAM usage FAQ

Post by jickster » Mon Dec 11, 2017 11:57 pm

deshipu wrote:So far the only person repeating themselves is you. Is that all you can do?

Since you can’t point out where the docs explain how to merge two mp_raw_code_t, why do you keep on replying?

Obviously you don’t know the answer so what are you getting out of it?

Yes that is all I can do because I don’t know the answer to my question.

What’s your excuse for your continued replies to my topic? All you’re doing is proving that you don’t know the answer … which we knew.


Sent from my iPhone using Tapatalk

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: Compilation and RAM usage FAQ

Post by SpotlightKid » Tue Dec 12, 2017 1:34 am

@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.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Compilation and RAM usage FAQ

Post by jickster » Tue Dec 12, 2017 11:29 am

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.
I stated my questions at the beginning of the topic. How else am I supposed to state them?

Where in the documentation am I supposed to look for how to combine two mp_raw_code_t ?

What initiative am I supposed to to demonstrate if the documentation doesn’t exist?


The only “documentation” is the code … which is terribly documented.


Sent from my iPhone using Tapatalk

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Compilation and RAM usage FAQ

Post by stijn » Tue Dec 12, 2017 12:40 pm

jickster wrote:
Tue Dec 12, 2017 11:29 am
The only “documentation” is the code … which is terribly documented.
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.
What initiative am I supposed to to demonstrate if the documentation doesn’t exist?
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?'.

So I concur with SpotlightKid: it may be that English is not your native language but in any case your posts do have a slight tendency to come over as 'give me the code and all answers now'. You should understand that can be quite off-putting to others which in turn can yield to friction..

Post Reply