Thanks again to Alan, Pedro, and Colin for the input on this.

I found the modern-cljs tutorial most helpful, and was able to put the 
compiled Hello World example on a server and then run it from my browser. 
Victory!

It seems like I am very close to doing what I want, which is to put an 
existing pure Clojure program (with no GUI or networking or database etc.) 
online so that the small group of users  of this program (mathematicians 
interested in a specific set of questions about finite algebras) can run 
some computations in their browsers, without having to install anything on 
their own machines. As I mentioned before, I'd like to do this, for now, 
without having to learn a lot about Javascript or web programming.

I am still facing what I think are some small hurdles, however. I'll bet 
can be overcome easily, but all of the tutorials I see require one to learn 
a lot more to do this than I have time to learn right now.

Specifically: 1) I need my code to get some input (just parameters to the 
one function that I will run), and 2) ideally the output would go to the 
browser window rather than to the Javascript console.

Ignoring 2 for the moment, I see that the Javascript console provides a 
Javascript REPL. If I can call a Clojurescript function there, and 
especially if the Clojurescript read function read from this REPL, then I 
could have my users work in the Javascript console. Not ideal, but it could 
work in a pinch.

Ideally, though, I would have either a single text field Clojurescript REPL 
on the web page itself, or two text fields, one for input and one for 
output, and a "Run" button to trigger the computation.

I don't much care what this all looks like. I just want some way to get 
text input and print text output, preferably in the browser window.

I assume that the modern-cljs tutorials would get me there, but only after 
substantial detours through several other topics. I'm sure this is all 
important and useful stuff, which I'd love to study if I ever want to do 
more substantial web programming. But for now I just want to make this 
existing program available to my users in their browsers.

So: Can anyone point me to a minimal way to get text I/O and trigger a 
function call (presumably with a button) in Clojurescript in the browser, 
without relying on knowledge of Javascript or web programming? 
Alternatively, if anyone can point me to a description of how to call 
Clojurescript functions in the Javascript console, and also to read input 
from the console, that would also help.

Thanks so much for any pointers that anyone can provide.

 -Lee


On Sunday, March 27, 2016 at 3:01:48 PM UTC-4, Lee wrote:
>
>
> Thanks Alan, Pedro, and Colin! 
>
> All of those look like good starting points, and I will explore them soon.
>
>  -Lee
>
>
> On Sat, Mar 26, 2016 at 8:06 AM, Lee Spector <lspec...@hampshire.edu> 
>>> wrote:
>>>
>>>>
>>>> Can anybody tell me or point me to a resource that will tell me how to 
>>>> get my Clojure program running as a Clojurescript program in a web page? 
>>>> Ideally, I would like to do this without learning a lot about Javascript 
>>>> or 
>>>> web programming. I just want this existing, pure Clojure program to run in 
>>>> a client's browser, running a computation and providing text output.
>>>>
>>>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to