Erlang filesystem (a bit long) (was: Re: File versioning)
Luke Gorrie
luke@REDACTED
Fri May 9 05:59:15 CEST 2003
Chris Pressey <cpressey@REDACTED> writes:
> Downright inspired me to prove that I wasn't just all talk, too -
> I sat myself down and implemented #3. The README should explain it all:
>
> http://www.catseye.mb.ca/projects/tellerl-2003.0508/
Do you know about the erl_call example program included with
erl_interface? It is actually incredibly cool, but I never remember to
use it..
Of course, a real man would have no hesitation in doing it like this:
#!/bin/sh
ERLANG_MODE_DIR="/home/luke/elisp"
DISTEL_DIR="/home/luke/hacking/distel/elisp"
if [ $# != 4 ]; then
echo "Usage: $0 <node> <mod> <func> <argslist (in emacs lisp syntax)>"
exit 1
fi
emacs --batch \
-L ${ERLANG_MODE_DIR} \
-L ${DISTEL_DIR} \
--eval "
(progn
(defun message (&rest ignore) nil) ; silence messages
(require 'distel)
(setq worker-pid
(erl-rpc (lambda (x)
(princ (format \"%s\\n\" x) t))
'()
'$1 '$2 '$3 '$4))
(while (erl-local-pid-alive-p worker-pid)
(accept-process-output)))
"
And then:
$ ./tellerl x@REDACTED lists reverse "((x y z))"
(z y x)
Cheers,
Luke
More information about the erlang-questions
mailing list