-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purge loaded module #57
base: master
Are you sure you want to change the base?
Conversation
This will purge already loaded code and will make new code available automatically
We are trying to understand what this pull request does and the need for it. Why would Also, in the code itself please add |
Even though nitfy:compile doesn't not load any code, it sets up a path to newly |
Testing a simple C program
PROBLEM 1:'new' already defined compile error. I think it's a problem with Nifty too. Generated code should not create a function with such a ubiquitous name like 'new'. FIX:rename 'new' to 'queue' in q.c
PROBLEM 2:Not sure what it is, but probably Nifty can't work without a header file. FIX:create q.h, move the queue struct to q.h and include q.h in q.c
OK. It works now! Let's proceed with the video.PROBLEM 3:Port q_eqc to work with Proper FIX:
PROBLEM 4:Fix q.c to pass tests (from the video) FIX:
PROBLEM 5:After fixing C code nifty:compile doesn't reload the code. FIX:Purge old code
The bottom line is Nifty currently doesn't support interactive work like eqc_c does. |
You are of course right that Thanks for the detailed example, but parts of it are different issues and do not belong in this pull request. Please open other issues to discuss them. |
I agree that compile doesn't sound like load/purge. But from the user's point of view I saw the issue and proposed my solution. |
I was trying to work through this Quickcheck video https://vimeo.com/104007760 and
immediately found that Nifty doesn't reload the module itself after recompile. This commit
fixes this. Please notice that the code doesn't load the module itself.