Clojure Dev Environment

2015-10-05 Thread Miguel Ping
Hi Guys,

I've been doing some personal clj for a while, but I never quite grokked 
the whole REPL thing. I normally use Lighttable and/or Cursive as editors, 
I can set up breakpoints and debug the code, but for web I'd like to know 
how seasoned developers work.
AFAIK people fire up the repl and "do everything from there" but I still 
don't understand some parts:

- do you code functions in the repl and copy them to respective files?
- do you edit files directly and hook them into the repl?
- how do you set breakpoints?
- can you do hot-replacement easily? I always see a bunch of stack traces 
while using lein and ring with reload flags
- is there an article or screencast explaining the "feel" of this?

My current worfklow is just starting > lein ring server and developing, but 
my general impression is that I need to restart it sometimes.

As I understand it, the repl workflow is very much a lisp thing.
Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clojure Dev Environment

2010-02-10 Thread abaitam
Hi,
There are several blog posts about setting up a development
environment for Clojure mostly in Emacs (and on Linux or Mac and not
Windows). Is there one place where I can find up-to-date information
on how to create a real-world Clojure project (and using Clojure and
Java libraries)? Do you know of someone who maintains such information
for newbies anywhere? I can't find such information on Clojure
website.

- I tried Clojure some time ago and I like it. But I was struggling
with Emacs at the same time.
- I am getting an error with Enclojure  that it cannot find the jar
files even though they are located in the prefs foloder.
- La Clojure's plugin is not working in Idea 9.

Thanks for any help

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Dev Environment

2015-10-05 Thread Robin Heggelund Hansen
Basically, I use stuart sierra's tools.namespace and component libraries to 
write an application that can be easily reloaded. So I write my code in 
regular files, then i tell the repl to reload my application with the 
latest changes from disk. I can also test the application while it's 
running, because I have access to every function. Hot-replacement is a 
matter of calling 'reset. Although that does technically shut down the 
application, so maybe it can't be called "hot".

Anyway, you can read more here: https://github.com/stuartsierra/component

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-05 Thread Erik Price
vim-fireplace lets you compile individual S-expressions into an existing
nREPL (one in which the rest of your code is typically also loaded and
available), so I typically make all my code changes right in the editor
against the actual file I'm working on. Then I just compile the function
I'm editing and send it to the REPL. I'll usually just add a comment block
near the changes I'm making and put test expressions inside of it, and
execute those expressions as needed to test my changes. It's awesome.

(Of course, I delete that comment block prior to committing my work.)

e

On Monday, October 5, 2015, Robin Heggelund Hansen 
wrote:

> Basically, I use stuart sierra's tools.namespace and component libraries
> to write an application that can be easily reloaded. So I write my code in
> regular files, then i tell the repl to reload my application with the
> latest changes from disk. I can also test the application while it's
> running, because I have access to every function. Hot-replacement is a
> matter of calling 'reset. Although that does technically shut down the
> application, so maybe it can't be called "hot".
>
> Anyway, you can read more here: https://github.com/stuartsierra/component
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> 
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-05 Thread Nelson Morris
http://www.parens-of-the-dead.com/ is a screencast series that shows a nice
emacs/cider workflow with some additional usage of figwheel for the cljs
frontend development. No showing off of the debugger yet though. Cursive
should be able to do something similar with keybindings for running tests
and refactorings.

There is little direct repl interaction in this series.  However, many of
the commands use the connection to the development environment to run
things for the user.  For example, clj-autotest runs
https://github.com/magnars/.emacs.d/blob/master/site-lisp/clj-autotest.el#L4
over the connection. Hot swapping works by the tooling sending the new code
over the connection.

Personally, I use the repl a bit more, but for exploratory testing. Does
`(repeat 1 2)` return '(1 1) or '(2) type things.  The majority of writing
code happens in the file, and I let the tooling load it for me.
Additionally, for web development I use a ring server component much like
the screencasts, instead of `lein ring server`. Then I can use the
reloaded/refresh style system to restart everything when needed rather then
needing to kill the whole jvm.

On Mon, Oct 5, 2015 at 5:00 AM, Miguel Ping  wrote:

> Hi Guys,
>
> I've been doing some personal clj for a while, but I never quite grokked
> the whole REPL thing. I normally use Lighttable and/or Cursive as editors,
> I can set up breakpoints and debug the code, but for web I'd like to know
> how seasoned developers work.
> AFAIK people fire up the repl and "do everything from there" but I still
> don't understand some parts:
>
> - do you code functions in the repl and copy them to respective files?
> - do you edit files directly and hook them into the repl?
> - how do you set breakpoints?
> - can you do hot-replacement easily? I always see a bunch of stack traces
> while using lein and ring with reload flags
> - is there an article or screencast explaining the "feel" of this?
>
> My current worfklow is just starting > lein ring server and developing,
> but my general impression is that I need to restart it sometimes.
>
> As I understand it, the repl workflow is very much a lisp thing.
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-05 Thread Sean Corfield
Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:
- do you code functions in the repl and copy them to respective files?

I use Emacs/CIDER and code functions in a file, then use C-M-x to evaluate each 
one into the running REPL. I usually keep the REPL in the user namespace and 
require in the namespace I’m working on (C-c C-z to jump to the REPL as needed) 
and then type in expressions to test functions as I go. Later I’ll take a 
transcript of parts of the REPL and add them to my unit test namespace — 
usually just copy’n’paste, followed by some minor edits to turn them into 
Expectations format: (expect {expected} {actual}) which means using C-M-t to 
swap REPL output which has:

user> (some test expression)
{the actual output}

=>

(expect {the actual output}
(some test expression))

Put the cursor after the prompt: user>| then M-delete, type (expect) and slurp 
twice M-) then forward one s-exp C-M-f and swap C-M-t

- do you edit files directly and hook them into the repl?

Yes, but I don’t save them every time since I can use C-M-x to evaluate the 
current form as I type.

- how do you set breakpoints?

I don’t bother. I’ve never liked step debuggers in any language in my 30+ years 
of development :(

- can you do hot-replacement easily? I always see a bunch of stack traces while 
using lein and ring with reload flags

If I want to hot-swap into a running process, I just start a REPL server inside 
the process and connect CIDER to that, instead of starting a standalone REPL in 
Emacs. I tend to use standalone REPLs only for running Expectations anyway 
(where I use a slightly different workflow and keep the REPL in the same 
namespace as the Expectations file (C-c M-n to swap REPL namespaces).

- is there an article or screencast explaining the "feel" of this?

I don’t know, sorry.

Sean


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-06 Thread Miguel Ping
Thanks guys!

For me the ideal flow would be something that would allow me to save an 
incoming http req (I do mostly web dev) onto some variable/def, and replay 
it against some code I'm writing in the repl.
Also I like to use step debuggers when I'm new to the language or lib, it 
allows me to go down the rabbit hole and see how things work. Sometimes you 
find some surprises!

I think documentation on this is something that's missing on the clj 
community, because everyone does things a little different, but it makes it 
hard for beginners to get the gist of it.
I know some people that don't even have auto-reload on lein/ring and end up 
stopping/starting the jvm which is crazy because it takes a while.

I may write something up, I would appreciate if you guys had any more 
suggestions, including suggestions about where to put this info.

This is what I think it's standard practice:

- ideally you don't restart jvm
- on ring, use hot-reload/auto-reload
- app can be started from repl
- ide can eval clj expressions (send it to repl)
- people code small bits on ide, eval it, loop on this until its working - 
can do this for tests also
- basically the whole idea is to have components built upon functional 
style that can be started and invoked from the repl at any layer depth

- As for debuggers, I know some people other than Sean that dont use step 
debuggers at all (specially oldschool ppl), but I think its helpful for 
newbies


I will keep you guys updated if I ever write something. First have to learn 
it ;)

On Monday, October 5, 2015 at 8:07:32 PM UTC+1, Sean Corfield wrote:
>
> Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:
>
> - do you code functions in the repl and copy them to respective files?
>
>
> I use Emacs/CIDER and code functions in a file, then use C-M-x to evaluate 
> each one into the running REPL. I usually keep the REPL in the user 
> namespace and require in the namespace I’m working on (C-c C-z to jump to 
> the REPL as needed) and then type in expressions to test functions as I go. 
> Later I’ll take a transcript of parts of the REPL and add them to my unit 
> test namespace — usually just copy’n’paste, followed by some minor edits to 
> turn them into Expectations format: (expect {expected} {actual}) which 
> means using C-M-t to swap REPL output which has:
>
> user> (some test expression)
> {the actual output}
>
> =>
>
> (expect {the actual output}
> (some test expression))
>
> Put the cursor after the prompt: user>| then M-delete, type (expect) and 
> slurp twice M-) then forward one s-exp C-M-f and swap C-M-t
>
> - do you edit files directly and hook them into the repl?
>
>
> Yes, but I don’t save them every time since I can use C-M-x to evaluate 
> the current form as I type.
>
> - how do you set breakpoints?
>
>
> I don’t bother. I’ve never liked step debuggers in any language in my 30+ 
> years of development :(
>
> - can you do hot-replacement easily? I always see a bunch of stack traces 
> while using lein and ring with reload flags
>
>
> If I want to hot-swap into a running process, I just start a REPL server 
> inside the process and connect CIDER to that, instead of starting a 
> standalone REPL in Emacs. I tend to use standalone REPLs only for running 
> Expectations anyway (where I use a slightly different workflow and keep the 
> REPL in the same namespace as the Expectations file (C-c M-n to swap REPL 
> namespaces).
>
> - is there an article or screencast explaining the "feel" of this?
>
>
> I don’t know, sorry.
>
> Sean
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-06 Thread Erlis Vidal
I think it will be very helpful to the Clojure community to have something
done with Videos (screencasts) ... Clojure University? somewhere we can see
how the more seasoned developers work. At least I won't have to discover by
myself, I can copy the best guys..

I'll like to read whatever you write.

Keep the good work.
Erlis

On Tue, Oct 6, 2015 at 4:41 AM, Miguel Ping  wrote:

> Thanks guys!
>
> For me the ideal flow would be something that would allow me to save an
> incoming http req (I do mostly web dev) onto some variable/def, and replay
> it against some code I'm writing in the repl.
> Also I like to use step debuggers when I'm new to the language or lib, it
> allows me to go down the rabbit hole and see how things work. Sometimes you
> find some surprises!
>
> I think documentation on this is something that's missing on the clj
> community, because everyone does things a little different, but it makes it
> hard for beginners to get the gist of it.
> I know some people that don't even have auto-reload on lein/ring and end
> up stopping/starting the jvm which is crazy because it takes a while.
>
> I may write something up, I would appreciate if you guys had any more
> suggestions, including suggestions about where to put this info.
>
> This is what I think it's standard practice:
>
> - ideally you don't restart jvm
> - on ring, use hot-reload/auto-reload
> - app can be started from repl
> - ide can eval clj expressions (send it to repl)
> - people code small bits on ide, eval it, loop on this until its working -
> can do this for tests also
> - basically the whole idea is to have components built upon functional
> style that can be started and invoked from the repl at any layer depth
>
> - As for debuggers, I know some people other than Sean that dont use step
> debuggers at all (specially oldschool ppl), but I think its helpful for
> newbies
>
>
> I will keep you guys updated if I ever write something. First have to
> learn it ;)
>
> On Monday, October 5, 2015 at 8:07:32 PM UTC+1, Sean Corfield wrote:
>>
>> Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:
>>
>> - do you code functions in the repl and copy them to respective files?
>>
>>
>> I use Emacs/CIDER and code functions in a file, then use C-M-x to
>> evaluate each one into the running REPL. I usually keep the REPL in the
>> user namespace and require in the namespace I’m working on (C-c C-z to jump
>> to the REPL as needed) and then type in expressions to test functions as I
>> go. Later I’ll take a transcript of parts of the REPL and add them to my
>> unit test namespace — usually just copy’n’paste, followed by some minor
>> edits to turn them into Expectations format: (expect {expected} {actual})
>> which means using C-M-t to swap REPL output which has:
>>
>> user> (some test expression)
>> {the actual output}
>>
>> =>
>>
>> (expect {the actual output}
>> (some test expression))
>>
>> Put the cursor after the prompt: user>| then M-delete, type (expect) and
>> slurp twice M-) then forward one s-exp C-M-f and swap C-M-t
>>
>> - do you edit files directly and hook them into the repl?
>>
>>
>> Yes, but I don’t save them every time since I can use C-M-x to evaluate
>> the current form as I type.
>>
>> - how do you set breakpoints?
>>
>>
>> I don’t bother. I’ve never liked step debuggers in any language in my 30+
>> years of development :(
>>
>> - can you do hot-replacement easily? I always see a bunch of stack traces
>> while using lein and ring with reload flags
>>
>>
>> If I want to hot-swap into a running process, I just start a REPL server
>> inside the process and connect CIDER to that, instead of starting a
>> standalone REPL in Emacs. I tend to use standalone REPLs only for running
>> Expectations anyway (where I use a slightly different workflow and keep the
>> REPL in the same namespace as the Expectations file (C-c M-n to swap REPL
>> namespaces).
>>
>> - is there an article or screencast explaining the "feel" of this?
>>
>>
>> I don’t know, sorry.
>>
>> Sean
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To uns

Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Miguel,

When I started clojure and web development I faced the same questions for 
some long time. Also it took me a lot to figure out how to have the best 
developer experience (regarding web stuff).
All my findings boil down into this leiningen template: 
https://github.com/sveri/closp

It delivers

* two different environments (development and production)
* figwheel for clojurescript during development (no need to restart)
* a combination of components and ring dev environment for not having to 
restart the JVM

While figwheel delivers everything needed for cljs side it was not so easy 
for clojure development.
The trickiest part was to make the reloading of namespaces work in a web 
environment, I tried several libraries, but none gave the full experience. 
So I chose to integrate Stuart Sierras component library. 
This wayI finally gained hot code deployment where it works, templates 
reloading (selmer templates) and a manual restarting option, which I only 
need when I change compojure routes.
Manual restart does not mean to restart the server, but running a "restart" 
function which will just reload all changed namespace and pick up changed 
routes.

You might want to try it out or just look at this namespace: 
https://github.com/sveri/closp/tree/master/resources/leiningen/new/closp/clj/components
 
plus 
https://github.com/sveri/closp/blob/master/resources/leiningen/new/closp/clj/user.clj

I do all this using a command line for fighweel and cursive with a repl 
started inside cursive for the server environment.

Best Regards,
Sven

PS: It might be that the template does not compile currently, if so, you 
just have to adopt the namespace that the compiler complains about. I will 
fix that in the next version.

Am Montag, 5. Oktober 2015 12:00:37 UTC+2 schrieb Miguel Ping:
>
> Hi Guys,
>
> I've been doing some personal clj for a while, but I never quite grokked 
> the whole REPL thing. I normally use Lighttable and/or Cursive as editors, 
> I can set up breakpoints and debug the code, but for web I'd like to know 
> how seasoned developers work.
> AFAIK people fire up the repl and "do everything from there" but I still 
> don't understand some parts:
>
> - do you code functions in the repl and copy them to respective files?
> - do you edit files directly and hook them into the repl?
> - how do you set breakpoints?
> - can you do hot-replacement easily? I always see a bunch of stack traces 
> while using lein and ring with reload flags
> - is there an article or screencast explaining the "feel" of this?
>
> My current worfklow is just starting > lein ring server and developing, 
> but my general impression is that I need to restart it sometimes.
>
> As I understand it, the repl workflow is very much a lisp thing.
> Thanks!
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Erlis,

Not considering myself a seasoned developer, still I stream from time to 
time on: https://www.livecoding.tv/sveri/ 
I am always happy to talk about things and explain everything to my best 
knowledge.

Best Regards,
Sven

Am Dienstag, 6. Oktober 2015 16:18:00 UTC+2 schrieb Erlis Vidal:
>
> I think it will be very helpful to the Clojure community to have something 
> done with Videos (screencasts) ... Clojure University? somewhere we can see 
> how the more seasoned developers work. At least I won't have to discover by 
> myself, I can copy the best guys..
>
> I'll like to read whatever you write.
>
> Keep the good work. 
> Erlis 
>
> On Tue, Oct 6, 2015 at 4:41 AM, Miguel Ping  > wrote:
>
>> Thanks guys!
>>
>> For me the ideal flow would be something that would allow me to save an 
>> incoming http req (I do mostly web dev) onto some variable/def, and replay 
>> it against some code I'm writing in the repl.
>> Also I like to use step debuggers when I'm new to the language or lib, it 
>> allows me to go down the rabbit hole and see how things work. Sometimes you 
>> find some surprises!
>>
>> I think documentation on this is something that's missing on the clj 
>> community, because everyone does things a little different, but it makes it 
>> hard for beginners to get the gist of it.
>> I know some people that don't even have auto-reload on lein/ring and end 
>> up stopping/starting the jvm which is crazy because it takes a while.
>>
>> I may write something up, I would appreciate if you guys had any more 
>> suggestions, including suggestions about where to put this info.
>>
>> This is what I think it's standard practice:
>>
>> - ideally you don't restart jvm
>> - on ring, use hot-reload/auto-reload
>> - app can be started from repl
>> - ide can eval clj expressions (send it to repl)
>> - people code small bits on ide, eval it, loop on this until its working 
>> - can do this for tests also
>> - basically the whole idea is to have components built upon functional 
>> style that can be started and invoked from the repl at any layer depth
>>
>> - As for debuggers, I know some people other than Sean that dont use step 
>> debuggers at all (specially oldschool ppl), but I think its helpful for 
>> newbies
>>
>>
>> I will keep you guys updated if I ever write something. First have to 
>> learn it ;)
>>
>> On Monday, October 5, 2015 at 8:07:32 PM UTC+1, Sean Corfield wrote:
>>>
>>> Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:
>>>
>>> - do you code functions in the repl and copy them to respective files?
>>>
>>>
>>> I use Emacs/CIDER and code functions in a file, then use C-M-x to 
>>> evaluate each one into the running REPL. I usually keep the REPL in the 
>>> user namespace and require in the namespace I’m working on (C-c C-z to jump 
>>> to the REPL as needed) and then type in expressions to test functions as I 
>>> go. Later I’ll take a transcript of parts of the REPL and add them to my 
>>> unit test namespace — usually just copy’n’paste, followed by some minor 
>>> edits to turn them into Expectations format: (expect {expected} {actual}) 
>>> which means using C-M-t to swap REPL output which has:
>>>
>>> user> (some test expression)
>>> {the actual output}
>>>
>>> =>
>>>
>>> (expect {the actual output}
>>> (some test expression))
>>>
>>> Put the cursor after the prompt: user>| then M-delete, type (expect) and 
>>> slurp twice M-) then forward one s-exp C-M-f and swap C-M-t
>>>
>>> - do you edit files directly and hook them into the repl?
>>>
>>>
>>> Yes, but I don’t save them every time since I can use C-M-x to evaluate 
>>> the current form as I type.
>>>
>>> - how do you set breakpoints?
>>>
>>>
>>> I don’t bother. I’ve never liked step debuggers in any language in my 
>>> 30+ years of development :(
>>>
>>> - can you do hot-replacement easily? I always see a bunch of stack 
>>> traces while using lein and ring with reload flags
>>>
>>>
>>> If I want to hot-swap into a running process, I just start a REPL server 
>>> inside the process and connect CIDER to that, instead of starting a 
>>> standalone REPL in Emacs. I tend to use standalone REPLs only for running 
>>> Expectations anyway (where I use a slightly different workflow and keep the 
>>> REPL in the same namespace as the Expectations file (C-c M-n to swap REPL 
>>> namespaces).
>>>
>>> - is there an article or screencast explaining the "feel" of this?
>>>
>>>
>>> I don’t know, sorry.
>>>
>>> Sean
>>>
>>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Group

Re: Clojure Dev Environment

2015-10-07 Thread Erlis Vidal
Sven!

Thans for sharing!

On Wed, Oct 7, 2015 at 8:14 AM, Sven Richter  wrote:

> Hi Erlis,
>
> Not considering myself a seasoned developer, still I stream from time to
> time on: https://www.livecoding.tv/sveri/
> I am always happy to talk about things and explain everything to my best
> knowledge.
>
> Best Regards,
> Sven
>
> Am Dienstag, 6. Oktober 2015 16:18:00 UTC+2 schrieb Erlis Vidal:
>>
>> I think it will be very helpful to the Clojure community to have
>> something done with Videos (screencasts) ... Clojure University? somewhere
>> we can see how the more seasoned developers work. At least I won't have to
>> discover by myself, I can copy the best guys..
>>
>> I'll like to read whatever you write.
>>
>> Keep the good work.
>> Erlis
>>
>> On Tue, Oct 6, 2015 at 4:41 AM, Miguel Ping  wrote:
>>
>>> Thanks guys!
>>>
>>> For me the ideal flow would be something that would allow me to save an
>>> incoming http req (I do mostly web dev) onto some variable/def, and replay
>>> it against some code I'm writing in the repl.
>>> Also I like to use step debuggers when I'm new to the language or lib,
>>> it allows me to go down the rabbit hole and see how things work. Sometimes
>>> you find some surprises!
>>>
>>> I think documentation on this is something that's missing on the clj
>>> community, because everyone does things a little different, but it makes it
>>> hard for beginners to get the gist of it.
>>> I know some people that don't even have auto-reload on lein/ring and end
>>> up stopping/starting the jvm which is crazy because it takes a while.
>>>
>>> I may write something up, I would appreciate if you guys had any more
>>> suggestions, including suggestions about where to put this info.
>>>
>>> This is what I think it's standard practice:
>>>
>>> - ideally you don't restart jvm
>>> - on ring, use hot-reload/auto-reload
>>> - app can be started from repl
>>> - ide can eval clj expressions (send it to repl)
>>> - people code small bits on ide, eval it, loop on this until its working
>>> - can do this for tests also
>>> - basically the whole idea is to have components built upon functional
>>> style that can be started and invoked from the repl at any layer depth
>>>
>>> - As for debuggers, I know some people other than Sean that dont use
>>> step debuggers at all (specially oldschool ppl), but I think its helpful
>>> for newbies
>>>
>>>
>>> I will keep you guys updated if I ever write something. First have to
>>> learn it ;)
>>>
>>> On Monday, October 5, 2015 at 8:07:32 PM UTC+1, Sean Corfield wrote:

 Miguel Ping wrote on Monday, October 5, 2015 at 3:00 AM:

 - do you code functions in the repl and copy them to respective files?


 I use Emacs/CIDER and code functions in a file, then use C-M-x to
 evaluate each one into the running REPL. I usually keep the REPL in the
 user namespace and require in the namespace I’m working on (C-c C-z to jump
 to the REPL as needed) and then type in expressions to test functions as I
 go. Later I’ll take a transcript of parts of the REPL and add them to my
 unit test namespace — usually just copy’n’paste, followed by some minor
 edits to turn them into Expectations format: (expect {expected} {actual})
 which means using C-M-t to swap REPL output which has:

 user> (some test expression)
 {the actual output}

 =>

 (expect {the actual output}
 (some test expression))

 Put the cursor after the prompt: user>| then M-delete, type (expect)
 and slurp twice M-) then forward one s-exp C-M-f and swap C-M-t

 - do you edit files directly and hook them into the repl?


 Yes, but I don’t save them every time since I can use C-M-x to evaluate
 the current form as I type.

 - how do you set breakpoints?


 I don’t bother. I’ve never liked step debuggers in any language in my
 30+ years of development :(

 - can you do hot-replacement easily? I always see a bunch of stack
 traces while using lein and ring with reload flags


 If I want to hot-swap into a running process, I just start a REPL
 server inside the process and connect CIDER to that, instead of starting a
 standalone REPL in Emacs. I tend to use standalone REPLs only for running
 Expectations anyway (where I use a slightly different workflow and keep the
 REPL in the same namespace as the Expectations file (C-c M-n to swap REPL
 namespaces).

 - is there an article or screencast explaining the "feel" of this?


 I don’t know, sorry.

 Sean

 --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>> 

Re: Clojure Dev Environment

2010-02-10 Thread Laurent PETIT
2010/2/9 abaitam :
> Hi,
> There are several blog posts about setting up a development
> environment for Clojure mostly in Emacs (and on Linux or Mac and not
> Windows). Is there one place where I can find up-to-date information
> on how to create a real-world Clojure project (and using Clojure and
> Java libraries)? Do you know of someone who maintains such information
> for newbies anywhere? I can't find such information on Clojure
> website.
>
> - I tried Clojure some time ago and I like it. But I was struggling
> with Emacs at the same time.
> - I am getting an error with Enclojure  that it cannot find the jar
> files even though they are located in the prefs foloder.
> - La Clojure's plugin is not working in Idea 9.

Try Eclipse & counterclockwise:

http://vimeo.com/channels/fulldisclojure#9223070

&

http://www.youtube.com/watch?v=1T0ZjBMIQS8

& then

http://code.google.com/p/counterclockwise/wiki/Documentation#Install_Counterclockwise_plugin

HTH,

-- 
Laurent

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Dev Environment

2010-02-13 Thread Carl Smotricz
La Clojure is working fine for me. The problem seems to be simply one
of version numbering.

If you let Idea auto-download/auto-install the plugin, chances are
you'll get a plugin that specifies an Idea version number different
from the one you're running.

I downloaded the plugin by hand, found the configuration file inside
it that specifies which Idea version it's compatible with, edited that
file and copied the plugin into the Idea plugin directory.

I did this some weeks ago so I don't remember any more detail than
what I mentioned here; but it seemed simple enough at the time.

Cheating on the version numbers could possibly lead to undefined
behavior. Your mileage may vary. I found that, with fairly little
work, I got a pretty well working Clojure development environment up
and running.

Good luck!

-Carl-


On Feb 10, 3:24 pm, Laurent PETIT  wrote:

> > - La Clojure's plugin is not working in Idea 9.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Dev Environment

2010-02-13 Thread Wilson MacGyver
With the latest intelliJ 9.0.1, la clojure now just works. It's back to
click on plugins, pick "la clojure", install and restart. Done.

On Feb 13, 2010 10:40 AM, "Carl Smotricz"  wrote:

La Clojure is working fine for me. The problem seems to be simply one
of version numbering.

If you let Idea auto-download/auto-install the plugin, chances are
you'll get a plugin that specifies an Idea version number different
from the one you're running.

I downloaded the plugin by hand, found the configuration file inside
it that specifies which Idea version it's compatible with, edited that
file and copied the plugin into the Idea plugin directory.

I did this some weeks ago so I don't remember any more detail than
what I mentioned here; but it seemed simple enough at the time.

Cheating on the version numbers could possibly lead to undefined
behavior. Your mileage may vary. I found that, with fairly little
work, I got a pretty well working Clojure development environment up
and running.

Good luck!

-Carl-



On Feb 10, 3:24 pm, Laurent PETIT  wrote:

> > - La Clojure's plugin is n...

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To po...

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Dev Environment

2010-02-13 Thread Steven E. Harris
Wilson MacGyver  writes:

> With the latest intelliJ 9.0.1, la clojure now just works.

On /one/ of my computers running Windows XP, I find that the REPL
doesn't start properly. Tracing IDEA and Java through Process Monitor,
it looks as though Java's attempt to open clojure.jar fails when loaded
for the REPL, and hence it can't find the required class (clojure.main),
even though IDEA can load the same Jar file for other reasons.

It's strange and frustrating.

-- 
Steven E. Harris

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en