Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Lisp Me

Name: Anonymous 2013-05-24 19:09

Am I doing it correct or should I refactor something outside?

(to make-dir-proxy parent path
  ! to get-name path
  ! ! l = length path
  ! ! when and (plusp l) (eql (aref path (- l 1)) #\/)
  ! ! ! setf path (subseq path 0 (- l 1))
  ! ! file-namestring path
  ! to special? x
  ! ! n = get-name x
  ! ! and (> (length n) 0) (char= (aref n 0) #\.)
  ! to prn :> "$(dir '{get-name path}')"
  ! to handler as
  ! ! unless as
  ! ! ! xs = ls path
  ! ! ! xs = remove-if special? xs
  ! ! ! xs = map x xs :> get-name x
  ! ! ! return-from handler xs
  ! ! (a &rest as) = as
  ! ! when equal a "/exps" :> return-from handler (list (list (list "print" prn)) nil)
  ! ! when as
  ! ! ! b = car as
  ! ! ! when equal a "file" :> return-from handler (if (file-p "{path}{b}") :yes :no)
  ! ! ! when equal a "folder" :> return-from handler (if (folder-p "{path}{b}") :yes :no)
  ! ! ! when equal a "get"
  ! ! ! ! when equal b "name" :> return-from handler (get-name path)
  ! ! ! ! when equal b "host_path" :> return-from handler path
  ! ! ! ! error "dir can't get {b}"
  ! ! ! when equal a "of" :> return-from handler (equal b "dir")
  ! ! ! error "dir can't {a}"
  ! ! xs = handler nil
  ! ! unless find a xs :test 'equal :> return-from handler :no
  ! ! n = "{path}{a}"
  ! ! if file-p n
  ! ! ! coerce (load-file-bytes n) 'list
  ! ! ! make-dir-proxy (cons (get-name path) parent) "{n}/"
  ! typed-closure "/exps" (&rest args) (handler args))

Name: Anonymous 2013-05-24 20:51

![o]
  ! !
  ! !
  ! ! !
  ! !
  !
  ! !
  ! !
  !
  !
  ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! !
  ! !
  ! !
  ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! ! !
  ! ! ! !
  ! ! ! !
  ! ! !
  ! ! !
  ! !
  ! !
  ! !
  ! !
  ! ! !
  ! ! !
  ![/o]

Name: Anonymous 2013-05-24 20:52

!
  ! !
  ! !
  ! ! !
  ! !
  !
  ! !
  ! !
  !
  !
  ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! !
  ! !
  ! !
  ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! !
  ! ! ! !
  ! ! ! !
  ! ! ! !
  ! ! !
  ! ! !
  ! !
  ! !
  ! !
  ! !
  ! ! !
  ! ! !
  !

Name: Anonymous 2013-05-24 21:33

1
2

3

4

Name: Anonymous 2013-05-24 21:36

ditshicks

Name: Anonymous 2013-05-24 23:01

! ! ! Nikita, what are you doing?

Name: Anonymous 2013-05-24 23:15

Nikita, what's wrong with parentheses? Or other kinds of delimiters.

Name: Anonymous 2013-05-25 3:36

>>7
Python is trendy

Name: Anonymous 2013-05-25 3:47

>>7
"lisp is different"

Don't change these.
Name: Email:
Entire Thread Thread List