项目作者: mahyaret

项目描述 :
Cracking the Coding Interview 6th Ed. Solutions
高级语言: Common Lisp
项目地址: git://github.com/mahyaret/CtCI-6th-Edition-CommonLisp.git
创建时间: 2019-03-14T11:27:36Z
项目社区:https://github.com/mahyaret/CtCI-6th-Edition-CommonLisp

开源协议:

下载


CtCI-6th-Edition

Solutions for Cracking the Coding Interview 6th Edition by Gayle Laakmann McDowell.

Contributing

Work Flow

  1. Fork the appropriate repo for your language to your GitHub user.
  2. Write quality code and lint if applicable.
  3. Add tests if applicable.
  4. Open a pull request and provide a descriptive comment for what you did.

How to run the code

I personally found the combination of Emacs and Slime on top of SBCL gives the best IDE for common Lisp.

With Emacs+Slime+SBCL

  1. Install Emacs using the following

Linux:

  1. sudo apt-get install emacs

Windows & MacOS:

https://www.gnu.org/software/emacs/download.html

  1. Install SBCL (also on Windows and MacOS)
  1. Setup Slime in Emacs
  • create .emacs in your home folder.
  • add following to this file:
    1. (require 'package)
    2. (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
    3. (not (gnutls-available-p))))
    4. (proto (if no-ssl "http" "https")))
    5. ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
    6. (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
    7. ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
    8. (when (< emacs-major-version 24)
    9. ;; For important compatibility libraries like cl-lib
    10. (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
    11. (package-initialize)
    12. ;; Setting lisp system
    13. (setq inferior-lisp-program "/usr/local/bin/sbcl")
    14. (setq slime-contribs '(slime-fancy))
    and then restart emacs and run the following:
    1. M-x package-refresh-contents
    2. M-x package-install RET slime RET
  1. Clone this repo
  2. In Emacs, open slime
    1. M-x slime
    SLIME starts the Lisp system with the current directory taken from the directory where the file associated with the current buffer is. If you want to exit from slime:
    1. , sayoonara
  3. In slime REPL run:
    1. (load "Tester.lisp")

For Help

Best resource for Common Lisp can be found here: https://github.com/norvig/paip-lisp