[ClojureScript] REPL setup help

2017-07-30 Thread Rob Nikander
Hi,

I'm new to ClojureScript. I followed the quick start instructions [1] and 
set up a REPL. It works, but now I'd like to integrate a REPL with my web 
app and IDE. Any pointers?

I have a Java servlet container, also running Clojure code. I'm using 
IntelliJ with Cursive plugin, and have REPL windows in the IDE working for 
the JVM/server-side of things. I can reload Clojure code in the running 
server. 

Now, that servlet code responds with an HTML page which contains my 
ClojureScript code. That runs, but I don't know how to connect that browser 
environment to a REPL window in IntelliJ, or even a REPL in my terminal. 
 The quick start terminal REPL only connects to a magic server listening on 
localhost:9000. 

Anyway... any pointers? 

thanks,
Rob


[1]: https://clojurescript.org/guides/quick-start#browser-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 https://groups.google.com/group/clojurescript.


[ClojureScript] Re: ANN: ClojureScript 1.9.854

2017-07-30 Thread David Nolen
The ability to consume node_modules is just an additional feature - it
makes no existing features obsolete.

David

On Sun, Jul 30, 2017 at 3:42 PM, Daniel  wrote:

> For someone who is new to clojurescript and pretty confused by
> clojurescript dependency management in general, does this release obsolete
> cljsjs for new projects and what is the new method?
>
>
> On Friday, July 28, 2017 at 4:55:04 PM UTC-5, David Nolen wrote:
>>
>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>
>> README and source code: https://github.com/clojure/clojurescript
>>
>> Leiningen dependency information:
>>
>> [org.clojure/clojurescript "1.9.854"]
>>
>> This is a significant feature release. Notable new features include
>> comprehensive NPM dependency support, overhauled code splitting,
>> enhanced JavaScript module preprocessing, declared global exports for
>> foreign libs, and checked array operations. There are also a large
>> number of fixes, changes, and minor enhancementes. For more detailed
>> descriptions of the major enhancements, please refer to the last month
>> of posts https://clojurescript.org/news/news.
>>
>> As always, feedback welcome!
>>
>> ## 1.9.854
>>
>> ### Enhancements
>> * CLJS-2280: Provide process.env :preload and auto-configure
>> * CLJS-2279: Infer `:module-type ` for provided `node_modules`
>> * CLJS-2250: Support :foreign-libs overrides via :provides
>> * CLJS-2243: Self-host: Add support for :global-exports
>> * CLJS-2232: Self-host: Add support for string-based requires
>> * add *print-fn-bodies* knob, set to false
>> * CLJS-2198: Safe array operations
>> * CLJS-2217: Support `:rename` for JS modules
>> * CLJS-2214: Support :global-exports for foreign libraries
>> * CLJS-1428: Add a cljs.core/*command-line-args* var
>> * CLJS-2061: Support ns :require for JS libs, allow strings along with
>> symbol
>> * CLJS-2148: Add warnings for invalid use of aget and aset
>> * CLJS-2143: Add support for symbol preprocess values
>>
>> ### Changes
>> * CLJS-2273: Bump tools.reader to 1.0.3 and development dependencies
>> * CLJS-2235: Allow passing extra maven opts to build scripts
>> * CLJS-2267: Allow ^:const inlined vars to affect if emission
>> * CLJS-2245: Add support for using a local `node_modules` installation
>> through a new `:node-modules` compiler flag
>> * CLJS-2002: Don't throw when no *print-fn* is set
>> * support Clojure primitive array type hints, core.async no longer
>>   gives warnings
>> * CLJS-2213: Node.js target should use node_modules index to emit
>> platform specific require
>> * CLJS-2200: bump to tools.reader 1.0.2
>> * CLJS-2135: require macro prints last result of loaded-libs
>> * CLJS-2192: Add ChakraCore testing facilities
>> * CLJS-1800: Defer to tools.reader for cljs.reader functionality
>> * CLJS-2163: Clean up uses of aget / aset on objects
>> * CLJS-2184: Add `ns-publics` and `ns-imports`
>> * CLJS-2183: Assert arguments are quoted symbols in some core macros
>> * CLJS-2182: Assert argument to resolve is a quoted symbol
>> * CLJS-2186: Update docstrings for aget/aset to be consistent with Clojure
>> * CLJS-2180: Allow compiling `:modules` with whitespace optimizations
>> * CLJS-1822: Use `:file-min` when processing JS modules with advanced
>> optimizations
>> * CLJS-2169: Error when compiling with :source-map and advanced
>> optimizations
>> * CLJS-2037: Throw if overwriting alias in current namespace
>> * CLJS-2160: Add loaded? and prefetch functions to cljs.loader
>> * CLJS-2148: Add unsafe-get and use goog.object
>> * CLJS-2161: Bump Closure Compiler to June 2017 release
>>
>> ### Fixes
>> * CLJS-1854: Self-host: Reload ns with const
>> * CLJS-2278: JavaScript object literals are printed wth keys that cannot
>> be read
>> * CLJS-2276: Self-host: Need test.check dep for CLJS-2275
>> * CLJS-2275: cljs.spec.alpha/fdef resolves eagerly
>> * CLJS-2259: Extra .cljs_node_repl directory containing cljs.core output
>> * CLJS-2274: Update CI script to install deps
>> * CLJS-2269: Warn on top level code split loads
>> * CLJS-2272: Tests that depended on default install deps behavior failing
>> * CLJS-2255: Clean up :npm-deps
>> * CLJS-2263: Docstring for neg-int? backwards
>> * CLJS-2262: Correct comment that *warn-on-infer* is file-scope
>> * CLJS-2258: Stack overflow regression for sequence xform applied to
>> eduction
>> * CLJS-2256: Generated code doesn't add newline after sourceMappingURL
>> comment
>> * CLJS-2254: Module Indexing: Provide relative paths for a package's main
>> module
>> * CLJS-2248: Build API tests rely on Yarn
>> * CLJS-2239: Self-host: Add `:target :nodejs` to the docstrings in cljs.js
>> * CLJS-2251: Follow-up fix to CLJS-2249 and related commit
>> * CLJS-2249: Provide a test for d4b871cce73
>> * CLJS-2246: Revert CLJS-2245 and CLJS-2240 and fix `lein test`
>> * CLJS-2244: Orphaned processed JS modules breaks :modules
>> * CLJS-2242: Lots of undeclared Var warns in cljs.spec.gen.alpha
>> * CLJS-2241: 

[ClojureScript] Re: ANN: ClojureScript 1.9.854

2017-07-30 Thread Leon Grapenthin
Yes, it does make CLJSJS obsolete and the new method is to include Node 
modules from NPM.

CLJSJS was never the one true way, especially for production. It lacked 
deduplication of transitive dependencies that were not packed per CLJSJS 
and of course support for dependencies that where are not included in 
CLJSJS. 
It was nice to get started quickly, but in production one compiled its own 
bundle of js deps e. g. via webpack, and handwritten (or handcopypasted) 
externs.

As a newcomer, you won't have to deal with all that in the future, which is 
one of the many benefits of this release.

Nonetheless this new functionality will probably take an iteration or two 
until its stable.

On Sunday, July 30, 2017 at 9:42:32 PM UTC+2, Daniel wrote:
>
> For someone who is new to clojurescript and pretty confused by 
> clojurescript dependency management in general, does this release obsolete 
> cljsjs for new projects and what is the new method?
>
> On Friday, July 28, 2017 at 4:55:04 PM UTC-5, David Nolen wrote:
>>
>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>
>> README and source code: https://github.com/clojure/clojurescript
>>
>> Leiningen dependency information:
>>
>> [org.clojure/clojurescript "1.9.854"]
>>
>> This is a significant feature release. Notable new features include
>> comprehensive NPM dependency support, overhauled code splitting,
>> enhanced JavaScript module preprocessing, declared global exports for
>> foreign libs, and checked array operations. There are also a large
>> number of fixes, changes, and minor enhancementes. For more detailed
>> descriptions of the major enhancements, please refer to the last month
>> of posts https://clojurescript.org/news/news.
>>
>> As always, feedback welcome!
>>
>> ## 1.9.854
>>
>> ### Enhancements
>> * CLJS-2280: Provide process.env :preload and auto-configure
>> * CLJS-2279: Infer `:module-type ` for provided `node_modules`
>> * CLJS-2250: Support :foreign-libs overrides via :provides
>> * CLJS-2243: Self-host: Add support for :global-exports
>> * CLJS-2232: Self-host: Add support for string-based requires
>> * add *print-fn-bodies* knob, set to false
>> * CLJS-2198: Safe array operations
>> * CLJS-2217: Support `:rename` for JS modules
>> * CLJS-2214: Support :global-exports for foreign libraries
>> * CLJS-1428: Add a cljs.core/*command-line-args* var
>> * CLJS-2061: Support ns :require for JS libs, allow strings along with 
>> symbol
>> * CLJS-2148: Add warnings for invalid use of aget and aset
>> * CLJS-2143: Add support for symbol preprocess values
>>
>> ### Changes
>> * CLJS-2273: Bump tools.reader to 1.0.3 and development dependencies
>> * CLJS-2235: Allow passing extra maven opts to build scripts
>> * CLJS-2267: Allow ^:const inlined vars to affect if emission
>> * CLJS-2245: Add support for using a local `node_modules` installation 
>> through a new `:node-modules` compiler flag
>> * CLJS-2002: Don't throw when no *print-fn* is set
>> * support Clojure primitive array type hints, core.async no longer
>>   gives warnings
>> * CLJS-2213: Node.js target should use node_modules index to emit 
>> platform specific require
>> * CLJS-2200: bump to tools.reader 1.0.2
>> * CLJS-2135: require macro prints last result of loaded-libs
>> * CLJS-2192: Add ChakraCore testing facilities
>> * CLJS-1800: Defer to tools.reader for cljs.reader functionality
>> * CLJS-2163: Clean up uses of aget / aset on objects
>> * CLJS-2184: Add `ns-publics` and `ns-imports`
>> * CLJS-2183: Assert arguments are quoted symbols in some core macros
>> * CLJS-2182: Assert argument to resolve is a quoted symbol
>> * CLJS-2186: Update docstrings for aget/aset to be consistent with Clojure
>> * CLJS-2180: Allow compiling `:modules` with whitespace optimizations
>> * CLJS-1822: Use `:file-min` when processing JS modules with advanced 
>> optimizations
>> * CLJS-2169: Error when compiling with :source-map and advanced 
>> optimizations
>> * CLJS-2037: Throw if overwriting alias in current namespace
>> * CLJS-2160: Add loaded? and prefetch functions to cljs.loader
>> * CLJS-2148: Add unsafe-get and use goog.object
>> * CLJS-2161: Bump Closure Compiler to June 2017 release
>>
>> ### Fixes
>> * CLJS-1854: Self-host: Reload ns with const
>> * CLJS-2278: JavaScript object literals are printed wth keys that cannot 
>> be read
>> * CLJS-2276: Self-host: Need test.check dep for CLJS-2275
>> * CLJS-2275: cljs.spec.alpha/fdef resolves eagerly
>> * CLJS-2259: Extra .cljs_node_repl directory containing cljs.core output
>> * CLJS-2274: Update CI script to install deps
>> * CLJS-2269: Warn on top level code split loads
>> * CLJS-2272: Tests that depended on default install deps behavior failing
>> * CLJS-2255: Clean up :npm-deps
>> * CLJS-2263: Docstring for neg-int? backwards
>> * CLJS-2262: Correct comment that *warn-on-infer* is file-scope
>> * CLJS-2258: Stack overflow regression for sequence xform applied to 
>> eduction
>> * CLJS-2256: Generated code doesn't add 

Re: [ClojureScript] Re: ANN: ClojureScript 1.9.854

2017-07-30 Thread David Nolen
No idea, make something minimal without any tooling besides ClojureScript
and report the issue in JIRA.

Thanks,
David

On Sun, Jul 30, 2017 at 2:47 PM, Leon Grapenthin 
wrote:

> Amazing release, trying it out right now.
>
> Just wanted to see if including this works: https://github.com/
> coopermaruyama/react-web3
>
> I try to :require it via [react-web3 :as w3]
>
> Unfortunately this gives me a not-found error. Also I noticed that CLJS
> indeed downloaded react-web3 to "node_modules", but the folder is missing
> from the node_modules folder in the compilers output.
>
> Am I requiring it wrong, or is it not supported for some reason?
>
> Kind regards,
>  Leon.
>
> On Friday, July 28, 2017 at 11:54:42 PM UTC+2, David Nolen wrote:
>>
>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>
>> README and source code: https://github.com/clojure/clojurescript
>>
>> Leiningen dependency information:
>>
>> [org.clojure/clojurescript "1.9.854"]
>>
>> This is a significant feature release. Notable new features include
>> comprehensive NPM dependency support, overhauled code splitting,
>> enhanced JavaScript module preprocessing, declared global exports for
>> foreign libs, and checked array operations. There are also a large
>> number of fixes, changes, and minor enhancementes. For more detailed
>> descriptions of the major enhancements, please refer to the last month
>> of posts https://clojurescript.org/news/news.
>>
>> As always, feedback welcome!
>>
>> ## 1.9.854
>>
>> ### Enhancements
>> * CLJS-2280: Provide process.env :preload and auto-configure
>> * CLJS-2279: Infer `:module-type ` for provided `node_modules`
>> * CLJS-2250: Support :foreign-libs overrides via :provides
>> * CLJS-2243: Self-host: Add support for :global-exports
>> * CLJS-2232: Self-host: Add support for string-based requires
>> * add *print-fn-bodies* knob, set to false
>> * CLJS-2198: Safe array operations
>> * CLJS-2217: Support `:rename` for JS modules
>> * CLJS-2214: Support :global-exports for foreign libraries
>> * CLJS-1428: Add a cljs.core/*command-line-args* var
>> * CLJS-2061: Support ns :require for JS libs, allow strings along with
>> symbol
>> * CLJS-2148: Add warnings for invalid use of aget and aset
>> * CLJS-2143: Add support for symbol preprocess values
>>
>> ### Changes
>> * CLJS-2273: Bump tools.reader to 1.0.3 and development dependencies
>> * CLJS-2235: Allow passing extra maven opts to build scripts
>> * CLJS-2267: Allow ^:const inlined vars to affect if emission
>> * CLJS-2245: Add support for using a local `node_modules` installation
>> through a new `:node-modules` compiler flag
>> * CLJS-2002: Don't throw when no *print-fn* is set
>> * support Clojure primitive array type hints, core.async no longer
>>   gives warnings
>> * CLJS-2213: Node.js target should use node_modules index to emit
>> platform specific require
>> * CLJS-2200: bump to tools.reader 1.0.2
>> * CLJS-2135: require macro prints last result of loaded-libs
>> * CLJS-2192: Add ChakraCore testing facilities
>> * CLJS-1800: Defer to tools.reader for cljs.reader functionality
>> * CLJS-2163: Clean up uses of aget / aset on objects
>> * CLJS-2184: Add `ns-publics` and `ns-imports`
>> * CLJS-2183: Assert arguments are quoted symbols in some core macros
>> * CLJS-2182: Assert argument to resolve is a quoted symbol
>> * CLJS-2186: Update docstrings for aget/aset to be consistent with Clojure
>> * CLJS-2180: Allow compiling `:modules` with whitespace optimizations
>> * CLJS-1822: Use `:file-min` when processing JS modules with advanced
>> optimizations
>> * CLJS-2169: Error when compiling with :source-map and advanced
>> optimizations
>> * CLJS-2037: Throw if overwriting alias in current namespace
>> * CLJS-2160: Add loaded? and prefetch functions to cljs.loader
>> * CLJS-2148: Add unsafe-get and use goog.object
>> * CLJS-2161: Bump Closure Compiler to June 2017 release
>>
>> ### Fixes
>> * CLJS-1854: Self-host: Reload ns with const
>> * CLJS-2278: JavaScript object literals are printed wth keys that cannot
>> be read
>> * CLJS-2276: Self-host: Need test.check dep for CLJS-2275
>> * CLJS-2275: cljs.spec.alpha/fdef resolves eagerly
>> * CLJS-2259: Extra .cljs_node_repl directory containing cljs.core output
>> * CLJS-2274: Update CI script to install deps
>> * CLJS-2269: Warn on top level code split loads
>> * CLJS-2272: Tests that depended on default install deps behavior failing
>> * CLJS-2255: Clean up :npm-deps
>> * CLJS-2263: Docstring for neg-int? backwards
>> * CLJS-2262: Correct comment that *warn-on-infer* is file-scope
>> * CLJS-2258: Stack overflow regression for sequence xform applied to
>> eduction
>> * CLJS-2256: Generated code doesn't add newline after sourceMappingURL
>> comment
>> * CLJS-2254: Module Indexing: Provide relative paths for a package's main
>> module
>> * CLJS-2248: Build API tests rely on Yarn
>> * CLJS-2239: Self-host: Add `:target :nodejs` to the docstrings in cljs.js
>> * 

[ClojureScript] Re: ANN: ClojureScript 1.9.854

2017-07-30 Thread Leon Grapenthin
Amazing release, trying it out right now.

Just wanted to see if including this 
works: https://github.com/coopermaruyama/react-web3

I try to :require it via [react-web3 :as w3]

Unfortunately this gives me a not-found error. Also I noticed that CLJS 
indeed downloaded react-web3 to "node_modules", but the folder is missing 
from the node_modules folder in the compilers output.

Am I requiring it wrong, or is it not supported for some reason?

Kind regards,
 Leon.

On Friday, July 28, 2017 at 11:54:42 PM UTC+2, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "1.9.854"]
>
> This is a significant feature release. Notable new features include
> comprehensive NPM dependency support, overhauled code splitting,
> enhanced JavaScript module preprocessing, declared global exports for
> foreign libs, and checked array operations. There are also a large
> number of fixes, changes, and minor enhancementes. For more detailed
> descriptions of the major enhancements, please refer to the last month
> of posts https://clojurescript.org/news/news.
>
> As always, feedback welcome!
>
> ## 1.9.854
>
> ### Enhancements
> * CLJS-2280: Provide process.env :preload and auto-configure
> * CLJS-2279: Infer `:module-type ` for provided `node_modules`
> * CLJS-2250: Support :foreign-libs overrides via :provides
> * CLJS-2243: Self-host: Add support for :global-exports
> * CLJS-2232: Self-host: Add support for string-based requires
> * add *print-fn-bodies* knob, set to false
> * CLJS-2198: Safe array operations
> * CLJS-2217: Support `:rename` for JS modules
> * CLJS-2214: Support :global-exports for foreign libraries
> * CLJS-1428: Add a cljs.core/*command-line-args* var
> * CLJS-2061: Support ns :require for JS libs, allow strings along with 
> symbol
> * CLJS-2148: Add warnings for invalid use of aget and aset
> * CLJS-2143: Add support for symbol preprocess values
>
> ### Changes
> * CLJS-2273: Bump tools.reader to 1.0.3 and development dependencies
> * CLJS-2235: Allow passing extra maven opts to build scripts
> * CLJS-2267: Allow ^:const inlined vars to affect if emission
> * CLJS-2245: Add support for using a local `node_modules` installation 
> through a new `:node-modules` compiler flag
> * CLJS-2002: Don't throw when no *print-fn* is set
> * support Clojure primitive array type hints, core.async no longer
>   gives warnings
> * CLJS-2213: Node.js target should use node_modules index to emit platform 
> specific require
> * CLJS-2200: bump to tools.reader 1.0.2
> * CLJS-2135: require macro prints last result of loaded-libs
> * CLJS-2192: Add ChakraCore testing facilities
> * CLJS-1800: Defer to tools.reader for cljs.reader functionality
> * CLJS-2163: Clean up uses of aget / aset on objects
> * CLJS-2184: Add `ns-publics` and `ns-imports`
> * CLJS-2183: Assert arguments are quoted symbols in some core macros
> * CLJS-2182: Assert argument to resolve is a quoted symbol
> * CLJS-2186: Update docstrings for aget/aset to be consistent with Clojure
> * CLJS-2180: Allow compiling `:modules` with whitespace optimizations
> * CLJS-1822: Use `:file-min` when processing JS modules with advanced 
> optimizations
> * CLJS-2169: Error when compiling with :source-map and advanced 
> optimizations
> * CLJS-2037: Throw if overwriting alias in current namespace
> * CLJS-2160: Add loaded? and prefetch functions to cljs.loader
> * CLJS-2148: Add unsafe-get and use goog.object
> * CLJS-2161: Bump Closure Compiler to June 2017 release
>
> ### Fixes
> * CLJS-1854: Self-host: Reload ns with const
> * CLJS-2278: JavaScript object literals are printed wth keys that cannot 
> be read
> * CLJS-2276: Self-host: Need test.check dep for CLJS-2275
> * CLJS-2275: cljs.spec.alpha/fdef resolves eagerly
> * CLJS-2259: Extra .cljs_node_repl directory containing cljs.core output
> * CLJS-2274: Update CI script to install deps
> * CLJS-2269: Warn on top level code split loads
> * CLJS-2272: Tests that depended on default install deps behavior failing
> * CLJS-2255: Clean up :npm-deps
> * CLJS-2263: Docstring for neg-int? backwards
> * CLJS-2262: Correct comment that *warn-on-infer* is file-scope
> * CLJS-2258: Stack overflow regression for sequence xform applied to 
> eduction
> * CLJS-2256: Generated code doesn't add newline after sourceMappingURL 
> comment
> * CLJS-2254: Module Indexing: Provide relative paths for a package's main 
> module
> * CLJS-2248: Build API tests rely on Yarn
> * CLJS-2239: Self-host: Add `:target :nodejs` to the docstrings in cljs.js
> * CLJS-2251: Follow-up fix to CLJS-2249 and related commit
> * CLJS-2249: Provide a test for d4b871cce73
> * CLJS-2246: Revert CLJS-2245 and CLJS-2240 and fix `lein test`
> * CLJS-2244: Orphaned processed JS modules breaks :modules
> * CLJS-2242: Lots of undeclared Var warns in cljs.spec.gen.alpha
> * CLJS-2241: