This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CL-USER> (com.informatimago.small-cl-pgms.sedit:sedit '(list :a "fish" :b "salmon")) | |
Sexp Editor: | |
【(LIST :A "fish" :B "salmon")】 | |
> i | |
sexp to be inserted before: n | |
(N 【(LIST :A "fish" :B "salmon")】) | |
> n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun get-products () | |
(with-connection (db) | |
(let ((products (retrieve-all | |
(select (:id :name :short-description :price) | |
(from :product))))) | |
(loop for product in products | |
do (let* ((product-id (getf product :id)) | |
(product-features (retrieve-all | |
(select (:feature :description) | |
(from :product-features) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun run-sql-script (script-name) | |
"Run a script located within the sql directory." | |
(format t "Running script ~a" script-name) | |
(let* ((path (merge-pathnames config:*sql-directory* script-name)) | |
(sql-file-string (uiop:read-file-string path)) | |
(sql-queries (mapcar #'str:trim (str:split ";" sql-file-string :omit-nulls t))) | |
(sql-queries (remove-if (lambda (x) (equal x "")) sql-queries))) | |
(with-connection (db) | |
(loop for sql-query in sql-queries do | |
(cl-dbi:do-sql *connection* sql-query))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun connection-settings (&optional (db :maindb)) | |
(cdr (assoc db (config :databases)))) | |
(defun db (&optional (db :maindb)) | |
(apply #'cl-dbi:connect-cached (connection-settings db))) | |
(defmacro with-connection (conn &body body) | |
`(let ((*connection* ,conn)) | |
,@body)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB Error: NIL (Code: NIL) | |
[Condition of type DBI.ERROR:<DBI-DATABASE-ERROR>] | |
Restarts: | |
0: [RETRY] Retry SLIME REPL evaluation request. | |
1: [*ABORT] Return to SLIME's top level. | |
2: [REMOVE-FD-HANDLER] Remove #<SB-IMPL::HANDLER INPUT on descriptor 6: #<CLOSURE (LABELS SWANK/SBCL::RUN :IN SWANK/BACKEND:ADD-FD-HANDLER) {100437496B}>> | |
3: [ABORT] Exit debugger, returning to top level. | |
Backtrace: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro define-mode (name direct-superclasses direct-slots &body body) | |
`(progn | |
(defclass ,name ,direct-superclasses ,direct-slots) | |
(progn ,@body))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; SLIME 2.22 | |
CL-USER> (require :cffi) | |
NIL | |
CL-USER> (push (format nil "~a/.guix-profile/lib/" (uiop:getenv "HOME")) cffi:*foreign-library-directories*) | |
("/home/ambrevar/.guix-profile/lib/") | |
CL-USER> | |
WARNING: System definition file #P"/home/ambrevar/.quicklisp/dists/quicklisp/software/cl-strings-20180131-git/cl-strings.asd" contains definition for system "cl-strings-tests". Please only define "cl-strings" and secondary systems with a name starting with "cl-strings/" (e.g. "cl-strings/test") in that file. | |
WARNING: UIOP/VERSION:PARSE-VERSION: "2018.01.02" contains leading zeros | |
WARNING: Invalid :version specifier "2018.01.02" for component "cl-string-match" from file #P"/home/ambrevar/.quicklisp/dists/quicklisp/software/cl-string-match-20180131-hg/cl-string-match.asd", using NIL instead | |
WARNING: System definition file #P"/home/ambrevar/.quicklisp/dists/quicklisp/software/cl-fad-20180430-git/cl-fad.asd" contains definition for system "cl-fad-test". Please only define "cl-fad" and secondary systems with a name sta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dispatch_sync(dispatch_get_main_queue(), ^{ | |
if ([event timestamp] != 1) { | |
[super sendEvent: [NSEvent keyEventWithType:NSEventTypeKeyDown | |
location:[event locationInWindow] | |
modifierFlags:[event modifierFlags] | |
timestamp:1 | |
windowNumber:[event windowNumber] | |
context:nil | |
characters:[event characters] | |
charactersIgnoringModifiers:[event charactersIgnoringModifiers] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NextApplication.m | |
// next-cocoa | |
// | |
// Created by John Mercouris on 3/25/18. | |
// Copyright © 2018 Next. All rights reserved. | |
// | |
#import "NextApplication.h" | |
#include <xmlrpc-c/base.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright © 2017-2018 Atlas Engineer LLC. | |
// Use of this file is governed by the license that can be found in LICENSE. | |
// | |
#import "Base.h" | |
#import "Minibuffer.h" | |
@implementation Base |