1

I'm using Clozure Common Lisp on Windows. When using the DRIBBLE command and evaluating some simple forms followed by closing the DRIBBLE stream, a specified file is created but nothing is written into it.

(DRIBBLE "test.log")
(+ 2 2)
(LIST 'a 'b 'c)
(DRIBBLE)

Is this a known limitation of CCL on Windows or a problem with my environment?

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
Denis
  • 145
  • 1
  • 8
  • You might need to add more info like: how do you use CCL, how do you evaluate those statements, a reproducible test case... – Rainer Joswig Jan 03 '19 at 11:39
  • I run Lispbox and evaluate each of those commands one at a time at the prompt. This creates a "test.log" in the same directory as lispbox and it appears to be empty where I would expect it to have recorded repl input and output. – Denis Jan 03 '19 at 23:56

1 Answers1

1

If you look at the source code for dribble (in particular, process-dribble), you can see that CCL redirects the *TERMINAL-IO* stream to a two-way stream. If you try to write directly to that stream (and possible call finish-output after, to be sure), then the file is going to being written to.

> (dribble "/tmp/log")
> (print "test" *terminal-io*)
> (dribble)

The use case for dribble, at least as implemented in CCL (the behaviour of dribble is practically unspecified), is to be used from the terminal, where you cannot easily record your session. Under an IDE like Lispbox/Slime, there are other mechanisms to store commands, such as the buffer that holds the current REPL.

coredump
  • 37,664
  • 5
  • 43
  • 77
  • This works and looking at the source for process-dribble I can see what you're describing. Thank you! – Denis Jan 08 '19 at 19:14