This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-12
Channels
- # announcements (3)
- # babashka (6)
- # beginners (84)
- # biff (1)
- # cider (7)
- # cljsrn (1)
- # clojure (18)
- # clojure-australia (3)
- # clojure-dev (21)
- # clojure-france (1)
- # clojure-spec (6)
- # clojurescript (78)
- # datomic (34)
- # emacs (5)
- # exercism (32)
- # graalvm (1)
- # helix (2)
- # hyperfiddle (3)
- # lsp (36)
- # malli (4)
- # missionary (3)
- # off-topic (54)
- # re-frame (14)
- # releases (2)
- # sql (31)
- # vim (9)
AFAIK the tests themselves don't, but users are free to add deps. That being said, several new exercises have been added in Exercism v3, so I'm not sure.
The test runner on the site uses babashka and doesn't load any deps, so all code there is constrained to what will run with SCI. I chose this mostly for the startup speed, but I also think it's appropriate for encouraging folks to write more portable code. Those who solve the exercises locally are free to use Leiningen or deps.edn however.
Is there text somewhere on the site that clarifies this to users? It would be confusing to have the tests pass locally but not on the site, preventing submission.
I think I lean towards that real Clojure should be used for the online test runner, regardless. It risks being similar to with old 4Clojure. Where an outdated Clojure version was used and contemporary documentation led users to create solutions that made the test runner throw errors and not accept the solutions.
The trade-off is having the run finish in an average of 1 second with bb vs 4 seconds with Leiningen. I consider the better user experience to outweigh the compatibility issues, but it's a community project so I'm open to be swayed
@porkostomus also car-assembly has a problem with submit with this code :
(ns cars-assemble)
(defn success-rate
"Gives back the succes rate at a certain speed"
[speed]
(cond
(== speed 0) 0
(< speed 5) 1
(< speed 9) 0.9
(== speed 9) 0.8
(== speed 10) 0.77))
(defn production-rate
"Returns the assembly line's production rate per hour,
taking into account its success rate"
[speed]
(float(* 221 (success-rate speed))))
(defn working-items
"Calculates how many working cars are produced per minute"
[speed]
(int(/ (production-rate speed) 60)))
Why a + @jaihindhreddy?
I faced the exact same problem a few days ago.
Got a fix in the works, I've been tracking it in this issue (which is beginning to read like a blog post): https://github.com/exercism/clojure-test-runner/issues/22
I know @porkostomus I did this so you can maybe better see how to solve it
It all started falling into place once I finally figured out how to use zippers! I could maybe even write a Concept exercise where the student is asked to do something with them.
It wouldn't be, because the whole point is to teach just enough of the concept to get the basic idea. But then it could unlock a practice exercise that could use them to parse source code or something.
@porkostomus so take time to find a good solution
Here’s the start of a project template for running the Clojure track in the browser without loosing Interactive Programming capabilities. Very much WIP, but please give it a spin and give me feedback. ❤️ https://github.com/PEZ/clojure-exercism-template
Hey @U0ETXRFEW! Great work on Calva - it’s so inspiring to see all the new features you’ve been working on! I’m interested in trying your new clojure-exercism-template but I don’t see the “use this template” button displayed on the github repo page at: https://github.com/PEZ/clojure-exercism-template. I’ve tried in Chrome and Brave but both browsers are not showing the button. Maybe I’m looking in the wrong place? Thanks!
I’m answering my own question here in case others are having similar issues. Clicking the link “https://gitpod.io/from-referrer/” from the page https://github.com/PEZ/clojure-exercism-template appears to work and opens gitpod with the clojure exercism template. Gitpod appears to download the required linux image and I get a VS Code-like editor. However, when trying to start the repl with ‘Jack-in’ I get the following error notification: “No supported project types detected. Maybe try starting your project manually and use the Connect command?”
Ok, I got the REPL working in Chrome. This issue appears to be due to Brave browser blocking something when you do Calva REPL Jack in.. Great work @U0ETXRFEW!
You can of course launch your workspace directly from the template project. But then you will have to fiddle some with forking or copying the repo when you want to push your progress to Github.
@U0ETXRFEW :face_palm: I totally didn’t see the large, obvious green button on the template page. Doh! I guess I just assumed it was the github “clone” button and ignored it. Sorry for the false report!