-
Notifications
You must be signed in to change notification settings - Fork 3
/
sbclrc
180 lines (153 loc) · 5.6 KB
/
sbclrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
;;;;
;;;; .sbclrc
;;;;
;;;; Config file for SBCL - Steel Bank Common Lisp.
;;;;
;;;; Copyright (C) 2019 Jon Atack <[email protected]>
(load "~/.lisprc")
(defvar *last-package* nil)
(defvar *cached-prompt* nil)
(defun package-prompt (stream)
(when (not (eq *last-package* *package*))
(setf *cached-prompt*
(format nil "~%[SBCL] ~A> "
(or (first (package-nicknames *package*))
(package-name *package*))))
(setf *last-package* *package*))
(terpri)
(princ *cached-prompt* stream))
(setf sb-int:*repl-prompt-fun* #'package-prompt)
;;; (setf sb-debug:*debug-beginner-help-p* nil)
(setf sb-impl::*default-external-format* :utf-8)
(require 'asdf)
;;; ======================================================
;;; Configure SBCL with Quicksearch and selected libraries
;;; ======================================================
;; Readline-style line-editor for Common Lisp
;; Repository and more info at: https://github.com/sharplispers/linedit
;; (ql:quickload :linedit)
;; (linedit:install-repl :wrap-current t :eof-quits t)
(handler-bind
((sb-ext:implicit-generic-function-warning #'muffle-warning)
(sb-kernel:type-proclamation-mismatch-warning #'muffle-warning)
(style-warning #'muffle-warning)
(warning #'muffle-warning)
;; (setf *on-package-variance* (list :warn nil :error t))
)
;;; =======================================
;;; Quicksearch for finding libraries
;;; =======================================
(asdf:load-system 'quicksearch)
;; Quicksearch looks for CL projects in Quicklisp, Cliki, GitHub and BitBucket.
;;
;; Example:
;;
;; (qs:? 'cell :du 5)
;;
;; => searches all sources for "cell"
;; and displays first 5 results with descriptions + URLs
;;
;; The search word must be a string, number or symbol.
;; A symbol is converted to a downcased string.
;;
;; If the search word contains a space (i.e. "foo bar")
;; the Quicklisp-search is OR-searched (foo or bar)
;; and Cliki-search, GitHub, and BitBucket are AND-searched (foo and bar).
;;
;; Options:
;;
;; d -- show descriptions (or QuickDocs URLs for Quicklisp search)
;; u -- show URLs
;; q -- search in Quicklisp
;; c -- search in Cliki
;; g -- search in GitHub
;; b -- search in Bitbucket
;; Cut-Off: Max number of displayed results (default is 50).
;;
;; - Options are idempotent: :dd <=> :d.
;; - The order of character options doesn't matter: :du <=> :ud.
;; - If options contain more than 2 cut-offs, only the last one is applied.
;; - If no search space is specified, default is all (e.g. :d <=> :dqcgb)
;; - If any search spaces are specified, the others are not specified.
;;
;; Config:
;;
;; (qs:config :maximum-columns-of-description 104
;; :maximum-number-of-fetching-repositories 50 :max-repos-supplied 50
;; :cache-size 4 :threading? t :quicklisp-verbose? t)
;;
;; To see this information:
;; C-c C-d a or M-x slime-apropos, followed by "quicksearch".
;;; =======================================
;;; Utilities
;;; =======================================
(asdf:load-system 'parse-float)
;;; =======================================
;;; Functional programming
;;; =======================================
;;; Pattern Matching
;;; (asdf:load-system 'optima)
;;; (asdf:load-system 'trivia) ; newer, faster, drop-in replacement for optima
;;; (asdf:load-system 'cl-algebraic-data-type)
;;; (asdf:load-system 'algebraic-data-library)
;;; (asdf:load-system 'abacus)
;;; (asdf:load-system 'cl-unification)
;;; FRP (Functional Reactive Programming Framework)
;;; (asdf:load-system 'cells)
;;; Functional Data Structures
;;; (asdf:load-system 'sycamore)
;;; (asdf:load-system 'fset)
;;; Functional Idioms Library
;;; (asdf:load-system 'folio)
;;; (asdf:load-system 'folio2)
;;; (asdf:load-system 'taps)
;;; =======================================
;;; Concurrent Programming
;;; =======================================
;;; Actor Model
;;; (asdf:load-system 'cl-actors)
;;; CSP Concurrent Process Algebra
;;; (asdf:load-system 'chanl)
;;; (asdf:load-system 'calispel)
;;; Software Transactional Memory
;;; (asdf:load-system 'cl-stm) ; original
;;; (asdf:load-system 'cl-stmx) ; high performance
;;; =======================================
;;; Static Code Analysis
;;; =======================================
(asdf:load-system 'lisp-critic)
;; Appease Paren Critics
;; (asdf:load-system 'readable)
;;; =======================================
;;; Benchmarking
;;; =======================================
;; (asdf:load-system 'trivial-benchmark)
;;; =======================================
;;; Default Namespaces
;;; =======================================
;;; (use-package :trivial-benchmark)
;;; (use-package :optima)
;;; (use-package :trivia) ; newer, faster, drop-in replacement for optima
;;; (use-package :algebraic-data-library)
;;; (use-package :abacus)
;;; (use-package :cells)
;;; (use-package :sycamore)
;;; (use-package :fset-user)
;;; (use-package :folio2)
;;; (use-package :taps)
;;; (use-package :cl-actors)
;;; (use-package :lisp-critic)
;;; =======================================
;;; Unit testing
;;; =======================================
(asdf:load-system 'rove)
;;; (asdf:load-system 'prove)
;;; (asdf:load-system 'fiveam)
;;; (asdf:load-system 'parachute)
;;; (ql:quickload "clunit")
)
;;; =======================================
;;; Load current side project
;;; =======================================
(ql:quickload :cl-kraken)
(ql:quickload :bitcoin-core-pr-reviews)