Skip to content

Instantly share code, notes, and snippets.

View jmercouris's full-sized avatar
🌴

John Mercouris jmercouris

🌴
View GitHub Profile
(defun load-quicklisp (path)
(let ((quicklisp-init (merge-pathnames path (user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init))))
(loop for path in (list ".quicklisp/setup.lisp" "quicklisp/setup.lisp")
do (load-quicklisp path))
;; Macro Usage
(defparen namexy (help-contents)
(setf (ps:@ document Body inner-H-T-M-L) (ps:lisp help-contents)))
;; Macro Expansion
(defun namexy (help-contents)
(setf (ps:@ document Body inner) (ps:lisp help-contents)))
;; Macro Usage
(defparen namexy (help-contents)
(setf (ps:@ document Body inner-H-T-M-L) (ps:lisp help-contents)))
;; Macro Expansion
(defun namexy (help-contents)
(ps:ps (setf (ps:@ document Body inner) (ps:lisp help-contents))))
;; problem
;; Args defined in defparen is variable in length, as is the body
(defun version-1 (search-string)
(ps:ps (let* ((regex-string (ps:lisp (concatenate 'string "/" search-string "[A-Za-z]*/gi")))
(matcher (ps:regex regex-string))
(stringy "some magical string breadfish")
(matches ())
(last-match t)))))
;; Version 1 Output
"(function () {
var regexString = '/lol[A-Za-z]*/gi';
;; Code
(cl-json:decode-json-from-string "")
;; Error
Unexpected end of file on #<STRING-INPUT-STREAM #x302003E44C5D>, near position 0, within ""
[Condition of type END-OF-FILE]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; CURRENT IMPLEMENTATION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun set-url (input-url &optional disable-history)
(let ((url (parse-url input-url)))
(set-url-buffer url *active-buffer* disable-history)))
(define-key *document-mode-map* (kbd "C-l")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; CURRENT IMPLEMENTATION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun set-url (input-url &optional disable-history)
(let ((url (parse-url input-url)))
(set-url-buffer url *active-buffer* disable-history)))
(define-key *document-mode-map* (kbd "C-l")
(:input-complete *minibuffer* set-url :setup #'setup-url :empty-complete t))
(defun name-food ()
(let ((name (read-from-minibuffer)))
(when (equalp name "fernando")
(let ((food read-from-minibuffer))
(print name)
(print food)))))
(defclass next-application (ccl::ccl-application) ()
(:metaclass ns:+ns-application))
(defmethod load-cocoa-application ((a cocoa-application))
...
(let* ((appclass next-application))))
(defun some-user-function ()
(let ((input-1 (get-minibuffer-input "what's your age?"))
(input-2 (get-minibuffer-input "what's your name?")))
;; some arbitrary Execution
))
(defun get-minibuffer-input (prompt)
;; Register Waiting for some Item in Queue
;; After Getting Item in Queue, function continues and returns
)