Open
Conversation
The Changes to this are:
1. silenced certain print statements regarding:
- the successful writing to file
- the successful compilation of files
- the execution of a program.
2. Created a folder structure for source files and binaries to declutter the notebooks root folder
- .o files get put into the same temporary directory as the wrapper
- source files get into a build/src/ folder
- executables get put into the build/ folder
- dependecies are now searched for in both the notebooks root folder aswell as the temporary directory
3. reimplemented the detect main function to remove duplicate compilations
- the reimplementation only uses the compilers preprocessor & regex to find main implementations
- This might not be as rigorous as the previous implementation but has the benefit of not needing to compile everything twice
- If preferred I can also redo this, keep the compilation but also keep the object file, if main is not found. This would at least skip the duplicate compilations for not executable binaries.
- Another solution would be to only go to the assembly step, this would forgo the complete compilation, and would produce a usable assembly file that can be checked for the main: lable.
drastically improved the detect main function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have changed / (re)implemented the following features:
silenced certain print statements regarding:
This was done to improve output readability. The output still exists, but is now part of the jupyter notebooks logs instead.
Created a folder structure for source files and binaries to declutter the notebooks root folder
When I started using this kernel i noticed, that my rootfolder cluttered very quickly. This change seeks to eliminate the cultter while still letting the user keep their source files and executables. I've elected to keep the object files as temporary files as they're not required to run the executables. If you'd prefer them to not be temporary I can also put them in a subdirectory as well.
reimplemented the detect main function to remove duplicate compilations
This change seeks to improve a bit on performance (tho im not entirely sure whether I've succeded in that Goal) as it eliminates the need to compile everything twice. Another solution would be to only compile up until the assembly step, this would forgo the complete compilation, and would produce a (re)usable assembly file that can be checked for the main: lable.
I'm not the most seasoned python programmer so if you'd like me to change anything or have some suggestions please let me know! :)