6 ms·
Yes, Python's REPL speeds up development, but Lisp's REPL (we should say image-based development model) is even more interactive! We never wait for a server to
by vindarel 5y ago
Yes, Python's REPL speeds up development, but Lisp's REPL (we should say image-based development model) is even more interactive! We never wait for a server to restart, our test data is live on the REPL, we compile our code function-by-function with a keystroke and we get instant warnings and errors, when there is an error we get an interactive debugger that pops up and allows us to inspect the stack, go to the buggy line, recompile, come back to the REPL, resume the execution from the point we want, objects are updated when a class definition changes and we can even control that… it's crazy. From time to time it becomes a mess and I restart the Lisp image, but it's about every two weeks :p I tried to explain more here: https://lisp-journey.gitlab.io/pythonvslisp/ https://lisp-journey.gitlab.io/pythonvslisp/
Note that I'm not a 10x master, I use CL for mundane, real-world tasks (access to an FTP, parsing XML, DB access, showing products on a website, sending email with sendgrid…), my programs had 1 trivial bug, I am more productive and I have more fun… Just to say it has its uses, even today, even with "all the libs" of Python (and btw, see py4cl).
- pdonis 5y ago> We never wait for a server to restart I'm not sure I understand. When I run Python's REPL, I'm running the interpreter on my local machine; I'm not talking to any server. The same would be true if I run the Lisp interpreter, but I don't see how that is any advantage for Lisp over Python.
- ahefner 5y agoStart your Python REPL, do your interactive development, measure your average time before aborting and reloading the python instance. How much time elapses? Minutes? Hours? When I've done Common Lisp heavily, I've lived in the same instance between multiple days up to weeks. This feels perfectly natural. Admittedly it is hard to justify why this difference is meaningful.
- vindarel 5y agoindeed, I was thinking web development for that example, but I'm talking to my local development server, not a remote one (although it's trivially possible with a swank connection). I often have to wait for Django in a non-trivial app. I often set a ipython breakpoint, try things out, continue, and iterate. Anyways, do you develop your app when you are in the REPL? Or do you try things out in the REPL and write back what you found out in the files? If you found how to send changes from your editor to the REPL, then good, but it's not built-in, and it will lack the other things I mentioned.
- pdonis 5y ago> do you develop your app when you are in the REPL? Or do you try things out in the REPL and write back what you found out in the files? Yes. :-) Both strategies can be useful. (And note that "app" does not necessarily mean "web app"; web applications are just one kind of application. There are lots of different kinds of applications. The REPL helps with all of them.)
- vindarel 5y agosure. Then a web app is a clear example of Lisp's increased interactivity.
- pdonis 5y agoThe increased interactivity appears to be due to your particular framework, which you have built using Lisp but which is not the same as just "Lisp". Similar frameworks have, I believe, been built using Python.
- vindarel 5y agoThe linked article of Mikel Evins further in the thread might give you more hints.
- pdonis 5y agoOther than the "breakloop" functionality, which I agree is (AFAIK) unique to Lisp interpreters, I don't see anything described there that can't be done in a Python REPL.
- chillpenguin 5y agoIf you can't understand what people are trying to say, I recommend trying to experience it for yourself. Install Common Lisp along with Slime for Emacs, and try things out. Or try out a Smalltalk environment like Squeak or Pharo which would also give you the same "enlightening" experience. I know you are skeptical because python has a repl too and so it is hard to see what these "live" environments like lisp/smalltalk are offering. But trust me (and the others) that there is more than what python offers. I have written python professionally probably more than any other language I have used, so I'm not ignorant of python btw. No one is trying to fool you. But you don't have to take our word, please try it out for yourself!
- pdonis 5y ago> Lisp's REPL (we should say image-based development model) This looks like something specific to your particular development workflow for one particular type of application (a web server). REPLs (for both Lisp and Python) are much, much, much more general than that.