docs/index.markdown @ ba96e98a1d54

Add precompilation of static queries at compile time

Imagine a function like this:

    (defun legal-moves ()
      (query (legal ?who ?move)))

The argument to `query` there is constant, so we can compile it into WAM
bytecode once, when the Lisp function around it is compiled.  Then running the
query doesn't need to touch the Bones compiler -- it can just load the bytecode
from an array and first up the VM loop.

This saves a lot of time (and consing) compared to compiling the same query over
and over at runtime.
author Steve Losh <steve@stevelosh.com>
date Sun, 17 Jul 2016 16:49:06 +0000
parents c60cac27a0a7
children cb324d188513
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%;"/>