[ClojureScript] Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
P.S.  There seems to be no *`clojure --version`* flag.  Should this be
added to the command line tool?


On Mon, Aug 10, 2020 at 4:58 PM Alan Thompson  wrote:

> Hi.  Just helped a colleague debug a vexing problem on a CLJS project
> using Figwheel.Main.
>
> If we do *`brew install clojure/tools/clojure`*, it works:
>
> ~/work/tmp810/xanadu > clj --help
> Version: *1.10.1.561*
>
> Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>clj [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
>
> The clojure script is a runner for Clojure. clj is a wrapper
> for interactive repl use. These scripts ultimately construct and
> 
>
>
> Note that local ./resources etc are at the beginning of the classpath
>
> ~/work/tmp810/xanadu > clj -Spath
> *resources:target:src/clj:src/cljc:src/cljs:test/cljs:test-figwheel-main*
> :/Users/alanthompson/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar:/Users/alanthompson/.m2/repository/com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar:/Users/alanthompson/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/alanthompson/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/alanthompson/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar:/Users/alanthompson/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/alanthompson/.m2/repository/cljsjs/material-ui-currency-textfield/0.8.6-0/material-ui-currency-textfield-0.8.6-0.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar:/Users/alanthompson/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.28.v20200408/jetty-xml-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/com/bhauman/figwheel-repl/0.2.11/figwheel-repl-0.2.11.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.28.v20200408/jetty-servlet-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/ring/ring-devel/1.8.1/ring-devel-1.8.1.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.logging/0.3.1/tools.logging-0.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/alanthompson/.m2/repository/co/deps/ring-etag-middleware/0.2.0/ring-etag-middleware-0.2.0.jar:/Users/alanthompson/.m2/repository/expound/expound/0.7.2/expound-0.7.2.jar:/Users/alanthompson/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alanthompson/.m2/repository/com/cemerick/url/0.1.1/url-0.1.1.jar:
>
> ..
>
>
> However, my colleague had accidentally typed *`brew install clojure`.  *This
> caused a mysterious failure:
>
> ---
> ~/work/tmp810/xanadu > clojure --help
> Version: *1.10.1.645*
>
> You use the Clojure tools ('clj' or 'clojure') to run Clojure programs
> on the JVM, e.g. to start a REPL or invoke a specific function with data.
> 
>
> and the classpath
>
> -
> ~/work/tmp810/xanadu > clj -Spath
> DEPRECATED: Libs must be qualified, change deps-ancient =>
> deps-ancient/deps-ancient (deps.edn)
> DEPRECATED: Libs must be qualified, change reagent => reagent/reagent
> (deps.edn)
> DEPRECATED: Libs must be qualified, change ns-tracker =>
> ns-tracker/ns-tracker (deps.edn)
> DEPRECATED: Libs must be qualified, change camel-snake-kebab =>
> camel-snake-kebab/camel-snake-kebab (deps.edn)
> DEPRECATED: Libs must be qualified, change bidi => bidi/bidi (deps.edn)
> DEPRECATED: Libs must be qualified, change orchestra =>
> orchestra/orchestra (deps.edn)
> DEPRECATED: Libs must be qualified, change cljs-ajax =>
> cljs-ajax/cljs-ajax (deps.edn)
> DEPRECATED: Libs must be qualified, change expound => expound/expound
> (deps.edn)
> DEPRECATED: Libs must be qualified, change re-frame => re-frame/re-frame
> (deps.edn)
> DEPRECATED: Libs must be qualified, change re-frame-utils =>
> re-frame-utils/re-frame-utils (deps.edn)
> DEPRECATED: Libs must be qualified, change cljs-bean =>
> cljs-bean/cljs-bean (deps.edn)
>
> /Users/alanthompson/.m2/repository/alandipert/storage-atom/1.2.4/storage-atom-1.2.4.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar:/Users/alanthompson/.m2/repository/com/google/jsinterop/jsinterop-annotations/1.0.2/jsinterop-annotations-1.0.2.jar:/Users/alanthompson/.m2/repository/compliment/compliment/0.3.6/compliment-0.3.6.jar:/Users/alanthompson/.m2/repository/ring/r

[ClojureScript] Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
Hi.  Just helped a colleague debug a vexing problem on a CLJS project using
Figwheel.Main.

If we do *`brew install clojure/tools/clojure`*, it works:

~/work/tmp810/xanadu > clj --help
Version: *1.10.1.561*

Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*]
   clj [dep-opt*] [--] [init-opt*] [main-opt] [arg*]

The clojure script is a runner for Clojure. clj is a wrapper
for interactive repl use. These scripts ultimately construct and



Note that local ./resources etc are at the beginning of the classpath

~/work/tmp810/xanadu > clj -Spath
*resources:target:src/clj:src/cljc:src/cljs:test/cljs:test-figwheel-main*
:/Users/alanthompson/.m2/repository/com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar:/Users/alanthompson/.m2/repository/com/google/elemental2/elemental2-core/1.0.0-RC1/elemental2-core-1.0.0-RC1.jar:/Users/alanthompson/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/alanthompson/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/alanthompson/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar:/Users/alanthompson/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/alanthompson/.m2/repository/cljsjs/material-ui-currency-textfield/0.8.6-0/material-ui-currency-textfield-0.8.6-0.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.analyzer/1.0.0/tools.analyzer-1.0.0.jar:/Users/alanthompson/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.28.v20200408/jetty-xml-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/com/bhauman/figwheel-repl/0.2.11/figwheel-repl-0.2.11.jar:/Users/alanthompson/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.28.v20200408/jetty-servlet-9.4.28.v20200408.jar:/Users/alanthompson/.m2/repository/ring/ring-devel/1.8.1/ring-devel-1.8.1.jar:/Users/alanthompson/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/tools.logging/0.3.1/tools.logging-0.3.1.jar:/Users/alanthompson/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/alanthompson/.m2/repository/co/deps/ring-etag-middleware/0.2.0/ring-etag-middleware-0.2.0.jar:/Users/alanthompson/.m2/repository/expound/expound/0.7.2/expound-0.7.2.jar:/Users/alanthompson/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alanthompson/.m2/repository/com/cemerick/url/0.1.1/url-0.1.1.jar:

..


However, my colleague had accidentally typed *`brew install clojure`.  *This
caused a mysterious failure:

---
~/work/tmp810/xanadu > clojure --help
Version: *1.10.1.645*

You use the Clojure tools ('clj' or 'clojure') to run Clojure programs
on the JVM, e.g. to start a REPL or invoke a specific function with data.


and the classpath

-
~/work/tmp810/xanadu > clj -Spath
DEPRECATED: Libs must be qualified, change deps-ancient =>
deps-ancient/deps-ancient (deps.edn)
DEPRECATED: Libs must be qualified, change reagent => reagent/reagent
(deps.edn)
DEPRECATED: Libs must be qualified, change ns-tracker =>
ns-tracker/ns-tracker (deps.edn)
DEPRECATED: Libs must be qualified, change camel-snake-kebab =>
camel-snake-kebab/camel-snake-kebab (deps.edn)
DEPRECATED: Libs must be qualified, change bidi => bidi/bidi (deps.edn)
DEPRECATED: Libs must be qualified, change orchestra => orchestra/orchestra
(deps.edn)
DEPRECATED: Libs must be qualified, change cljs-ajax => cljs-ajax/cljs-ajax
(deps.edn)
DEPRECATED: Libs must be qualified, change expound => expound/expound
(deps.edn)
DEPRECATED: Libs must be qualified, change re-frame => re-frame/re-frame
(deps.edn)
DEPRECATED: Libs must be qualified, change re-frame-utils =>
re-frame-utils/re-frame-utils (deps.edn)
DEPRECATED: Libs must be qualified, change cljs-bean => cljs-bean/cljs-bean
(deps.edn)

[ClojureScript] Excellent series of videos by Uncle Bob Martin

2020-04-28 Thread Alan Thompson
I think everyone can benefit from viewing this material:


   - Clean Code - pt 1 
   - Clean Code - pt 2 
   - Clean Code - pt 3 
   - Clean Code - pt 4 
   - Clean Code - pt 5 
   - Clean Code - pt 6 


Enjoy!
Alan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/CAN67zA13%2BJf19Jv4%2B-Vmahkxxp0-tWhhS_mPModdy30syJ1%2B2A%40mail.gmail.com.


[ClojureScript] Love Letter to Clojure (by Gene Kim)

2019-10-11 Thread Alan Thompson
Thought this would be of interest:
https://itrevolution.com/love-letter-to-clojure-part-1/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/CAN67zA1%3D-VhpqUg_8fb1J0owRgk1qkvyNcxu1b74HvDT%3DK5SwQ%40mail.gmail.com.


[ClojureScript] Good Clojure article by Uncle Bob

2019-08-23 Thread Alan Thompson
Nicely sums up the advantages of Clojure:

http://blog.cleancoder.com/uncle-bob/2019/08/22/WhyClojure.html

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/CAN67zA3fJK0aEV4qb8RfFd5WPb40U1_4yNjQhBFtf86p-8TyEQ%40mail.gmail.com.


Re: [ClojureScript] [ANN] new Clojure(Script) Date/Time libraries based on java.time

2019-05-21 Thread Alan Thompson
Sounds great.  I have often thought that something like this would be cool.
Alan

On Tue, May 21, 2019 at 5:24 AM Henry Widd  wrote:

> Hey everyone,
>
>
> Java.time is a platform library which was introduced in Java 8 and is a
> refinement of Joda Time (which the popular clj-time sits on).  Now that
> there is also a Javascript implementation of java.time, it has been
> possible to create the following libraries:
>
>
> cljc.java-time   - this
> mirrors the java.time api directly (it was auto-generated via reflection on
> java.time) but code written with it will compile to Clojure and
> ClojureScript.
>
> time-literals   - also a
> Clojure(Script) library, this provides a set of tagged literals for objects
> from the java.time domain and the relevant readers/printers for these. For
> it's most basic application and if you are only using java.time directly on
> the jvm, this library will be interesting because java.time objects output
> in the REPL can be pasted back in.
>
>
> My talk at Clojure/North 
> provides more background on these and other java.time related libraries.
>
>
> Thanks,
>
> Henry
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojurescript/fc62c82d-c45c-4f06-8cdf-b50caaede6f5%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/CAN67zA0gYK1AwbiTZxj62YhCZe4eoWs1UNLBjO3X4ORXzKdk1g%40mail.gmail.com.


[ClojureScript] Re: Figwheel.Main error trying to open cljs reload socket

2019-05-03 Thread Alan Thompson
Found it.  Someone had left an old reference to `figwheel/watch-and-reload`
lying around Doh!

 (figwheel/watch-and-reload ; #todo #awt needed?
  :websocket-url "ws://localhost:3449/figwheel-ws"
  :on-jsload mount-components)


On Fri, May 3, 2019 at 4:00 PM Alan Thompson  wrote:

> Also getting this error:
>
> repl.cljc:372 REPL eval error RangeError: Maximum call stack size exceeded
> at cljs$core$_EQ_ (core.cljs:1258)
> at Object.figwheel$repl$figwheel_require (repl.cljc:90)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> at Object.figwheel$repl$figwheel_require (repl.cljc:94)
> figwheel$repl$eval_javascript_STAR__STAR_ @ repl.cljc:372
> (anonymous) @ repl.cljc:384
> G__12572__2 @ core.cljs:10857
> G__12572 @ core.cljs:10843
> (anonymous) @ repl.cljc:474
> goog.events.EventTarget.fireListeners @ eventtarget.js:284
> goog.events.EventTarget.dispatchEventInternal_ @ eventtarget.js:381
> goog.events.EventTarget.dispatchEvent @ eventtarget.js:196
> goog.net.WebSocket.onMessage_ @ websocket.js:426
>
>
>
>
>
> On Fri, May 3, 2019 at 3:49 PM Alan Thompson  wrote:
>
>> Using figwheel-main, I am getting a strange error:
>>
>> Figwheel: trying to open cljs reload socket
>> socket.cljs:71
>> WebSocket connection to 'ws://localhost:3449/figwheel-ws' failed:
>> Error in connection establishment: net::ERR_CONNECTION_REFUSED
>>
>>
>> As the error message implies, hot reloading doesn't work w/o the socket.
>> Any clues on what could be causing this?
>>
>> Alan
>>
>>

-- 
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: Figwheel.Main error trying to open cljs reload socket

2019-05-03 Thread Alan Thompson
Also getting this error:

repl.cljc:372 REPL eval error RangeError: Maximum call stack size exceeded
at cljs$core$_EQ_ (core.cljs:1258)
at Object.figwheel$repl$figwheel_require (repl.cljc:90)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
at Object.figwheel$repl$figwheel_require (repl.cljc:94)
figwheel$repl$eval_javascript_STAR__STAR_ @ repl.cljc:372
(anonymous) @ repl.cljc:384
G__12572__2 @ core.cljs:10857
G__12572 @ core.cljs:10843
(anonymous) @ repl.cljc:474
goog.events.EventTarget.fireListeners @ eventtarget.js:284
goog.events.EventTarget.dispatchEventInternal_ @ eventtarget.js:381
goog.events.EventTarget.dispatchEvent @ eventtarget.js:196
goog.net.WebSocket.onMessage_ @ websocket.js:426





On Fri, May 3, 2019 at 3:49 PM Alan Thompson  wrote:

> Using figwheel-main, I am getting a strange error:
>
> Figwheel: trying to open cljs reload socket
> socket.cljs:71
> WebSocket connection to 'ws://localhost:3449/figwheel-ws' failed:
> Error in connection establishment: net::ERR_CONNECTION_REFUSED
>
>
> As the error message implies, hot reloading doesn't work w/o the socket.
> Any clues on what could be causing this?
>
> Alan
>
>

-- 
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] Figwheel.Main error trying to open cljs reload socket

2019-05-03 Thread Alan Thompson
Using figwheel-main, I am getting a strange error:

Figwheel: trying to open cljs reload socket
socket.cljs:71
WebSocket connection to 'ws://localhost:3449/figwheel-ws' failed:
Error in connection establishment: net::ERR_CONNECTION_REFUSED


As the error message implies, hot reloading doesn't work w/o the socket.
Any clues on what could be causing this?

Alan

-- 
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.


Re: [ClojureScript] figwheel-main vs headless chrome testing

2019-03-19 Thread Alan Thompson
Looks like the URL got garbled.  Plain text:

https://github.com/cloojure/cljs-template.git


On Tue, Mar 19, 2019 at 8:16 PM Alan Thompson  wrote:

> Hi - Here is a template project that I've developed to showcase CLJS
> testing and JS interop & testing.  Just clone this repo:
>
> https://github.com/cloojure/cljs-template.git
>
>
>
> and follow the README to set up cljs tests (`lein test` for CLJ will work
> out of the box).
>
> It is based on the original figwheel (plans to upgrade to figwheel-main
> are in the works).
>
> Alan
>
>
> On Tue, Mar 19, 2019 at 8:23 AM Paul Whittington 
> wrote:
>
>> I'm trying to follow the instructions here
>> https://figwheel.org/docs/testing.html#running-tests-in-a-headless-environment,
>> but the command line test execution never terminates.
>>
>> I've executed the following procedure:
>>
>> *Development environment*
>>
>>- LinuxMint 19.1
>>- BASH
>>- openjdk version "11.0.1" 2018-10-16
>>- OpenJDK Runtime Environment (build
>>11.0.1+13-Ubuntu-3ubuntu118.04ppa1)
>>- OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1,
>>mixed mode, sharing)
>>- Clojure 1.9.0
>>- ClojureScript 1.10.339
>>- figwheel-main 0.1.9
>>
>> *Development Process*
>> *Create a figwheel-main project by executing this command:*
>> => clj -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "0.5.5"}}}'
>> -m clj-new.create
>> figwheel-main
>> fsclj.core
>>
>> *Enter the fsclj.core directory*
>> => cd fsclj.core
>>
>> *Execute the unit tests from the command line:*
>> => clj -A:fig:test
>>
>> [Figwheel] Validating figwheel-main.edn
>> [Figwheel] figwheel-main.edn is valid (ツ)/
>> [Figwheel] Compiling build test to "target/public/cljs-out/test-main.js"
>> [Figwheel] Successfully compiled build test to
>> "target/public/cljs-out/test-main.js" in 1.147 seconds.
>> 2019-03-15 11:13:56.627:INFO::main: Logging initialized @10504ms
>> Opening URL http://localhost:9500/test.html
>>
>> Testing fsclj.core-test
>>
>> Ran 2 tests containing 2 assertions.
>> 0 failures, 0 errors.
>> :figwheel.main.testing/success
>>
>> *Find path to google-chrome:*
>> => which google-chrome
>>
>> /usr/bin/google-chrome
>>
>> *Modify 'test.cljs.edn' to use Chrome headless by uncommenting the
>> ':launch-js' line and changing it.*
>> => cat test.cljs.edn
>>
>> ^{
>> ;; use an alternative landing page for the tests so that we don't
>> ;; launch the application
>> :open-url "http://[[server-hostname]]:[[server-port]]/test.html;
>>
>> ;; uncomment to launch tests in a headless environment
>> ;; you will have to figure out the path to chrome on your system
>> :launch-js ["/usr/bin/google-chrome" "--headless" "--disable-gpu"
>> "--repl" :open-url]
>> }
>> {:main fsclj.test-runner}
>>
>> *Execute the unit tests from the command line again:*
>> => clj -A:fig:test
>>
>> [Figwheel] Validating figwheel-main.edn
>> [Figwheel] figwheel-main.edn is valid (ツ)/
>> [Figwheel] Compiling build test to "target/public/cljs-out/test-main.js"
>> [Figwheel] Successfully compiled build test to
>> "target/public/cljs-out/test-main.js" in 2.06 seconds.
>> 2019-03-15 13:16:16.381:INFO::main: Logging initialized @11033ms
>> Launching Javascript environment with script: ["/usr/bin/google-chrome"
>> "--headless" "--disable-gpu" "--repl" :open-url]
>> Environment output being logged to:
>> target/public/cljs-out/test/js-environment.log
>>
>> *The above output is generated, but the program never terminates*
>>
>> The js-environment.log file contains:
>>
>> /131437.958265:INFO:headless_shell.cc(370)] Type a Javascript expression
>> to evaluate or "quit" to exit.
>>
>> --
>> 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.
>>
>

-- 
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.


Re: [ClojureScript] figwheel-main vs headless chrome testing

2019-03-19 Thread Alan Thompson
Hi - Here is a template project that I've developed to showcase CLJS
testing and JS interop & testing.  Just clone this repo:

https://github.com/cloojure/cljs-template.git



and follow the README to set up cljs tests (`lein test` for CLJ will work
out of the box).

It is based on the original figwheel (plans to upgrade to figwheel-main are
in the works).

Alan


On Tue, Mar 19, 2019 at 8:23 AM Paul Whittington  wrote:

> I'm trying to follow the instructions here
> https://figwheel.org/docs/testing.html#running-tests-in-a-headless-environment,
> but the command line test execution never terminates.
>
> I've executed the following procedure:
>
> *Development environment*
>
>- LinuxMint 19.1
>- BASH
>- openjdk version "11.0.1" 2018-10-16
>- OpenJDK Runtime Environment (build
>11.0.1+13-Ubuntu-3ubuntu118.04ppa1)
>- OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1,
>mixed mode, sharing)
>- Clojure 1.9.0
>- ClojureScript 1.10.339
>- figwheel-main 0.1.9
>
> *Development Process*
> *Create a figwheel-main project by executing this command:*
> => clj -Sdeps '{:deps {seancorfield/clj-new {:mvn/version "0.5.5"}}}'
> -m clj-new.create
> figwheel-main
> fsclj.core
>
> *Enter the fsclj.core directory*
> => cd fsclj.core
>
> *Execute the unit tests from the command line:*
> => clj -A:fig:test
>
> [Figwheel] Validating figwheel-main.edn
> [Figwheel] figwheel-main.edn is valid (ツ)/
> [Figwheel] Compiling build test to "target/public/cljs-out/test-main.js"
> [Figwheel] Successfully compiled build test to
> "target/public/cljs-out/test-main.js" in 1.147 seconds.
> 2019-03-15 11:13:56.627:INFO::main: Logging initialized @10504ms
> Opening URL http://localhost:9500/test.html
>
> Testing fsclj.core-test
>
> Ran 2 tests containing 2 assertions.
> 0 failures, 0 errors.
> :figwheel.main.testing/success
>
> *Find path to google-chrome:*
> => which google-chrome
>
> /usr/bin/google-chrome
>
> *Modify 'test.cljs.edn' to use Chrome headless by uncommenting the
> ':launch-js' line and changing it.*
> => cat test.cljs.edn
>
> ^{
> ;; use an alternative landing page for the tests so that we don't
> ;; launch the application
> :open-url "http://[[server-hostname]]:[[server-port]]/test.html;
>
> ;; uncomment to launch tests in a headless environment
> ;; you will have to figure out the path to chrome on your system
> :launch-js ["/usr/bin/google-chrome" "--headless" "--disable-gpu" "--repl"
> :open-url]
> }
> {:main fsclj.test-runner}
>
> *Execute the unit tests from the command line again:*
> => clj -A:fig:test
>
> [Figwheel] Validating figwheel-main.edn
> [Figwheel] figwheel-main.edn is valid (ツ)/
> [Figwheel] Compiling build test to "target/public/cljs-out/test-main.js"
> [Figwheel] Successfully compiled build test to
> "target/public/cljs-out/test-main.js" in 2.06 seconds.
> 2019-03-15 13:16:16.381:INFO::main: Logging initialized @11033ms
> Launching Javascript environment with script: ["/usr/bin/google-chrome"
> "--headless" "--disable-gpu" "--repl" :open-url]
> Environment output being logged to:
> target/public/cljs-out/test/js-environment.log
>
> *The above output is generated, but the program never terminates*
>
> The js-environment.log file contains:
>
> /131437.958265:INFO:headless_shell.cc(370)] Type a Javascript expression
> to evaluate or "quit" to exit.
>
> --
> 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.
>

-- 
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] Figwheel build failure for CLJS 1.10.516: Error: Cannot find module '@cljs-oss/module-deps'

2019-02-12 Thread Alan Thompson
Hi - I have a re-frame app that works fine for CLJS 1.10.439, but fails in
compile for CLJS 1.10.516.  Any suggestions?

Here is the working and failing build output for `lein figwheel`:

1.10.439 - works
-
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Figwheel: Cleaning build - dev
Compiling build :dev to "resources/public/js/compiled/flintstones.js" from
["src/cljc" "src/cljs"]...
WARNING: schema.core/either is deprecated at line 13
resources/public/js/compiled/flintstones-dev/tupelo/schema.cljc
WARNING: schema.core/either is deprecated at line 1676
resources/public/js/compiled/flintstones-dev/tupelo/core.cljc
WARNING: schema.core/either is deprecated at line 1703
resources/public/js/compiled/flintstones-dev/tupelo/core.cljc
WARNING: schema.core/either is deprecated at line 1862
resources/public/js/compiled/flintstones-dev/tupelo/core.cljc
WARNING: Namespace tupelo.char contains a reserved JavaScript keyword, the
corresponding Google Closure namespace will be munged to tupelo.char$ at
line 7 resources/public/js/compiled/flintstones-dev/tupelo/char.cljc
Successfully compiled build :dev to
"resources/public/js/compiled/flintstones.js" in 15.379 seconds.
Launching ClojureScript REPL for build: dev
--

1.10.516 - fails

Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Figwheel: Cleaning build - dev
Compiling build :dev to "resources/public/js/compiled/flintstones.js" from
["src/cljc" "src/cljs"]...
module.js:550
throw err;
^

Error: Cannot find module '@cljs-oss/module-deps'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at [eval]:8:13
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at Object.runInThisContext (vm.js:139:38)
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:653:30)
at evalScript (bootstrap_node.js:479:27)

WARNING: schema.core/either is deprecated at line 13
resources/public/js/compiled/flintstones-dev/tupelo/schema.cljc
^C%



Alan Thompson

-- 
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.


Re: [ClojureScript] Clojurescript testing

2018-11-09 Thread Alan Thompson
This setup includes the ability to use/test native JS libs in 3 different
ways, which required a bit of a struggle (i.e. trial & error) to get the
syntax right.  Here are the native JavaScript files in ~/resources:

~/expr/cljs-template > tree resources
resources
└── public
├── css
│   └── style.css
├── dino-externs.js
├── dino.js
├── index.html
├── js
├── libs
│   └── wilma.js
└── pebbles.js



On Fri, Nov 9, 2018 at 2:18 PM Alan Thompson  wrote:

> You can see the source layout as follows:
>
> ~/expr/cljs-template > tree src test
> src
> ├── clj
> │   └── flintstones
> │   └── test_clj.clj
> ├── cljc
> │   └── flintstones
> │   ├── bambam.cljc
> │   ├── core.cljc
> │   ├── slate.cljc
> │   └── test_cljs.cljc
> └── cljs
> └── flintstones
> └── test_cljs.cljs
> test
> ├── clj
> ├── cljc
> │   └── tst
> │   └── flintstones
> │   ├── bambam.cljc
> │   └── slate.cljc
> └── cljs
> └── tst
> └── flintstones
> ├── dino.cljs
> ├── doorunner.cljs
> ├── pebbles.cljs
> └── wilma.cljs
>
> 13 directories, 12 files
>
>
>
>
>
> On Fri, Nov 9, 2018 at 2:17 PM Alan Thompson  wrote:
>
>> I have a nice setup for CLJS testing using the `doo` test framework.  It
>> can run tests either at the command line using `phantomjs` or in the
>> browser (eg Chrome).  It has source and test dirs segregrated into `clj`,
>> `cljc`, and `cljs` subdirs so you can get macros and dual-use code working
>> correctly.  You can see it here:
>>
>> https://github.com/cloojure/cljs-template
>>
>> A sample run:
>>
>>
>> ~/expr/cljs-template > lein clean ; time lein doo phantom test once
>>
>> ;; ==
>> ;; Testing with Phantom:
>>
>> doorunner - beginning
>> doorunner - end
>>
>> Testing tst.flintstones.dino
>> test once - enter
>> globalObject:   #js {:a 1, :b 2, :c 3}
>> (-> % .-b (+ 5) => 7
>> (js/makeDino) => #js {:desc blue dino-dog, :says #object[Function]}
>> dino.desc =>  blue dino-dog
>> dino.says(5) =>  Ruff-Ruff-Ruff-Ruff-Ruff!
>> :keep-words ("am" "having" "today")
>> :re-seq ("am" "having" "today")
>> test once - leave
>>
>> Testing tst.flintstones.wilma
>> test each - enter
>> test each - leave
>> test each - enter
>> wilmaPhony/stats:#js {:lipstick red, :height 5.5}
>> wilma => #js {:desc patient housewife, :says #object[Function]}
>> test each - leave
>>
>> Testing tst.flintstones.pebbles
>> test once - enter
>> test once - leave
>>
>> Testing tst.flintstones.slate
>> logr-slate-enter
>> logr-slate-leave 3
>>
>> Testing tst.flintstones.bambam
>> test each - enter
>> test each - leave
>> test each - enter
>> logr-bambam-enter
>> logr-bambam-leave 3
>> test each - leave
>>
>> Ran 9 tests containing 22 assertions.
>> 0 failures, 0 errors.
>> lein doo phantom test once  38.52s user 0.84s system 333% cpu 11.813 total
>>
>>
>>
>> On Fri, Nov 9, 2018 at 10:14 AM Gareth James  wrote:
>>
>>> I'm currently researching different methods for testing clojurescipt
>>> code, specifically unit testing, automated browser testing and code
>>> coverage. I'm specifically trying to find more information about the use of
>>> cljs.test and cljs.spec either individually or together. Could anyone share
>>> any experience they have of using either of these or any other information
>>> about how they are testing their code.
>>>
>>> Thanks
>>> Gareth
>>>
>>> --
>>> 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.
>>>
>>

-- 
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.


Re: [ClojureScript] Clojurescript testing

2018-11-09 Thread Alan Thompson
You can see the source layout as follows:

~/expr/cljs-template > tree src test
src
├── clj
│   └── flintstones
│   └── test_clj.clj
├── cljc
│   └── flintstones
│   ├── bambam.cljc
│   ├── core.cljc
│   ├── slate.cljc
│   └── test_cljs.cljc
└── cljs
└── flintstones
└── test_cljs.cljs
test
├── clj
├── cljc
│   └── tst
│   └── flintstones
│   ├── bambam.cljc
│   └── slate.cljc
└── cljs
└── tst
└── flintstones
├── dino.cljs
├── doorunner.cljs
├── pebbles.cljs
└── wilma.cljs

13 directories, 12 files





On Fri, Nov 9, 2018 at 2:17 PM Alan Thompson  wrote:

> I have a nice setup for CLJS testing using the `doo` test framework.  It
> can run tests either at the command line using `phantomjs` or in the
> browser (eg Chrome).  It has source and test dirs segregrated into `clj`,
> `cljc`, and `cljs` subdirs so you can get macros and dual-use code working
> correctly.  You can see it here:
>
> https://github.com/cloojure/cljs-template
>
> A sample run:
>
>
> ~/expr/cljs-template > lein clean ; time lein doo phantom test once
>
> ;; ==
> ;; Testing with Phantom:
>
> doorunner - beginning
> doorunner - end
>
> Testing tst.flintstones.dino
> test once - enter
> globalObject:   #js {:a 1, :b 2, :c 3}
> (-> % .-b (+ 5) => 7
> (js/makeDino) => #js {:desc blue dino-dog, :says #object[Function]}
> dino.desc =>  blue dino-dog
> dino.says(5) =>  Ruff-Ruff-Ruff-Ruff-Ruff!
> :keep-words ("am" "having" "today")
> :re-seq ("am" "having" "today")
> test once - leave
>
> Testing tst.flintstones.wilma
> test each - enter
> test each - leave
> test each - enter
> wilmaPhony/stats:#js {:lipstick red, :height 5.5}
> wilma => #js {:desc patient housewife, :says #object[Function]}
> test each - leave
>
> Testing tst.flintstones.pebbles
> test once - enter
> test once - leave
>
> Testing tst.flintstones.slate
> logr-slate-enter
> logr-slate-leave 3
>
> Testing tst.flintstones.bambam
> test each - enter
> test each - leave
> test each - enter
> logr-bambam-enter
> logr-bambam-leave 3
> test each - leave
>
> Ran 9 tests containing 22 assertions.
> 0 failures, 0 errors.
> lein doo phantom test once  38.52s user 0.84s system 333% cpu 11.813 total
>
>
>
> On Fri, Nov 9, 2018 at 10:14 AM Gareth James  wrote:
>
>> I'm currently researching different methods for testing clojurescipt
>> code, specifically unit testing, automated browser testing and code
>> coverage. I'm specifically trying to find more information about the use of
>> cljs.test and cljs.spec either individually or together. Could anyone share
>> any experience they have of using either of these or any other information
>> about how they are testing their code.
>>
>> Thanks
>> Gareth
>>
>> --
>> 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.
>>
>

-- 
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.


Re: [ClojureScript] Clojurescript testing

2018-11-09 Thread Alan Thompson
I have a nice setup for CLJS testing using the `doo` test framework.  It
can run tests either at the command line using `phantomjs` or in the
browser (eg Chrome).  It has source and test dirs segregrated into `clj`,
`cljc`, and `cljs` subdirs so you can get macros and dual-use code working
correctly.  You can see it here:

https://github.com/cloojure/cljs-template

A sample run:


~/expr/cljs-template > lein clean ; time lein doo phantom test once

;; ==
;; Testing with Phantom:

doorunner - beginning
doorunner - end

Testing tst.flintstones.dino
test once - enter
globalObject:   #js {:a 1, :b 2, :c 3}
(-> % .-b (+ 5) => 7
(js/makeDino) => #js {:desc blue dino-dog, :says #object[Function]}
dino.desc =>  blue dino-dog
dino.says(5) =>  Ruff-Ruff-Ruff-Ruff-Ruff!
:keep-words ("am" "having" "today")
:re-seq ("am" "having" "today")
test once - leave

Testing tst.flintstones.wilma
test each - enter
test each - leave
test each - enter
wilmaPhony/stats:#js {:lipstick red, :height 5.5}
wilma => #js {:desc patient housewife, :says #object[Function]}
test each - leave

Testing tst.flintstones.pebbles
test once - enter
test once - leave

Testing tst.flintstones.slate
logr-slate-enter
logr-slate-leave 3

Testing tst.flintstones.bambam
test each - enter
test each - leave
test each - enter
logr-bambam-enter
logr-bambam-leave 3
test each - leave

Ran 9 tests containing 22 assertions.
0 failures, 0 errors.
lein doo phantom test once  38.52s user 0.84s system 333% cpu 11.813 total



On Fri, Nov 9, 2018 at 10:14 AM Gareth James  wrote:

> I'm currently researching different methods for testing clojurescipt code,
> specifically unit testing, automated browser testing and code coverage. I'm
> specifically trying to find more information about the use of cljs.test and
> cljs.spec either individually or together. Could anyone share any
> experience they have of using either of these or any other information
> about how they are testing their code.
>
> Thanks
> Gareth
>
> --
> 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.
>

-- 
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: Plumatic Schema error in CLJS

2018-11-05 Thread Alan Thompson
I wrote up more details of this error on StackOverflow:

https://stackoverflow.com/questions/53149344/what-causes-error-no-protocol-method-xxx-yyy-defined-for-type-undefined-in-clo


These errors are particularly insidious since the error message is so
vague, and there was no reference to the offending file & line. In face, in
this case it was caused by a chain of references across 4 files:

tst.tupelo.core -> tupelo.core -> tupelo.impl -> tupelo.schema


On Mon, Nov 5, 2018 at 7:15 AM Alan Thompson  wrote:

> OK, I found the cause of the error.  In a dependent namespace, I had
> defined some schemas:
>
> (ns tupelo.schema
>   "Prismatic Schema type definitions"
>   (:require [schema.core :as s])
>   #?(:clj (:import [java.util HashSet] ))
>   #?(:clj (:gen-class)))
>
> (def Set
>   "Either a Clojure hash-set or a java.util.HashSet"
>   (s/either #{s/Any}
> *#?(:clj* java.util.HashSet*)*))  ; <= *This was missing the
> #?(:clj ...)*   and caused the error
>
>
>
>
> On Mon, Nov 5, 2018 at 7:15 AM Alan Thompson  wrote:
>
>> Copied from the Clojure mailing list
>> 
>>
>> I am seeing the following errors in CLJS, but not in CLJ:
>>
>> ERROR in (dotest-line-695) (schema/core.js:33:64)
>> expected: (clojure.core/= (t/thru 9) (t/glue-rows data))
>>   actual: #object[Error Error: No protocol method Schema.spec defined for
>> type undefined: ]
>>
>>
>> The errors disappear if I remove Plumatic Schema elements of the function
>> definition:
>>
>> ; this one produces the error in clojurescript (clojure runs fine)
>> (s/defn glue-rows  :- tsk/List
>>   [coll-2d :- tsk/List]
>> ...
>>
>> ; this one works fine in both clojure and clojurescript
>> (s/defn glue-rows  :- tsk/List
>>   [coll-2d :- tsk/List]
>> ...
>>
>>
>> Any clues as to the cause of this behavior?
>> Alan
>>
>>

-- 
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: Plumatic Schema error in CLJS

2018-11-05 Thread Alan Thompson
OK, I found the cause of the error.  In a dependent namespace, I had
defined some schemas:

(ns tupelo.schema
  "Prismatic Schema type definitions"
  (:require [schema.core :as s])
  #?(:clj (:import [java.util HashSet] ))
  #?(:clj (:gen-class)))

(def Set
  "Either a Clojure hash-set or a java.util.HashSet"
  (s/either #{s/Any}
*#?(:clj* java.util.HashSet*)*))  ; <= *This was missing the
#?(:clj ...)*   and caused the error




On Mon, Nov 5, 2018 at 7:15 AM Alan Thompson  wrote:

> Copied from the Clojure mailing list
> 
>
> I am seeing the following errors in CLJS, but not in CLJ:
>
> ERROR in (dotest-line-695) (schema/core.js:33:64)
> expected: (clojure.core/= (t/thru 9) (t/glue-rows data))
>   actual: #object[Error Error: No protocol method Schema.spec defined for
> type undefined: ]
>
>
> The errors disappear if I remove Plumatic Schema elements of the function
> definition:
>
> ; this one produces the error in clojurescript (clojure runs fine)
> (s/defn glue-rows  :- tsk/List
>   [coll-2d :- tsk/List]
> ...
>
> ; this one works fine in both clojure and clojurescript
> (s/defn glue-rows  :- tsk/List
>   [coll-2d :- tsk/List]
> ...
>
>
> Any clues as to the cause of this behavior?
> Alan
>
>

-- 
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] Plumatic Schema error in CLJS

2018-11-05 Thread Alan Thompson
Copied from the Clojure mailing list


I am seeing the following errors in CLJS, but not in CLJ:

ERROR in (dotest-line-695) (schema/core.js:33:64)
expected: (clojure.core/= (t/thru 9) (t/glue-rows data))
  actual: #object[Error Error: No protocol method Schema.spec defined for
type undefined: ]


The errors disappear if I remove Plumatic Schema elements of the function
definition:

; this one produces the error in clojurescript (clojure runs fine)
(s/defn glue-rows  :- tsk/List
  [coll-2d :- tsk/List]
...

; this one works fine in both clojure and clojurescript
(s/defn glue-rows  :- tsk/List
  [coll-2d :- tsk/List]
...


Any clues as to the cause of this behavior?
Alan

-- 
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.


Re: [ClojureScript] Seeking advice on making HTTP requests from CLJS

2018-10-26 Thread Alan Thompson
Hi - Just learned about the Martian project this week.  It sounds exactly
like what you need.  I'm looking forward to using it in future projects.
Watch the video first.

   - Video:  https://skillsmatter.com/skillscasts/8843-clojure-bytes#video
   - Blog post:  https://juxt.pro/blog/posts/advanced-martian.html
   - Github:  https://github.com/oliyh/martian




On Fri, Oct 26, 2018 at 8:13 AM Kashyap CK  wrote:

> Hi,
>
> I am trying to build a javascript library to deal with the protocol
> details of a server. The goal is to create a library that does all the
> dirty work of handshake and reconnect logic and exposes a "stream" to the
> user of the library that can be read from and written to.
>
> In the past I have used CLJS for my personal projects and have tried
> cljs-http and also the xhr module in goog. However, I want to confirm if
> there is a recommended CLJS way for doing this? My target is the browser
> for now but it would not hurt if I use something that works on node as well
> :)
>
> Regards,
> Kashyap
>
> --
> 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.
>

-- 
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.


Re: [ClojureScript] Importing react components from clojurescript

2018-08-20 Thread Alan Thompson
Meant to paste the URL:   https://github.com/cloojure/cljs-template

Alan

On Mon, Aug 20, 2018 at 4:32 PM Alan Thompson  wrote:

> If you clone this template project it provides examples of 3 ways in
> "import" native JS code into a CLJS project (see "dino.js" etc).
>
> g...@github.com:cloojure/cljs-template.git
>
>
>
>
> On Mon, Aug 20, 2018 at 9:37 AM Dusan Miloradovic <
> dusan.milorado...@gmail.com> wrote:
>
>> I think the easiest way to do it is using the shadow-cljs. Here is the
>> example:
>> https://github.com/shadow-cljs/examples/tree/master/cljs-react-app
>>
>>
>>
>> On Mon, Aug 20, 2018 at 6:43 PM Quentin Le Guennec <
>> quentin.leguenn...@gmail.com> wrote:
>>
>>> It doesn't quite answer everything. I would like a full example of a
>>> project using a react javascript component. Do you have an idea where I
>>> could find that?
>>> On 8/20/18 3:09 AM, Philos Kim wrote:
>>>
>>> The react-flip-move library in the example is written in React
>>> JavaScript code.
>>>
>>> https://github.com/joshwcomeau/react-flip-move
>>>
>>> https://unpkg.com/react-flip-move@3.0.2/dist/react-flip-move.js
>>>
>>>
>>> 2018년 8월 19일 일요일 오후 10시 11분 30초 UTC+9, Quentin Le Guennec 님의 말:
>>>>
>>>> Hello, thanks for your answer
>>>>
>>>> That is not what I am looking for.
>>>>
>>>> I am trying to import javascript code into my clojurescript project.
>>>> Something you would do with either `require` or `import` in javascript.
>>>>
>>>> The node module I need would have to be specified in `defproject`, then
>>>> downloaded when I run `lein deps`
>>>>
>>>> Then in clojurescript, I would have access to that module.
>>>>
>>>> On 8/19/18 1:58 AM, Philos Kim wrote:
>>>> > Recer to the section
>>>> > 'Creating Reagent "Components" from React Components' of the
>>>> following page.
>>>> >
>>>> >
>>>> >
>>>> https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md
>>>> >
>>>>
>>>> --
>>> 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.
>>>
>>> --
>>> 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.
>>>
>> --
>> 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.
>>
>

-- 
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.


Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-07 Thread Alan Thompson
I have tested that it works on Java 10 now using Figwheel 0.5.16.My
project.clj looks so plain now without the tricky

#=(eval ...)


:(

On Sun, May 6, 2018 at 4:55 PM, Daniel Compton <
daniel.compton.li...@gmail.com> wrote:

> Working from https://github.com/cloojure/cljs-figwheel-stripped I could
> reproduce the issue Alan was seeing with Java 9. Looking at the dependency
> tree, I could see that http-kit 2.2.0 was being pulled in by
> figwheel-sidecar. http-kit 2.3.0 doesn't depend on the java.xml.bind module
> any more, so using that should fix the issue.
>
> To do so, you can either:
>
> * Add http-kit 2.3.0 to your dependencies to override the version that
> Figwheel 0.5.15 pulls in
> * Upgrade to Figwheel 0.5.16, which was released in the last few hours.
> This version uses http-kit 2.3.0.
>
> Both of these options should work for starting up a Figwheel repl using
> ClojureScript 1.10 and Java 9, without adding any modules. I was able to do
> so on my machine after removing Alan's (clever) :jvm-opts evaling.
>
> --
> Daniel.
>
> On Sat, May 5, 2018 at 12:16 AM Johannes <bra...@nordakademie.de> wrote:
>
>> I've learned from Daniel Compton (in this discussion)
>>
>> Yep this is a ClojureScript issue. I wrote more about this here
>>> https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-9/
>>> .
>>> Until ClojureScript 1.10, you need to add:
>>> :jvm-opts ["--add-modules" "java.xml.bind"]
>>> to your Leiningen config.
>>
>>
>> that this kind of workaround will become unnecessary with ClojureScript
>> 1.10. That does not seem to be the case.
>>
>> Johannes
>>
>> Am Freitag, 4. Mai 2018 08:48:10 UTC+2 schrieb Alan Thompson:
>>
>>> Cleaned it up a little:
>>>
>>>   :jvm-opts #=(eval (into ["-Xmx1g"]
>>>   (let [version-str (System/getProperty
>>> "java.version")]
>>>     (if (or (= "10" version-str) (re-find #"^9\."
>>> version-str))
>>>   ["--add-modules" "java.xml.bind"] ; needed for
>>> java 9 or 10
>>>   [] ; java 8 or below
>>>
>>>
>>>
>>>
>>> On Thu, May 3, 2018 at 11:37 PM, Alan Thompson <cloo...@gmail.com>
>>> wrote:
>>>
>> I created a little lein dynamic eval code to automatically handle the
>>>> :jvm-opts stuff for Java 8/9/10:
>>>>
>>>>  :jvm-opts #=(eval (let [version-str (System/getProperty
>>>> "java.version")]
>>>>  (cond
>>>>(re-find #"^9\." version-str)  ["-Xmx1g"
>>>> "--add-modules" "java.xml.bind"]
>>>>(= "10" version-str)   ["-Xmx1g"
>>>> "--add-modules" "java.xml.bind"]
>>>>:else  ["-Xmx1g"])))
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, May 3, 2018 at 8:45 PM, Alan Thompson <cloo...@gmail.com>
>>>> wrote:
>>>>
>>> I just tried it with Java 10.  I get the same error as for Java 9, and
>>>>> it has the same fix:
>>>>>
>>>>>   :jvm-opts ["-Xmx1g" "--add-modules" "java.xml.bind"])
>>>>>
>>>>>
>>>>> This is with
>>>>>
>>>>>   :dependencies [[org.clojure/clojure "1.9.0"]
>>>>>  [org.clojure/clojurescript "1.10.238"] ]
>>>>>   :plugins [[lein-cljsbuild "1.1.7" :exclusions
>>>>> [[org.clojure/clojure]]]
>>>>> [lein-figwheel "0.5.15"] ]
>>>>>
>>>>>
>>>>> So one of those dependencies is still not cool with java 9/10.
>>>>>
>>>>> Clojure itself works fine on Java 10 (just tested).
>>>>>
>>>>> The stacktrace mentiones both http-kit and 
>>>>> figwheel-sidecar/figwheel-server....
>>>>> not sure who the culprit is (or clojurescript 1.10.238 ?)
>>>>> Alan
>>>>>
>>>>>
>>>>> On Thu, May 3, 2018 at 8:22 PM, Alan Thompson <cloo...@gmail.com>
>>>>> wrote:
>>>>>
>>>> Hmmm, OK, I just noticed I am on JVM 1.8. 

Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-03 Thread Alan Thompson
I just tried it with Java 10.  I get the same error as for Java 9, and it
has the same fix:

  :jvm-opts ["-Xmx1g" "--add-modules" "java.xml.bind"])


This is with

  :dependencies [[org.clojure/clojure "1.9.0"]
 [org.clojure/clojurescript "1.10.238"] ]
  :plugins [[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]
[lein-figwheel "0.5.15"] ]


So one of those dependencies is still not cool with java 9/10.

Clojure itself works fine on Java 10 (just tested).

The stacktrace mentiones both http-kit and
figwheel-sidecar/figwheel-server not sure who the culprit is (or
clojurescript 1.10.238 ?)
Alan



On Thu, May 3, 2018 at 8:22 PM, Alan Thompson <clooj...@gmail.com> wrote:

> Hmmm, OK, I just noticed I am on JVM 1.8.   If I switch to java 9, I get
> the same error as you.
>
> On Thu, May 3, 2018 at 4:36 PM, Johannes <bra...@nordakademie.de> wrote:
>
>> I'm sorry, but I get the same stack trace as before. And again: if I
>> modify the :jvm-opts
>>
>> :jvm-opts ["-Xmx1g" "--add-modules" "java.xml.bind"]
>>
>> all works fine.
>>
>> Johannes
>>
>> Am Freitag, 4. Mai 2018 00:08:48 UTC+2 schrieb Alan Thompson:
>>>
>>> OK, I made a super-stripped down version to remove possible config
>>> problems.  Try this:
>>>
>>> https://github.com/cloojure/cljs-figwheel-stripped.git
>>>
>>>
>>>
>>> Alan
>>>
>>> On Thu, May 3, 2018 at 1:56 PM, Johannes <bra...@nordakademie.de> wrote:
>>>
>>>>
>>>>
>>>> Am Donnerstag, 3. Mai 2018 22:51:33 UTC+2 schrieb Alan Thompson:
>>>>>
>>>>> And what happens if you type `lein figwheel` ?
>>>>>
>>>> The same problem as before:
>>>>
>>>> JohMBAir:cljs-template-master johannes$ lein figwheel
>>>>
>>>> Figwheel: Cutting some fruit, just a sec ...
>>>>
>>>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>>>
>>>> at clojure.main.(main.java:20)
>>>>
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> javax.xml.bind.DatatypeConverter, compiling:(org/httpkit/server.
>>>> clj:1:1)
>>>>
>>>> at clojure.lang.Compiler.load(Compiler.java:7526)
>>>>
>>>> at clojure.lang.RT.loadResourceScript(RT.java:379)
>>>>
>>>> at clojure.lang.RT.loadResourceScript(RT.java:370)
>>>>
>>>> at clojure.lang.RT.load(RT.java:460)
>>>>
>>>> at clojure.lang.RT.load(RT.java:426)
>>>>
>>>> at clojure.core$load$fn__6548.invoke(core.clj:6046)
>>>>
>>>> at clojure.core$load.invokeStatic(core.clj:6045)
>>>>
>>>> at clojure.core$load.doInvoke(core.clj:6029)
>>>>
>>>> at clojure.lang.RestFn.invoke(RestFn.java:408)
>>>>
>>>> at clojure.core$load_one.invokeStatic(core.clj:5848)
>>>>
>>>> at clojure.core$load_one.invoke(core.clj:5843)
>>>>
>>>> at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
>>>>
>>>> at clojure.core$load_lib.invokeStatic(core.clj:5887)
>>>>
>>>> at clojure.core$load_lib.doInvoke(core.clj:5868)
>>>>
>>>> at clojure.lang.RestFn.applyTo(RestFn.java:142)
>>>>
>>>> at clojure.core$apply.invokeStatic(core.clj:659)
>>>>
>>>> at clojure.core$load_libs.invokeStatic(core.clj:5925)
>>>>
>>>> at clojure.core$load_libs.doInvoke(core.clj:5909)
>>>>
>>>> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>>>>
>>>> at clojure.core$apply.invokeStatic(core.clj:659)
>>>>
>>>> at clojure.core$require.invokeStatic(core.clj:5947)
>>>>
>>>> at clojure.core$require.doInvoke(core.clj:5947)
>>>>
>>>> at clojure.lang.RestFn.invoke(RestFn.java:1789)
>>>>
>>>> at figwheel_sidecar.components.figwheel_server$eval18306$loadin
>>>> g__6434__auto18307.invoke(figwheel_server.clj:1)
>>>>
>>>> at figwheel_sidecar.components.figwheel_server$eval18306.invoke
>>>> Static(figwheel_server.clj:1)
>>>>
>>>> at figwheel_sidecar.components.figwheel_server$eval18306.invoke
>>>> (figwheel_server.clj:1)
>>>>
>>>> at clojure.lang.Compiler.eval(Compiler.java:7062)
&

Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-03 Thread Alan Thompson
And what happens if you type `lein figwheel` ?


On Thu, May 3, 2018 at 1:42 PM, Johannes <bra...@nordakademie.de> wrote:

>
>
> Am Donnerstag, 3. Mai 2018 22:28:29 UTC+2 schrieb Alan Thompson:
>>
>> That looks good.  Can you verify it matches what is in `project.clj`?
>>
> Yes, I think it does. That's the downloaded project.clj:
> (defproject flintstones "0.1.0-SNAPSHOT"
>   :min-lein-version "2.7.1"
>   :dependencies [[org.clojure/clojure "1.9.0"]
>  [org.clojure/clojurescript "1.10.238"]
>  [org.clojure/core.async "0.4.474"]
>  [tupelo "0.9.76"]
> ]
>   :plugins [[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]
> [lein-figwheel "0.5.15"]
> [lein-doo "0.1.10"]]
>
>   :doo {:karma {:config {"plugins"   ["karma-junit-reporter"]
>  "reporters" ["progress" "junit"]
>  "junitReporter" {"outputDir"
> "target/test-results"}}}
> :paths {:karma   "node_modules/karma/bin/karma"
> :phantom "node_modules/phantomjs/bin/phantomjs" }}
>   :source-paths ["src"]
>   :cljsbuild {:builds
>   [{:id   "dev"
> :source-paths ["src"]
> ;; The presence of a :figwheel configuration here will
> cause figwheel to inject the
> ;; figwheel client into your build
> :figwheel {:on-jsload "flintstones.core/on-js-reload"
>;; :open-urls will pop open your
> application in the default browser once
>;; Figwheel has started and compiled your
> application.  Comment this out
>;; once it no longer serves you.
>:open-urls ["http://localhost:3449/index.
> html"]}
> :compiler {:main flintstones.core
>:optimizations:none
>:libs
> ["resources/public/libs"] ; recursive includes all children
>
>:foreign-libs [{:file "dino.js"
>:provides
> ["dinoPhony"]}]
>:externs  ["dino-externs.js"]
>
>:output-to"resources/public/js/
> compiled/flintstones.js"
>:output-dir
> "resources/public/js/compiled/flintstones-dev"
>:asset-path
> "js/compiled/flintstones-dev" ; rel to figwheel default of
> `resources/public`
> ; ^^^ must match
> :output-dir
>:source-map-timestamp true
>;; To console.log CLJS data-structures make
> sure you enable devtools in Chrome
>;; https://github.com/binaryage/
> cljs-devtools
>:preloads [devtools.preload]}}
>
>{:id   "test"
> :source-paths ["src" "test"]
> :compiler {:main
> tst.flintstones.doorunner
>:optimizations:none ; :advanced
>:libs
> ["resources/public/libs"] ; recursive includes all children
>
>:foreign-libs [{:file "dino.js"
>:provides
> ["dinoPhony"]}]
>:externs  ["dino-externs.js"]
>
>:output-to"resources/public/js/
> compiled/bedrock.js"
>:output-dir
> "resources/public/js/compiled/bedrock-tst"
>;:asset-path
> "js/compiled/bedrock-tst" ; rel to figwheel default of `resources/public`
>
>:source-map-timestamp true}}]}
>
>   :profiles {:dev {:dependencies  [[binaryage/devtools "0.9.9"]
>[figwheel-sidecar "0.5.15"]
>[com.cemerick/piggieback "0.2.2"]]
>;; need to add dev source pa

Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-03 Thread Alan Thompson
That looks good.  Can you verify it matches what is in `project.clj`?
Also, try `lein --version` or type `lein repl` to verify the same stuff is
found.
Alan

On Wed, May 2, 2018 at 3:00 PM, Johannes <bra...@nordakademie.de> wrote:

> I am not sure if this is what you want to see:
>
> JohMBAir:hello-world johannes$ clj --main cljs.main --compile
> hello-world.core --repl
>
> ClojureScript 1.10.238
>
> cljs.user=> ^D
>
> JohMBAir:hello-world johannes$ clj
>
> Clojure 1.9.0
>
> user=> ^D
>
> JohMBAir:hello-world johannes$ java --version
>
> java 9.0.1
>
> Java(TM) SE Runtime Environment (build 9.0.1+11)
>
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
>
> Am Mittwoch, 2. Mai 2018 21:05:09 UTC+2 schrieb Alan Thompson:
>>
>> Can you verify versions for Java, Clojure, & ClojureScript?
>>
>> On Mon, Apr 30, 2018 at 6:34 AM, Johannes <bra...@nordakademie.de> wrote:
>>
>>> Hm, I downloaded your profile.clj, and with
>>>
>>> lein figwheel
>>>
>>> I get the known error:
>>>
>>> Figwheel: Cutting some fruit, just a sec ...
>>>
>>> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.pom from clojars
>>>
>>> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.pom from
>>> clojars
>>>
>>> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.pom from clojars
>>>
>>> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.pom from clojars
>>>
>>> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.pom
>>> from clojars
>>>
>>> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.pom from clojars
>>>
>>> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.pom
>>> from central
>>>
>>> Retrieving org/clojure/tools.analyzer.jvm/0.6.5/tools.analyzer.jvm-0.6.5.pom
>>> from central
>>>
>>> Retrieving org/clojure/tools.analyzer/0.6.4/tools.analyzer-0.6.4.pom
>>> from central
>>>
>>> Retrieving org/clojure/tools.reader/0.8.12/tools.reader-0.8.12.pom from
>>> central
>>>
>>> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.pom
>>> from central
>>>
>>> Retrieving prismatic/schema/1.1.7/schema-1.1.7.pom from clojars
>>>
>>> Retrieving 
>>> com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
>>> from central
>>>
>>> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.
>>> 9.0/jackson-dataformat-smile-2.9.0.jar from central
>>>
>>> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.
>>> 9.0/jackson-dataformat-cbor-2.9.0.jar from central
>>>
>>> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.jar
>>> from central
>>>
>>> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.jar
>>> from central
>>>
>>> Retrieving cheshire/cheshire/5.8.0/cheshire-5.8.0.jar from clojars
>>>
>>> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.jar from
>>> clojars
>>>
>>> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.jar from clojars
>>>
>>> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.jar from clojars
>>>
>>> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.jar from clojars
>>>
>>> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.jar from clojars
>>>
>>> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.jar
>>> from clojars
>>>
>>> Retrieving prismatic/schema/1.1.7/schema-1.1.7.jar from clojars
>>>
>>> Exception in thread "main" java.lang.ClassNotFoundException:
>>> javax.xml.bind.DatatypeConverter, compiling:(org/httpkit/server.clj:1:1)
>>>
>>> at clojure.lang.Compiler.load(Compiler.java:7526)
>>>
>>> at clojure.lang.RT.loadResourceScript(RT.java:379)
>>>
>>> ...
>>>
>>>
>>> Am Montag, 30. April 2018 02:46:34 UTC+2 schrieb Alan Thompson:
>>>
>>>> I am not including `--add-modules` in my template project
>>>> <https://github.com/cloojure/cljs-template.git> and it works great:
>>>>
>>>>
>>>> (defproject flintstones "0.1.0-SNAPSHOT"
>>>>   :min-lein-version "2.7.1"
>>>>   :dependencies [[org.clojure/clojure "1.9.0"]
>>>>  [org.clojure/clojur

Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-02 Thread Alan Thompson
Can you verify versions for Java, Clojure, & ClojureScript?

On Mon, Apr 30, 2018 at 6:34 AM, Johannes <bra...@nordakademie.de> wrote:

> Hm, I downloaded your profile.clj, and with
>
> lein figwheel
>
> I get the known error:
>
> Figwheel: Cutting some fruit, just a sec ...
>
> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.pom from clojars
>
> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.pom from
> clojars
>
> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.pom from clojars
>
> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.pom from clojars
>
> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.pom
> from clojars
>
> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.pom from clojars
>
> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.pom
> from central
>
> Retrieving org/clojure/tools.analyzer.jvm/0.6.5/tools.analyzer.jvm-0.6.5.pom
> from central
>
> Retrieving org/clojure/tools.analyzer/0.6.4/tools.analyzer-0.6.4.pom from
> central
>
> Retrieving org/clojure/tools.reader/0.8.12/tools.reader-0.8.12.pom from
> central
>
> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.pom
> from central
>
> Retrieving prismatic/schema/1.1.7/schema-1.1.7.pom from clojars
>
> Retrieving 
> com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
> from central
>
> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-
> smile/2.9.0/jackson-dataformat-smile-2.9.0.jar from central
>
> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-
> cbor/2.9.0/jackson-dataformat-cbor-2.9.0.jar from central
>
> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.jar
> from central
>
> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.jar
> from central
>
> Retrieving cheshire/cheshire/5.8.0/cheshire-5.8.0.jar from clojars
>
> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.jar from
> clojars
>
> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.jar from clojars
>
> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.jar from clojars
>
> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.jar from clojars
>
> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.jar from clojars
>
> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.jar
> from clojars
>
> Retrieving prismatic/schema/1.1.7/schema-1.1.7.jar from clojars
>
> Exception in thread "main" java.lang.ClassNotFoundException:
> javax.xml.bind.DatatypeConverter, compiling:(org/httpkit/server.clj:1:1)
>
> at clojure.lang.Compiler.load(Compiler.java:7526)
>
> at clojure.lang.RT.loadResourceScript(RT.java:379)
>
> ...
>
>
> Am Montag, 30. April 2018 02:46:34 UTC+2 schrieb Alan Thompson:
>
>> I am not including `--add-modules` in my template project
>> <https://github.com/cloojure/cljs-template.git> and it works great:
>>
>>
>> (defproject flintstones "0.1.0-SNAPSHOT"
>>   :min-lein-version "2.7.1"
>>   :dependencies [[org.clojure/clojure "1.9.0"]
>>  [org.clojure/clojurescript "1.10.238"]
>>  [org.clojure/core.async "0.4.474"]
>>  [tupelo "0.9.76"]
>> ]
>>   :plugins [[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]
>> [lein-figwheel "0.5.15"]
>> [lein-doo "0.1.10"]]
>>
>>
>> ---
>>
>> ~/expr/cljs-template > lein figwheel
>> Figwheel: Cutting some fruit, just a sec ...
>> Figwheel: Validating the configuration found in project.clj
>> Figwheel: Configuration Valid ;)
>> Figwheel: Starting server at http://0.0.0.0:3449
>> Figwheel: Watching build - dev
>> Compiling build :dev to "resources/public/js/compiled/flintstones.js"
>> from ["src"]...
>> Successfully compiled build :dev to 
>> "resources/public/js/compiled/flintstones.js"
>> in 0.908 seconds.
>> Launching ClojureScript REPL for build: dev
>> ...
>> Exit: :cljs/quit
>>  Results: Stored in vars *1, *2, *3, *e holds last exception object
>> Prompt will show when Figwheel connects to your application
>> [Rebel readline] Type :repl/help for online help info
>> ClojureScript 1.10.238
>> dev:cljs.user!{:conn 2}=>
>>
>>
>>
>>
>> On Thu, Apr 26, 2018 at 2:53 AM, Johannes <bra...@nordakademie.de> wrote:
>>
>>> I've learned from several discussions (https://github.com/bhauman/le

Re: [ClojureScript] Re: Figwheel and Java 9 compatibility

2018-05-02 Thread Alan Thompson
Can you verify versions for Java, Clojure, & ClojureScript?
Alan

On Mon, Apr 30, 2018 at 6:34 AM, Johannes <bra...@nordakademie.de> wrote:

> Hm, I downloaded your profile.clj, and with
>
> lein figwheel
>
> I get the known error:
>
> Figwheel: Cutting some fruit, just a sec ...
>
> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.pom from clojars
>
> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.pom from
> clojars
>
> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.pom from clojars
>
> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.pom from clojars
>
> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.pom
> from clojars
>
> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.pom from clojars
>
> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.pom
> from central
>
> Retrieving org/clojure/tools.analyzer.jvm/0.6.5/tools.analyzer.jvm-0.6.5.pom
> from central
>
> Retrieving org/clojure/tools.analyzer/0.6.4/tools.analyzer-0.6.4.pom from
> central
>
> Retrieving org/clojure/tools.reader/0.8.12/tools.reader-0.8.12.pom from
> central
>
> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.pom
> from central
>
> Retrieving prismatic/schema/1.1.7/schema-1.1.7.pom from clojars
>
> Retrieving 
> com/fasterxml/jackson/core/jackson-core/2.9.0/jackson-core-2.9.0.jar
> from central
>
> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-
> smile/2.9.0/jackson-dataformat-smile-2.9.0.jar from central
>
> Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-
> cbor/2.9.0/jackson-dataformat-cbor-2.9.0.jar from central
>
> Retrieving org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.jar
> from central
>
> Retrieving org/clojure/core.match/0.3.0-alpha4/core.match-0.3.0-alpha4.jar
> from central
>
> Retrieving cheshire/cheshire/5.8.0/cheshire-5.8.0.jar from clojars
>
> Retrieving clojure-csv/clojure-csv/2.0.2/clojure-csv-2.0.2.jar from
> clojars
>
> Retrieving danlentz/clj-uuid/0.1.7/clj-uuid-0.1.7.jar from clojars
>
> Retrieving criterium/criterium/0.4.4/criterium-0.4.4.jar from clojars
>
> Retrieving tupelo/tupelo/0.9.76/tupelo-0.9.76.jar from clojars
>
> Retrieving enlive/enlive/1.1.6/enlive-1.1.6.jar from clojars
>
> Retrieving primitive-math/primitive-math/0.1.4/primitive-math-0.1.4.jar
> from clojars
>
> Retrieving prismatic/schema/1.1.7/schema-1.1.7.jar from clojars
>
> Exception in thread "main" java.lang.ClassNotFoundException:
> javax.xml.bind.DatatypeConverter, compiling:(org/httpkit/server.clj:1:1)
>
> at clojure.lang.Compiler.load(Compiler.java:7526)
>
> at clojure.lang.RT.loadResourceScript(RT.java:379)
>
> ...
>
>
> Am Montag, 30. April 2018 02:46:34 UTC+2 schrieb Alan Thompson:
>
>> I am not including `--add-modules` in my template project
>> <https://github.com/cloojure/cljs-template.git> and it works great:
>>
>>
>> (defproject flintstones "0.1.0-SNAPSHOT"
>>   :min-lein-version "2.7.1"
>>   :dependencies [[org.clojure/clojure "1.9.0"]
>>  [org.clojure/clojurescript "1.10.238"]
>>  [org.clojure/core.async "0.4.474"]
>>  [tupelo "0.9.76"]
>> ]
>>   :plugins [[lein-cljsbuild "1.1.7" :exclusions [[org.clojure/clojure]]]
>> [lein-figwheel "0.5.15"]
>> [lein-doo "0.1.10"]]
>>
>>
>> ---
>>
>> ~/expr/cljs-template > lein figwheel
>> Figwheel: Cutting some fruit, just a sec ...
>> Figwheel: Validating the configuration found in project.clj
>> Figwheel: Configuration Valid ;)
>> Figwheel: Starting server at http://0.0.0.0:3449
>> Figwheel: Watching build - dev
>> Compiling build :dev to "resources/public/js/compiled/flintstones.js"
>> from ["src"]...
>> Successfully compiled build :dev to 
>> "resources/public/js/compiled/flintstones.js"
>> in 0.908 seconds.
>> Launching ClojureScript REPL for build: dev
>> ...
>> Exit: :cljs/quit
>>  Results: Stored in vars *1, *2, *3, *e holds last exception object
>> Prompt will show when Figwheel connects to your application
>> [Rebel readline] Type :repl/help for online help info
>> ClojureScript 1.10.238
>> dev:cljs.user!{:conn 2}=>
>>
>>
>>
>>
>> On Thu, Apr 26, 2018 at 2:53 AM, Johannes <bra...@nordakademie.de> wrote:
>>
>>> I've learned from several discussions (https://github.com/bhauman/le

[ClojureScript] GMail code formatter

2016-06-14 Thread Alan Thompson
Just discovered a cool Chrome extension so that you can get proper syntax
highlighting when pasting code into your email.  It turns plain-old code
into something nice to read:

*Plain:*

(defn truthy?
  "Returns true if arg is logical true (neither nil nor false); otherwise
returns false."
  [arg]
  (if arg true false) )
(s/fdef truthy?
  :args ::s/any
  :ret boolean?)

*Nice:*


(defn truthy?
  "Returns true if arg is logical true (neither nil nor false); otherwise
returns false."
  [arg]
  (if arg true false) )
(s/fdef truthy?
  :args ::s/any
  :ret boolean?)


Find it in the Google Chrome web store:
https://chrome.google.com/webstore/detail/gmail-syntax-highlighting/pcipmnfalbiopheelcmpllcjciifkaeh

Alan

-- 
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.


Re: [ClojureScript] #{:ann} funcool/struct - yet another validation library for Clojure and ClojureScript.

2016-05-03 Thread Alan Thompson
Hi - Looks nice!
Alan

On Mon, May 2, 2016 at 11:11 PM, Andrey Antukh  wrote:

> Hi all.
>
> I am happy to announce the first public release of funcool/struct
> validation library.
>
> https://github.com/funcool/struct
>
> Why an other?
>
> I have started on my project using well know and very nice library:
> bouncer; that has worked pretty well for me, but over time I have needed
> some features that are missing: such as value coercion and dependent
> validators.
>
> Then, I decided to build a own one. And these are the main highlights of
> the resulting library:
>
> - Validators are defined using plain hash-maps instead of opaque macros.
> - Optional value coercion (very useful if you want to validate query
> params or form-data that by default comes as string).
> - Dependent validators (add the ability to the validator access to previos
> state, also useful for form-data validation).
> - Serves pretty well as simple data structure validation in the same way
> as bouncer or schema works and also works well for validate user input such
> as query params and forms.
>
> Github: https://github.com/funcool/struct
> Documentation: http://funcool.github.io/struct/latest/
>
> Regards.
> --
> Andrey Antukh - Андрей Антух - 
> http://www.niwi.nz
> https://github.com/niwinz
>
> --
> 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.
>

-- 
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] Video of ClojureScript & Reagent

2016-04-12 Thread Alan Thompson
Hi - Just saw this nice introduction to ClojureScript and Reagent from the
SF Reagent Meetup Group:   https://youtu.be/DYzwfekWSzQ

Enjoy,
Alan

-- 
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] Nice Om Tutorial

2016-04-11 Thread Alan Thompson
Hi - Just came across this nice 6-part tutorial on Om and thought I'd post
a link.  The 2nd half is especially good:
https://blog.stephanbehnke.com/zero-to-om/

Enjoy!
Alan

-- 
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.


Re: [ClojureScript] Omission on ClojureScript Quick-Start on GH

2016-03-28 Thread Alan Thompson
Chrome on Ubuntu 15.10,  Version 49.0.2623.87 (64-bit)

On Mon, Mar 28, 2016 at 4:34 PM, <mikefike...@gmail.com> wrote:

> I'm AFK, but I think this is an issue that occurs with Safari.
>
> Alan, which browser are you using?
>
> - Mike
>
> On Mar 28, 2016, at 7:01 PM, David Nolen <dnolen.li...@gmail.com> wrote:
>
> You should not need a `:reload` for the first one. Only the second one. If
> that's no longer true there has been a regression and you should open a
> JIRA ticket.
>
> On Mon, Mar 28, 2016 at 4:30 PM, Alan Thompson <clooj...@gmail.com> wrote:
>
>> Hi - Anybody here familiar with the CLJS QuickStart on github?   I think
>> I've found an omission.  At the part about adding foo:
>>
>> (defn foo [a b]
>>   (+ a b))
>>
>>
>> it is missing the ":reload" in the (require ...).  The missing ":reload"
>> results in this at the repl:
>>
>> cljs.user=> (require '[hello-world.core :as hello] )
>> nil
>> cljs.user=> (hello/foo 2 3)
>> TypeError: Cannot read property 'call' of undefined
>> (NO_SOURCE_FILE)
>>
>>
>> The ":reload" is present in the 2nd part for
>>
>>
>> (defn foo [a b]
>>   (* a b)) ;; CHANGED
>>
>>
>> I think we need a small update to the README.  Should I submit a PR?
>> Alan
>>
>> --
>> 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.
>>
>
> --
> 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.
>
> --
> 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.
>

-- 
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] Omission on ClojureScript Quick-Start on GH

2016-03-28 Thread Alan Thompson
Hi - Anybody here familiar with the CLJS QuickStart on github?   I think
I've found an omission.  At the part about adding foo:

(defn foo [a b]
  (+ a b))


it is missing the ":reload" in the (require ...).  The missing ":reload"
results in this at the repl:

cljs.user=> (require '[hello-world.core :as hello] )
nil
cljs.user=> (hello/foo 2 3)
TypeError: Cannot read property 'call' of undefined
(NO_SOURCE_FILE)


The ":reload" is present in the 2nd part for


(defn foo [a b]
  (* a b)) ;; CHANGED


I think we need a small update to the README.  Should I submit a PR?
Alan

-- 
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.