Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it as easy to start an editor REPL as it is to start a prompt REPL #1003

Closed
PEZ opened this issue Jan 31, 2021 · 7 comments
Closed

Make it as easy to start an editor REPL as it is to start a prompt REPL #1003

PEZ opened this issue Jan 31, 2021 · 7 comments

Comments

@PEZ
Copy link
Collaborator

PEZ commented Jan 31, 2021

The comment in #855 about how if we do not demand a project context, we can make it much easier for beginners, reminds me of that I have had plans on making Calva much simpler for the beginner to pick up Clojure than it currently does. I think that when I added jack-in and saw all that connect-the-repl support go away, I wrongly got the feeling that I was done. I forgot where I was heading. No regrets here, we have gotten a lot of other important pieces in place. But now it is time that we return to the story with the user who wants to try some Clojure.

What if it was easy as installing Calva in VS Code, issue a Give me a REPL command and have an editor open, connected to a Clojure REPL.

It would be similar to starting a prompt REPL, but it would be in an editor.

@seancorfield
Copy link
Contributor

For my benefit, not being terribly familiar with Calva, can you explain why the project-less jack-in actually fails?

I'm solidly in the "Start REPL, connect editor to it" camp so I'm not seeing why a project is needed for this.

@bpringe
Copy link
Member

bpringe commented Jan 31, 2021

What if it was easy as installing Calva in VS Code, issue a Give me a REPL command and have an editor open, connected to a Clojure REPL.

Can you explain the difference between this and jack-in (assuming we don't need a project)? I'm not following.

@PEZ
Copy link
Collaborator Author

PEZ commented Jan 31, 2021

For my benefit, not being terribly familiar with Calva, can you explain why the project-less jack-in actually fails?

It's a long story, but it goes back to how I began thinking about things when I first created Calva. It was always a project and especially a project root involved. It was probably partly because I was solving my own problem with getting VS Code to work with a ClojureScript project I was working with. But now I think it should be quite easy to remove that requirement. I see it mainly as a bug.

@PEZ
Copy link
Collaborator Author

PEZ commented Jan 31, 2021

What if it was easy as installing Calva in VS Code, issue a Give me a REPL command and have an editor open, connected to a Clojure REPL.

Can you explain the difference between this and jack-in (assuming we don't need a project)?

It might actually mostly be about removing that project requirement and renaming some commands. I'm not sure. My point here is that we are not done until the story can be told like that. Documentation First, remember? 😄

@PEZ
Copy link
Collaborator Author

PEZ commented Feb 14, 2021

The latest commits to PR #1031 adds the documentation for a new Getting Started page. Which looks like something like so (mkdocs markdown, but most of it comes across):

Getting Started

Depending on wether you want to just start a Clojure REPL or you have a project you want to work with, getting started looks similar but a bit different. Both start with:

  1. You have VS Code started
  2. You install Calva

Start a Standalone REPL

If you are new to Calva, a good place to start is using the command Start a standalone ”Hello World” REPL.

Command Palette Start Standaloe REPL

It will open up a file named hallo-repl.clj in a temporary directory, and start and connect a REPL. The file contains some sample code and a few tips on how to evaluate code in a Calva editor.

Hello REPL

The only prerequisite here is that you have Java installed. No pre-installed clojure tools required. (You will want to install these tools later, of course.)

!!! Note
When you are more familiar with Calva, and want a standalone REPL, there is a separate command: Start a standalone REPL (not in project). It will open up a user.clj in a temporary directory, containing only an (ns user) form, and start and connect the REPL.

You have a Project?

If you are new to Calva, please consider the above option first. Then when it it will be time to get Calva connected to the REPL of your project.

Clojure Resources

If you are new to Clojure or ClojureScript altogether, please check out the guide material on the respective official sites:

There are also many great books on Clojure. Clojure for the Brave and True can be read for free online. It is a great resource for beginners.

Happy coding! ♥️

@bpringe
Copy link
Member

bpringe commented Feb 15, 2021

This is great stuff!

@PEZ PEZ closed this as completed in 5dd90a9 Feb 21, 2021
@PEZ
Copy link
Collaborator Author

PEZ commented Feb 21, 2021

Latest version released adds the Start Standalone REPL command. The Getting Started stuff is not yet ready for prime time, so I opened a new issue for that: #1040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants