I am new to swift, but definitely enjoying learning so far! Quick thanks to Jeremy, Chris, and everyone making this possible!
I took a stab at making the magic cell %%time
command work. Definitely got some inspiration from the comments in this thread, so thanks everyone.
I’m still not 100% happy with it, but wanted to share the first pass. A few things I have left are:
- Using a module instead of #include to avoid adding functions directly to the global scope
- Not wrapping all the code in a closure so you can use any variables defined within the cell in other cells
- Still have the final value in the cell print out in addition to the timing details
Here’s a notebook with some sample usage, the commits to swift-jupyter, and the swift module to make it all work.