Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Question re Mikael Sundberg's Getting started with compojure
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jacek Laskowski  
View profile  
 More options Aug 31 2010, 10:24 am
From: Jacek Laskowski <ja...@laskowski.net.pl>
Date: Tue, 31 Aug 2010 16:24:50 +0200
Local: Tues, Aug 31 2010 10:24 am
Subject: Question re Mikael Sundberg's Getting started with compojure
Hi,

I've been reading Mikael Sundberg's Getting started with compojure [1]
and been wondering how to reload a function "display" (without Emacs
and swank) so I don't have to restart repl. I'd love to update the
function while running lein repl. Is it possible?* How?

[1] http://cleancode.se/2010/08/30/getting-started-with-compojure.html

* I know it's possible, but dunno how and therefore the question :)

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Rathwell  
View profile  
 More options Aug 31 2010, 10:44 am
From: Mark Rathwell <mark.rathw...@gmail.com>
Date: Tue, 31 Aug 2010 10:44:26 -0400
Local: Tues, Aug 31 2010 10:44 am
Subject: Re: Question re Mikael Sundberg's Getting started with compojure

I'm not sure if this is the question you are asking, but to reload a
namespace in a repl, depending on whether you are use-ing the ns or
require-ing it, there are :reload and :reload-all  keyword arguments
accepted:

(require '[foo.something :as something] :reload)
(require '[foo.something :as something] :reload-all)
...

On Tue, Aug 31, 2010 at 10:24 AM, Jacek Laskowski <ja...@laskowski.net.pl>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacek Laskowski  
View profile  
 More options Aug 31 2010, 10:52 am
From: Jacek Laskowski <ja...@laskowski.net.pl>
Date: Tue, 31 Aug 2010 16:52:36 +0200
Local: Tues, Aug 31 2010 10:52 am
Subject: Re: Question re Mikael Sundberg's Getting started with compojure

On Tue, Aug 31, 2010 at 4:44 PM, Mark Rathwell <mark.rathw...@gmail.com> wrote:

> I'm not sure if this is the question you are asking, but to reload a
> namespace in a repl, depending on whether you are use-ing the ns or
> require-ing it, there are :reload and :reload-all  keyword arguments
> accepted:
> (require '[foo.something :as something] :reload)
> (require '[foo.something :as something] :reload-all)

Thanks! That was it.

As we're at it, how does people reload functions while connected to a
remote Clojure app from within Emacs? Do they also
(require...:reload)? Is there a tutorial/article about it?

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michał Marczyk  
View profile  
 More options Aug 31 2010, 11:11 am
From: Michał Marczyk <michal.marc...@gmail.com>
Date: Tue, 31 Aug 2010 17:11:56 +0200
Local: Tues, Aug 31 2010 11:11 am
Subject: Re: Question re Mikael Sundberg's Getting started with compojure
On 31 August 2010 16:52, Jacek Laskowski <ja...@laskowski.net.pl> wrote:

> As we're at it, how does people reload functions while connected to a
> remote Clojure app from within Emacs? Do they also
> (require...:reload)? Is there a tutorial/article about it?

One possibility is to open the remote file wherein the function in
question is defined, modify it as appropriate, then either enter
(require :reload ...) at the REPL or press C-c C-k (a SLIME / Swank
binding) in the buffer with the modified code. (Or press C-c C-c with
point inside the top-level form in question.)

Another possibility -- which is open even if the app has been packaged
as a .jar / .war file -- is to switch to the appropriate namespace at
the REPL and evaluate the appropriate defn; or maybe stay in the user
namespace and use clojure.core/intern / alter-var-root / .bindRoot to
replace the root binding of the Var holding the function.

Sincerely,
Michał


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikael Sundberg  
View profile  
 More options Sep 1 2010, 6:32 am
From: Mikael Sundberg <mikael.sundber...@gmail.com>
Date: Wed, 1 Sep 2010 12:32:54 +0200
Local: Wed, Sep 1 2010 6:32 am
Subject: Re: Question re Mikael Sundberg's Getting started with compojure
Hi
thanks for the great question, and the answer! i have updated the post
to contain the information.

http://cleancode.se/2010/08/30/getting-started-with-compojure.html

/Micke

2010/8/31 Michał Marczyk <michal.marc...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »