Skip to content

Instantly share code, notes, and snippets.

@donlindsay
donlindsay / gist:6695245
Last active December 23, 2015 21:19
defstruct with multiple constructors
(defstruct app-skel
(:constructor make-gtk-app-skel
(&key (name 'gtk)
(imports 'gtk)
(headerbar (headerbar-p))
(popover (popover-p))
(grid (grid-p))
(webkit (webkit-p))
(tabs (tabs-p))
(label 'true)
@donlindsay
donlindsay / gist:6737754
Created September 28, 2013 02:25
Lisp error: (void-variable comint-mode-map)
;;; REPL
;; Setting up, creating the gjs-repl window, and starting the gjs
;; shell. These tasks are currently being performed by js-comint.
(defvar gjs-file-path "/usr/bin/gjs"
"Path to the program used by `run-gjs'")
(defvar gjs-arguments '()
"Commandline arguments to pass to `gjs'")
(progn (load "/home/don/.emacs.d/elpa/slime-20140804.1449/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.2257"))
This is SBCL 1.1.14.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
*
~$ lein repl
nREPL server started on port 56202 on host 127.0.0.1 - nrepl://127.0.0.1:56202
Exception in thread "nREPL-worker-0" java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutBuffer.length()I
at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(session.clj:43)
at clojure.lang.RestFn.invoke(RestFn.java:460)
at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$ff19274a.write(Unknown Source)
at java.io.PrintWriter.write(PrintWriter.java:456)
at java.io.PrintWriter.write(PrintWriter.java:473)
at clojure.core$fn__5471.invoke(core_print.clj:191)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
(setq mx-eq-axioms '((mx-eq
. '((eq-ref . '(org-entry-put (point) "EQ" "ref"))
(eq-sym . '(org-entry-put (point) "EQ" "sym"))
(eq-trans . '(org-entry-put (point) "EQ" "trans"))
(eq-rep-s . '(org-entry-put (point) "EQ" "rep-s"))
(eq-rep-p . '(org-entry-put (point) "EQ" "rep-p"))
(eq-rep-o . '(org-entry-put (point) "EQ" "rep-o"))
(eq-diff1 . '(org-entry-put (point) "EQ" "eq-diff1"))
(eq-diff2 . '(org-entry-put (point) "EQ" "eq-diff2"))
(eq-diff3 . '(org-entry-put (point) "EQ" "eq-diff3"))

(defun prp-fp “Assign the Functional Property axiom to the element.” (interactive) (setq (org-entry-get point “axiom”) ‘((mx-triple . (?p, rdf:type, owl:FunctionalProperty))) (while ‘((mx-triple . (mx-subj, mx-pred, mx-object1))) (setq ‘(mx-triple-cdr . (?x, ?p, ?y2))) (setq ‘(mx-triple-cddr . (?y1, owl:sameAs, ?y2))))) (message “PRP-FP asserted.”))

(defun prp-fp
"Assign the Functional Property axiom to the element."
(interactive)
(setq (org-entry-get point "axiom")
'((mx-triple . (?p, rdf:type, owl:FunctionalProperty)))
(while '((mx-triple . (mx-subj, mx-pred, mx-object1)))
(setq '(mx-triple-cdr . (?x, ?p, ?y2)))
(setq '(mx-triple-cddr . (?y1, owl:sameAs, ?y2)))))
(message "PRP-FP asserted."))
(defun wifi-up (wifi-connection)
"Thisandthat.
Argument WIFI-CONNECTION Custom variable."
(interactive)
(let (wifi-connection)
(shell-command (concat ("nmcli con up id ") wifi-connection)))
(message "wifi up"))
(define-buffer-button (mxgit-push b
:label "UPLOAD"
:prefix ";;")
(with-current-buffer mx-buttons.el
(goto-char (button-start b))
(cd "~/src/mx-org-rl/")
(interactive-form (
(shell-command "git push origin master" nil)))))
(define-buffer-button (elisp-eval b
:label "<- Eval"
:prefix ";;")
(save-excursion
(goto-char (button-start b))
(eval-last-sexp nil)))