Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.1k stars 105 forks source link

Fix #326 - proper handling of store_history #329

Closed strangepleasures closed 2 years ago

ileasile commented 2 years ago

Hi, Pavel! How do you use store_history? Are you interested only in not incrementing the counter, or do you really wish not to save compiled snippets in memory?

strangepleasures commented 2 years ago

Hi, Pavel! How do you use store_history? Are you interested only in not incrementing the counter, or do you really wish not to save compiled snippets in memory?

Hi Ilya, in principle, I only need proper numbering (consistent with Out[] values of course). If you need to keep"unnumbered" results for any other reason, e.g. for rendering, I guess it could be a separate data structure.

ileasile commented 2 years ago

@strangepleasures I've changed the logic a bit and slightly refactored the code. Could you please review new logic? It's in this test: https://github.com/Kotlin/kotlin-jupyter/pull/329/files#diff-374830c795b7e656d78a644f288ac3108fdb5048764f61ee5b3d2a8ddd54e973R314-R330

ileasile commented 2 years ago

Well, I'm merging it then