Re: ClojureScript and development workflow
Collin, To achieve the basic of what you said: lein new chestnut name Because of the other pieces I had to extract the code into the stack I'm using. But it's very good for a start. On Saturday, November 8, 2014 11:47:37 AM UTC-2, Colin Yates wrote: Figwheel plus om plus immutable data is just great. Throw in lein garden auto and the world is a better place. Highly recommend it. On Friday, 7 November 2014 02:17:08 UTC, Daniel Szmulewicz wrote: My experience has been that the promise of hot reloadable code in the browser was fulfilled most reliably by lein-figwheel. I have relinquished all other solutions (which gave me trouble), and I am a happy with my newfound cljs workflow. https://github.com/bhauman/lein-figwheel On Monday, September 10, 2012 7:28:44 PM UTC+3, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ClojureScript and development workflow
Any update on how to do this from LightTable? On Tue, Sep 11, 2012 at 7:48 PM, Chris Granger ibdk...@gmail.com wrote: FWIW, I'm working on this with Light Table, which removes a lot of the difficulties here - it will be include this script tag and you're ready to go. There's no reason that we need to jump through a bunch of hoops here. My plan is that the next release (sometime after strange loop) will include a nice way to work with CLJS such that a very nice getting started video could be created. :) Cheers, Chris. On Tuesday, September 11, 2012 6:10:29 AM UTC-7, Chas Emerick wrote: On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: 2012/9/10 Chas Emerick ch...@cemerick.com I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to start the server), with clsjbuild to compile the browser_repl.cljs to bootstrap the REPL machinery (lein cljsbuild once), regular lein repl once project.clj has been configured with the proper options) and a regular CCW 0.10.0 nrepl client. It works OK with the out of the box Rhino-backed evaluator, but as you might guess, I have no interest in this and then I quickly jump to try get a Browser-based REPL running. That's where things broke. I did not manage to get things compiled correctly. As it stands, it seems that I'll have to read understand wiki pages from ClojureScript project, nrepl documentation, piggieback documentation, cljsbuild documentation, to really grasp the whole thing. Seems a little bit daunting just to be able to play with it. Is there an easier way ? A resource somewhere which already explains step-by-step how to get started with a new project, cljsbuild for compiling from time to time, and piggieback ? Just asking before starting digging :-) There is a how-to in piggieback's README for using a browser-repl environment rather than Rhino. Nelson Morris was actually the first one to get that working, and I'm using it regularly, so it *does* work, though there's no doubt there's a lot of pieces you need to put together (for my part, I blew nearly an hour tearing my hair out before re-reading the browser-repl tutorial,[1] and seeing near the bottom that loading the HTML page from disk wouldn't work; once I served the page from localhost, everything fell together). FWIW, I've found ClojureScript itself to be very solid so far; there are some unfortunate (IMO unnecessary) incompatibilities between it and Clojure, but [2] is the only thing I've really tripped up on from a technical standpoint. I think your assessment that the learning curve is daunting is just about right, but that largely lays with the state of tooling, and the disjointed nature of the development process. With Clojure, you always have a single environment (the JVM or CLR), into which you can load code all day from nearly anywhere without having to think much about the logistics of it. ClojureScript necessarily implies a more complicated setup: there's your REPL environment, probably a browser, and maybe a connection between the two; you *must* have your code on disk and in the right place in order for Google Closure / lein-cljsbuild to get at it (not strictly true, but driving the compiler from a Clojure REPL isn't any easier outside of simple cases); your Ring webapp needs to be configured to be serving the gclosure output; and, you'd obviously like to be able to control and monitor all of this from your editor/environment of choice. (I'd like to eventually do a 'Starting ClojureScript' screencast similar to [3], but the logistics of going from zero to hero with ClojureScript are IMO far too hard and nuanced still in order to present them well in that sort of medium.) I think the contrast is so stark in part because of how good we've had it on the Clojure side. I suspect that CoffeeScript programming must be similarly disjointed, since all the same moving pieces are necessary (and perhaps without the benefit of upsides like a browser-connected REPL and so on). Welcome to the wonderful world of modern web development! :-P I think that's all a long way of saying: start digging! Cheers, - Chas [1] https://github.com/clojure/clojurescript/wiki/The-REPL- and-Evaluation-Environments [2] http://dev.clojure.org/jira/browse/CLJS-358 [3] http://cemerick.com/2012/05/02/starting-clojure/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
Figwheel plus om plus immutable data is just great. Throw in lein garden auto and the world is a better place. Highly recommend it. On Friday, 7 November 2014 02:17:08 UTC, Daniel Szmulewicz wrote: My experience has been that the promise of hot reloadable code in the browser was fulfilled most reliably by lein-figwheel. I have relinquished all other solutions (which gave me trouble), and I am a happy with my newfound cljs workflow. https://github.com/bhauman/lein-figwheel On Monday, September 10, 2012 7:28:44 PM UTC+3, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ClojureScript and development workflow
Hi Laurent, For refreshing the browser, I call (.reload js/location) from the browser REPL. So this is the workflow: Terminal 1: lein cljsbuild auto dev Terminal 2: lein trampoline cljsbuild repl-listen Browser: localhost:9000/myapp.html 1. I make change to the CLJS file. 2. cljsbuild auto dev picks it up and recompiles the JS file. 3. In the REPL I call (.reload js/location) which picks up the new JS file. 4. In the REPL I call (myapp.run-tests) which runs the unit tests. You can view the sources at http://github.com/asimjalis/cluster_splitter. Asim On Monday, September 10, 2012 9:28:44 AM UTC-7, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ClojureScript and development workflow
I’m not sure that the original question is still valid, as it’s over 2 years old now. I’ve had success using figwheel[1] to automatically recompile Clojurescript and send the updated js to the browser, sans reloading. [1] https://github.com/bhauman/lein-figwheel On Nov 6, 2014, at 4:57 PM, Asim Jalis asimja...@gmail.com wrote: Hi Laurent, For refreshing the browser, I call (.reload js/location) from the browser REPL. So this is the workflow: Terminal 1: lein cljsbuild auto dev Terminal 2: lein trampoline cljsbuild repl-listen Browser: localhost:9000/myapp.html 1. I make change to the CLJS file. 2. cljsbuild auto dev picks it up and recompiles the JS file. 3. In the REPL I call (.reload js/location) which picks up the new JS file. 4. In the REPL I call (myapp.run-tests) which runs the unit tests. You can view the sources at http://github.com/asimjalis/cluster_splitter. Asim On Monday, September 10, 2012 9:28:44 AM UTC-7, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com mailto:clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ClojureScript and development workflow
My experience has been that the promise of hot reloadable code in the browser was fulfilled most reliably by lein-figwheel. I have relinquished all other solutions (which gave me trouble), and I am a happy with my newfound cljs workflow. https://github.com/bhauman/lein-figwheel On Monday, September 10, 2012 7:28:44 PM UTC+3, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ClojureScript and development workflow
Hi Paul, Thanks for the workflow. - use the Clojure REPL as much as possible, even for my CLJS code. Afterall, it's just Clojure, right? This also encourages good program design, keeping browser-specific code in a single namespace How do you achieve the above ? Do you specify your cljs code dir in the crossover ? I am assuming that as the cljs src dir is different, one will not be able to load the code directly in the repl by typing (use 'abc.bcd) ? Thanks, Murtaza On Tuesday, September 11, 2012 12:36:01 AM UTC+5:30, Paul deGrandis wrote: Hi Laurent, I've been putting a few ClojureScript apps into production throughout this year with much success. Because of earlier limitations/sensitivities in the browser-repl, my workflow is a little different than those described above. Typically I: - have cljsbuild-auto running - use the Clojure REPL as much as possible, even for my CLJS code. Afterall, it's just Clojure, right? This also encourages good program design, keeping browser-specific code in a single namespace - use the browser-repl only for exploring DOM-related pieces of my application, or debugging - use some sort of browser auto-refresh when I build new assets (HTML, CSS, JS, etc. For me, I use Ruby for this piece) I will often just use my browser's console for peeking at quick things in the CLJS code (I only compile in advanced mode when I've locked in an app). When I need the browser-repl, I just use repl-listen in cljsbuild. In future projects I plan to explore and use piggyback. A lot of the grunt work I've needed to build out is captured in my Shoreleave CLJS libs, including ways to fireoff a browser-repl with query-string args. Hope this helps! Paul -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
2012/9/10 Takahiro Hozumi fat...@googlemail.com Hi, I refresh browser every time I change cljs files. Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? I think this is somewhat exaggeration. REPL isn't good enough to push the all changes into browser. Hello, While I could learn the long and hard way where when it is necessary to restart the ClojureScript application (refresh the browser), I'd be interesting in feedback in this area. I guess that at least the following require a restart. Please correct / explain as needed : - change in CSS file on disk ? - change in template file (either enfocus / hiccup-on-the-browser -don't remember the name) ? and also when doing certain changes to the ClojureScript code itself : - when I add a new namespace ? - same problem with multimethods as JVM Clojure ? - ... ? Thanks in advance, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
2012/9/10 Chas Emerick c...@cemerick.com I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to start the server), with clsjbuild to compile the browser_repl.cljs to bootstrap the REPL machinery (lein cljsbuild once), regular lein repl once project.clj has been configured with the proper options) and a regular CCW 0.10.0 nrepl client. It works OK with the out of the box Rhino-backed evaluator, but as you might guess, I have no interest in this and then I quickly jump to try get a Browser-based REPL running. That's where things broke. I did not manage to get things compiled correctly. As it stands, it seems that I'll have to read understand wiki pages from ClojureScript project, nrepl documentation, piggieback documentation, cljsbuild documentation, to really grasp the whole thing. Seems a little bit daunting just to be able to play with it. Is there an easier way ? A resource somewhere which already explains step-by-step how to get started with a new project, cljsbuild for compiling from time to time, and piggieback ? Just asking before starting digging :-) Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: 2012/9/10 Chas Emerick c...@cemerick.com I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to start the server), with clsjbuild to compile the browser_repl.cljs to bootstrap the REPL machinery (lein cljsbuild once), regular lein repl once project.clj has been configured with the proper options) and a regular CCW 0.10.0 nrepl client. It works OK with the out of the box Rhino-backed evaluator, but as you might guess, I have no interest in this and then I quickly jump to try get a Browser-based REPL running. That's where things broke. I did not manage to get things compiled correctly. As it stands, it seems that I'll have to read understand wiki pages from ClojureScript project, nrepl documentation, piggieback documentation, cljsbuild documentation, to really grasp the whole thing. Seems a little bit daunting just to be able to play with it. Is there an easier way ? A resource somewhere which already explains step-by-step how to get started with a new project, cljsbuild for compiling from time to time, and piggieback ? Just asking before starting digging :-) There is a how-to in piggieback's README for using a browser-repl environment rather than Rhino. Nelson Morris was actually the first one to get that working, and I'm using it regularly, so it *does* work, though there's no doubt there's a lot of pieces you need to put together (for my part, I blew nearly an hour tearing my hair out before re-reading the browser-repl tutorial,[1] and seeing near the bottom that loading the HTML page from disk wouldn't work; once I served the page from localhost, everything fell together). FWIW, I've found ClojureScript itself to be very solid so far; there are some unfortunate (IMO unnecessary) incompatibilities between it and Clojure, but [2] is the only thing I've really tripped up on from a technical standpoint. I think your assessment that the learning curve is daunting is just about right, but that largely lays with the state of tooling, and the disjointed nature of the development process. With Clojure, you always have a single environment (the JVM or CLR), into which you can load code all day from nearly anywhere without having to think much about the logistics of it. ClojureScript necessarily implies a more complicated setup: there's your REPL environment, probably a browser, and maybe a connection between the two; you *must* have your code on disk and in the right place in order for Google Closure / lein-cljsbuild to get at it (not strictly true, but driving the compiler from a Clojure REPL isn't any easier outside of simple cases); your Ring webapp needs to be configured to be serving the gclosure output; and, you'd obviously like to be able to control and monitor all of this from your editor/environment of choice. (I'd like to eventually do a 'Starting ClojureScript' screencast similar to [3], but the logistics of going from zero to hero with ClojureScript are IMO far too hard and nuanced still in order to present them well in that sort of medium.) I think the contrast is so stark in part because of how good we've had it on the Clojure side. I suspect that CoffeeScript programming must be similarly disjointed, since all the same moving pieces are necessary (and perhaps without the benefit of upsides like a browser-connected REPL and so on). Welcome to the wonderful world of modern web development! :-P I think that's all a long way of saying: start digging! Cheers, - Chas [1] https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments [2] http://dev.clojure.org/jira/browse/CLJS-358 [3] http://cemerick.com/2012/05/02/starting-clojure/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
2012/9/11 Chas Emerick c...@cemerick.com On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: 2012/9/10 Chas Emerick c...@cemerick.com I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to start the server), with clsjbuild to compile the browser_repl.cljs to bootstrap the REPL machinery (lein cljsbuild once), regular lein repl once project.clj has been configured with the proper options) and a regular CCW 0.10.0 nrepl client. It works OK with the out of the box Rhino-backed evaluator, but as you might guess, I have no interest in this and then I quickly jump to try get a Browser-based REPL running. That's where things broke. I did not manage to get things compiled correctly. As it stands, it seems that I'll have to read understand wiki pages from ClojureScript project, nrepl documentation, piggieback documentation, cljsbuild documentation, to really grasp the whole thing. Seems a little bit daunting just to be able to play with it. Is there an easier way ? A resource somewhere which already explains step-by-step how to get started with a new project, cljsbuild for compiling from time to time, and piggieback ? Just asking before starting digging :-) There is a how-to in piggieback's README for using a browser-repl environment rather than Rhino. Yeah, I read it. During my first trial with ClojureScript yesterday, I assumed following piggieback's README would be sufficient. I was wrong, there is more to it :-) Nelson Morris was actually the first one to get that working, and I'm using it regularly, so it *does* work, though there's no doubt there's a lot of pieces you need to put together (for my part, I blew nearly an hour tearing my hair out before re-reading the browser-repl tutorial,[1] and seeing near the bottom that loading the HTML page from disk wouldn't work; once I served the page from localhost, everything fell together). FWIW, I've found ClojureScript itself to be very solid so far; there are some unfortunate (IMO unnecessary) incompatibilities between it and Clojure, but [2] is the only thing I've really tripped up on from a technical standpoint. I think your assessment that the learning curve is daunting is just about right, I'm ok with that, as long as its the only way to go right now. I would not have missed something, that's why I asked. but that largely lays with the state of tooling, and the disjointed nature of the development process. With Clojure, you always have a single environment (the JVM or CLR), into which you can load code all day from nearly anywhere without having to think much about the logistics of it. ClojureScript necessarily implies a more complicated setup: there's your REPL environment, probably a browser, and maybe a connection between the two; you *must* have your code on disk and in the right place in order for Google Closure / lein-cljsbuild to get at it (not strictly true, but driving the compiler from a Clojure REPL isn't any easier outside of simple cases); your Ring webapp needs to be configured to be serving the gclosure output; and, you'd obviously like to be able to control and monitor all of this from your editor/environment of choice. (I'd like to eventually do a 'Starting ClojureScript' screencast similar to [3], but the logistics of going from zero to hero with ClojureScript are IMO far too hard and nuanced still in order to present them well in that sort of medium.) I think the contrast is so stark in part because of how good we've had it on the Clojure side. I suspect that CoffeeScript programming must be similarly disjointed, since all the same moving pieces are necessary (and perhaps without the benefit of upsides like a browser-connected REPL and so on). Welcome to the wonderful world of modern web development! :-P I think that's all a long way of saying: start digging! I will. One of my goals for Counterclockwise, right now, is to even better integrate it with Leiningen2. But I'd like also to know more about ClojureScript dev workflow, since in the end the integration with Leiningen 2 is just a means towards an end. ClojureScript in Counterclockwise being an important part of this end. Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
Hi, I guess that at least the following require a restart. Please correct / explain as needed : - change in CSS file on disk ? - change in template file (either enfocus / hiccup-on-the-browser -don't remember the name) ? and also when doing certain changes to the ClojureScript code itself : - when I add a new namespace ? - same problem with multimethods as JVM Clojure ? - ... ? You need to refresh the browser every time you update cljs/css/js file on disk as with normal javascript webapp development. Personally I don't use browser-repl frequently because I refresh the browser in a short time interval. - same problem with multimethods as JVM Clojure ? Sorry, I don't understand what this means. Anyway I don't recommend using multimethods in cljs because it is not fast. Cheers, - Takahiro On Sep 11, 4:52 pm, Laurent PETIT laurent.pe...@gmail.com wrote: 2012/9/10 Takahiro Hozumi fat...@googlemail.com Hi, I refresh browser every time I change cljs files. Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? I think this is somewhat exaggeration. REPL isn't good enough to push the all changes into browser. Hello, While I could learn the long and hard way where when it is necessary to restart the ClojureScript application (refresh the browser), I'd be interesting in feedback in this area. I guess that at least the following require a restart. Please correct / explain as needed : - change in CSS file on disk ? - change in template file (either enfocus / hiccup-on-the-browser -don't remember the name) ? and also when doing certain changes to the ClojureScript code itself : - when I add a new namespace ? - same problem with multimethods as JVM Clojure ? - ... ? Thanks in advance, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
I emit the clojurescript code myself by calling cljs.closure/build myself and put this into the html file. I cache the code using clojure.core.memoize/memo-fifo with my own function that takes the dependent files timestamps as args (so that changes result in recompiles). Using ring, pages with refreshes automatically update if the source is updated. I also use cemerick.piggieback for the liverepl between refreshes. See dj.cljs/cljs-repl as part of 'dj', the library I wrote to manage some of these things. https://github.com/bmillare/dj/blob/library/src/dj/cljs.clj Note that it is sufficient to just use the inserted js code emitted from cljs.closure/build from a cljs file with (clojure.browser.repl/connect http://localhost:port/repl) and dj.cljs/cljs-repl to get a liverepl. You do not need any other files in the html file. (The example https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments can be misleading since it includes the out/goog/base.js and other statements. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
Hi Laurent, I've been using CCW and cljsbuild for three months and it is working well for me but I suspect that my workflow can improve. I run cljsbuild auto (incremental mode) and edit cljs files in CCW, then refresh the browser (approx 6sec compile time) I suspect that I could improve my workflow in the following ways: 1. TDD: cljs support for TDD is bad so I use crossovers and abstract all the language specific features behind a protocol so I can use midje in jvm/clj for my UI controllers 2. I plan to abstract my views behind a protocol as well to keep them really simple i.e. MVP 3. piggieback and CCW : I've struggled to make this work and it sounds like the holy grail. It would really help if someone would write a step by step description of making this work. cemerick mentioned somewhere that it's easiest to start a (browser connected) repl from lein and then attach from CCW. I have not been able to work out how to do this. I'll buy beers all night for anyone that helps me make this work. That's my 10c. I'm happy to provide more info if it helps. Steve -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
FWIW, I'm working on this with Light Table, which removes a lot of the difficulties here - it will be include this script tag and you're ready to go. There's no reason that we need to jump through a bunch of hoops here. My plan is that the next release (sometime after strange loop) will include a nice way to work with CLJS such that a very nice getting started video could be created. :) Cheers, Chris. On Tuesday, September 11, 2012 6:10:29 AM UTC-7, Chas Emerick wrote: On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: 2012/9/10 Chas Emerick ch...@cemerick.com javascript: I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to start the server), with clsjbuild to compile the browser_repl.cljs to bootstrap the REPL machinery (lein cljsbuild once), regular lein repl once project.clj has been configured with the proper options) and a regular CCW 0.10.0 nrepl client. It works OK with the out of the box Rhino-backed evaluator, but as you might guess, I have no interest in this and then I quickly jump to try get a Browser-based REPL running. That's where things broke. I did not manage to get things compiled correctly. As it stands, it seems that I'll have to read understand wiki pages from ClojureScript project, nrepl documentation, piggieback documentation, cljsbuild documentation, to really grasp the whole thing. Seems a little bit daunting just to be able to play with it. Is there an easier way ? A resource somewhere which already explains step-by-step how to get started with a new project, cljsbuild for compiling from time to time, and piggieback ? Just asking before starting digging :-) There is a how-to in piggieback's README for using a browser-repl environment rather than Rhino. Nelson Morris was actually the first one to get that working, and I'm using it regularly, so it *does* work, though there's no doubt there's a lot of pieces you need to put together (for my part, I blew nearly an hour tearing my hair out before re-reading the browser-repl tutorial,[1] and seeing near the bottom that loading the HTML page from disk wouldn't work; once I served the page from localhost, everything fell together). FWIW, I've found ClojureScript itself to be very solid so far; there are some unfortunate (IMO unnecessary) incompatibilities between it and Clojure, but [2] is the only thing I've really tripped up on from a technical standpoint. I think your assessment that the learning curve is daunting is just about right, but that largely lays with the state of tooling, and the disjointed nature of the development process. With Clojure, you always have a single environment (the JVM or CLR), into which you can load code all day from nearly anywhere without having to think much about the logistics of it. ClojureScript necessarily implies a more complicated setup: there's your REPL environment, probably a browser, and maybe a connection between the two; you *must* have your code on disk and in the right place in order for Google Closure / lein-cljsbuild to get at it (not strictly true, but driving the compiler from a Clojure REPL isn't any easier outside of simple cases); your Ring webapp needs to be configured to be serving the gclosure output; and, you'd obviously like to be able to control and monitor all of this from your editor/environment of choice. (I'd like to eventually do a 'Starting ClojureScript' screencast similar to [3], but the logistics of going from zero to hero with ClojureScript are IMO far too hard and nuanced still in order to present them well in that sort of medium.) I think the contrast is so stark in part because of how good we've had it on the Clojure side. I suspect that CoffeeScript programming must be similarly disjointed, since all the same moving pieces are necessary (and perhaps without the benefit of upsides like a browser-connected REPL and so on). Welcome to the wonderful world of modern web development! :-P I think that's all a long way of saying: start digging! Cheers, - Chas [1] https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments [2] http://dev.clojure.org/jira/browse/CLJS-358 [3] http://cemerick.com/2012/05/02/starting-clojure/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
dj looks interesting, thanks for the link. :-) - Chas On Sep 10, 2012, at 8:31 PM, Brent Millare wrote: I emit the clojurescript code myself by calling cljs.closure/build myself and put this into the html file. I cache the code using clojure.core.memoize/memo-fifo with my own function that takes the dependent files timestamps as args (so that changes result in recompiles). Using ring, pages with refreshes automatically update if the source is updated. I also use cemerick.piggieback for the liverepl between refreshes. See dj.cljs/cljs-repl as part of 'dj', the library I wrote to manage some of these things. https://github.com/bmillare/dj/blob/library/src/dj/cljs.clj Note that it is sufficient to just use the inserted js code emitted from cljs.closure/build from a cljs file with (clojure.browser.repl/connect http://localhost:port/repl) and dj.cljs/cljs-repl to get a liverepl. You do not need any other files in the html file. (The example https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments can be misleading since it includes the out/goog/base.js and other statements. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
ClojureScript and development workflow
Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
You can use a browser connected repl too: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/REPL.md I've used repl-listen with success. Robert On Mon, Sep 10, 2012 at 06:28:14PM +0200, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Cheers, - Chas [1] https://github.com/cemerick/piggieback On Sep 10, 2012, at 12:28 PM, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
I've also been using lein-cljsbuild to compile an initial js for page load, and piggieback for interactive dev. I did need to make a fork of nrepl.el that used an :op load-file to be able to C-c C-k a buffer and load it in the background. Working on getting that into master. On Mon, Sep 10, 2012 at 12:11 PM, Chas Emerick c...@cemerick.com wrote: I've been using a combination of lein-cljsbuild to keep the on-disk generated code fresh and piggieback[1] for all of my cljs REPL needs. Cheers, - Chas [1] https://github.com/cemerick/piggieback On Sep 10, 2012, at 12:28 PM, Laurent PETIT wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
On Mon, Sep 10, 2012 at 6:28 PM, Laurent PETIT laurent.pe...@gmail.comwrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, You can also check clojurescript One: http://clojurescriptone.com/ It's an application/framework/ide all in one, great to quick start projects. -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
2012/9/10 Denis Labaye denis.lab...@gmail.com On Mon, Sep 10, 2012 at 6:28 PM, Laurent PETIT laurent.pe...@gmail.comwrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, You can also check clojurescript One: http://clojurescriptone.com/ It's an application/framework/ide all in one, great to quick start projects. Yeah, as I mentioned in my first message, I know ClojureScript One, since I quoted a sentence from its doc. What I'd like to hear is what people doing real stuff with ClojureScript (not just playing with it or developing ClojureScript itself) are using as a workflow. lein-clsjbuild + piggieback/nrepl combo seems to have some traction. -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
2012/9/10 Laurent PETIT laurent.pe...@gmail.com 2012/9/10 Denis Labaye denis.lab...@gmail.com On Mon, Sep 10, 2012 at 6:28 PM, Laurent PETIT laurent.pe...@gmail.comwrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, You can also check clojurescript One: http://clojurescriptone.com/ It's an application/framework/ide all in one, great to quick start projects. Yeah, as I mentioned in my first message, I know ClojureScript One, since I quoted a sentence from its doc. I answered quickly between 2 others tasks at home, now that I re-read my message, it seems a bit harsh. I didn't mean to make it sound like that, sorry. Cheers, -- Laurent What I'd like to hear is what people doing real stuff with ClojureScript (not just playing with it or developing ClojureScript itself) are using as a workflow. lein-clsjbuild + piggieback/nrepl combo seems to have some traction. -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
On Mon, Sep 10, 2012 at 8:50 PM, Laurent PETIT laurent.pe...@gmail.comwrote: 2012/9/10 Laurent PETIT laurent.pe...@gmail.com 2012/9/10 Denis Labaye denis.lab...@gmail.com On Mon, Sep 10, 2012 at 6:28 PM, Laurent PETIT laurent.pe...@gmail.comwrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, You can also check clojurescript One: http://clojurescriptone.com/ It's an application/framework/ide all in one, great to quick start projects. Yeah, as I mentioned in my first message, I know ClojureScript One, since I quoted a sentence from its doc. I answered quickly between 2 others tasks at home, now that I re-read my message, it seems a bit harsh. I didn't mean to make it sound like that, sorry. appologies accepted (just kidding :-) Sorry for my too quick quick checking of your message content (the one in clojurescript one is not an easy word to quick spot) Cheers, -- Laurent What I'd like to hear is what people doing real stuff with ClojureScript (not just playing with it or developing ClojureScript itself) are using as a workflow. lein-clsjbuild + piggieback/nrepl combo seems to have some traction. -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
Hi, I refresh browser every time I change cljs files. Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? I think this is somewhat exaggeration. REPL isn't good enough to push the all changes into browser. Cheers, - Takahiro On Tuesday, September 11, 2012 1:28:44 AM UTC+9, lpetit wrote: Hello, A ClojureScript workflow newbie question. People seem to be using a lot lein-cljsbuild to work with their ClojureScript project. From what I understand, this means they have a watcher which recompiles javascript in the background whenever they save changes to clojurescript files to the disk. Thus, this means that whenever they make a change, they have to restart the application (e.g. refresh the browser). Is that the end of the story with lein-cljs ? (wrt development workflow ?) On the other end, when looking at the wiki page for ClojureScript One, one can see : Using the REPL as the main way to deliver code to the browser means never having to refresh the page. One could theoretically build an entire application without a single page refresh. If you find yourself refreshing the page after every change you make, you're doing it wrong. What is this, 2009? So before digging into ClojureScript for the first time, I'd like to know what to thing about all this, so that I don't waste my time following wrong paths. What would be my expected default workflow when starting to write a single page application with ClojureScript, in September 2012 ? Cheers, -- Laurent -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ClojureScript and development workflow
Hi Laurent, I've been putting a few ClojureScript apps into production throughout this year with much success. Because of earlier limitations/sensitivities in the browser-repl, my workflow is a little different than those described above. Typically I: - have cljsbuild-auto running - use the Clojure REPL as much as possible, even for my CLJS code. Afterall, it's just Clojure, right? This also encourages good program design, keeping browser-specific code in a single namespace - use the browser-repl only for exploring DOM-related pieces of my application, or debugging - use some sort of browser auto-refresh when I build new assets (HTML, CSS, JS, etc. For me, I use Ruby for this piece) I will often just use my browser's console for peeking at quick things in the CLJS code (I only compile in advanced mode when I've locked in an app). When I need the browser-repl, I just use repl-listen in cljsbuild. In future projects I plan to explore and use piggyback. A lot of the grunt work I've needed to build out is captured in my Shoreleave CLJS libs, including ways to fireoff a browser-repl with query-string args. Hope this helps! Paul -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en