Evaluate code in a running Guile process

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

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).