Timeline for Heavily limited premature compiler translates text into excecutable python code
Current License: CC BY-SA 4.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 2, 2019 at 9:59 | comment | added | TVSuchty | Nah, it is not that the term "premature compiler" exists. I am just saying that I build a compiler because technically I did. But this compiler is not able to do all thing it is used to do, because I have not implemented a needed "aspects". So he is not mature, therefore premature... | |
Jul 1, 2019 at 19:10 | comment | added | RBarryYoung | I have never heard the term "Premature Compiler" before and Google isn't showing any other instances of it on the Internet. Is "Precompiler" what was intended here? | |
Jun 24, 2019 at 11:58 | comment | added | alx - recommends codidact |
@TVSuchty That's true for pointers, because if not, the caller doesn't know if the function changed the value pointed by the pointer. But variables can't be changed by a function, so the caller knows it will be constant. And for the function itself, the compiler is smart enough to read the whole function and know if it is being used in the function or not. In the specific case of this function it would make sense to make the pointer const (actually, not the pointer, but the type pointed by the pointer): size_t seek(const char *buffer, size_t start, size_t end, char to_be_seeked);
|
|
Jun 24, 2019 at 10:30 | comment | added | TVSuchty | @CacahueteFrito My intention is that the compiler can optimize- I heard that, if you do not change something make it constant so that the compiler can optimize | |
Jun 23, 2019 at 8:06 | comment | added | alx - recommends codidact |
The prototype size_t seek(char* buffer, size_t start, const size_t end, char to_be_seeked); has a const parameter (const size_t end ), which is weird. From the point of view of the caller, that is redundant, as only pointers can be used to modify arguments of a function. It makes some sense from the point of view of the function itself, but it kind of clutters the code, and I've never seen that being used; mostly because functions are (or should be) so short that that information is usually obvious. It's weirder given that to_be_seeked isn't modified in the function, but isn't const .
|
|
Jun 19, 2019 at 14:59 | comment | added | Martin Frank | Very good example for code review, thanks for sharing and thanks to all these good anseers | |
Jun 19, 2019 at 3:52 | answer | added | Shadow | timeline score: 8 | |
Jun 19, 2019 at 0:01 | history | tweeted | twitter.com/StackCodeReview/status/1141133773796519937 | ||
Jun 18, 2019 at 16:50 | history | became hot network question | |||
Jun 18, 2019 at 11:36 | answer | added | Edward | timeline score: 17 | |
Jun 18, 2019 at 9:46 | vote | accept | TVSuchty | ||
Jun 18, 2019 at 9:34 | answer | added | Toby Speight | timeline score: 15 | |
Jun 18, 2019 at 9:19 | history | edited | TVSuchty | CC BY-SA 4.0 |
added 268 characters in body
|
Jun 18, 2019 at 9:04 | history | edited | TVSuchty | CC BY-SA 4.0 |
added 29 characters in body
|
Jun 18, 2019 at 8:54 | comment | added | dfhwze | @AlexV You guys are right :) | |
Jun 18, 2019 at 8:53 | history | edited | yuri | CC BY-SA 4.0 |
added 56 characters in body
|
Jun 18, 2019 at 8:52 | comment | added | AlexV |
@dfhwze: To be fair, the code actually seems to emit executable Python code, since the OP actually does system("python3 translation.py"); to generate the output.
|
|
Jun 18, 2019 at 8:52 | comment | added | TVSuchty | Sure, you are right. But actually, this is happening already only in a redundant form. How would you call it? | |
Jun 18, 2019 at 8:46 | history | edited | dfhwze | CC BY-SA 4.0 |
tag + layout
|
Jun 18, 2019 at 8:43 | history | asked | TVSuchty | CC BY-SA 4.0 |