News for hackers. Stuff that matters.
Re:ClojureScript 101 by swannodette on Friday November 08, 2013 @09:13PM (#6700395)
If there's something in the tutorial that trips anyone up or doesn't make sense please let me know and I will amend.

I'm pretty excited about the latest release of ClojureScript that makes all this possible. With respect to speed of incremental compiles, code size, performance of generated code, and debugging we're finally in a good place (with of course many improvements planned in the near future).

None of this would have been possible without the tireless work of 62 contributors over the past two years, http://github.com/clojure/clojurescript/. A big thank you to all!

Happy hacking!

Re:ClojureScript 101 by benmathes on Friday November 08, 2013 @10:39PM (#6700588)
Couldn't really get started (with the latest clean install of leiningen from homebrew).

  $ lein cljsbuild auto async-tutl
  ...
  java.lang.Exception: Unknown build identifier: async-tutl
Did the name of the tutorial change?

edit: ell instead of 1. I guess that's why I use a heavily-serifed font for my coding. I even re-read the command several times looking for a simple typo to catch exactly this problem.

Re:ClojureScript 101 by chongli on Friday November 08, 2013 @10:48PM (#6700614)
You have a typo there. The proper command is:

$ lein cljsbuild auto async-tut1

Note the one instead of the ell.

Re:ClojureScript 101 by swannodette_ on Friday November 08, 2013 @10:51PM (#6700620)
The project is async-tut1 not async-tutl. Look at your project.clj.
Re:ClojureScript 101 by sitkack on Saturday November 09, 2013 @02:01PM (#6702679)
Being totally new to Sublime I was actually got confused on configuring paredit and lispindent with Sublime 2.

    get sublime2 http://www.sublimetext.com/2
    package control https://sublime.wbond.net/installation#st2


	launch "sublime 2"
	ctrl-`
	paste in the package control script (from above link) <ret>
	re-launch "sublime 2"

	⌘-shift-p # dialog comes up
	install ↓ <ret>
	# up will pop a dialog after reading the package database
	paredit <ret>
	⌘-shift-p
	install ↓ <ret>
	lispindent <ret>
The extra level of detail would cloudy the main flow of the tutorial so maybe have some supporting material links for the slower kids?
Re:ClojureScript 101 by rtorr on Friday November 08, 2013 @09:25PM (#6700425)
This is great. We currently hold a weekly clojure class at work, and this will be very helpful to some of the people who attend. The more content the better!
Re:ClojureScript 101 by masklinn on Sunday November 10, 2013 @08:35AM (#6706366)
Suggestion: add a form around the input and button, and bind on its submit. That makes the application work when pressing [return] from the input field

(you'll have to include a (.preventDefault e) in the (listen) callback though)

Re:ClojureScript 101 by olifante on Tuesday November 12, 2013 @11:51AM (#6718880)
The (.log js/console (dom/getElement "query")) command returns "null" instead of a DOM element. Curiously, manually running the equivalent command in the Chrome console works as expected:

  > goog.dom.getElement
    function (element) {
      return goog.isString(element) ?
        document.getElementById(element) : element;
    }
  > goog.dom.getElement("query")
    <input id=​"query" type=​"text">​
Re:ClojureScript 101 by cnp on Saturday November 09, 2013 @05:13PM (#6703553)
If someone could provide a good pointer to better understand lisp syntax / Clojure I would appreciate it. Clojure is so confusing and hard to follow for the beginner!
Re:ClojureScript 101 by NoodleIncident on Saturday November 09, 2013 @07:00PM (#6704227)
The biggest difference is that functions go after the left-paren, not before. Commas are also unnecessary, they're just whitespace

    foo(bar, baz) => (foo bar baz)

    herp(bar, derp(baz)) => (herp bar (derp baz))
This might help as well: http://adambard.com/blog/clojure-in-15-minutes/
Re:ClojureScript 101 by olivergeorge on Friday November 08, 2013 @11:02PM (#6700643)
Perhaps note that scripts should be loaded after form elements. You get an odd error if (init) runs before the form elements exist.
Re:ClojureScript 101 by poppingtonic on Saturday November 09, 2013 @04:08AM (#6701154)
I love this example. Working through this made me finally get started on reading Hoare's CSP book. Thanks!
Re:ClojureScript 101 by jbeja on Friday November 08, 2013 @10:29PM (#6700567)
Love CLJS!.