Hi,
One thing that I never remember is how to save the commands entered in
a REPL (I'm not talking about slime here). To be honest, I never use
it (since I use slime), but it's a thing I like to show to people.
I googled it, but couldn't find what I was looking for.
Pedro
(message (Hello 'Pedro)
(you :wrote :on '(6 Mar 2007 06:43:02 -0800))
(
PK> One thing that I never remember is how to save the commands entered in
PK> a REPL (I'm not talking about slime here). To be honest, I never use
PK> it (since I use slime), but it's a thing I like to show to people.
PK> I googled it, but couldn't find what I was looking for.
(dribble pathname)
it will store all the output.
there are also some external programs for doing this.
)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"?? ???? ??????? ?????")
On Mar 6, 12:03 pm, "Alex Mizrahi" <········@users.sourceforge.net>
wrote:
> (dribble pathname)
thanks. that's what I was looking for.
(how is one supposed to find something like this?)
Pedro
"Pedro Kroger" <············@gmail.com> writes:
> On Mar 6, 12:03 pm, "Alex Mizrahi" <········@users.sourceforge.net>
> wrote:
>
> > (dribble pathname)
>
> thanks. that's what I was looking for.
>
> (how is one supposed to find something like this?)
After I learned some Common Lisp, I found it helpful to read Common
Lisp: The Language, 2nd Edition from cover to cover. Even if you don't
retain everything (there's a lot to retain), you may tickle a neuron
the next time you need some sort of functionality. The main caveat is
that CLtL2 doesn't reflect the final CL standard. I find the prose
parts more readable than the final standard.
Zach
On Tue, 06 Mar 2007 07:08:39 -0800, Pedro Kroger wrote:
> On Mar 6, 12:03 pm, "Alex Mizrahi" <········@users.sourceforge.net>
> wrote:
>
>> (dribble pathname)
>
> thanks. that's what I was looking for.
But note: this will only save the part of your interaction _after_ you
evaluated 'dribble'. This is of no help if you decide to save the last
hour of REPL interaction.
> (how is one supposed to find something like this?)
Guess ? ;-)
Cheers, Ralf Mattes
> Pedro
Ralf Mattes <··@mh-freiburg.de> writes:
> On Tue, 06 Mar 2007 07:08:39 -0800, Pedro Kroger wrote:
>
>> On Mar 6, 12:03 pm, "Alex Mizrahi" <········@users.sourceforge.net>
>> wrote:
>>
>>> (dribble pathname)
>>
>> thanks. that's what I was looking for.
>
> But note: this will only save the part of your interaction _after_ you
> evaluated 'dribble'. This is of no help if you decide to save the last
> hour of REPL interaction.
Indeed. That's why I put in my ~/.common.lisp file (which is loaded by
my various implementations rc files) the following:
(let ((path
(merge-pathnames
(make-pathname
:directory '(:relative "DRIBBLES")
:name (flet ((implementation-id ()
(flet ((first-word (text)
(let ((pos (position (character " ") text)))
(remove (character ".")
(if pos (subseq text 0 pos) text)))))
(format
nil
"~A-~A-~A"
(cond
((string-equal
"International Allegro CL Enterprise Edition"
(lisp-implementation-type))
"ACL")
(t (first-word (lisp-implementation-type))))
(first-word (lisp-implementation-version))
(first-word (machine-type))))))
(multiple-value-bind (se mi ho da mo ye)
(decode-universal-time (get-universal-time))
(format nil "~4,'0D~2,'0D~2,'0DT~2,'0D~2,'0D~2,'0D-~A"
ye mo da ho mi se (implementation-id))))
:type "DRIBBLE"
:version nil
:defaults (user-homedir-pathname))
(user-homedir-pathname) nil)))
(ensure-directories-exist path)
(dribble path))
This saves dribble files for all my lisp sessions (but of course those
started without reading the rc files) to the ~/DRIBBLES directory.
--
__Pascal Bourguignon__ http://www.informatimago.com/
Un chat errant
se soulage
dans le jardin d'hiver
Shiki
On Mar 6, 7:02 pm, Ralf Mattes <····@mh-freiburg.de> wrote:
> On Tue, 06 Mar 2007 07:08:39 -0800, Pedro Kroger wrote:
> > (how is one supposed to find something like this?)
>
> Guess ? ;-)
Well, CLHS of course. But my question was "I *know* there is something
that does <foo>, I can't remember it's name, I've tried apropos, I've
skimmed CLHS trying to find it but no luck (hey, it's _big_!) , what
can I do now?"
Pedro
"Pedro Kroger" <············@gmail.com> wrote in message
····························@c51g2000cwc.googlegroups.com...
> On Mar 6, 7:02 pm, Ralf Mattes <····@mh-freiburg.de> wrote:
>> On Tue, 06 Mar 2007 07:08:39 -0800, Pedro Kroger wrote:
>
>> > (how is one supposed to find something like this?)
>>
>> Guess ? ;-)
>
> Well, CLHS of course. But my question was "I *know* there is something
> that does <foo>, I can't remember it's name, I've tried apropos, I've
> skimmed CLHS trying to find it but no luck (hey, it's _big_!) , what
> can I do now?"
Maybe the CLHS "Permuted Symbol Index" will help. I find it very useful. But of
course you still need some vague idea of what you're looking for.
Carl Taylor
On Wed, 07 Mar 2007 18:50:15 GMT, "Carl Taylor" <··········@att.net> said:
| "Pedro Kroger" <············@gmail.com> wrote in message
| ····························@c51g2000cwc.googlegroups.com...
|| On Mar 6, 7:02 pm, Ralf Mattes <····@mh-freiburg.de> wrote:
||| On Tue, 06 Mar 2007 07:08:39 -0800, Pedro Kroger wrote:
||
||| > (how is one supposed to find something like this?)
|||
||| Guess ? ;-)
||
|| Well, CLHS of course. But my question was "I *know* there is something
|| that does <foo>, I can't remember it's name, I've tried apropos, I've
|| skimmed CLHS trying to find it but no luck (hey, it's _big_!) , what
|| can I do now?"
| Maybe the CLHS "Permuted Symbol Index" will help. I find it very useful. But of
| course you still need some vague idea of what you're looking for.
Or try Google. One of the sites where CLHS can be found is www.lisp.org;
starting with the words in the subject line of this thread, I tried
several combinations of search terms restricted to that site, and the fifth
or sixth attempt:
http://www.google.com/search?q=session+file+site%3Awww.lisp.org
found DRIBBLE as the second hit.
---Vassil.
--
Is your code free of side defects?
"Pedro Kroger" <············@gmail.com> writes:
> On Mar 6, 12:03 pm, "Alex Mizrahi" <········@users.sourceforge.net>
> wrote:
>
>> (dribble pathname)
>
> thanks. that's what I was looking for.
>
> (how is one supposed to find something like this?)
Asking cll is one way.
My method is more proactive: I scan the CLHS chapters, all of them.
No need to read and understand the details of each defined symbol, you
only need to have an overlook to know what's available. When you need
it, you can then go back to the CLHS and read the details.
--
__Pascal Bourguignon__ http://www.informatimago.com/
Un chat errant
se soulage
dans le jardin d'hiver
Shiki