Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The closest thing to image based programming in Common Lisp (which doesn't exist as such in Clojure, Scheme, etc.) is having a tmux session with ipython open! I can save the session and come back to it later with the state of the program still correctly loaded. It's fantastic.

Jupyter Notebooks should have this feature because loading huge datasets upon loading a ipynb really doesn't make sense, but alas...



Could you say how you save the ipython sessions? I'm aware of dill.dump_session but haven't tried it. I also would love to use something like CRIU, but find it doesn't play well with external accelerators like GPUs.

For the moment I'm stuck opening lots of tmux sessions and just re-running from history if I mess up the state.


I save the tmux session using ctrl-a,ctrl-s and it automatically saves the ipython state as well as my neovim.


This sounds like tmux-resurrect and not a built-in feature. Similarly, C-a is the default GNU screen prefix, C-b is the default prefix for tmux (though this is a fairly common rebind for people who wanted it to work more like screen).


I remapped ctrl-b to ctrl-a, and yes, I use tmux-resurrect.


Thank you for that necessary context.


I use a terminal split in vim which runs in screen.

Same effect, except that I can send various commands from the other vim split to the terminal using slime.

Started working like this when i was writing and prototyping a lot of SQL code... ran SQL in the terminal split and used the other split for the SQL file.


Python is a lisp just lists are replaced with dicts, after all ;)

I wonder if an AWS elastic lisp image service would be something lispers would use. Probably won’t live to see anything like it.


It is only missing having proper lambdas instead of one liners, JIT compilation, redo code after breaking into debugger, saving REPL into an image, ...

Julia is more Lispy than Python will ever be.

Ironically what AWS nowadays offers for Java and .NET based lambdas (SnapStart) is something similar to Smalltalk/Common Lisp images, yet another thing that traces back to their roots (Java being influenced by Objective-C/Smalltalk, and .NET origins due to J++ lawsuit).


> proper lambdas instead of one liners

that has simple solution - walrus thingy


In that case Elixir is also a Lisp where you use do-end instead of parentheses :)

heck, any language that has an AST would be a Lisp according to your definition..


Though it's easy to write a tiny Lisp interpreter in ~100 lines of Python (or JavaScript, etc.):

http://norvig.com/lispy.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: