Skip to content

t-cool/cl-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9d9c671 · Dec 6, 2020
Sep 7, 2018
Dec 6, 2020
Sep 28, 2017
May 26, 2018
Dec 25, 2018
Sep 28, 2017
Nov 13, 2017
Sep 1, 2017
Dec 25, 2018
May 26, 2018
Sep 1, 2017
Mar 27, 2019
Sep 1, 2017
Sep 21, 2017
Mar 27, 2019
Mar 27, 2019

Repository files navigation

cl-exercise

Common Lisp Online Learning System

screenshot

Platform

macOS, Ubuntu16.04

Requirement

Installation

  1. Please check if you've already installed libev, Roswell, and Qlot:
$ brew install libev
Warning: libev 4.24 is already installed and up-to-date```

$ brew install roswell
Warning: roswell 19.3.10.97 is already installed and up-to-date

$ ros install fukamachi/qlot
Installing from github fukamachi/qlot
(omitted)
up to date. stop
  1. Please install cl-exercise using Roswell:
$ ros install t-cool/cl-exercise

Usage

$ ros run
* (ql:quickload :cl-exercise)
* (cl-exercise:start :port 8000 :debug nil)

Then please open http://localhost:8000 with a browser(Firefox or Chrome):

Deployment

You can start the app as following:

* (cl-exercise:start :host "http://[GLOBAL_IP_ADDRESS]" :port 80)

Docker(Local)

(work in progress)

# plan
$ docker pull tcool/cl-exercise
$ docker run -it -p 8000:8000 --name cl-exercise tcool/cl-exercise

Heroku

(work in progress)

$ heroku create --buildpack https://github.com/gos-k/heroku-buildpack-roswell
$ git add .roswell-install-list .roswell-load-system-list app.lisp Procfile
$ git commit -m "Initial commit"
$ git push

DigitalOcean

(work in progress)

$ docker-machine create --digitalocean-size "s-2vcpu-4gb" --driver digitalocean --digitalocean-access-token PERSONAL_ACCESS_TOKEN facebox-prod-1

Adding lessons data

You can add your own lessons. The format is as bellow:

The files of lessons are inside data directory in JSON format.

  • name: lesson's name

  • purpose: lesson's purpose

  • media: the link to videos or presentation slides

  • description: the head title of the lesson page

  • content: explanation

  • test: the test function to check the answer

  • requirements: the list of the symbols that have to be inside the code

This is an example of lessons.

{
  "name": "setf",
  "purpose": "The purpose of the lesson",
  "media": "https://www.youtube.com/embed/HM1Zb3xmvMc",
  "description": "**setq**",
  "content": "
  Please set the result of `2 + 3 * 4` to the symbol `reslut`.
  ",
  "prepare": "(defvar result nil)",
  "test": "(and (numberp result) (= result (+ 2 (* 3 4))))",
  "requirements": {
    "symbols": ["setq", "result"]
  }
}

See Also

  • Darkmatter - The notebook-style Common Lisp environment
  • Bulma - Modern CSS framework based on Flexbox
  • CodeMirror - In-browser code editor
  • marked - A markdown parser and compiler

Author

Eddie, t-cool

Copyright

Copyright (c) 2019 Eddie, t-cool

License

Licensed under the MIT License.