Re: Problem with ClojureScript and Node.js

2011-08-30 Thread Christopher Redinger
I checked in a change this morning that fixes this.

On Wednesday, August 17, 2011 11:25:54 AM UTC-4, Mark McGranaghan wrote:
>
>
>
> On Jul 28, 4:50 pm, Anthony Grimes  wrote: 
> > Oh! I apologize. I was replying via the google interface and didn't 
> realize 
> > it wasn't quoting. Here is a link to the topic for 
> > context:https://groups.google.com/d/topic/clojure/ZyVrCxmOFTM/discussion 
> > 
> > I've also filed a bug here:http://dev.clojure.org/jira/browse/CLJS-43 
>
> I've been trying to get the hello world ClojureScript + Node.js 
> example working, but have been hitting the problems described in this 
> thread. I see that this ticket for this issue is still open: 
>
> http://dev.clojure.org/jira/browse/CLJS-43 
>
> But that the one it points to as being the possible root cause is 
> closed: 
>
>http://dev.clojure.org/jira/browse/CLJS-25 
>
> Is Node.js expected to be working in ClojureScript HEAD, for example 
> in the form described here?: 
>
> https://github.com/clojure/clojurescript/wiki/Quick-Start 
>
> If it is known/expected to be not working, how might I help get it 
> working again? Is there a specific blocker, or is it just that support 
> has regressed because of a changing code base and needs to be 
> investigated/refreshed? 
>
> I'm anxious to help but am not sure where to start: any pointers would 
> be appreciated. 
>
> - Mark 
>
>
> > Sorry. :) 
> > 
> > 
> > 
> > On Thursday, July 28, 2011 6:40:39 PM UTC-5, Rich Hickey wrote: 
> > 
> > > Could you please use quoting in your messages? Otherwise they have no   
>
> > > context. 
> > 
> > > Thanks, 
> > 
> > > Rich 
> > 
> > > On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote: 
> > 
> > > > Actually, it seems to be caused by this commit: 
> > >https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af7... 
>
> > 
> > > > If I checkout before that, everything is peachy. I guess I'll submit 
>   
> > > > a bug report.

-- 
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: Problem with ClojureScript and Node.js

2011-08-27 Thread Javier Neira Sanchez
Hi people! i am experimenting with clojurescript and node.js in windows too 
and i cant to access public node.js vars like __dirname. I had to use (js* 
"__dirname") but i think it would be neat that cljs.nodejs had all the 
global vars of node.js

Thanks for clojurescript and keep on it!

-- 
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: Problem with ClojureScript and Node.js

2011-08-17 Thread Mark McGranaghan


On Jul 28, 4:50 pm, Anthony Grimes  wrote:
> Oh! I apologize. I was replying via the google interface and didn't realize
> it wasn't quoting. Here is a link to the topic for
> context:https://groups.google.com/d/topic/clojure/ZyVrCxmOFTM/discussion
>
> I've also filed a bug here:http://dev.clojure.org/jira/browse/CLJS-43

I've been trying to get the hello world ClojureScript + Node.js
example working, but have been hitting the problems described in this
thread. I see that this ticket for this issue is still open:

http://dev.clojure.org/jira/browse/CLJS-43

But that the one it points to as being the possible root cause is
closed:

   http://dev.clojure.org/jira/browse/CLJS-25

Is Node.js expected to be working in ClojureScript HEAD, for example
in the form described here?:

https://github.com/clojure/clojurescript/wiki/Quick-Start

If it is known/expected to be not working, how might I help get it
working again? Is there a specific blocker, or is it just that support
has regressed because of a changing code base and needs to be
investigated/refreshed?

I'm anxious to help but am not sure where to start: any pointers would
be appreciated.

- Mark


> Sorry. :)
>
>
>
> On Thursday, July 28, 2011 6:40:39 PM UTC-5, Rich Hickey wrote:
>
> > Could you please use quoting in your messages? Otherwise they have no  
> > context.
>
> > Thanks,
>
> > Rich
>
> > On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote:
>
> > > Actually, it seems to be caused by this commit:
> >https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af7...
>
> > > If I checkout before that, everything is peachy. I guess I'll submit  
> > > a bug report.

-- 
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: Problem with ClojureScript and Node.js

2011-07-30 Thread Benny Tsai
Thank you for tracking it down and doing the legwork, Anthony :)

On Thursday, July 28, 2011 5:50:37 PM UTC-6, Anthony Grimes wrote:
>
> Oh! I apologize. I was replying via the google interface and didn't realize 
> it wasn't quoting. Here is a link to the topic for context: 
> https://groups.google.com/d/topic/clojure/ZyVrCxmOFTM/discussion
>
> I've also filed a bug here: http://dev.clojure.org/jira/browse/CLJS-43
>
> Sorry. :)
>
> On Thursday, July 28, 2011 6:40:39 PM UTC-5, Rich Hickey wrote:
>>
>> Could you please use quoting in your messages? Otherwise they have no  
>> context.
>>
>> Thanks,
>>
>> Rich
>>
>> On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote:
>>
>> > Actually, it seems to be caused by this commit: 
>> https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea
>> >
>> > If I checkout before that, everything is peachy. I guess I'll submit  
>> > a bug report.
>> >
>>
>>

-- 
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: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
Oh! I apologize. I was replying via the google interface and didn't realize 
it wasn't quoting. Here is a link to the topic for 
context: https://groups.google.com/d/topic/clojure/ZyVrCxmOFTM/discussion

I've also filed a bug here: http://dev.clojure.org/jira/browse/CLJS-43

Sorry. :)

On Thursday, July 28, 2011 6:40:39 PM UTC-5, Rich Hickey wrote:
>
> Could you please use quoting in your messages? Otherwise they have no  
> context.
>
> Thanks,
>
> Rich
>
> On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote:
>
> > Actually, it seems to be caused by this commit: 
> https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea
> >
> > If I checkout before that, everything is peachy. I guess I'll submit  
> > a bug report.
> >
>
>

-- 
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: Problem with ClojureScript and Node.js

2011-07-28 Thread Rich Hickey
Could you please use quoting in your messages? Otherwise they have no  
context.


Thanks,

Rich

On Jul 28, 2011, at 7:10 PM, Anthony Grimes wrote:


Actually, it seems to be caused by this commit: 
https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea

If I checkout before that, everything is peachy. I guess I'll submit  
a bug report.




--
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: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
Actually, it seems to be caused by this 
commit: 
https://github.com/clojure/clojurescript/commit/954e8529b1ec814f40af77d6035f90e93a9126ea

If I checkout before that, everything is peachy. I guess I'll submit a bug 
report.

-- 
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: Problem with ClojureScript and Node.js

2011-07-28 Thread Anthony Grimes
I'm all of a sudden getting this exact same error on OS X 10.6.8. And I do 
mean all of a sudden. I actually updated to this version of OS X last night 
and today it isn't working. Is this happening to any OS X users on an older 
Snow Leopard? This is the only thing that has changed in my setup, so I'm 
actually starting to wonder if it might have something to do with that.

-- 
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: Problem with ClojureScript and Node.js

2011-07-27 Thread Oliver Kaiser
I seem to have fixed this by editing
closure/library/closure/goog/base.js and rebuilding lib/goog.jar.
The relevant line is "goog.global = this;" somewhere at the top where
"this" should be replaced by
"(function(){return this})();"; the bootstrap script contains the
command to create the jarfile.

I can't tell if this is the ~correct~ way of fixing this problem, but
so far it doesn't appear to have broken
anything. Tested with v0.4 branch and 0.5.2 release, both work.

Regards,
tok

-- 
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: Problem with ClojureScript and Node.js

2011-07-25 Thread Oliver Kaiser
I also experience this problem; switching nodejs versions (0.4.11-pre
== v0.4 branch, 0.4.10 and 0.5.2) did not have any effect.

When compiling with:
bin/cljsc samples/nodehello.cljs '{:target :nodejs :optimizations
:simple :pretty-print true}' > nodehello.js

the (first) relevant line for this error seems to be:
goog.global.Date.prototype.cljs$core$IEquiv$ = !0;

I don't get why this is goog.global.Date and not goog.date.Date, or
where the definition should actually come from; somehow it smells like
config trouble or (most likely) user error.

Regards,
tok

-- 
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: Problem with ClojureScript and Node.js

2011-07-24 Thread Benny Tsai
Thank you for your response, Urlik.  It's good to know someone else saw the 
same error, on a non-Windows platform, no less.  Sean Corfield, responding 
to an earlier failed attempt by me to post about the problem, said that he 
was able to use Node with ClojureScript on OSX after following the 
instructions at https://github.com/joyent/node/wiki/Installation 
and building Node 0.4.11-pre from source.  Perhaps that might work for you 
as well?

If anyone else has experienced this problem, please feel free to chime in!

-- 
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: Problem with ClojureScript and Node.js

2011-07-24 Thread Ulrik Sandberg
I have the same problem, using an unmodified clojurescript checkout
(08db38f) with nodejs 0.4.10 on MacOSX 10.6.8.

$ cat nodehello.cljs
(ns nodehello)

(defn -main [& args]
  (println (apply str (map [\ "world" "hello"] [2 0 1]

(set! *main-cli-fn* -main)
$ bin/cljsc nodehello.cljs
'{:optimizations :advanced :target :nodejs}' > nodehello.js
$ node nodehello.js

node.js:134
throw e; // process.nextTick error, or 'error' event on first
tick
^
TypeError: Cannot read property 'prototype' of undefined
at Object. (/Source/Git/clojurescript/nodehello.js:
14:382)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at Array. (module.js:421:10)
at EventEmitter._tickCallback (node.js:126:26)

On 24 Juli, 07:53, Benny Tsai  wrote:
> I should add that I did have to make one change to closure.clj in order to
> compile nodehello.cljs; I changed the following line in the ns->file-name
> function:
>
>   path (string/replace (munge ns) \. java.io.File/separatorChar)]
>
> To:
>
>   path (string/replace (munge ns) \. \/)]

-- 
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: Problem with ClojureScript and Node.js

2011-07-23 Thread Benny Tsai
I should add that I did have to make one change to closure.clj in order to 
compile nodehello.cljs; I changed the following line in the ns->file-name 
function:

  path (string/replace (munge ns) \. java.io.File/separatorChar)]

To:

  path (string/replace (munge ns) \. \/)]

-- 
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

Problem with ClojureScript and Node.js

2011-07-23 Thread Benny Tsai
I'm experimenting with the latest build of ClojureScript from github on 
Windows.  I can get as far as compiling nodehello.cljs from the Quick Start 
guide, but I get the following error when trying to run the compiled .js 
file with Node:

node.js:195
throw e; // process.nextTick error, or 'error' event on first tick
  ^
GetConsoleTitleW: The access code is invalid.
TypeError: Cannot read property 'prototype' of undefined
at Object. (C:\clojurescript\nodehello.js:13:382)
at Module._compile (module.js:420:26)
at Object..js (module.js:459:10)
at Module.load (module.js:335:31)
at Function._load (module.js:294:12)
at Array. (module.js:479:10)
at EventEmitter._tickCallback (node.js:187:26)

I get that error with both 0.5.2 and 0.5.1 binaries from nodejs.org/dist/, 
and a similar error with the 0.4.9 and 0.4.8 binaries 
from node-js.prcn.co.cc/:

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
WideCharToMultiByte: The data area passed to a system call is too small.
TypeError: Cannot read property 'prototype' of undefined
at Object. (/cygdrive/c/clojurescript/nodehello.js:13:382)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at Array. (module.js:421:10)
at EventEmitter._tickCallback (node.js:126:26)

Has anyone had success with ClojureScript + Node.js, on Windows or 
otherwise?

-- 
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