Hi Matthew,
Have you tried console.log() as
(.log js/console "is anybody out there?")
That works for me currently.
When I first started in ClojureScript I had trouble calling
console.log() because it was a native code function and it couldn't be
called with JavaScript's .call(this, args) form, so I defined a
wrapper in JavaScript manually:
window.p = function(x){console.log(x); return x;}
On Aug 17, 3:00 pm, Matthew Gilliard <[email protected]>
wrote:
> I've been playing around writing a fun little ClojureScript project -
> it's a bit different, so I thought you might like to see it:
>
> http://mjg123.github.com/pacman/pacman.html
>
> As I was feeling my way quite blindly through ClojureScript and
> gClosure I have let the code get into a bit of a mess and I don't
> think I'll really work on it much more. I have learned an awful lot
> though (which was the main objective) - my main lessons are:
>
> - ClojureScript is awesome. The performance and stability of it are
> really astounding. Really great work guys.
> - Debugging a ClojureScript app is hard. I never figured out how to
> get js/console to work. My best solution was to compile & run very
> often, so that errors were caught quickly. Better yet would have been
> thorough testing ;)
>
> - it *is* possible to write a game with no mutable state (well, I use
> an atom to hold the most-recently-pressed key, but apart from that...
> The state-of-the-world datastructure is immutable)
>
> - Some functions missing from ClojureScript which surprised me: range, int
> - Some functions behave differently between Clojure and ClojureScript
> (due to underlying platform differences): mod
>
> - Testing is very important. The gClosure jsunit stuff looks nice
> but I'd love a midje-like API for it.
>
> Browser-compatibility: Chrome - OK, Firefox 6 - sometimes crashes
> with "too much recursion", IE/Safari - Forget it.
>
> Happy to answer any questions, otherwise I'll be over here hacking
> some Clojure :)
>
> Matthew
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en