[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Doubt on using (dribble) to save an interactive session

Anoop GR

9/29/2015 12:22:00 PM

Hello hackers,
My setup: emacs + slime repl + sbcl-1.2.15 on Freebsd 10.1
I am trying to save my interactions into a file using dribble like so:

;;presently no file named session1.log exits in working directory david/
(dribble "~/david/session1.log")
;;now I see a file session1.log being created in working directory

;;I evaluate each of the below calls using C-x C-e
(cons t 8)
(reverse '(a n o o p))

;;lets stop dribble recording
(dribble)

I now opened the session1.log file to find that it is empty and nothing is being written to it.
Where am I going wrong ?
Beginner question, please bear with me and hopefully enlighten me.
4 Answers

Anoop GR

9/29/2015 12:29:00 PM

0

On Tuesday, September 29, 2015 at 5:52:03 PM UTC+5:30, Anoop GR wrote:
> Hello hackers,
> My setup: emacs + slime repl + sbcl-1.2.15 on Freebsd 10.1
> I am trying to save my interactions into a file using dribble like so:
>
> ;;presently no file named session1.log exits in working directory david/
> (dribble "~/david/session1.log")
> ;;now I see a file session1.log being created in working directory
>
> ;;I evaluate each of the below calls using C-x C-e
> (cons t 8)
> (reverse '(a n o o p))
>
> ;;lets stop dribble recording
> (dribble)
>
> I now opened the session1.log file to find that it is empty and nothing is being written to it.
> Where am I going wrong ?
> Beginner question, please bear with me and hopefully enlighten me.

Also, The above work, I am doing in emacs in a file named david.l that is inside the david/ folder

Pascal J. Bourguignon

9/29/2015 10:32:00 PM

0

Anoop GR <anoopemacs@gmail.com> writes:

> On Tuesday, September 29, 2015 at 5:52:03 PM UTC+5:30, Anoop GR wrote:
>> Hello hackers,
>> My setup: emacs + slime repl + sbcl-1.2.15 on Freebsd 10.1
>> I am trying to save my interactions into a file using dribble like so:
>>
>> ;;presently no file named session1.log exits in working directory david/
>> (dribble "~/david/session1.log")
>> ;;now I see a file session1.log being created in working directory
>>
>> ;;I evaluate each of the below calls using C-x C-e
>> (cons t 8)
>> (reverse '(a n o o p))
>>
>> ;;lets stop dribble recording
>> (dribble)
>>
>> I now opened the session1.log file to find that it is empty and
>> nothing is being written to it.
>> Where am I going wrong ?

You are expecting slime-repl to behave like your implementation REPL.
When using slime, you have save the dribble post-hoc, with C-x C-s in
the slime-repl buffer.

Notice also that slime/swank works with multiple threads; when you
evaluate things in lisp buffers, they're evaluated by swank in different
worker threads each time.

I guess it would be possible to add a dribble feature to swank, but if
you do it only for the current thread, then it won't work for the worker
threads for lisp buffer evaluations, and if we handled also those lisp
buffer evaluations, then we'd have to dribble commands (and outputs)
coming from multiple threads at the same time.

There are a few places where EVAL is used in swank.lisp, notably
interactive-eval and eval-and-grab-output. You could implement a
swank:dribble function to activate saving their string argument to a
file.

--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

n2kra

9/30/2015 5:12:00 AM

0

On Tuesday, September 29, 2015 at 6:32:16 PM UTC-4, informatimago wrote:
> Anoop GR <anoopemacs@gmail.com> writes:
>
> > On Tuesday, September 29, 2015 at 5:52:03 PM UTC+5:30, Anoop GR wrote:
> >> Hello hackers,
> >> My setup: emacs + slime repl + sbcl-1.2.15 on Freebsd 10.1
> >> I am trying to save my interactions into a file using dribble like so:
> >>
> >> ;;presently no file named session1.log exits in working directory david/
> >> (dribble "~/david/session1.log")
> >> ;;now I see a file session1.log being created in working directory
> >>
> >> ;;I evaluate each of the below calls using C-x C-e
> >> (cons t 8)
> >> (reverse '(a n o o p))
> >>
> >> ;;lets stop dribble recording
> >> (dribble)
> >>
> >> I now opened the session1.log file to find that it is empty and
> >> nothing is being written to it.
> >> Where am I going wrong ?
>
> You are expecting slime-repl to behave like your implementation REPL.
> When using slime, you have save the dribble post-hoc, with C-x C-s in
> the slime-repl buffer.
>
> Notice also that slime/swank works with multiple threads; when you
> evaluate things in lisp buffers, they're evaluated by swank in different
> worker threads each time.
>
> I guess it would be possible to add a dribble feature to swank, but if
> you do it only for the current thread, then it won't work for the worker
> threads for lisp buffer evaluations, and if we handled also those lisp
> buffer evaluations, then we'd have to dribble commands (and outputs)
> coming from multiple threads at the same time.

I can't find at the moment, storage is plentiful and cheap, in the init file
Keep all ~/dribble/implementation/timestamp, plus your suggestions.

> There are a few places where EVAL is used in swank.lisp, notably
> interactive-eval and eval-and-grab-output. You could implement a
> swank:dribble function to activate saving their string argument to a
> file.
>
> --
> __Pascal Bourguignon__ http://www.informat...
> "The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment." -- Carl Bass CEO Autodesk

Anoop GR

10/2/2015 8:11:00 PM

0

Thank you everyone, at the moment I will avoid using slime-repl when I use dribble.