This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
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
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
Colin is 1200 Zulu
Until Spain (?)
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
Or can we move it as such alias it and spread the mutable mess somewhat for the loading consequences
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
And those vars are initialised on creation, looks like - I guess there might be issues with missing init
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: one complaint... when I did my big method move Cursive didn't catch the changes and rewrite clojure/core.clj
some of the stuff like Compiler.java and gen-class using class field accessors is totally excusable
arrdem: You’re talking about moving RT.var not renaming RT/var to Util/var in Clojure code?
yeah so wen I did the "refactor > move" on RT.var it didn't see that RT/var == RT.var and rewrite that stuff
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
That’s some next level refactoring
In other news, I only have two cases to fix, and the whole Cursive codebase will typecheck correctly with the in-editor inference
Where’s your CIDER now huh?
I guess I don't even need to rewrite the preamble of RT to use vars from Util thanks to the magic of intern...
cfleming: https://github.com/arrdem/clojure/commit/9d9f31f48ae43f134010a6e04d46342340b7a7eb
I think there's still more to be done in terms of moving all the vars out to some common namespace...
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.
You shouldn't see load time improvements on non lean binaries because calling require or compilers hits RT which does the source load
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.
@arrdem: I think Rich used intellij... but I could be wrong. at clojureExchange 2013 (?) he showed us a bit of the Java code.
I think he’s using Cursive for Clojure now as well - he was planning to, but I haven’t heard how it’s going
They were both waiting for the inferior-lisp equivalent REPL, which went in a while back
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. ¬_¬
@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.
Question for users of Emacs/Spacemacs and Cider: how do you evaluate a form in nREPL without having to move one space past it?
In Vim + fireplace, the cpp
key combination will evaluate a form so long as your point is anywhere within the form
I’m trying to do the same thing with spacemacs, but I’ve got is cider-eval-last-sexp
…which is annoying since I usually don’t leave extra blank spaces at the end of my lines 😉
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: 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
actually, now that I think about it this is probably a bug that needs to be resolved in the Spacemacs clojure layer
(B) http://emacs.stackexchange.com/questions/7814/evaluate-paragraph-in-cider (works really well, even within (comment))
(B) just evaluates the paragraph, which is often exactly what you want, given high level forms are usually separated by a blank line
actually, now that I think of it, I think I had almost that exact same function in a prior .emacs.d
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
@jballanc yes, you may want to report that to spacemacs. But, in any case, it sounds like you want C-M-x.
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