This is a nice trick and its one I have done myself on Clojure CLIs 
(particularly with "help" options) to defer loading and give a faster feel 
to startup. It is great to have a repl that starts super fast for people 
learning Clojure to get started, or to spin one up to try something.

However, the time to start up a base Clojure repl (with no deps or app 
code) is already subsecond - so you're saving no more than a second with 
this approach. The problem is that (approximately) no one actually starts a 
REPL this way. [You can find my ongoing notes on this subject at 
http://dev.clojure.org/display/design/Improving+Clojure+Start+Time by the 
way.]

Most people start a REPL via Leiningen (or Boot), and the demo'ed technique 
changes nothing about that experience. Leiningen still needs to start the 
Clojure runtime, compile and load nrepl and all the tooling, launch an 
nrepl server in a new JVM, connect to it, load all the middleware code, and 
commonly even a vast amount of application code (based on common patterns 
of project setup). If you look at the Luminus guestbook application for 
example (not picking on this one, just one I happened to look at), at dev 
time it loads env/dev/clj/user.clj prior to repl startup which loads a vast 
number of dependency namespaces and application code, which takes 10s of 
seconds, which dwarfs Clojure core load time.

Because this a Clojure repl hack, it also does nothing to affect actually 
running a Clojure application, which again must load the Clojure runtime 
and your application code (which often involves compiling and loading a lot 
of code) before it starts doing anything.

So while this is a nice demo, I don't see that it actually changes anything 
for the vast majority of actual "Clojure start time issues" people 
experience on a daily basis. That said, this is an acknowledged pain point 
that we still care about very much! I'm sure there will be more work on 
this to come.

On Saturday, June 18, 2016 at 9:25:37 PM UTC-5, Sungjin Chun wrote:
>
> Yes, I want this kind of instant speed (I hope this kind of speed is 
> possible in
> emacs + side).
>
> https://www.youtube.com/watch?v=D3gpQth8uTI&feature=youtu.be
>
> Have you seen this? Why we simply cannot do this?
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to