I seem to be lagging a little in the conversation, but for what it's
worth, the code I use to capture function definitions is:
(defmacro mkfn
"Create a function and record the source in the var metadata"
[name & fdecl]
(list*
`defn
(with-meta name
(assoc (meta name) :source (s
On Wed, Jul 8, 2009 at 11:37 PM, Phil Hagelberg wrote:
>
> Robert Campbell writes:
>
>> The main reason this is an issue for me is during development I
>> sometimes find I need another library added to my classpath. Right now
>> the only way I know how to modify the classpath in Emacs is to chang
> I hate to go completely off topic, but could you explain what advices
> are in Lisp? When I was reading a post by Steve Yegge he wrote
CLOS (the Common Lisp Object System) has before, around, and after
methods. Advice is similar, and certainly informed the CL standard. So
far as I understan
Phil - got it. It wouldn't be hard at all to write a script to monitor
a directory, and any jar you throw in there gets exploded to the
classpath dir like you use. That would make it pretty painless.
> For the record, this is usually termed "dribbling" in the Lisp world.
> It's very handy for deb
> Perhaps instead of saving an image, it should be able to save a
> transcript
> of the REPL inputs? Then you could rescue code from this, or find
> any cruft
> your image had become dependent on, or whatever.
For the record, this is usually termed "dribbling" in the Lisp world.
It's very h
Robert Campbell writes:
> Doesn't this seem a little crazy though? My day job is Java dev in
> Eclipse and a little IntelliJ and both IDEs allow you to modify
> classpath at any time. It seems like it would be a basic requirement
> for any IDE. Think of how often you do this. If I had to reboot
>> Unfortunately this is impossible due to the way the classloaders in
>> the
>> JVM work; you can't modify your classpath at runtime and have it work
>> consistently.
Doesn't this seem a little crazy though? My day job is Java dev in
Eclipse and a little IntelliJ and both IDEs allow you to modif
what's the problem with adding urls to the current ClassLoader ?
i've seen remarks to the effect that it doesn't work well, but i don't
understand why...
c
On 8 Jul 2009, at 17:37, Phil Hagelberg wrote:
>
> Robert Campbell writes:
>
>> The main reason this is an issue for me is during devel
On Jul 8, 2009, at 10:22 AM, Sean Devlin wrote:
> Isn't this why you would use a doc string, and not a comment?
Docstrings aren't the only comments in my code. :)
—
Daniel Lyons
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Robert Campbell writes:
> The main reason this is an issue for me is during development I
> sometimes find I need another library added to my classpath. Right now
> the only way I know how to modify the classpath in Emacs is to change
> the .emacs file with an add-to-list 'swank-clojure-extra-cl
Isn't this why you would use a doc string, and not a comment?
On Jul 8, 12:14 pm, Daniel Lyons wrote:
> On Jul 8, 2009, at 5:46 AM, Robert Campbell wrote:
>
> > It seems strange to me that Clojure doesn't support this concept
> > natively
>
> Comments are part of the problem. Clojure's reader
On Jul 8, 2009, at 5:46 AM, Robert Campbell wrote:
> It seems strange to me that Clojure doesn't support this concept
> natively
Comments are part of the problem. Clojure's reader strips them out
while parsing before compiling the function, so you would lose them
during the first round-t
I half-solve the "what have I defined?" problem with a combination of:
1) trying to always work from a file rather than entering stuff by
hand at the repl
2) always working in a "scrap" namespace whose contents I can inspect
using ns-interns and clojure.inspector/inspect-tree, like so:
user=> (n
2009/7/8 John Harrop :
> On Wed, Jul 8, 2009 at 5:14 AM, Robert Campbell wrote:
>>
>> Thanks Daniel, that makes perfect sense, especially about having
>> random - and forgotten - code in the image. I have a lot of this
>> during my exploration sessions.
>
> Perhaps instead of saving an image, it
> Perhaps instead of saving an image, it should be able to save a transcript
> of the REPL inputs? Then you could rescue code from this, or find any cruft
> your image had become dependent on, or whatever.
The only problem I see with this approach is that you leave it up to
the user (me) to sort
On Wed, Jul 8, 2009 at 5:14 AM, Robert Campbell wrote:
>
> Thanks Daniel, that makes perfect sense, especially about having
> random - and forgotten - code in the image. I have a lot of this
> during my exploration sessions.
Perhaps instead of saving an image, it should be able to save a transc
Hi Jurjen,
That wrapper for defn is something I was looking for in another post;
I previously asked how I can inspect the definitions of my functions
on the REPL. When I'm exploring stuff I'll be redefining many
functions many times and sometimes I lose track things. I basically
have to scroll ar
I had the same thought (as posted in the other thread) and haven't
come to a final solution yet. The main reason I wanted to achieve it
was that I do my developing / tinkering / brainstorming spread over
several work boxes spread out through several locations, and a clojure
REPL is cheap and easy,
Thanks Daniel, that makes perfect sense, especially about having
random - and forgotten - code in the image. I have a lot of this
during my exploration sessions.
The main reason this is an issue for me is during development I
sometimes find I need another library added to my classpath. Right now
Robert,
On Jul 8, 2009, at 2:13 AM, Robert Campbell wrote:
> Sometimes I have pretty long REPL sessions where I'm trying to flesh
> out some ideas. When I close my instance of Clojure Box (Emacs based)
> I lose all the definitions I had worked out over time. Is there any
> way to dump namespace(
Hello,
Sometimes I have pretty long REPL sessions where I'm trying to flesh
out some ideas. When I close my instance of Clojure Box (Emacs based)
I lose all the definitions I had worked out over time. Is there any
way to dump namespace(s) to an image? It would be great to be able to
load up some
21 matches
Mail list logo