{"id":21129064,"url":"https://github.com/ics-software-engineering/cci-playground","last_synced_at":"2025-07-09T00:31:37.466Z","repository":{"id":42927101,"uuid":"232891574","full_name":"ics-software-engineering/cci-playground","owner":"ics-software-engineering","description":"Boilerplate for getting started quickly on cracking the coding interview solutions.","archived":false,"fork":false,"pushed_at":"2023-03-04T06:08:40.000Z","size":26602,"stargazers_count":7,"open_issues_count":12,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-27T04:19:23.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ics-software-engineering.png","metadata":{"files":{"readme":"README-clojure.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-09T19:46:37.000Z","updated_at":"2024-03-27T04:19:23.229Z","dependencies_parsed_at":"2023-02-07T23:31:10.164Z","dependency_job_id":null,"html_url":"https://github.com/ics-software-engineering/cci-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fcci-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fcci-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fcci-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fcci-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ics-software-engineering","download_url":"https://codeload.github.com/ics-software-engineering/cci-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225470737,"owners_count":17479368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:14:51.246Z","updated_at":"2024-11-20T05:14:51.737Z","avatar_url":"https://github.com/ics-software-engineering.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clojure\n\nClojure is a lisp dialect that runs on the JVM and can be ran in the browser or locally by compiling to JavaScript.\n\nA great resource for starting with Clojure is the free book [Clojure for the Brave and True](https://www.braveclojure.com/clojure-for-the-brave-and-true/). \n\n## 1. Clojure installation\n\n[Leiningen](https://leiningen.org) is a Clojure build tool and the easiest way of getting started with Clojure.\n\nFollow the installation instructions at: https://leiningen.org/#install\n\nFor more information on Leiningen, see: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md\n\n## 2. Configure Clojure support in IntelliJ Idea\n\nThe [Cursive plugin](https://cursive-ide.com/) for Clojure provides support for editing and running Clojure projects within IntelliJ. It also works directly with Leiningen which was installed on the previous step.\n\nThis plugin provides a free license for non-commercial use. First sign up for a license at https://cursive-ide.com/buy.html. Make sure you select `Non-Commercial license`. You should not have to enter any payment details. If you are asked for payment details, you are likely signing up for the wrong license. \n\nOnce you've received your Cursive license, install the Cursive plugin as described at https://cursive-ide.com/userguide/.\n\n## 3. Open the Clojure project in IntelliJ Idea\n\nWith the cci-playground project open, select `File -\u003e New -\u003e Module From Existing Sources`. Then select the clj root directory within the cci-playground directory.\n\n\u003cimg src=\"../master/images/clj-idea-new-module.png\"\u003e\n\nNext you should see a screen titled `Import Module`. Select `Import module from external model` and then choose `Leiningen`.\n\n\u003cimg src=\"../master/images/clj-idea-import-project.png\"\u003e\n\nFrom here, click through the defaults until the project is imported. \n\nOnce the project is imported, you should see a layout that looks similar to:\n\n\u003cimg src=\"../master/images/clj-idea-layout.png\"\u003e\n\nThe is-unique functions and the main method are defined in `clj/src/clj/core.clj`. Unit tests can be found in `clj/test/clj/core_test.clj`.\n\n## 4. Running the project\n\n#### Running from the IDE\n\nOpen the `clj.core` file and click the green play button beside the main function. You should see something that looks like:\n\n\u003cimg src=\"../master/images/clj-idea-run-ide.png\"\u003e\n\n#### Running from the terminal\n\nOpen a terminal and navigate to the root `clj` directory. Then run the command:\n\n`lein run`\n\nYou should see something that looks like:\n\n\u003cimg src=\"../master/images/clj-idea-run-cli.png\"\u003e\n\n#### REPL\n\nOne of the greatest things about Clojure is that you can evaluate parts of the source in a REPL (Read-Eval-Print-Loop). This goes hand-in-hand with iterative development which I find is a necessity for working on these types of problems. This topic is generally outside the scope of this discussion, but it would be worth your while getting familiar with the REPL.  \n\nFor more details, see: https://cursive-ide.com/userguide/repl.html\n\n## 5. Running the tests\n\nClojure unit tests can be ran either from the IDE or from the terminal. I personally believe that running the tests from the terminal provide more useful feedback. \n\n#### Running tests from the IDE\n\nRight click on the `core_test.clj` file and select `Run 'clj.core-test'`. You should see output similar to:\n\n\u003cimg src=\"../master/images/clj-idea-tests-ide.png\"\u003e\n\nWhen all tests pass, you will only see `Process finished with exit code 0`. If any of the tests fail, you will see the failures here.\n\n#### Running tests from the terminal\n\nOpen a terminal and navigate to the root `clj` directory.\n\nRun the command `lein test`. You should see output similar to:\n\n\u003cimg src=\"../master/images/clj-idea-tests-cli.png\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fics-software-engineering%2Fcci-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fics-software-engineering%2Fcci-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fics-software-engineering%2Fcci-playground/lists"}