From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: [PATCH] Re: ob-clojure.el: Add ClojureScript interface Date: Mon, 17 Feb 2020 10:33:02 +1100 Message-ID: <87y2t2t8eq.fsf@gmail.com> References: <20180422205003.87836-1-roberthambrock@gmail.com> <20180422205003.87836-3-roberthambrock@gmail.com> <87v9ocuesg.fsf@gmail.com> <87imkb7mwj.fsf@gnu.org> <87y2t6fqwj.fsf@gmail.com> <87pnei8oe0.fsf@bzg.fr> <87k14prbb5.fsf@gmail.com> <87eeuxqyeq.fsf@bzg.fr> <87eeuxqjxq.fsf@gmail.com> <87v9o8zyzs.fsf@gnu.org> <875zg8el5a.fsf@gmail.com> <878sl2ruk7.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57169) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3TPY-0003DS-1a for emacs-orgmode@gnu.org; Sun, 16 Feb 2020 18:33:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3TPW-0001hA-KG for emacs-orgmode@gnu.org; Sun, 16 Feb 2020 18:33:15 -0500 In-reply-to: <878sl2ruk7.fsf@bzg.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode@gnu.org Thanks for the response and work Bastien. I will check out the updated version when I get a chance. One point possibly relevant with regards to Clojurescript. I suspect there could be a reasonable use case when you consider clojurescipt in the context of node rather than just as a browser language. In particular, people have been using clojurescript to develop NPM packages that can be used in various ways for javascript projects. However, the right tool for doing this is likely shadow-cljs rather than clojure CLI tools - though it should also be possible just using the CLI tools. Tim Bastien writes: > Hi Tim, > > thanks for your email. > > Tim Cross writes: > >> I wonder if it would make sense to use shadow-cljs rather than cider as >> a back end for evaluating clojurescript? > > I am inclined to question the usefulness of evaluating ClojureScript > code *at all*. > >> More generally, I wonder if there would be any benefit in considering a >> Clojure CLI Tools back end integration and bypassing CIDER altogether? > > Yes, I agree this would be better. > > I implemented (in master now) the support of inf-clojure.el to > evaluate Clojure blocks. > > Inf-clojure is more lightweight than cider. > > Also, with (setq org-babel-clojure-backend 'inf-clojure) you can now > add a :alias header arg to the src block and "clojure -Aalias" will > then be called to launch the repl. > >> While I love CIDER, I'm not sure it is the right tool for a org-babel >> type environment. I've recently been moving my projects from being lein >> based to Clojure CLI tools based and while I still use CIDER for larger >> development work, find the CLI great for basic execution of code. For >> me, CIDER has a lot of additional overhead and complexity which is often >> of little benefit to what I want via babel and I've found it to be a >> very fragile environment. > > Yep, I agree again. > >> Sean Corfield has a great example deps.edn file at >> https://github.com/seancorfield/doc-clojure and it shows how you can >> hook in various different REPLs - for example, a basic socket based >> REPL, which might provide a cleaner and more stable back end interface >> for evaluating Clojure (and potentially clojurescript) for babel. > > I am not sure it is worth getting rid of inf-clojure.el altogether, > but relying on tools.deps seems the way to go. > >> As I said, this is an initial and immature idea, but I think it could >> provide a back end which was a little more like other babel back ends >> and may be less fragile than one based on CIDER (plus I suspect it would >> be faster). What do people think? Is this something worth investigating >> further? > > Definitely! Thanks for sharing these idea. > > Please try the latest ob-clojure.el from master and let me know what > can be improved to better fit your (and others') needs. > > Thanks, -- Tim Cross