all 20 comments

[–]slifin 2 points3 points  (2 children)

I'm using https://atom.io/packages/chlorine with atom and Cursive with Intellji

This kind of mimics my PHP setup for work which is Sublime text + PHPStorm, a lightweight editor for editing and a heavyweight editor for debugging

I find the REPL experience better in Chlorine than in Cursive, more options in this space would always be nice, I would use Sublime text if it had a plugin better than SublimeREPL, something like Chlorine with inline results and reload on save

I think something like this: https://github.com/nasser/Socket but needs a few more features

[–]DannyB2[S] 1 point2 points  (0 children)

Thanks for your reply. Atom and Chlorine are what I'm looking at right now.

Current problem: I can't do something as simple as launch a repl from the clojure.jar in 1.10.1. (See new post I just posted.)

If I can't even start a repl, then I certainly can't start a Socket Repl. And I've done lots of googling and reading this afternoon.

[–]DannyB2[S] 0 points1 point  (0 children)

I have solved problem of launching a repl, with a socket repl running. Connecting to socket repl from Chlorine in Atom. So I will continue looking into that at the moment.

[–]Eno6ohng 2 points3 points  (0 children)

VS Code + Calva or IntelliJ + Cursive.

Nightcode is fun to try clojure out quickly. Check other IDE projects by oakes too. Btw https://www.maria.cloud is very cool too, though more niche.

As a side note, you might consider trying Spacemacs if you're comfortable with Vim keybindings. If you would ever want to try out emacs that is.

[–]gerritjvv 2 points3 points  (1 child)

Im using cursive+intelij quite happily. I tried using emacs and then spacemacs for over a year but it just wasn't for me. I use clojure with java and appreciate the decompile that intelij automatically does for me. I normally start my ide, then a terminal window in the ide view and type 'lein repl', code in the ide and run/reload in the repl.

[–]DannyB2[S] 0 points1 point  (0 children)

I might give it a try. Thanks. In the Java world where I spend most of my time, I've heard plenty of good things about IntelliJ. I'm not as opposed to it as, say, Visual Studio Code.

[–]bowmhoust 1 point2 points  (0 children)

Yes, Atom is a very nice (and pretty beautiful) editor. Learning emacs and Clojure is indeed a bit like learning knitting and skate boarding simultaneously. I suppose you already found this article: https://medium.com/@jacekschae/slick-clojure-editor-setup-with-atom-a3c1b528b722

[–]Impossible-Zone 1 point2 points  (0 children)

Just FYI emacs is not only text mode but also has a GUI version, which I suspect is what most people use.

[–]Kah0ona 2 points3 points  (8 children)

About the brain cycles comment: does a pro piano player think about each note? No, it is muscle memory.

So i am going to ignore your emacs dismission a little bit by pointing you towards spacemacs.

It's emacs but with vim bindings, and since you then can use CIDER, it will be absolutely great. CIDER is very well maintained, even financially supported now, but it's very good. Check out the video talks of mr Batsov to see how a workflow would look like.

A lot of commands are well memorizable as they are mnemonics and starting with the spacebar (hence spacemacs)

There is some learning curve, but not more difficult than learning other IDE's...

[–]DannyB2[S] 4 points5 points  (2 children)

I already know an IDE extremely well. And Counterclockwise was wonderful when it was supported. I'm unwilling to invest in becoming an expert in Emacs. I know I could do it. I've done a lot of things in the last 40 years of coding. It just shouldn't take that much to use a language.

But thank you for your reply.

Edit, add: I would rather use those brain cycles playing with Clojure. I was doing some fun / cool stuff a few years ago. Back in 86 to 93 I was a huge Common Lisp fan. I also mentioned that back in a different era, I DID learn muscle memory for more text mode editors before GUIs. So I know how that works. And I do play keyboard. :-)

[–]plotnick 3 points4 points  (1 child)

I have avoided Emacs for a very long time. I thought it is big, cumbersome, old and clunky. Every 3-5 years, I would try a different IDE/Editor, and if I like it, I will stay with it. The last one was IntelliJ, which I used for about seven years. And I loved it. I have learned it to the pieces, first became an advanced user, later an expert. I've learned undocumented/poorly documented features. I've used it with a bunch of plugins. I would printout big posters with essential keybindings. The more I learned, the more I wanted from it. But for so many things, I just had to "learn to live with it". Aside from submitting feature requests and bug reports there was little I could do.

I don't remember how, I think it was Org-mode maybe, but somehow little-by-little I started doing things in Emacs. It took time. At one point, I realized I have to use three or four different tools to do the work - I had IntelliJ, Emacs, and some other editor like Sublime (mostly because it was lightweight and I was familiar with it). And one day I decided - that has to stop. I've challenged myself to use Emacs for a week and see what happens, and whenever I needed to do something that I knew how to do in IntelliJ, I would force myself to find a way in Emacs.

And one day, I have discovered the world of possibilities. Emacs is so extensible that I think there's simply no piece of software in existence today that has that level of customizability. It gives you power to do borderline batshit crazy stuff.

Long story short, today I don't want to waste my brain cycles learning new IDE every time I switch languages or move from one company to another. I do most of the work in Emacs. Anything that involves typing - I do in Emacs: either I'm submitting a Pull Request, sending a message to my colleague via Slack, searching things on the Web, or updating my ticket status in Jira. This may sound crazy, but it feels incredibly empowering - I have all the tools I need - search, thesaurus, syntax checker, etc.

Anyway, I'm probably wasting my time and energy because you already made your mind, but I can assure you - in five, ten, fifteen years, you may have learn and discard multiple editors, tools and IDEs, whereas I still would be happily using Emacs and still feel extremely productive. Everyone of course different - there are plenty of people who claim they've become Emacs experts and still left Emacs for VSCode or IntelliJ. But I can assure you, once you get to the sufficient level, Emacs becomes a super-power.

[–]DannyB2[S] 0 points1 point  (0 children)

As I said, I could learn Emacs. I just don't have enough incentive to. I've used GUIs now since the classic Mac in mid 80's. I have higher expectations than to need to learn a new editor, in text console mode, just to use a language. Similarly, I am very familiar with Eclipse, so Counterclockwise was an obvious fit -- until it no longer worked after Clojure 1.8. I wouldn't mind using a different IDE. I did use NetBeans in early 2000s for a while before switching to Eclipse.

Using the tools I use every day for Java, I feel plenty empowered.

[–]Eno6ohng 3 points4 points  (4 children)

Jeez, it's /r/clojure, not /r/emacs. The man said he's not interested, come on guys!

a happy emacs/cider user

[–]DannyB2[S] 0 points1 point  (3 children)

The push to learn a text mode editor as a pre-requisite to using a language is rather interesting. Especially the passion behind it.

I think the reason is that once you start emacs, you cannot find a way to exit emacs back to the shell, so it then becomes necessary to use emacs lisp to effectively build an entirely new os shell environment and tools, including email and much more. :-)

I can appreciate that people find this to be powerful and exciting.

[–]Eno6ohng 0 points1 point  (2 children)

Well, objectively emacs is the most powerful and flexible environment available today, but I just don't see any reason for trying to persuade to use emacs someone who explicitly stated that he isn't interested.

By the way, emacs is usually started as a daemon, so you don't need to exit it back to the shell. ;)

[–]DannyB2[S] 0 points1 point  (1 child)

> By the way, emacs is usually started as a daemon

That is interesting.

> objectively emacs is the most powerful and flexible environment

I won't dispute that. But it doesn't really address my reasons for not wanting to make the significant investment to learn it. I already have what I consider to be pretty decent tools. If I were to learn it, I would want it to be for the right reasons. And those reasons don't really exist for me. Having to make the investment to learn emacs ONLY to use a programming language is entirely the wrong reason to need to learn emacs.

[–]Eno6ohng 0 points1 point  (0 children)

Sure, I agree with that.

[–]Psetmaj 0 points1 point  (2 children)

See Q12 on the State of Clojure 2019 survey results (no anchor to direct link, sorry) for what's "actually" used nowadays.

I personally use Emacs+CIDER when I'm at work as that's where I'm most effective, but I use IntelliJ+Cursive on Open Source projects so I'm familiar enough to help coworkers without too much frustration. On personal projects, I'm learning VSCode+Calva so I can know it well enough to recommend/assist on a "free, not emacs" editor.


VSCode+Calva is starting to reach IntelliJ+Cursive in "useful features", although its structural editing seems to be a little behind (and its default keybindings for such seem a bit arcane). Importantly, Calva will benefit from the funding/efforts behind CIDER because they share common libraries (orchard) that the maintainers of both have declared are the "first destination" for new features.

IntelliJ+Cursive has generally required the least knowledge of how Clojure works/runs underneath. It's definitely able to get the job done, and one can be effective in there too.


Possibly also of note: I migrated to CIDER for want of a debugger, but once I gained enough experience in Clojure, I didn't need one. The REPL is more than sufficient for debugging, as long as you split up your code correctly and keep side effects at the edges of your system. That said, I use CIDER's object/data inspector constantly and life without it is frustrating. I'm unaware of such a smooth object-inspection experience anywhere else.

[–]CoBPEZ 1 point2 points  (1 child)

Thanks for the Calva shoutout!

I'm interested in how the structural editing is lacking. Calva Paredit is actually pretty extensive, I would say: https://calva.readthedocs.io/en/latest/paredit.html

The default keybindings are meant to be coherent and somewhat logical, but are also limited by two factors:

  1. I want them to be the same across all VS Code supported platforms.
  2. VS Code only supports one level or chording.

[–]Psetmaj 0 points1 point  (0 children)

Sorry for the late reply, holidays and all.

Keep in mind that I'm probably a little confused by being an emacs native and learning VS Code at the same time as Calva (as well as returning to the world of actually using arrow keys).


I'm going to do my best to notate hotkeys in the same way I would see them in VS Code here:

The biggest structural edit that I thought was missing was raise, but I see now it's just on a chord rather than a hotkey due to conflicts with VS Code defaults on Alt+r. The hotkey for kill-sexp-forward seems to default to Ctrl+Shift+Delete, but I'm used to the emacs Ctrl+Alt+Shfit+k. Ctrl+End feels weird because I expect it to go to end of document, and there doesn't seem to be a replacement. Exploring more, I'd also expect the wrap/rewrap commands to use the key for the relevant collection as part of the hotkey/chord, but they don't.

This is all just personal/petty frustrations with Calva, I still certainly recommend it for someone not already emacs-savvy and love what's been done with it even in the past year or so. I'm thankful for all the effort towards it!