[ANN] new book: "ClojureScript: Up and Running"

541 views
Skip to first unread message

Stuart Sierra

unread,
Nov 7, 2012, 7:23:22 PM11/7/12
to clo...@googlegroups.com
Not to toot our own horn, but people have been asking about getting started with ClojureScript, so here's our contribution, just released in book form:

ClojureScript: Up and Running
by Stuart Sierra and Luke VanderHart
published by O'Reilly in paper, eBook, and Safari

http://shop.oreilly.com/product/0636920025139.do

-S

Softaddicts

unread,
Nov 7, 2012, 8:53:25 PM11/7/12
to clo...@googlegroups.com
Already bought it weeks ago, like it, it's a concise recipe, right on target.

Disclaimer: I am not a blonde Stuart Sierra groupie :)

Luc P.
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad!

Stuart Sierra

unread,
Nov 8, 2012, 1:07:34 PM11/8/12
to clo...@googlegroups.com
> Already bought it weeks ago, like it, it's a concise recipe, right on target.

Aw, thanks!


> Disclaimer: I am not a blonde Stuart Sierra groupie :)

Aw, shucks! ;)

-S


charlie

unread,
Nov 8, 2012, 1:44:19 PM11/8/12
to clo...@googlegroups.com
I look forward to my copy ( currently in the mail ) !



-S


Robert Pitts

unread,
Nov 8, 2012, 4:14:03 PM11/8/12
to clo...@googlegroups.com
Awesome. Would you say that this is essentially a completed work? Growing weary or reading and re-reading beta books lately.

Cheers regardless,

Robert

Sean Corfield

unread,
Nov 8, 2012, 5:30:22 PM11/8/12
to clo...@googlegroups.com
On Wed, Nov 7, 2012 at 4:23 PM, Stuart Sierra
<the.stua...@gmail.com> wrote:
> Not to toot our own horn, but people have been asking about getting started
> with ClojureScript, so here's our contribution, just released in book form:
...
> http://shop.oreilly.com/product/0636920025139.do

Nice. $15 and already sync'd to my DropBox on all my devices - some
light reading for the train in/out of SF tonight to listen to Rich
Hickey speak at the Bay Area Clojure Meetup!
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Mayank Jain

unread,
Nov 8, 2012, 5:39:02 PM11/8/12
to clo...@googlegroups.com
Try this code : MBBGS
It should give you 50% off on the book. Hopefully. :)


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en



--
Regards,
Mayank.

Sean Corfield

unread,
Nov 8, 2012, 10:21:53 PM11/8/12
to clo...@googlegroups.com
On Thu, Nov 8, 2012 at 2:39 PM, Mayank Jain <fires...@gmail.com> wrote:
> Try this code : MBBGS
> It should give you 50% off on the book. Hopefully. :)

Thanx but too late. One of my colleagues also bought it 50% off with a
different code. I'm happy with $15 :)

Stuart Sierra

unread,
Nov 9, 2012, 9:19:22 AM11/9/12
to clo...@googlegroups.com
On Thursday, November 8, 2012 4:14:03 PM UTC-5, Robert Pitts wrote:
Awesome. Would you say that this is essentially a completed work? Growing weary or reading and re-reading beta books lately.

Yes, the book is finished and out of beta.

There may still be periodic updates and bug fixes to the eBook in the future.

-S

Ravindra Jaju

unread,
Nov 9, 2012, 12:49:22 PM11/9/12
to clo...@googlegroups.com
I see you guys have kept that margin for updates/fixes already.

The copyright notice talks about the year 2013. :)
" Copyright © 2013 Stuart Sierra, Luke VanderHart."

Anyway, looking forward to spending some time with the book!

--
jaju

--

kinleyd

unread,
Nov 10, 2012, 6:46:21 AM11/10/12
to clo...@googlegroups.com
Awesome and congratulations. I look forward to picking up my copy.

Mark Engelberg

unread,
Nov 19, 2012, 11:18:00 PM11/19/12
to clo...@googlegroups.com
I just received the book today.  I was surprised to see how thin it is, but I'm glad the book exists.  I had a lot of trouble getting up and running several months ago, using only the scattered install instructions on the web.  It's nice to have a clear path to getting started.

Unfortunately, I can't get past page 8 and would appreciate some additional guidance.
Using the latest lein 2.0 preview 10, I did "lein new cljs2" to create a new project called cljs2.
Then, I edited the project.clj file as described in the book, using the latest version number for lein-cljsbuild:

(defproject cljs2 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [org.clojure/clojurescript "0.0-1450"]]
  :plugins [[lein-cljsbuild "0.2.9"]]
  :cljsbuild {:builds []})

Then, at the command prompt I typed:
lein trampoline cljs-build repl-rhino
and got the following error message.  I'm running on Windows.  Any idea what's going wrong?
Thanks.

C:\devel\Clojure\lein\cljs2>lein trampoline cljsbuild repl-rhino
Running Rhino-based ClojureScript REPL.
Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.Ru
ntimeException: EOF while reading, starting at line 1
        at clojure.lang.LispReader.read(LispReader.java:215)
        at clojure.core$read.invoke(core.clj:3346)
        at clojure.core$read.invoke(core.clj:3344)
        at clojure.main$eval_opt.invoke(main.clj:295)
        at clojure.main$initialize.invoke(main.clj:316)
        at clojure.main$script_opt.invoke(main.clj:340)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:703)
        at clojure.lang.Var.invoke(Var.java:450)
        at clojure.lang.AFn.applyToHelper(AFn.java:212)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: EOF while reading, starting at line 1
        at clojure.lang.Util.runtimeException(Util.java:170)
        at clojure.lang.LispReader.readDelimitedList(LispReader.java:1117)
        at clojure.lang.LispReader$ListReader.invoke(LispReader.java:962)
        at clojure.lang.LispReader.read(LispReader.java:180)
        ... 11 more

George Oliver

unread,
Nov 19, 2012, 11:28:03 PM11/19/12
to clo...@googlegroups.com


On Monday, November 19, 2012 8:18:16 PM UTC-8, puzzler wrote:

Then, at the command prompt I typed:
lein trampoline cljs-build repl-rhino
and got the following error message.  I'm running on Windows.  Any idea what's going wrong?
Thanks.




These kinds of errors usually mean a file path or constructed command line is misquoted, double-quoted where it shouldn't be, etcetera. For example see issues like this, https://github.com/technomancy/leiningen/issues/674. Not sure myself what the problem is here since it seems like most of these issues have been closed but maybe there's something still there. 

 

Sean Corfield

unread,
Nov 19, 2012, 11:45:08 PM11/19/12
to clo...@googlegroups.com
I wonder if it's some aspect of lein trampoline on Windows. As I understand it, trampoline generates a file that is used to fire up the next process and it may well have some *nix-ism that isn't compatible with Windows?


--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Sean Corfield

unread,
Nov 19, 2012, 11:48:46 PM11/19/12
to clo...@googlegroups.com
Looks like George nailed it with his note about issue 674 which came in while I was writing my (accurate but not particularly helpful) response...

Mark Engelberg

unread,
Nov 20, 2012, 12:34:29 AM11/20/12
to clo...@googlegroups.com
Ugh, I should have guessed.  My attempts to do clojurescript several months back were foiled by trampolining problems, but that was on lein 1.7.  I was under the impression those problems had been fixed in lein 2.0, so I had expected it to work, but it looks like there is still an issue.  Any easy workaround?

George Oliver

unread,
Nov 20, 2012, 1:48:58 AM11/20/12
to clo...@googlegroups.com


On Monday, November 19, 2012 9:34:29 PM UTC-8, puzzler wrote:
Ugh, I should have guessed.  My attempts to do clojurescript several months back were foiled by trampolining problems, but that was on lein 1.7.  I was under the impression those problems had been fixed in lein 2.0, so I had expected it to work, but it looks like there is still an issue.  Any easy workaround?


VirtualBox? :) 

Mimmo Cosenza

unread,
Nov 20, 2012, 4:28:22 AM11/20/12
to clo...@googlegroups.com
For what I know you do not need to explicitly write cljs dependency in project.clj if using lein-cljsbuild plugin which should already implicitly contain it.

try the following

$ lein new rhinotest

edit project.clj as follow

(defproject rhinotest "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :license {:name "Eclipse Public License"
  :dependencies [[org.clojure/clojure "1.4.0"]]
  :plugins [[lein-cljsbuild "0.2.9"]]
  :cljsbuild {:builds []})

$ cd rhinotest
$ lein trampoline cljsbuild repl-rhino

mimmo

Laurent PETIT

unread,
Nov 20, 2012, 4:32:42 AM11/20/12
to clo...@googlegroups.com
2012/11/20 Mark Engelberg <mark.en...@gmail.com>

Ugh, I should have guessed.  My attempts to do clojurescript several months back were foiled by trampolining problems, but that was on lein 1.7.  I was under the impression those problems had been fixed in lein 2.0, so I had expected it to work, but it looks like there is still an issue.  Any easy workaround?

What happens if you just don't use trampoline at all ? (Is trampoline required, or just nice for saving some memory ?)
 

Stuart Sierra

unread,
Nov 20, 2012, 3:00:38 PM11/20/12
to clo...@googlegroups.com
`lein trampoline` was required to permit the CLJS REPL process to grab STDIN/STDOUT. According to a recent thread on the Leiningen mailing list, this may have been fixed in the Git master branch of Leiningen.

-S
Reply all
Reply to author
Forward
0 new messages