Discussion about all editors used for Clojure/ClojureScript
arrdem 2015-06-05T00:35:00.000441Z

Okie doke. Taking a stab at that RT/Util refactor we talked about.

cfleming 2015-06-05T02:08:25.000443Z

arrdem: Awesome, let me know how you get on

arrdem 2015-06-05T02:18:12.000444Z

cfleming I may yet trouble you for a Skype call on this and there will definitely be a clj-dev post. What to do with vars and RT.var is not obvious and critical

cfleming 2015-06-05T02:18:42.000445Z

arrdem: Sure, let me know when you’d like to call

cfleming 2015-06-05T02:19:08.000446Z

arrdem: I’m in this timezone for another week and then I’m in Europe for a couple of months, so that’ll be your morning

arrdem 2015-06-05T02:19:55.000447Z


arrdem 2015-06-05T02:20:28.000448Z

Evening in CA works best for me... What Zulu offset are you on

cfleming 2015-06-05T02:21:13.000449Z

This isn’t IRC any more - just click on my user

cfleming 2015-06-05T02:21:44.000450Z

You’ll notice that Cursive is technology from the future

arrdem 2015-06-05T02:22:11.000451Z


danielcompton 2015-06-05T02:22:13.000452Z

Colin is 1200 Zulu

danielcompton 2015-06-05T02:22:28.000453Z

Until Spain (?)

cfleming 2015-06-05T02:22:33.000454Z


cfleming 2015-06-05T02:22:53.000455Z

arrdem: What’s the issue with var?

cfleming 2015-06-05T02:24:39.000456Z

arrdem: I guess if you move var, you have to move all the static vars too, right?

cfleming 2015-06-05T02:25:07.000457Z

arrdem: Or not, RT can call Util.var

arrdem 2015-06-05T02:28:49.000458Z

Right it can

arrdem 2015-06-05T02:28:57.000459Z

The question is philosophical

cfleming 2015-06-05T02:29:31.000460Z

I’ll get my pipe

arrdem 2015-06-05T02:29:42.000461Z

Is all that mutable state stuck in RT and thus poisoning a bunch of other stuff that may not need a fully booted Clojure instance

arrdem 2015-06-05T02:30:26.000462Z

Or can we move it as such alias it and spread the mutable mess somewhat for the loading consequences

arrdem 2015-06-05T02:31:38.000463Z

Does that make sense?

cfleming 2015-06-05T02:32:17.000464Z

You’re talking about data-readers etc?

arrdem 2015-06-05T02:32:25.000465Z

I just don't want to write a bunch of code only to find that we didn't purify everything or have it shot down by alex

arrdem 2015-06-05T02:32:28.000466Z


cfleming 2015-06-05T02:32:34.000467Z

That should have earmuffs, obviously

cfleming 2015-06-05T02:32:48.000468Z

Is that needed by anything in Util?

cfleming 2015-06-05T02:33:17.000469Z

From my POV Util should be as small as humanly possible

cfleming 2015-06-05T02:33:48.000471Z

To allow collections & EDN to work without RT, basically

arrdem 2015-06-05T02:33:59.000472Z

No the problem is that the printing functions and the math class depend on earmuffs

arrdem 2015-06-05T02:34:18.000473Z

And since some datastructures use the printing stuff

cfleming 2015-06-05T02:34:33.000474Z


cfleming 2015-06-05T02:34:34.000475Z

I see

arrdem 2015-06-05T02:34:40.000476Z

Unless we can move that it's not possible to do with this partition

arrdem 2015-06-05T02:35:00.000477Z

Also math in lean Clojure

arrdem 2015-06-05T02:35:09.000478Z

*no math

cfleming 2015-06-05T02:35:41.000479Z

So you need to move them, then.

arrdem 2015-06-05T02:35:46.000480Z


cfleming 2015-06-05T02:35:48.000481Z

Is there an issue with doing that?

cfleming 2015-06-05T02:36:40.000482Z

Var itself doesn’t contain anything too funky, right?

cfleming 2015-06-05T02:37:07.000483Z

And those vars are initialised on creation, looks like - I guess there might be issues with missing init

cfleming 2015-06-05T02:37:35.000484Z

If any of them are initialised later using set! during ns load or something

arrdem 2015-06-05T02:37:43.000485Z

Right if you move those vars you now have this weird partially booted Clojure monster

cfleming 2015-06-05T02:37:59.000486Z

But it doesn’t need any actual Clojure though, right?

arrdem 2015-06-05T02:38:05.000487Z

Right it doesn't

cfleming 2015-06-05T02:38:12.000488Z

My definition of purity is: does it load clojure.core?

arrdem 2015-06-05T02:38:23.000489Z

We can do this without core

arrdem 2015-06-05T02:38:41.000490Z

Core doesn't to my knowledge modify this stuff

cfleming 2015-06-05T02:39:52.000491Z

Ok, I’d go for a totally minimal PoC and then worry about the purity later. I don’t think that initialising some Var objects with Java initial values is a huge deal.

cfleming 2015-06-05T02:40:20.000492Z

And it’s not optional anyway, sounds like.

arrdem 2015-06-05T02:40:29.000493Z

Right right...

arrdem 2015-06-05T02:40:53.000494Z

Okay. I have a refactored copy of rt in Dropbox...

arrdem 2015-06-05T02:41:08.000495Z

I'll do the big move to util later tonight

cfleming 2015-06-05T02:56:06.000496Z

Ok cool

arrdem 2015-06-05T04:30:49.000497Z

cfleming: one complaint... when I did my big method move Cursive didn't catch the changes and rewrite clojure/core.clj

arrdem 2015-06-05T04:31:10.000498Z

it's not hard to do by hand, I would just have expected you'd catch that

arrdem 2015-06-05T04:31:32.000499Z

some of the stuff like Compiler.java and gen-class using class field accessors is totally excusable

cfleming 2015-06-05T04:31:56.000500Z

arrdem: Yeah, support for the move refactorings is still a little patchy.

cfleming 2015-06-05T04:32:26.000501Z

arrdem: You’re talking about moving RT.var not renaming RT/var to Util/var in Clojure code?

arrdem 2015-06-05T04:33:34.000502Z

yeah so wen I did the "refactor > move" on RT.var it didn't see that RT/var == RT.var and rewrite that stuff

cfleming 2015-06-05T04:34:01.000503Z

Yeah, sorry - renames catch all that stuff, moves not so much

cfleming 2015-06-05T04:34:34.000504Z

Moves are more complicated since I’d also have to muck with imports and so on.

cfleming 2015-06-05T04:34:47.000505Z

It’s on the list, but the list is long :simple_smile:

arrdem 2015-06-05T04:37:09.000506Z

copy that

cfleming 2015-06-05T04:38:13.000507Z

I’ll be working on Clojure moves before Java ones, too - I’d dearly love to be able to move functions to another namespace safely, get the namespaces updated and get warnings about cyclic dependencies

danielcompton 2015-06-05T04:42:10.000508Z

That’s some next level refactoring

cfleming 2015-06-05T04:43:10.000509Z

In other news, I only have two cases to fix, and the whole Cursive codebase will typecheck correctly with the in-editor inference

arrdem 2015-06-05T04:43:12.000510Z

okay I think I'm almost there...

arrdem 2015-06-05T04:43:27.000511Z

thank god for Intellij refactoring automagically fixing most of Compiler.java for me

cfleming 2015-06-05T04:43:41.000512Z

Sing it, brother

danielcompton 2015-06-05T04:44:01.000513Z

Where’s your CIDER now huh?

cfleming 2015-06-05T04:44:01.000514Z

Using Emacs for Java development is basically professional negligence

arrdem 2015-06-05T04:44:17.000516Z


cfleming 2015-06-05T04:45:20.000517Z

On that note, I’m going for a beer

arrdem 2015-06-05T04:45:22.000518Z

I cannot go into RT without wanting to light it on fire

arrdem 2015-06-05T04:45:29.000519Z


arrdem 2015-06-05T04:45:36.000520Z

way ahead of you there...

arrdem 2015-06-05T04:45:43.000521Z

office beer 😄

arrdem 2015-06-05T04:49:15.000522Z

How do I force intellij to synchronize buffers and fs?

arrdem 2015-06-05T04:53:57.000523Z

Okay I think that's Compiler.java ported...

arrdem 2015-06-05T05:05:45.000524Z

I guess I don't even need to rewrite the preamble of RT to use vars from Util thanks to the magic of intern...

arrdem 2015-06-05T05:52:19.000525Z

cfleming: patch complete... tests clean so far

arrdem 2015-06-05T05:52:28.000526Z

tests clean

arrdem 2015-06-05T05:52:41.000527Z

gents we have a 1.7 snapshot that breaks no behavior and enables lean AOT

arrdem 2015-06-05T05:53:04.000528Z

I'm gonna go no not celebrate sleep yeah that's the other one.

arrdem 2015-06-05T06:36:26.000530Z

merry christmas

arrdem 2015-06-05T06:36:29.000531Z

sleep now

arrdem 2015-06-05T06:37:29.000532Z

I think there's still more to be done in terms of moving all the vars out to some common namespace...

arrdem 2015-06-05T06:37:36.000533Z

but that's putting lipstick on a pig

arrdem 2015-06-05T06:38:00.000534Z

also the vars that moved from RT to Util need to still occur in RT, they don't right now which is strictly a binary compatability break.

arrdem 2015-06-05T07:04:31.000535Z

You shouldn't see load time improvements on non lean binaries because calling require or compilers hits RT which does the source load

arrdem 2015-06-05T07:05:29.000536Z

But a lean compiler or a handcrafted binary should be able to do a bunch of keyword map and vector ops, print some stuff and exit without booting Clojure proper.

cfleming 2015-06-05T08:18:52.000537Z

arrdem: That’s awesome

cfleming 2015-06-05T08:19:07.000538Z

arrdem: I’ll take a look at at the patch sometime soon, hopefully tomorrow

bozhidar 2015-06-05T10:14:31.000541Z

@arrdem: I’m always watching 😉

bozhidar 2015-06-05T10:14:36.000542Z

but I don’t mind

bozhidar 2015-06-05T10:15:08.000543Z

I’m perfectly fine with everyone using Cursive instead of cider

bozhidar 2015-06-05T10:15:23.000544Z

most of you are Clojure users

bozhidar 2015-06-05T10:15:32.000545Z

I’m an Emacs user

bozhidar 2015-06-05T10:15:49.000546Z

and there lies the big difference

bozhidar 2015-06-05T10:16:14.000547Z

if you view your editor as something that puts into disadvantage

bozhidar 2015-06-05T10:16:21.000548Z

then I guess you’re not using the right tool

bozhidar 2015-06-05T10:19:10.000549Z

btw, on the subject of formatting

bozhidar 2015-06-05T10:19:24.000550Z

I really don’t know how Rich has written all the Clojure and Java code

bozhidar 2015-06-05T10:19:30.000551Z

pretty much everything is way off

bozhidar 2015-06-05T10:19:38.000552Z

tabs and spaces all over the place

bozhidar 2015-06-05T10:19:49.000553Z

makes the codebase look pretty messy to most people

bozhidar 2015-06-05T10:20:26.000554Z

every time I see Clojure’s Java code I get sick

thomas 2015-06-05T10:21:10.000555Z

@arrdem: I think Rich used intellij... but I could be wrong. at clojureExchange 2013 (?) he showed us a bit of the Java code.

thomas 2015-06-05T10:21:27.000556Z

you could go back and look at the videos and find out.

thomas 2015-06-05T10:21:39.000557Z

probably 2012 actually btw.

bozhidar 2015-06-05T10:35:31.000558Z

I think he even said this a few times

bozhidar 2015-06-05T10:35:44.000559Z

that he used Emacs for Clojure and IntelliJ for Java

bozhidar 2015-06-05T10:35:56.000560Z

although I’m not sure if this is the case anymore

cfleming 2015-06-05T10:50:03.000561Z

He’s always used IntelliJ for Java

cfleming 2015-06-05T10:50:32.000562Z

I think he’s using Cursive for Clojure now as well - he was planning to, but I haven’t heard how it’s going

cfleming 2015-06-05T10:51:44.000563Z

Stu Halloway was going to switch as well

cfleming 2015-06-05T10:52:15.000564Z

They were both waiting for the inferior-lisp equivalent REPL, which went in a while back

cfleming 2015-06-05T10:52:29.000565Z

Neither of them use nREPL

akiva 2015-06-05T13:33:35.000567Z

Suddenly Emacs is doing that thing where it keeps five empty lines at the bottom of a buffer so there are five unusable lines in a REPL window. ¬_¬

akiva 2015-06-05T13:33:46.000568Z

MY DAY CANNOT START LIKE THIS [knocks stuff over]

arrdem 2015-06-05T15:05:28.000570Z

Nrepl is actually my favorite feature of the clojure tooling world...

arrdem 2015-06-05T15:07:31.000571Z

@cfleming okay. It's one big diff right now will probably split it by file today but yeah a second pair of eyes would be great.

arrdem 2015-06-05T15:08:22.000572Z

@bozhidar welcome!

erichmond 2015-06-05T15:37:21.000574Z

haha, I remember that crazy thread on the list around nREPL

erichmond 2015-06-05T15:37:43.000575Z

I think it’s pretty sweet myself

jballanc 2015-06-05T15:37:45.000576Z

Question for users of Emacs/Spacemacs and Cider: how do you evaluate a form in nREPL without having to move one space past it?

jballanc 2015-06-05T15:38:20.000577Z

In Vim + fireplace, the cpp key combination will evaluate a form so long as your point is anywhere within the form

jballanc 2015-06-05T15:39:45.000578Z

I’m trying to do the same thing with spacemacs, but I’ve got is cider-eval-last-sexp

jballanc 2015-06-05T15:40:17.000579Z

…which is annoying since I usually don’t leave extra blank spaces at the end of my lines 😉

otijhuis 2015-06-05T15:52:24.000581Z

I always use cider-eval-defun-at-point and you could create a custom function combining selection of the current sexp with cider-eval-region if you only want the current sexp and not the whole function

malabarba 2015-06-05T16:08:28.000583Z

@jballanc why would you need an extra blank space to use eval-last-sexp?

jballanc 2015-06-05T16:26:15.000585Z

@malabarba: with Spacemacs, when you’re not in insert mode, at the end of the line the point counts as being on the last char in the line

jballanc 2015-06-05T16:26:38.000586Z

actually, now that I think about it this is probably a bug that needs to be resolved in the Spacemacs clojure layer

rauh 2015-06-05T16:29:13.000587Z

@jballanc: There is a few options: (A) (setq-default evil-move-cursor-back nil)

rauh 2015-06-05T16:29:47.000588Z

(B) http://emacs.stackexchange.com/questions/7814/evaluate-paragraph-in-cider (works really well, even within (comment))

rauh 2015-06-05T16:30:20.000590Z

(A) allows you to move your curser past the last character in Evil.

rauh 2015-06-05T16:30:56.000591Z

(B) just evaluates the paragraph, which is often exactly what you want, given high level forms are usually separated by a blank line

jballanc 2015-06-05T16:33:08.000592Z

@rauh: Ah yes, I think (B) is exactly what I want

jballanc 2015-06-05T16:33:38.000593Z

actually, now that I think of it, I think I had almost that exact same function in a prior .emacs.d

rauh 2015-06-05T16:33:57.000594Z

Yeah it's really nice, even though it doesn't walk parentheses and many would consider it a hack due to relying on blank lines... But in reality: it works great

malabarba 2015-06-05T16:34:18.000595Z

@jballanc yes, you may want to report that to spacemacs. But, in any case, it sounds like you want C-M-x.

jballanc 2015-06-05T16:35:06.000596Z

Right, normally I can just use eval defun. The current case I’m dealing with, though, is I like to stick (comment … ) blocks in my code with examples for the REPL, and eval defun just evals the comment

jballanc 2015-06-05T16:35:30.000597Z

…but I do use blank spaces within the comment to separate examples, so paragraph would be the right delineation

malabarba 2015-06-05T16:35:51.000598Z

Great then. :-)

cfleming 2015-06-05T22:38:22.000603Z

arrdem: Ok, I’m traveling today, will try to take a look tonight.

bozhidar 2015-06-05T23:49:53.000604Z

btw, there’s now a #C0617A8PQ channel for cider-specific questions/discussions

bozhidar 2015-06-05T23:50:19.000605Z

I don’t have time to read everything about every possible editor here

bozhidar 2015-06-05T23:50:39.000606Z

but I’ll keep an eye on the #C0617A8PQ channel