4 ms·
I really, really like Clojure. I just wish I had something to use it for. I've done lots of Common Lisp development previously and REPL-based programming is jus
by black-tea 8y ago
I really, really like Clojure. I just wish I had something to use it for. I've done lots of Common Lisp development previously and REPL-based programming is just great. I can't really do it in Python and it makes me sad.
- Zak 8y ago> I can't really do it in Python and it makes me sad. That really bugs me with a great many popular languages. There's a REPL, but the libraries and tooling don't really embrace it.
- owyn 8y agoYeah, PHP supports a REPL too! I sometimes found it useful when working on mediawiki to debug issues when a full blown debugger wasn't necessary. And if you were familiar with the various internal API's it was pretty easy to do simple maintenance tasks through the REPL without needing to write a script.
- wwweston 8y agoWhich one do you use? I ended up rolling my own years ago and it's worked out fine (other than the fact I've never gotten readln support working), but I've noticed a proliferation of other solutions since about the release of PHP 7 and wonder if they're an improvement.
- owyn 8y agoI used Boris, and the php debugger as a pretty effective shell sometimes. mediawiki had eval.php, which is apparently now shell.php https://m.mediawiki.org/wiki/Special:MyLanguage/Manual:Shell.php https://m.mediawiki.org/wiki/Special:MyLanguage/Manual:Shell... Based on my experience with that I’d definitely add a shell utility to any large application I was working on.
- black-tea 8y agoThe only tools I've found with decent support for Python and other languages are all emacs based. Same goes for the Clojure and CL ones, actually. It's no surprise, I suppose, because this style of programming is so natural to an emacs user. But it's difficult with Python as soon as you try to do anything beyond a single module. CL and Clojure have proper packages and namespaces so it works fine. But in Python you're limited to working on the context of a single module. If you modify a module that was imported then you have to restart the REPL because you can't reload modules. It just doesn't work. In CL I would just load the entire system then eval whatever part I want to. From that point I would never not have the current version of the system completely loaded into the running image. Much the same with emacs itself. It is a running image of your emacs lisp system and you can just modify it and eval as-you-go. Does any other language even come close to this?
- dmux 8y ago>Does any other language even come close to this? Smalltalk
- black-tea 8y agoInteresting. But one of the points of Clojure is to get away from the object-oriented way so I'm not sure that I'd like Smalltalk.
- chillpenguin 8y agoIf I understand it correctly, Smalltalk is really nothing like Java and the mainstream OOP that Clojure is a reaction to.
- pjmlp 8y agoSmalltalk is dynamic and Java is static. Smalltalk, it is an experience, given that language, IDE and runtime/OS are all blended together, while Java can only do so much, even with the more advanced IDEs. Clojure might be a reaction to C++/Java/C# OOP style, but it surely adopts Common Lisp OOP style.
- narwally 8y agoIt doesn't help that most languages that advertise having a REPL really have more of an interactive shell than a true read-eval-print-loop. Lisps do a really good job of making a distinction between the reader, evaluator, and the printer. It makes it really easy to create tools that use just one or two of these or insert themselves between the different layers to expand the REPLs capabilities.
- black-tea 8y agoYes indeed, and now that repl.it is popular with noob programmers I think that distinction has been lost. Who told them that what they are offering is a REPL? Sigh...
- aidos 8y agoI use ipython with auto reload and it works really well in general. Not sure how anyone lives without it. I made a video to demonstrate it some time ago. Apologies for the dreadful sound quality. https://youtu.be/k-mAuNY9szI https://youtu.be/k-mAuNY9szI