Fork me on GitHub
#emacs
<
2017-07-04
>
ajs07:07:19

is there a way to compile/eval an entire clojure buffer using inferior lisp (not cider) ? You can eval individual top-level expressions, but I'm looking for a counterpart to the "compile whole file" key binding

pseud08:07:19

@ajs I am somwhat intrigued, why not just use Cider ? You'll be missing out on the tighter intregration. Is there some problem with Cider you encountered ?

ajs08:07:37

I don't like Cider. Too bloated.

ajs08:07:19

Heck rich hickey and luke vanderhart and other well-known clojure folks don't use it either. a lot of the contractors I've worked with also don't like it.

ajs08:07:28

i have had problems using some projects from cider with inexplicable errors that my colleagues did not have, and after long time tracking down the problem, it was due to the cider-nrepl interaction on my machine only. it's just overly complex

pseud08:07:08

While that's a tangential discussion, it's not as if Rich & Co are infallible beings - I wouldn't adopt customs from any other person without first reflecting on why I want it. Also, even when "bloated", anything in emacs is lightweight compared to what modern machines has to endure (Electron apps, for example). And perhaps the bloatedness exists in large part to offer additional functionality. That said, try looking in mode help - (C-h m) and see if there isn't some command which sends the entire buffer over. If not, you can always write some elisp to copy over parts of the buffer to the REPL buffer for evaluation 🙂

ajs08:07:49

i used cider for 2 years so it's not like i'm not speaking from experience; i'm not blindly adopting what others do, i just really don't like it.

ajs08:07:03

and so far, inferior lisp solves a lot of the complexity for me. i never used nearly all cider features, so i'm getting the same experience in a much lighter, faster setup

ajs08:07:05

actualy inf-clojure was created because of the popularity of inferior lisp for clojure editing. unfortunately, inf-clojure is written by the cider author, and adds some cider features

munen09:07:20

ajs: My comment won't add a lot to the discussion. But I for one am very happy that bbatsov is such an active contributor to the community. Saying that 'someone gives us great tooling for free' unfortunately feels mean enough that I'm saying this even though it doesn't help the question at hand.

richiardiandrea09:07:04

I am currently contributing quite a bit to inf-clojure. I don't think inf-clojure adds any cider feature actually. Which one is the most worrisome for you?

ajs15:07:02

@U0C8489U6 i've started using inf-clojure and it's not bad so far. hopefully it does not grow to be anything complex

richiardiandrea08:07:25

@ajs Are you using version 2.0.1? Do you find completions slow?

ajs09:07:18

if you are talking about autocompletion, i have not used that in any language in many years. I find autocompletion overrated, and in general a pain to set up properly in any language. I do however use the generic emacs dabbrev-expand which has always been sufficient for me

ajs09:07:47

i actually find that in general autocompletion doesn't save any time for me when coding

richiardiandrea10:07:58

yeah agree...any slowness in something else?

ajs14:07:36

i haven't found inf-clojure to be slow, except maybe the startup, which was the same as cider

richiardiandrea15:07:57

@ajs yeah but that is more like nRepl's fault

richiardiandrea15:07:19

socket repl should be faster in theory

pseud08:07:28

If fast and light is your concern, you are using the wrong Lisp 😛 Did you have a look to see what the inferior lisp mode offers in terms of commands ? C-h m or M-x describe-mode. Also, describe-key & describe-bindings are often helpful.

ajs08:07:00

clojure is lighter and faster than common lisp for many things

ajs08:07:45

i have looked at the inferior lisp docs, and can do most things i want, but was curious how others had handled whole-file compilation. i can do it easily enough at the repl, but some things in emacs are still confusing for me

ajs08:07:29

actually, with regards to common lisp, it depends on your compiler. and for "lighter" i mean, as a language, clojure is much more minimal than CL

munen09:07:20

ajs: My comment won't add a lot to the discussion. But I for one am very happy that bbatsov is such an active contributor to the community. Saying that 'someone gives us great tooling for free' unfortunately feels mean enough that I'm saying this even though it doesn't help the question at hand.

ajs09:07:19

i can appreciate the work that went into cider, but it's not for everyone. that's all. hence my reaching out to others who do things without cider.

richiardiandrea09:07:25

@ajs there is an attempt for improving on cider called unrepl, still early days though

richiardiandrea09:07:43

the only path forward imho is to work on alternatives, contribute as much as possible will improve things for sure

ajs09:07:10

this is entertaining reading on the subject: https://gist.github.com/levand/b1012bb7bdb5fcc6486f

richiardiandrea09:07:37

yep all this is nice and old 🙂 nRepl is the only working solution for now because open source contributions on other projects have been slower...I personally have lately contributed more to inf-clojure than to cider because I share this view

ajs10:07:12

do you primarily use inf-clojure in your workflow?

richiardiandrea11:07:46

Yep I try to, sometimes I indulge in the stability of cider 😀

nha14:07:07

Anyone use sayid? I am trying to set it up, and get “Sayid didn’t respond. Is it loaded?” when trying a command. I ran sayid-setup-package which produced no output (several times in fact). I am using spacemacs in case it matters.

donyorm16:07:09

nha: Did you add it to dotspacemacs-additional-packages, spacemacs will uninstall any package not defined in .dotspacemacs or needed by a layer

nha16:07:00

It works now 🙂 It seems I just restarted the wrong repl after adding it to my lein dependencies. thanks 🙂

jeff.terrell14:07:19

@nha - You might get more targeted help if you ask in #spacemacs.

nha14:07:33

Ah could be, thanks

dotemacs14:07:51

@jeff.terrell sorry, not used sayid, but been meaning to… is sayid somehow more used by spacemacsers ?

bpiel15:07:46

@nha Can't really talk now, but sounds like sayid isn't loaded on the clojure-side of things. Add it to profiles.clj or project.clj?

jeff.terrell15:07:34

@dotemacs - Not sure. It's possible, since it is (or soon will be?) in the Clojure layer of Spacemacs by default, thanks to @donyorm.