Evaluate code in a running Guile process

Alex Kost c38b5bbf1c build: Update version to 0.1.3 4 anni fa
doc b3f69311b3 Place fifo and socket files into "XDG_RUNTIME_DIR/guile-daemon" 4 anni fa
modules b3f69311b3 Place fifo and socket files into "XDG_RUNTIME_DIR/guile-daemon" 4 anni fa
scripts b3f69311b3 Place fifo and socket files into "XDG_RUNTIME_DIR/guile-daemon" 4 anni fa
.gitignore 2477d7c4f9 Add Texinfo manual 7 anni fa
COPYING 60a029695c Initial commit 8 anni fa
INSTALL 60a029695c Initial commit 8 anni fa
Makefile.am 2477d7c4f9 Add Texinfo manual 7 anni fa
NEWS ac8e7ad724 Update NEWS 4 anni fa
README e355bce9fc README: Update the link to the Guix package 7 anni fa
README.org e519f4448e Add README 8 anni fa
autogen.sh 60a029695c Initial commit 8 anni fa
configure.ac c38b5bbf1c build: Update version to 0.1.3 4 anni fa
guix.scm 087a42c429 guix.scm: Use (gnu packages guile-xyz) module 4 anni fa
pre-inst-env.el.in 90e5f36a80 Add "pre-inst-env" stuff 8 anni fa
pre-inst-env.in 90e5f36a80 Add "pre-inst-env" stuff 8 anni fa

README

-*- mode: org -*-

* About

Guile-Daemon is a small Guile program that loads your initial
configuration file, and then reads and evaluates Guile expressions that
you send to a FIFO file. That's basically it.

Normally, =guile-daemon= will not exit: it's a daemon, so it just "sits"
on a FIFO file waiting for commands.

Along with =guile-daemon= program, Guile-Daemon provides =gdpipe= shell
script that redirects commands to the default FIFO file.

Finally, you can also connect to the daemon using a socket file (for
example, with =M-x geiser-connect-local= if you use [[https://github.com/jaor/geiser][Geiser]]).

By default, socket and FIFO files are placed in
[[file:$XDG_CONFIG_HOME/guile-daemon/run]] directory
([[file:$HOME/.config/guile-daemon/run]] if XDG_CONFIG_HOME is not set).

* Usage

Simply run =guile-daemon= (remember, it won't fork!), and then use
=gdpipe= to evaluate anything, like this:

#+BEGIN_SRC sh
gdpipe '(format #t "load path: ~a~%" %load-path)'
#+END_SRC

(on a console where =guile-daemon= is running you should see the load
path)

I use Guile-Daemon as an OSD daemon, see [[https://github.com/alezost/guile-daemon-config][my config]].

* Building from Git

Requirements for building from git:

- [[http://gnu.org/software/guile/][GNU Guile]]
- [[http://gnu.org/software/autoconf/][GNU Autoconf]]
- [[http://gnu.org/software/automake/][GNU Automake]]

Run =./autogen.sh= to generate the build system infrastructure. After
that, the program can be built and installed with the usual sequence of
commands of the GNU Build System:

#+BEGIN_SRC sh
$ ./configure
$ make
# make install
#+END_SRC

** Pre-installation environment

It is possible to use/test Guile-Daemon without installing (i.e., after
running =make= but before running =make install=) with the help of
=pre-inst-env= script in the top build tree, like this:

#+BEGIN_SRC sh
$ ./pre-inst-env guile-daemon &
$ ./pre-inst-env gdpipe ...
#+END_SRC

If you live in Emacs, you may find =pre-inst-env.el= more useful. If
you load this file (for example, with =M-x load-file=), it will set the
required environment inside Emacs, so you can run =guile-daemon= and
=gdpipe= in =M-x shell= without prefixing them with =.../pre-inst-env=.
And more importantly, you can start Geiser and use (daemon ...) modules
there!

* Building/installing with Guix

The latest version of Guile-Daemon can be installed with [[http://www.gnu.org/software/guix/][GNU Guix]]:
[[https://www.gnu.org/software/guix/packages/g.html#guile-daemon]].

Also this repository contains [[file:guix.scm]] file which can be used to
build/install Guile-Daemon using the git checkout, or to make a
development environment for it (see the commentary in that file for more
details).