Giter Club home page Giter Club logo

local-4clj's Introduction

local-4clj

Problems of the famous 4clojure site.

It is recommended that you create an account there, and do the problems in the order suggested.

This project provides the same problems, but with an embedded editor nightlight. You get a repl for free (to use it, toggle instaREPL in the interface), and parinfer will help you edit your first clojure forms.

You'll know you've solved the problem when all the test-cases evaluates to true. You should then copy-paste your solution on 4clojure, as it will allow you to study the solutions of other users (the whole point, really).

NB: If you have never written a single line of clojure, you should start with the clojure koans to discover the syntax, then come back to 4clojure.

Usage

  • If you have boot on your machine: boot wait nightlight --port 4000
  • If you have lein on your machine: lein nightlight --port 4000
  • If you have docker on your machine: ./docker-run.sh

If you have none of the above, my recommendation would be to install boot and go from there.

Open http://localhost:4000 in your favorite browser (with JS enabled), you should now see the interface of the [nightlight] editor. Go to the src directory (in the left side-bar), then to your current problem difficulty, then to the number of the problem.

The (def __ ...) part is there to help you format your code in the way 4clojure expects it. Oftentimes, you will need to write a function in there:

(def __ ;; Your solution here!
  (fn [a b]
    ,,,)
  ,,,)

Of course, in a normal project, you would use a defn, but for this special case, just write the function this way, it will be easier to copy-paste your response on 4clojure later.

Also, notice that if you toggle on the InstaREPL, any form you write in the file will be evaluated. This allows you to experiment easily with partial solutions with a very tight feedback loop.

Tips

Keep a tab open on the clojure cheatsheet. You'll need it.

Development

Build and push the docker image

If you want to build the docker image docker build -t <your docker hub handle>/local-4clj:<tag> ..

Then docker push <your docker hub handle>/local-4clj:<tag>

License

Copyright © 2017 chpill

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

local-4clj's People

Contributors

chpill avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

qicst23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.