On Thursday, 5 January 2017 14:38:51 UTC, Daniel Skarda  wrote:
> Hi Mike,
> have you succeeded to run remote REPL without modifications?
> It is a while I wrote the tutorial. However today I was able to run REPL to 
> debian running inside VirtualBox from Emacs or Cursive with help of 
> piggieback.
> I see potential issue in your code. :output-dir should be absolute and same 
> on both machines (dev and remote). 
> The reason for same absolute directory (and synchronization) is 
> implementation of JS environment in CLJS. CLJS compiler spits out .js files. 
> JS Environment (browser, node) requests these environment using http 
> (browser) or by reading  local files (node). In case of local files REPL 
> instructs js environment where to get these files. 
> In case of remote js environment (nodejs is executed on remote machine) we 
> trick repl and node to think they run both on same machine and can "exchange" 
> files in shared directory. 
> I agree it is dirty hack:) The correct solution would be to make a way how 
> nodejs can request compiled files from repl (in similar way browser requests 
> files from web server running from repl). Unfortunately at this moment I do 
> not have time to shave this yak.
> To help you to run REPL:
> 1) Check you have correct dir names for shared directory and they are 
> absolute, eg
> :output-dir "/tmp/cljs-share-repl"
> see wiki page. I made few correction of directory names today.
> 2) Check /tmp/cljs-share-repl synchronization works
> - does cljs repl create compiled files inside /tmp/cljs-repl-share/out?
> - are these files visible from remote machine?
> 2) If it does not work, please provide me some info about your configuration:
> - which versions of CLJ, CLJS, Lein, piggieback, node?
> - which OS you run on dev and remote machine?
> - how do you synchronize /tmp/cljs-repl-share? sshfs, samba, nfs?
> 3) some debugging tips:
> - check nodejs is running on remote machine and that it listens on some port 
> (netstat, lsof)
> - try to snoop tcp/ip communication using wireshark
> Crossing my fingers,
> Dan

I've switched absolute paths but the behaviour is still the same, osxfuse is 
working fine If I understood more about how it is meant to work it would be 
easier for me to debug. The first problem is I don't understand how it should 
be invoking node on the remote system. From my original post:
"If I invoke node without arguments (as the repl init does) it just appears to 
hang; shouldn't an argument be passed to invoke something on the host?"
I know node is being invoked but without arguments because I put an "echo" in 
the repl-host-node script.
 node v4.2.1 is running on the remote. 
Again thanks for your help with this.

Note that posts from new members are moderated - please be patient with your 
first post.
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to