Skip to content

Instantly share code, notes, and snippets.

View cmoore's full-sized avatar
🆑

Clint Moore cmoore

🆑
View GitHub Profile
(defun number-to-word (number)
(cond ((string-equal number "12") "twelve")
(t "what")))
(defun test-it ()
`(format nil "~a" ,(number-to-word "12")))
(defmacro test-it-m ()
`(format nil "~a" ,(number-to-word "12")))
@cmoore
cmoore / errors.md
Last active October 19, 2015 14:23
stack funkiness in here.

This is the difference between a stack with edIncludes in Installed.hs commented out, and not.

Just to show the paths that are, I assume, inserted into --extra-include-dirs and friends.

C:\projects\stack>stack install
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
binary-tagged-0.1.1.0: unregistering (flags changed from ["--extra-include-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-windows\\msys2-20150512\\mingw32\\include","--extra-include-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-windows\\msys2-20150512\\mingw64\\include","--extra-lib-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-windows\\msys2-20150512\\mingw32\\lib","--extra-lib-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-windows\\msys2-20150512\\mingw64\\lib"] to ["--extra-lib-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-windows\\msys2-20150512\\mingw32\\lib","--extra-lib-dirs=C:\\Users\\clint\\AppData\\Local\\Programs\\stack\\x86_64-
@cmoore
cmoore / out.txt
Created October 15, 2015 12:54
zeromq windows
0MQ Socket Properties
get socket option (Pair): FAIL (0.03s)
*** Failed! Exception: 'ZMQError { errno = 22, source = "getIntOpt", message = "Invalid argument" }' (after 5 tests):
Filedesc (-1)
Use --quickcheck-replay '4 TFGenR 000000159B0C43ED00000000001E8480000000000000DFDE00000003A3529440 0 31 5 0' to reproduce.
get socket option (Pub): FAIL
*** Failed! Exception: 'ZMQError { errno = 22, source = "getIntOpt", message = "Invalid argument" }' (after 1 test):
Filedesc 1
Use --quickcheck-replay '0 TFGenR 000000159B0C43ED00000000001E8480000000000000DFDE00000003A3529440 0 2 2 0' to reproduce.
get socket option (Sub): FAIL
@cmoore
cmoore / damnit.lisp
Created August 26, 2012 19:50
To functional, or not to functional...
(defmacro with-x (login pass &rest body)
`(let ((the-connection (connect ,login ,pass)
,@body))
(defun test ()
(with-x "name" "pass"
(do-something the-connection)))
Tue Aug 14 07:44:16 [initandlisten] MongoDB starting : pid=32549 port=27017 dbpath=./data 64-bit host=preston.local
Tue Aug 14 07:44:16 [initandlisten]
Tue Aug 14 07:44:16 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Tue Aug 14 07:44:16 [initandlisten] db version v2.2.0-rc0, pdfile version 4.5
Tue Aug 14 07:44:16 [initandlisten] git version: 33dc8445316479bbaa062db00f179fa5c39bbddb
Tue Aug 14 07:44:16 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
Tue Aug 14 07:44:16 [initandlisten] options: { dbpath: "./data", logpath: "./out.log" }
Tue Aug 14 07:44:16 [initandlisten] journal dir=./data/journal
Tue Aug 14 07:44:16 [initandlisten] recover : no journal files present, no recovery needed
Tue Aug 14 07:44:16 [websvr] admin web console waiting for connections on port 28017
Tue Aug 14 07:43:08 [initandlisten] MongoDB starting : pid=32541 port=27017 dbpath=./data 64-bit
Tue Aug 14 07:43:08 [initandlisten] db version v1.8.5, pdfile version 4.5
Tue Aug 14 07:43:08 [initandlisten] git version: 403c8dadcd56f68dcbe06013ecbfac67b32a22ac
Tue Aug 14 07:43:08 [initandlisten] build sys info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Tue Aug 14 07:43:08 [initandlisten] waiting for connections on port 27017
Tue Aug 14 07:43:08 [websvr] web admin interface listening on port 28017
Tue Aug 14 07:43:13 [initandlisten] connection accepted from 127.0.0.1:60138 #1
Tue Aug 14 07:43:13 [conn1] end connection 127.0.0.1:60138
Tue Aug 14 07:43:13 [initandlisten] connection accepted from 127.0.0.1:60139 #2
Tue Aug 14 07:43:13 [FileAllocator] allocating new datafile ./data/test.ns, filling with zeroes...
Tue Aug 14 07:41:16 [initandlisten] MongoDB starting : pid=32516 port=27017 dbpath=./data 64-bit
** NOTE: This is a development version (1.7.6) of MongoDB.
** Not recommended for production.
Tue Aug 14 07:41:16 [initandlisten] db version v1.7.6, pdfile version 4.5
Tue Aug 14 07:41:16 [initandlisten] git version: 5909aa6962bebe24f7cd65b924053a5cf70b83d3
Tue Aug 14 07:41:16 [initandlisten] sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Tue Aug 14 07:41:16 [initandlisten] waiting for connections on port 27017
Tue Aug 14 07:41:16 [websvr] web admin interface listening on port 28017
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------