Re: [ClojureScript] Easiest way to compile cljs live

2015-09-12 Thread Mike Fikes
Yes, planck -v is overly verbose right now (owing to it showing the ancillary 
JavaScript used to emit vars for def forms).

I’d recommend :repl-verbose true for any ClojureScript REPL instead. For 
example, modify the last line of script/noderepljs that ships with the compiler 
to be

  (repl/repl (node/repl-env $1) :repl-verbose true)”

- Mike

> On Sep 12, 2015, at 2:36 PM, Yehonathan Sharvit  wrote:
> 
> On Friday, 11 September 2015 08:24:01 UTC+3, Linus Ericsson  wrote:
>> Figwheel is nice, even though I just get the repl in the command-line there 
>> (no autocomplete etc).
>> 
>> The features for compiling and update client side cljs is really really good.
>> 
>> https://github.com/bhauman/lein-figwheel
>> 
>> Den 11 sep 2015 04:22 skrev "Mike Fikes" :
>> 
>> 1. Are you setting :repl-options in project.clj? If so, I suspect that only 
>> affects Lein’s Clojure REPL.  See 
>> https://github.com/clojure/clojurescript/wiki/Running-REPLs and, in 
>> particular, :repl-verbose true would be provided in the map argument to 
>> cljs.repl/repl*.
>> 
>> 
>> 2. If you are running Planck on OS X, the `-v` option puts Planck into 
>> verbose mode, showing compiled JavaScript. If on OS X but running a REPL 
>> that ships with ClojureScript (like script/noderepljs) or a REPL that is 
>> based on from ClojureScript’s cljs.repl, comment #1 above applies.
>> 
>> 
>> 
>> 
>> On Sep 10, 2015, at 9:41 AM, Yehonathan Sharvit  wrote:
>> 
>> 1. I set   :repl-options {:repl-verbose true} but the repl didn't show any js
>> 2. I'm on mac but I can't see the compiled js on the repl
>> 
>> 
>> 
>> 
>> 
>> -- 
>> 
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> 
>> --- 
>> 
>> You received this message because you are subscribed to the Google Groups 
>> "ClojureScript" group.
>> 
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojurescrip...@googlegroups.com.
>> 
>> To post to this group, send email to clojur...@googlegroups.com.
>> 
>> Visit this group at http://groups.google.com/group/clojurescript.
> 
> Thanks Mike.
> 
> I am able to see compiled js in planck (I was using an old version before)
> 
> But the repl approach is not so easy when you have a couple of lines of code.
> 
> Try to see the js of this piece of cljs code:
> 
> (deftype x [val])
> 
> (defprotocol Wow
>  (aa [this]))
> 
> (extend-type x
>  Wow
>  (aa [this] "aa from extend-type"))
> 
> 
> (extend-protocol Wow
>  x
>  (aa [this] "aa from extend-protocol"))
> 
> (aa (x. "a"))
> 
> 
> Is there another tool availble out there? Maybe  a web page that compiles 
> cljs?
> 
> 
> 
> -- 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Easiest way to compile cljs live

2015-09-10 Thread Yehonathan Sharvit
What's the easiest way to compile cljs live.
I'm looking for a webpage or a cli utils that will be easy to use.

Currently, I'm using http://swannodette.github.io/2015/07/29/clojurescript-17/
But it's not so convenient 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Easiest way to compile cljs live

2015-09-10 Thread Yehonathan Sharvit
On Thursday, 10 September 2015 15:52:37 UTC+3, Mike Fikes  wrote:
> Yehonathan,
> 
> 
> Any ClojureScript REPL derived from the shipping REPLs is capable of showing 
> compiled JS for a form via the :repl-verbose option.
> 
> 
> See
> 
> 
>   https://github.com/clojure/clojurescript/wiki/REPL-Options#repl-verbose
> 
> 
> and here is some non-normative exposition on the option:
> 
> 
>    http://blog.fikesfarm.com/posts/2015-06-15-see-js-in-cljs-repl.html
> 
> 
> Also, if you happen to be on a Mac, Planck can do this at the command line:
> 
> 
> 
> $ planck -v -e '(inc (+ 3 2))'
> Classpath resolves to:
> type: src, location: /Users/mfikes/Projects/planck/planck/./
> Evaluating (inc (+ 3 2))
> ((3 + 2) + 1)
> 6
> 
> 
> 
> 
> - Mike

1. I set   :repl-options {:repl-verbose true} but the repl didn't show any js
2. I'm on mac but I can't see the compiled js on the repl

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Easiest way to compile cljs live

2015-09-10 Thread Mike Fikes
Yehonathan,

Any ClojureScript REPL derived from the shipping REPLs is capable of showing 
compiled JS for a form via the :repl-verbose option.

See

  https://github.com/clojure/clojurescript/wiki/REPL-Options#repl-verbose

and here is some non-normative exposition on the option:

   http://blog.fikesfarm.com/posts/2015-06-15-see-js-in-cljs-repl.html 


Also, if you happen to be on a Mac, Planck can do this at the command line:

$ planck -v -e '(inc (+ 3 2))'
Classpath resolves to:
type: src, location: /Users/mfikes/Projects/planck/planck/./
Evaluating (inc (+ 3 2))
((3 + 2) + 1)
6


- Mike

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Easiest way to compile cljs live

2015-09-10 Thread Linus Ericsson
Figwheel is nice, even though I just get the repl in the command-line there
(no autocomplete etc).

The features for compiling and update client side cljs is really really
good.

https://github.com/bhauman/lein-figwheel
Den 11 sep 2015 04:22 skrev "Mike Fikes" :

> 1. Are you setting :repl-options in project.clj? If so, I suspect that
> only affects Lein’s Clojure REPL.  See
> https://github.com/clojure/clojurescript/wiki/Running-REPLs and, in
> particular, :repl-verbose true would be provided in the map argument to
> cljs.repl/repl*.
>
> 2. If you are running Planck on OS X, the `-v` option puts Planck into
> verbose mode, showing compiled JavaScript. If on OS X but running a REPL
> that ships with ClojureScript (like script/noderepljs) or a REPL that is
> based on from ClojureScript’s cljs.repl, comment #1 above applies.
>
> On Sep 10, 2015, at 9:41 AM, Yehonathan Sharvit  wrote:
>
> 1. I set   :repl-options {:repl-verbose true} but the repl didn't show any
> js
> 2. I'm on mac but I can't see the compiled js on the repl
>
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Easiest way to compile cljs live

2015-09-10 Thread Mike Fikes
1. Are you setting :repl-options in project.clj? If so, I suspect that only 
affects Lein’s Clojure REPL.  See 
https://github.com/clojure/clojurescript/wiki/Running-REPLs 
 and, in 
particular, :repl-verbose true would be provided in the map argument to 
cljs.repl/repl*.

2. If you are running Planck on OS X, the `-v` option puts Planck into verbose 
mode, showing compiled JavaScript. If on OS X but running a REPL that ships 
with ClojureScript (like script/noderepljs) or a REPL that is based on from 
ClojureScript’s cljs.repl, comment #1 above applies.

> On Sep 10, 2015, at 9:41 AM, Yehonathan Sharvit  wrote:
> 
> 1. I set   :repl-options {:repl-verbose true} but the repl didn't show any js
> 2. I'm on mac but I can't see the compiled js on the repl

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.