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

Make it possible to split implementation over multiple cells #28

Open
spoorcc opened this Issue Apr 13, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@spoorcc

spoorcc commented Apr 13, 2017

Currently each cell should contain an entire functional c program. Notebooks would be much more descriptive if you could incrementally build up a program and intermix functions and markdown.

  • Markdown cell with some explanation
  • Code cell with a function
  • Markdown cell with some more explanation
  • Code cell with another function
  • Markdown cell with even more explanation
  • Code cell with main function calling other two functions
@brendan-rius

This comment has been minimized.

Owner

brendan-rius commented Aug 10, 2017

That would be a good improvement, anyone wants to open a PR for this?

@spoorcc

This comment has been minimized.

spoorcc commented Aug 10, 2017

For basic implementation (without redefining functions), changes needed probably:

  • Concatenate all code from cells (store all cells in mem when entering do_execute)
    --> Maybe there is a Jupyter notebook provided way/feature to do this?
    • But how to see if the first cell was changed and re-executed?
  • Not complain (just don't call anything) when there is no usermain found from master.c
    main_t usermain = dlsym(userhandle, "main");
    if ((error = dlerror()) != NULL) {
    fprintf(stderr, "%s: %s\n", argv[0], error);
    return EXIT_FAILURE;
    }
@spoorcc

This comment has been minimized.

spoorcc commented Sep 22, 2017

There is also relevant stackoverflow question about a accumilating mechanism: https://stackoverflow.com/questions/43316613/access-jupyter-code-cell-metadata-in-a-kernel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment