Practice Clojure in a full editor-based experience without installing anything

Following the What do beginners struggle with? thread, I have decided to spend this week trying to improve the Getting Started with Clojure story. I have sill not fully wrapped my mind around what should be the result, but something like this:

  • An article, Getting Started with Clojure, that leverages some of the findings in that thread mentioned. (I am especially inspired by what @jaco shared this weekend.) Supporting this article:
    1. A zero-install Getting Started project where Clojure is used with the REPL powering the edited files, building on Calva’s Getting Started REPL.
    2. A zero-install version of Rich 4Clojure, the editor (and Rich Comment Forms) based port of 4Clojure.
  • A zero-install template for starting with a Clojure project.
  • A zero-install template for starting with a ClojureScript project. (Probably will not get this far this week, but anyway.)

It’s the content of the article that is extra vague for me right now. I am not sure I can pull it off even, but I will give it a try. Hoping I will get you all’s help with feedback and tweaking.

The zero-install parts are important here, because even Calva’s Getting Started REPL is only zero-install if you have Java installed, which can be pretty far from a zero effort to fix. Again judging from the thread mentioned, installing things to get started throws many beginners off track with what seems to be a plethora of options and very little guidance on what is really important and what is not.

I will use Gitpod for the zero-install. It is a full root-access Linux root-access shell running in the browser and also a full-blown web based version of VS Code. Meaning Calva runs there, in your browser, without anything whatsoever needed to be installed by the user!

As the full picture is yet blurry to me I have started with a piece of it that is crystal clear. The Rich 4Clojure project. I have updated it with the necessary Gitpod configuration and given the README some extra love. Now anyone can start practicing with the 4Clojure problems, in the editor, from the web browser. Please give it some spins and please give me feedback:

image

The way the README is written right now, this should potentially already be something a beginner can use to start with Clojure. Though I still will create that other project as well where the focus will be just that.

A not so humble ask: I would love to do some user testing on this. If you or someone you know fits the description, Clojure Beginner, please consider contacting me so we can schedule a screensharing session where I can see and hear you think out loud while trying to use this project for getting started with Clojure.

Thanks in advance for any feedback! :pray: :heart:

12 Likes

Hi PEZ

Thank you for working on this. I’ve been toying with Gitpod and Rich 4Clojure a bit, and I am really enjoying it. Muuuch better experience than what I’ve had up to now.

My thoughts so far (working on Windows): Starting off with gitpod was a breeze. Your README is clear and helpful. (Even an idiot like myself could follow along :stuck_out_tongue: ). hello_repl was a really good introduction. I might just remember alt+enter, control+enter and control+alt+c enter for now, but I know where to find the rest if I ever need it. Thanks for that.

I only skimmed through hello_paredit. I read it late last night and was tired, but once I read the most important part up on top (I won’t be able to delete parens accidentally, but if I want to, I can use alt) I felt that I knew enough for now.

I’m only on line 380 of welcome_to_clojure, but it is easy to read and easy to understand.

Honestly, what I’ve been finding most confusing, are the 4clojure problems themselves, but that had to do with the := and :tests-will-fail and “__” in there. I think I’ve cracked the code, though, since I’ve comfortably made it to elementary question 6.

Thanks again.

3 Likes

Thanks! My employer is sponsoring me to do Clojure open source work this week. Your feedback is very encouraging and one of the things I take home is that I’ll keep at it, in the current direction. :rocket:

4 Likes

I know I’m not your target audience but I figured I’d give it a try – that is some mad sorcery that provides VS Code + Calva in a browser! Whoa! At first, I didn’t realize what I was looking at because I’m so used to VS Code in “dark” mode and then I was “Wait! What? Really…?” and just dove into solving puzzles. That really is incredible.

Is there a way you can tell it to start with a specific file open in the editor? It would be nice if the README was the first thing you saw.

2 Likes

Thanks for helping with this @seancorfield!

Well, you are! :smiley: You are spending tons of your time helping beginners so you know a lot about what the struggles are and obviously care a lot about the beginner story. Your feedback and help to get these repositories work well is invaluable. Also, I know I framed things in this post like that Rich 4Clojure is part of the beginner story toolkit, which it is, but the main point with that particular project is to provide a good environment for practicing Clojure, which I assume you enjoy doing as much as anyone else of us. :wink:

Interesting choice of words. I commented ”sorcery” on one of the Gitpod screencasts on Youtube. I’ve been trying to get Calva to work on Gitpod for more than a year (no, not full time!) but as long as they were using Theia there was always things not working. Now they have switched to VS Code and ”Whoa!", I’m going to have fun with. this.

I definitely think that is possible. A super idea! Gitpod’s tagline is ”Automate your development environment” so if you come up with more ideas around how we can leverage that, please fire them at me.

2 Likes

I have now updated the ramp-up for Rich 4Clojure quite a bit based on the feedback I have received. Still have a full todo-list for it, but anyway. Updates since yesterday:

  • Split up getting a Clojure environment up, and getting started with problem solving in separate markdown files, README.md and INSTRUCTIONS.md, respectively.
    • For the Gitpod option I made INSTRUCTIONS.md open up in VS Code when the workspace starts. (Since the first step in getting a Clojure env up is obviously done then.)
  • I also updated Calva to make the REPL statusbar button easier to see in both light and dark themes. (Thanks @seancorfield for the heads-up!)

Please give it a new (or first) spin using the zero-install (Gitpod) option. If you’ve tried it earlier you’ll need to create a new workspace. That’s as easy as starting at the Github repo and clicking the Open in Gitpod button. Gitpod will have your old workspace saved for you, don’t worry (and you are posting your solutions to their respective gist anyway, right?)

If you are not a beginner, pretend to be one. And for a lot of extra points: recruit beginners to test this!

Thanks! :pray:

5 Likes

Amazing that this exists! Very impressive, and potentially very useful.

I regularly teach Clojure to beginners, and I will be doing so in a course this coming spring.

I am excited by the possibility of using something related to this, but what I think I would most want is a version that opens as a minimal new project (like hello world), ideally with a jacked-in REPL and with as little other screen clutter as can be managed.

While 4Clojure is great, you need a basic REPL before, during, and after you use 4Clojure in your learning process. Also, the 4Clojure setup shared here fills the screen with panes and text and buttons and tabs, showing lists of files we’ve never heard of, and all sorts of other things that you and I will either understand or know to ignore, but I am pretty confident that most beginners will be bewildered and sad about all of this.

I have found Replit to be helpful for beginners, because it too requires no installation, runs in the browser, and gives you a basic REPL and actually lets you do a fair bit of work. But it’s not perfect (the lack of Clojure reformatting is a big problem – it does it for Java, but not Clojure :sob: ) and I can see that Calva in the browser could be vastly better.

But again, what I’d want is something that comes up as a minimal project, ideally as uncluttered as it can be but also ideally with a REPL that’s ready to type into. Once students have evaluated a few expressions and learned their way around the interface, then it would also be great to have a way to run 4Clojure.

And as @PEZ may be able to predict from some of our prior discussions, I don’t think that anything targeted to beginners should ever come up in “strict” editing mode. If it does, people who teach beginners will have to start with a demonstration of how to de-cripple the editor so they can type :blush:.

A good one for 4clojure is to use this: https://4clojure.oxal.org/

Requires zero setup and has no distractions, purely has you go through the 4Clojure exercises.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.