--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,3 @@
+syntax: glob
+
+docs/build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,18 @@
+.PHONY: test pubdocs
+
+docfiles = $(shell ls docs/*.markdown)
+
+test:
+ sbcl --noinform --load test/run.lisp --eval '(quit)'
+
+docs: docs/build/index.html
+
+docs/build/index.html: $(docfiles)
+ cd docs && ~/.virtualenvs/d/bin/d
+
+pubdocs: docs
+ hg -R ~/src/sjl.bitbucket.org pull -u
+ rsync --delete -a ./docs/build/ ~/src/sjl.bitbucket.org/bones
+ hg -R ~/src/sjl.bitbucket.org commit -Am 'bones: Update site.'
+ hg -R ~/src/sjl.bitbucket.org push
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,22 @@
+ eeeee eeeee eeeee eeee eeeee
+ 8 8 8 88 8 8 8 8 "
+ 8eee8e 8 8 8e 8 8eee 8eeee
+ 88 8 8 8 88 8 88 88
+ 88eee8 8eee8 88 8 88ee 8ee88
+
+Bones is a logic programming library for Common Lisp.
+
+**Bones is still in development, don't actually try to use this for anything
+yet. It should be usable by mid-2016.**
+
+* **License:** MIT/X11
+* **Documentation:** <http://sjl.bitbucket.org/bones/>
+* **Code:** <http://bitbucket.org/sjl/bones/>
+* **Issues:** <http://bitbucket.org/sjl/bones/issues/>
+
+![I don't know what that means](https://i.imgur.com/EWPGAHa.gif)
+
+License
+-------
+
+Copyright 2016 Steve Losh and contributors. Licensed as **MIT/X11**.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bones-test.asd Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,12 @@
+(asdf:defsystem #:bones-test
+ :description "Test suite for bones."
+ :author "Steve Losh <steve@stevelosh.com>"
+ :license "MIT/X11"
+ :depends-on (#:bones
+ #:fiveam)
+ :serial t
+ :components ((:file "package-test")
+ (:module "test"
+ :serial t
+ :components ((:file "bones")))))
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bones.asd Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,20 @@
+(asdf:defsystem #:bones
+ :name "bones"
+ :description "A logic programming library for Common Lisp."
+
+ :author "Steve Losh <steve@stevelosh.com>"
+ :maintainer "Steve Losh <steve@stevelosh.com>"
+
+ :license "MIT/X11"
+ :version "0.0.1"
+
+ :depends-on (#:defstar
+ #:optima
+ #:fare-quasiquote-optima
+ #:fare-quasiquote-readtable)
+
+ :serial t
+ :components ((:file "package")
+ (:module "src"
+ :components ((:file "bones")))))
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/01-installation.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,2 @@
+Installation
+============
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/02-overview.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,2 @@
+Overview
+========
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/03-reference.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,2 @@
+Reference
+=========
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/04-changelog.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,2 @@
+Changelog
+=========
Binary file docs/bones.gif has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/footer.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,3 @@
+<i>Made with Lisp and love by [Steve Losh][] in Reykjavík, Iceland.</i>
+
+[Steve Losh]: http://stevelosh.com/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/index.markdown Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,12 @@
+Bones is a logic programming library for Common Lisp.
+
+**Bones is still in development, don't actually try to use this for anything
+yet. It should be usable by mid-2016.**
+
+* **License:** MIT/X11
+* **Documentation:** <http://sjl.bitbucket.org/bones/>
+* **Code:** <http://bitbucket.org/sjl/bones/>
+* **Issues:** <http://bitbucket.org/sjl/bones/issues/>
+
+<img src="https://i.imgur.com/EWPGAHa.gif"
+ style="border: 1px solid #222; margin: 15px 0px 10px; width: 100%;"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/title Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,1 @@
+Bones
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/package-test.lisp Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,3 @@
+(defpackage #:bones-test
+ (:use #:cl #:bones #:5am))
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/package.lisp Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,5 @@
+(defpackage #:bones
+ (:use #:cl)
+ (:export :hello)
+ )
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/bones.lisp Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,6 @@
+(in-package #:bones)
+
+(defun hello ()
+ 1)
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/99.pl Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,59 @@
+% 99 Prolog Problems
+% from http://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/
+%
+% Solutions to at least a few of these, for testing purposes.
+
+% P01
+my_last(X, [X]).
+my_last(X, [_ | T]) :-
+ my_last(X, T).
+
+% P02
+my_lastbutone(X, [X, _]).
+my_lastbutone(X, [_ | T]) :-
+ my_lastbutone(X, T).
+
+% P03
+my_nth(X, [X | _], 1).
+my_nth(X, [_ | T], N) :-
+ M is N - 1,
+ my_nth(X, T, M).
+
+% P04
+my_len([], 0).
+my_len([_ | T], Length) :-
+ my_len(T, M),
+ Length is M + 1.
+
+my_len_acc([], A, A).
+my_len_acc([_ | T], A, Length) :-
+ B is A + 1,
+ my_len_acc(T, B, Length).
+
+my_len2(L, Length) :-
+ my_len_acc(L, 0, Length).
+
+% P05
+my_reverse_acc([], Acc, Acc).
+my_reverse_acc([X | T], Acc, Reversed) :-
+ my_reverse_acc(T, [X | Acc], Reversed).
+
+my_reverse(L, R) :-
+ my_reverse_acc(L, [], R).
+
+% P06
+my_palindrome(L) :-
+ my_reverse(L, L).
+
+% P07
+my_flatten([], []).
+
+my_flatten([Atom | Tail], [Atom | FlatTail]) :-
+ \+ is_list(Atom),
+ my_flatten(Tail, FlatTail).
+
+my_flatten([HeadList | Tail], Flattened) :-
+ is_list(HeadList),
+ my_flatten(HeadList, FlatHeadList),
+ my_flatten(Tail, FlatTail),
+ append(FlatHeadList, FlatTail, Flattened).
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bones.lisp Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,7 @@
+(in-package #:bones-test)
+
+(def-suite bones)
+(in-suite bones)
+
+(test hello-works
+ (is (equal 0 (1- (hello)))))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/run.lisp Sat Mar 05 23:58:39 2016 +0000
@@ -0,0 +1,6 @@
+(let ((*standard-output* (make-broadcast-stream)))
+ (ql:quickload "bones-test"))
+
+
+(in-package #:bones-test)
+(run!)