Re: [ClojureScript] Re: ANN: ClojureScript 1.9.14, clojure.spec port
2016-06-02 4:54 GMT+02:00 David Nolen : > > We are considering aliasing support for cljs.spec. That is rewriting > clojure.spec vars in ClojureScript sources to cljs.spec but it will likely > cover more than just cljs.spec - cljs.test, cljs.pprint etc. > Interesting. Is this on the table as a general alternative for supporting .cljc in macros? -- 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: ANN: ClojureScript 1.9.14, clojure.spec port
Choosing cljs.spec over clojure.spec is out of necessity not preference - Clojure has already taken the namespace and that namespace defines macros. We are considering aliasing support for cljs.spec. That is rewriting clojure.spec vars in ClojureScript sources to cljs.spec but it will likely cover more than just cljs.spec - cljs.test, cljs.pprint etc. David On Wed, Jun 1, 2016 at 10:27 PM, Daniel Compton < daniel.compton.li...@gmail.com> wrote: > Would it be good to change the namespace for spec from cljs.spec to > clojure.spec? This will make CLJC files nicer to write as you won’t need to > have reader conditionals for requiring cljs.spec in CLJS and clojure.spec > in CLJ. > > It seems like spec is going to be used by lots of projects, so the choices > made now will affect lots of code, and be hard to change later. > > More generally, what are the guidelines for deciding if a ClojureScript > file gets written as cljs.* or clojure.*? > > On Thu, Jun 2, 2016 at 9:19 AM Walter van der Laan < > waltervanderl...@fincite.nl> wrote: > >> It's like magic. I added some specs to cljc namespaces and it just works! >> >> I'm making domain specific error messages with just a few lines of code. >> This is a huge leap forward. >> >> Thank you, and all involved, so much. >> >> -- >> 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. >> > -- > — > Daniel > > -- > 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] How to develop ClojureScript in Web worker?
I'm on the boot-reload side and it is okey with different socket port numbers.Yeah, it's still tricky for boot-reload to both at the same time too. On Thu, Jun 2, 2016 at 3:55 AM Alan Moore wrote: > On Tuesday, May 31, 2016 at 7:51:15 AM UTC-7, Eivind Magnus Hvidevold > wrote: > > I don't think so. Figwheel gives an error when run from a worker: > "Figwheel: Can't start Figwheel!! This browser doesn't support WebSockets". > > Firefox was the last browser to add support for websockets in webworkers > (fixed in FF 38): > > https://bugzilla.mozilla.org/show_bug.cgi?id=504553 > > So make sure you are using a recent browser. > > Figwheel tests for websocket support by checking for the existence of > window.WebSocket. However, webworkers cannot access the window object so > this will always fail in a webworker. This doesn't mean that a > webworker-aware Figwheel couldn't use "new WebWorker(...)" and check for an > exception/error instead. > > Regardless, I don't think you are going to get Figwheel working in a > webworker *and* in the main thread at the same time. Maybe one or the other > but not both due to conflicts on the server-side w.r.t. port numbers and > the like. Also, there are likely other assumptions in Figwheel about access > to the DOM/window that go beyond simply testing for websocket support... > YMWV. > > Good luck! > > 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 a topic in the > Google Groups "ClojureScript" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojurescript/4b7zPDh70_M/unsubscribe. > To unsubscribe from this group and all its topics, 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: ANN: ClojureScript 1.9.14, clojure.spec port
Would it be good to change the namespace for spec from cljs.spec to clojure.spec? This will make CLJC files nicer to write as you won’t need to have reader conditionals for requiring cljs.spec in CLJS and clojure.spec in CLJ. It seems like spec is going to be used by lots of projects, so the choices made now will affect lots of code, and be hard to change later. More generally, what are the guidelines for deciding if a ClojureScript file gets written as cljs.* or clojure.*? On Thu, Jun 2, 2016 at 9:19 AM Walter van der Laan < waltervanderl...@fincite.nl> wrote: > It's like magic. I added some specs to cljc namespaces and it just works! > > I'm making domain specific error messages with just a few lines of code. > This is a huge leap forward. > > Thank you, and all involved, so much. > > -- > 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. > -- — Daniel -- 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.14, clojure.spec port
It's like magic. I added some specs to cljc namespaces and it just works! I'm making domain specific error messages with just a few lines of code. This is a huge leap forward. Thank you, and all involved, so much. -- 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] How to develop ClojureScript in Web worker?
On Tuesday, May 31, 2016 at 7:51:15 AM UTC-7, Eivind Magnus Hvidevold wrote: > I don't think so. Figwheel gives an error when run from a worker: "Figwheel: > Can't start Figwheel!! This browser doesn't support WebSockets". Firefox was the last browser to add support for websockets in webworkers (fixed in FF 38): https://bugzilla.mozilla.org/show_bug.cgi?id=504553 So make sure you are using a recent browser. Figwheel tests for websocket support by checking for the existence of window.WebSocket. However, webworkers cannot access the window object so this will always fail in a webworker. This doesn't mean that a webworker-aware Figwheel couldn't use "new WebWorker(...)" and check for an exception/error instead. Regardless, I don't think you are going to get Figwheel working in a webworker *and* in the main thread at the same time. Maybe one or the other but not both due to conflicts on the server-side w.r.t. port numbers and the like. Also, there are likely other assumptions in Figwheel about access to the DOM/window that go beyond simply testing for websocket support... YMWV. Good luck! 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] ANN: ClojureScript 1.9.14, clojure.spec port
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.14"] This release includes a complete and faithful port of clojure.spec to ClojureScript. The functionality resides in the new cljs.spec namespace. All features present in Clojure 1.9.0-alpha4 are implemented, including REPL support, testing support and macro checking. As always feedback welcome. ## 1.9.14 ### Enhancements * clojure.spec ported to cljs.spec ### Fixes * CLJS-1649: Possible issue with in cljs.reader or cljs.core/PersistentHashMap * CLJS-1647: Rethrow exception from parallel-build * CLJS-1642: cljs.core/reductions does not respect 'reduced' * CLJS-1635: Var type implements IEquiv but not IHash * CLJS-1629: Fix warning about duplicate test-pr-str * CLJS-1637: Missing docstrings for a few vars -- 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.