Re: I got to use Clojure at work today !!!

2009-03-17 Thread mac
On Mar 17, 4:54 am, Paul Mooser wrote: > I've been using clojure in a similar way at work. I run a swank server > in a separate thread inside of a running application instance, and I > can connect to it remotely using SLIME. It works pretty well! Me too, I put a swank server in a webapp and dep

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Tassilo Horn
Paul Mooser writes: Hi Paul, > I've been using clojure in a similar way at work. I run a swank server > in a separate thread inside of a running application instance, and I > can connect to it remotely using SLIME. It works pretty well! I could benefit from such an approach, too. Could you e

Re: Symbols evaluated at compile time?

2009-03-17 Thread Christophe Grand
How do you cope with type-hinted vars or macros? (ok #'declare does not work for macros neither) With autodef, one could have to either move the definition or add a declare just to be able to add a type hint. Christophe Stephen C. Gilardi a écrit : > > On Mar 16, 2009, at 6:59 PM, Elena wrot

reload modified java class

2009-03-17 Thread linh
Hello, I want to use REPL to quickly test Java code. Is it possible to reload a modified Java class in REPL? I've searched this forum for answers but haven't found any. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Symbols evaluated at compile time?

2009-03-17 Thread Elena
On Mar 17, 12:15 am, "Stephen C. Gilardi" wrote: > If *autodef-unresolved-symbols* is true, and if "a" has never been   > mentioned before, this interaction with Clojure: > >         user=> a >         java.lang.Exception: Unable to resolve symbol: a in this context > > would become: > >        

Re: swank-clojure: swank-clojure-init-files not used

2009-03-17 Thread AndrewC.
On Mar 16, 2:08 pm, David Nolen wrote: > On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn wrote: > > > > > When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting > > SLIME, htop shows that this directory is not in the -cp java option. > > Sending a SIGINT kills the clojure proces

Re: Clojure Web Framework, what I want to add

2009-03-17 Thread James Reeves
On Mar 16, 11:17 pm, BerlinBrown wrote: > After many years (decade) of web development, here are the things that > I want in a framework, mostly based in clojure: > > What do you think and what you add.  This is ambitious and just a > "ideas" of what I would add.  What would you want from your id

SLIME: evaluating forms?

2009-03-17 Thread Elena
I'm writing a Clojure source file. I thought that C-M-x (slime-eval- defun) would send the current toplevel form to the REPL but I was wrong. For instance, if I evaluate: (ns test (:import (java.net InetAddress))) from the source file and then I evaluate *ns* at the REPL, I get: # whil

Re: Symbols evaluated at compile time?

2009-03-17 Thread Michael Wood
On Tue, Mar 17, 2009 at 11:02 AM, Elena wrote: > > On Mar 17, 12:15 am, "Stephen C. Gilardi" wrote: >> If *autodef-unresolved-symbols* is true, and if "a" has never been >> mentioned before, this interaction with Clojure: >> >>         user=> a >>         java.lang.Exception: Unable to resolve s

Re: swank-clojure-extra-classpaths troubles

2009-03-17 Thread AndrewC.
> > Yes, for me having directories in `swank-clojure-extra-classpaths' > doesn't work at all.  Everything except jar files are discarded.  So > that's the general problem for me, the examples are one specific case > which bites me. Yes - here is the form the computes the default calue of slime-cl

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Elena
On Mar 17, 1:27 am, Jeffrey Straszheim wrote: > Only to do a tiny little test w/ not-deployed code.  But still: I am a > professional Clojure developer now :) > (Please don't kill my dream.) Me too ^_^ I'm writing an automated test suite for a legacy application I've been assigned. I wouldn't

Re: Symbols evaluated at compile time?

2009-03-17 Thread Elena
On Mar 17, 10:46 am, Michael Wood wrote: > I understand why people want to be able to do things like this: > > (defn b [] (a)) > (defn a [] (...)) That's what I'm asking for. > But that's completely different from the above.  The above is more like: > > (a) > (defn a [] (...)) > > Why would you

Re: Symbols evaluated at compile time?

2009-03-17 Thread Elena
On Mar 17, 11:06 am, Michael Wood wrote: > I think you have been pretty clear right up until your previous e-mail > where you implied that: > > (a) > (defn a ...) > > should warn instead of error ;) You are right, I misread the example and wrongly agreed to it. I wanted to say that entering: (

Re: Symbols evaluated at compile time?

2009-03-17 Thread Stephen C. Gilardi
On Mar 17, 2009, at 4:44 AM, Christophe Grand wrote: How do you cope with type-hinted vars or macros? (ok #'declare does not work for macros neither) With autodef, one could have to either move the definition or add a declare just to be able to add a type hint. The class of vars you're tal

Re: Improving the test suite

2009-03-17 Thread Frantisek Sodomka
Hello Phil, I see that you have your CA in already: http://clojure.org/contributing so you can start with creating issues and posting patches for them: http://code.google.com/p/clojure-contrib/issues/list Then somebody from clojure-contrib members looks at it and eventually checks it in. (Stephen

Re: Symbols evaluated at compile time?

2009-03-17 Thread Michael Wood
On Tue, Mar 17, 2009 at 1:01 PM, Elena wrote: > > On Mar 17, 10:46 am, Michael Wood wrote: >> I understand why people want to be able to do things like this: >> >> (defn b [] (a)) >> (defn a [] (...)) > > That's what I'm asking for. > >> But that's completely different from the above.  The above

Re: swank-clojure: swank-clojure-init-files not used

2009-03-17 Thread Tassilo Horn
"AndrewC." writes: > On Mar 16, 2:08 pm, David Nolen wrote: >> On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn wrote: >> >> >> >> > When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting >> > SLIME, htop shows that this directory is not in the -cp java option. >> > Sending a SIG

Re: Symbols evaluated at compile time?

2009-03-17 Thread Stephen C. Gilardi
On Mar 17, 2009, at 7:20 AM, Elena wrote: I wanted to say that entering: (defn a [] (b)) should issue a warning (and I don't think an exception is the right way to warn the user). The autodef I described would not warn, nor throw an exception in this case. I think "warn on autodef" w

Re: Clojure Web Framework, what I want to add

2009-03-17 Thread Hubert Iwaniuk
Hi Jeffrey, I was recently thinking of adding support for https://grizzly.dev.java.net/ in http://github.com/weavejester/compojure/tree/master. Just need some time to get my head around compojure. Cheers, Hubert. On Tue, Mar 17, 2009 at 12:52 AM, Jeffrey Straszheim < straszheimjeff...@gmail.com

implement "into" with reduce

2009-03-17 Thread Dex Wood
On IRC we were discussing the behavior of "into", and this lead us to dive into core.clj to look at its implementation. We discovered that it was not implemented with reduce, which would produce the same behavior, and we also discovered that implementing it with reduce may have a performance adva

Re: Symbols evaluated at compile time?

2009-03-17 Thread Rich Hickey
On Mar 16, 6:39 pm, Elena wrote: > On 16 Mar, 22:55, Meikel Brandmeyer wrote: > > > My remark was pointed at the fact, that before it was > > claimed, that the one way doesn't work in Clojure and > > one has to go the other. And then the same person > > goes on to contradict him(or her?)self.

Re: filter1 interesting?

2009-03-17 Thread Rich Hickey
On Mar 16, 3:38 pm, Stuart Sierra wrote: > On Mar 16, 8:14 am, Rich Hickey wrote: > > > Sorry to jump in late, but one problem with seek is that it is a > > homophone of seq. > > > Did anyone consider ffilter or find-first? > > I thought "find-first" was too long, since it's almost as long as

Re: Which Java book(s) to order

2009-03-17 Thread Stuart Sierra
On Mar 16, 4:35 pm, Mark Engelberg wrote: > Of course, with respect to Clojure, probably the most important thing > is to learn the Java *libraries*.  What are good books about that? The Sun Java tutorials are actually pretty good: http://java.sun.com/docs/books/tutorial/ -Stuart Sierra --~--~-

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Luc Prefontaine
It depends which SVN release you use. We pulled version 1242 and went to production with it. It's used in services running non stop 24/24 7 days a week. No crashes, no glitches, ... That's before the lazy branch became the base for all future developments. Of course we were expecting some changes

Re: Clojure Web Framework, what I want to add

2009-03-17 Thread Jeffrey Straszheim
I hadn't heard of Grizzly before. Thanks for the pointer (er..., reference, or whatever we're calling them these days). On Tue, Mar 17, 2009 at 5:31 AM, Hubert Iwaniuk wrote: > Hi Jeffrey, > I was recently thinking of adding support for > https://grizzly.dev.java.net/ in > http://github.com/wea

Re: Symbols evaluated at compile time?

2009-03-17 Thread Laurent PETIT
Hello Rich, 2009/3/17 Rich Hickey > I remain opposed, and here are some more reasons: > > when you say > > (def foo [x] > (bar x 42)) > > you are as likely to be referring to a forgot-to-require bar-lib as > you are to a to-be-defined bar. > > The compiler can only default the latter, by intern

Re: SLIME: evaluating forms?

2009-03-17 Thread Shawn Hoover
On Tue, Mar 17, 2009 at 6:40 AM, Elena wrote: > > I'm writing a Clojure source file. I thought that C-M-x (slime-eval- > defun) would send the current toplevel form to the REPL but I was > wrong. For instance, if I evaluate: > > (ns test >(:import (java.net InetAddress))) > > from the sou

Re: Behavior of 'empty'

2009-03-17 Thread Rich Hickey
On Mar 16, 7:13 pm, Mark Engelberg wrote: > On Mon, Mar 16, 2009 at 3:54 PM, Frantisek Sodomka wrote: > > (empty (seq [1 2])) => nil > > Now that there is the concept of empty sequences, maybe this should > actually return an empty sequence, such as (). Yes. I've made (empty aseq) -> (), (emp

Producing HTML

2009-03-17 Thread Jeffrey Straszheim
Is there a good standalone library to create HTML from Clojure, preferably something like the CL-WHO? This will be for a standalone application, not an application server. I just need to generate some populated HTML and put it in to a file. Thanks. --~--~-~--~~~---~-

Re: Request Feedback on Clojure Blog Article

2009-03-17 Thread Timothy Pratley
I have another question! I've found your article very interesting. I really like how you have buttons and keybindings to the same AbstractAction. However when I run your app if I press ctrl-x while in a textbox nothing happens... If I'm not in a textbox it exits. I believe this is because the text

Clojure STM and deadlocks

2009-03-17 Thread Mark Volkmann
Is there a summary somewhere of the steps Clojure STM takes to avoid deadlocks? I'm just trying to understand the basics of what, if anything, it does to avoid them. -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ You received this message becaus

Re: implement "into" with reduce

2009-03-17 Thread Rich Hickey
On Mar 16, 7:58 pm, Dex Wood wrote: > On IRC we were discussing the behavior of "into", and this lead us to > dive into core.clj to look at its implementation. We discovered that > it was not implemented with reduce, which would produce the same > behavior, and we also discovered that implemen

Re: Clojure STM and deadlocks

2009-03-17 Thread Jeffrey Straszheim
The code isn't too hard to follow, 'cept the barging stuff gets a bit tricky. A nice 10,000 foot overview would be nice, however. On Tue, Mar 17, 2009 at 8:04 AM, Mark Volkmann wrote: > > Is there a summary somewhere of the steps Clojure STM takes to avoid > deadlocks? I'm just trying to underst

Re: Producing HTML

2009-03-17 Thread Timothy Pratley
I can highly recommend clojure.contrib.prxml James Reeves gave a really good example in the 2nd last post of this thread: http://groups.google.com/group/clojure/browse_thread/thread/f35d01a859329409 I've used it to output html to a file and found it very convenient: http://clojure.googlegroups.c

Clojure 1, PHP 0

2009-03-17 Thread Onorio Catenacci
Hi all, I thought this article might present some ideas of interest to everyone. Originally found via HackerNews. -- Onorio Catenacci III It is the greatest of all mistakes to do nothing because you can only do a little. -Sydney Smith, writer and

Re: Producing HTML

2009-03-17 Thread Jeffrey Straszheim
Awesome! Thanks. On Tue, Mar 17, 2009 at 8:08 AM, Timothy Pratley wrote: > > I can highly recommend clojure.contrib.prxml > > James Reeves gave a really good example in the 2nd last post of this > thread: > > http://groups.google.com/group/clojure/browse_thread/thread/f35d01a859329409 > > I've us

Re: Behavior of 'empty'

2009-03-17 Thread Frantisek Sodomka
And what about lazy sequences? Is this behavior correct? user=> (lazy-seq ()) () user=> (empty (lazy-seq ())) nil user=> (empty (lazy-seq [])) nil user=> (lazy-seq [1 2]) (1 2) user=> (empty (lazy-seq [1 2])) nil Thank you, Frantisek On 17 Bře, 13:54, Rich Hickey wrote: > On Mar 16, 7:13 pm,

Re: Improving the test suite

2009-03-17 Thread Shawn Hoover
On Tue, Mar 17, 2009 at 12:03 AM, Phil Hagelberg wrote: > > > OK, so I've posted a fair amount of "smack talk" about test suites and > how important they are--I figure it's time to help out. > > What are some ways in which test-clojure is lacking? How can I help > improve the coverage? > > -Phil

Re: swank-clojure: swank-clojure-init-files not used

2009-03-17 Thread AndrewC.
On Mar 17, 11:10 am, Tassilo Horn wrote: > "AndrewC." writes: > > The other problem is that it uses add-to-list so if you reload slime > > to refresh the value of slime-lisp-implementations, you end up with > > two clojure entries in the list. > > Why do you think?  add-to-list adds only if

Re: Behavior of 'empty'

2009-03-17 Thread Rich Hickey
On Mar 17, 2009, at 9:18 AM, Frantisek Sodomka wrote: > > And what about lazy sequences? Is this behavior correct? > > user=> (lazy-seq ()) > () > user=> (empty (lazy-seq ())) > nil > user=> (empty (lazy-seq [])) > nil > > user=> (lazy-seq [1 2]) > (1 2) > user=> (empty (lazy-seq [1 2])) > nil >

Re: SLIME: evaluating forms?

2009-03-17 Thread Elena
On Mar 17, 12:51 pm, Shawn Hoover wrote: > If you want to set the REPL package from your .clj > buffer, use C-c M-p (slime-repl-set-package). That worked, thanks. For newbies, I'll add that slime-repl-set-package is in a slime contribution not available by default, so you'll have to add the sli

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Elena
On Mar 17, 12:43 pm, Luc Prefontaine wrote: > It depends which SVN release you use. We pulled version 1242 and went to > production with it. > It's used in services running non stop 24/24 7 days a week. No crashes, > no glitches, ... I didn't mean I don't trust the current runtime. I was referri

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Luc Prefontaine
Sometimes I feel lucky to be able to take my own decisions and turn our development strategy on a dime :. My partners rely on me for these decisions and we never regretted one so far. 1.0 should not be too far away so your waiting is near it's end... :))) Luc On Tue, 2009-03-17 at 07:23 -070

Re: android app development with clojure

2009-03-17 Thread Remco van 't Veer
Sorry, missed your message. See: http://github.com/remvee/clojurehelloandroid/ for a hello world example. On Thu, Mar 12, 2009 at 3:04 PM, rob wrote: > > Ok, duh, somehow didn't catch that this link was the code I was > wondering about: > > http://github.com/remvee/clojure/tree/master/ > >

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Paul Mooser
It's actually fairly straightforward. In my (ordinary java) application, I create a thread which loads a clojure program passed on the command line (I don't have the source in front of me, but if you need it, I can give you a hand), and that program typically contains something like the following:

Re: Request Feedback on Clojure Blog Article

2009-03-17 Thread Timothy Pratley
I found one way to make 'global hotkeys' (its a bit verbose though): http://groups.google.com/group/clojure/web/global-hotkey.clj adapted from http://www.javaspecialists.eu/archive/Issue007.html Just mentioning it for interest seeing key controls in swing has been driving me nuts :P Regards, Tim.

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Tassilo Horn
Paul Mooser writes: Hi Paul, > It's actually fairly straightforward. In my (ordinary java) > application, I create a thread which loads a clojure program passed on > the command line (I don't have the source in front of me, but if you > need it, I can give you a hand), That would be great. >

Issue 34

2009-03-17 Thread Joshua
I think I have a fix for Issue 34 (Disable EvalReader with a *read- eval* flag). I added the *read-eval* variable and also created a dispatch reader that sets the value at read time. Let me know any comments. Joshua ### Eclipse Workspace Patch 1.0 #P Clojure Index: src/jvm/clojure/lang/RT.java

Re: Issue 34

2009-03-17 Thread Joshua
Sample syntax is: #r() #r(eval (def x 3)) works fine #r(#=(eval (def x 3))) will throw an exception Joshua --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: reload modified java class

2009-03-17 Thread Meikel Brandmeyer
Hi, Am 17.03.2009 um 09:46 schrieb linh: I want to use REPL to quickly test Java code. Is it possible to reload a modified Java class in REPL? I've searched this forum for answers but haven't found any. I'm not a Java expert, but I get that this is difficult. Maybe Java Rebel could help you h

Re: Issue 34

2009-03-17 Thread Joshua
Updated the patch based on comments from rhickey. New sample syntax is: (binding [*read-eval* false] (read-string "#=(eval (def x 3))" )) throws an Exception Joshua ### Eclipse Workspace Patch 1.0 #P Clojure Index: src/clj/clojure/core.clj ===

Reading decimal numbers (doubles)

2009-03-17 Thread Frantisek Sodomka
Hello Rich & all! I have question about the reader http://clojure.org/reader Numbers say "as per Java". I found that e.g. "2." reads Java as double and Clojure as int. All these read as double in Java: 2. .1 +.0 -.0 +2. -2. Clojure either sees them as ints or errors out. I am wondering abou

Printing, Reading, and Serializing (+ bug?)

2009-03-17 Thread Jason Wolfe
Does anyone have suggestions on the best way to store Clojure objects to a file and later read them back in? The obvious option would be to use the build-in printer and reader. One limitation here, which I'm OK with for now, is that this doesn't work for arbitrary serializable objects (which migh

Re: Printing, Reading, and Serializing (+ bug?)

2009-03-17 Thread Phil Hagelberg
Jason Wolfe writes: > Finally, has anyone tried printing something with closures in it, and > then reading it back in another JVM instance? Closures are dependent upon their lexical environment. While you can serialize the code they contain, you can't serialize their whole lexical environment,

Re: Clojure STM and deadlocks

2009-03-17 Thread Mark Volkmann
On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim wrote: > The code isn't too hard to follow, 'cept the barging stuff gets a bit > tricky.  A nice 10,000 foot overview would be nice, however. > > On Tue, Mar 17, 2009 at 8:04 AM, Mark Volkmann > wrote: >> >> Is there a summary somewhere of the

Re: Clojure STM and deadlocks

2009-03-17 Thread Rich Hickey
On Mar 17, 2:32 pm, Mark Volkmann wrote: > On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim > > wrote: > > The code isn't too hard to follow, 'cept the barging stuff gets a bit > > tricky. A nice 10,000 foot overview would be nice, however. > > > On Tue, Mar 17, 2009 at 8:04 AM, Mark Volkm

Re: Printing, Reading, and Serializing (+ bug?)

2009-03-17 Thread MikeM
I've used print-dup and read for saving and restoring data and it worked well for me once I defined the needed print-dup methods. Since you said it's ok for you to read your struct back in as a hash map, you can do the following: (defmethod print-dup clojure.lang.PersistentStructMap [o w] (print

Re: I got to use Clojure at work today !!!

2009-03-17 Thread Victor Rodriguez
On Tue, Mar 17, 2009 at 12:21 PM, Tassilo Horn wrote: > > Paul  Mooser writes: > > Hi Paul, > >> It's actually fairly straightforward. In my (ordinary java) Take a look at this blog post: http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html I think you will find it useful

Re: reload modified java class

2009-03-17 Thread Stuart Sierra
On Mar 17, 4:46 am, linh wrote: > Is it possible to reload a modified Java class in REPL? You could write a custom ClassLoader to load (and then reload) your Java classes. Not impossible, but not trivial. -Stuart Sierra --~--~-~--~~~---~--~~ You received this me

Re: Clojure STM and deadlocks

2009-03-17 Thread Mark Volkmann
On Tue, Mar 17, 2009 at 1:41 PM, Rich Hickey wrote: > > On Mar 17, 2:32 pm, Mark Volkmann wrote: >> On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim >> >> wrote: >> > The code isn't too hard to follow, 'cept the barging stuff gets a bit >> > tricky.  A nice 10,000 foot overview would be nice

Starting Swank from Java (was: I got to use Clojure at work today !!!)

2009-03-17 Thread Tassilo Horn
Victor Rodriguez writes: Hi Victor, > Take a look at this blog post: > http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html > > I think you will find it useful. Cool, but I had to modify it a bit to get it working: --8<---cut here---start-

Re: reload modified java class

2009-03-17 Thread linh
Well I was hoping that someone with more time and skills than me already did that. Thanks for the answers. On Mar 17, 8:14 pm, Stuart Sierra wrote: > On Mar 17, 4:46 am, linh wrote: > > > Is it possible to reload a modified Java class in REPL? > > You could write a custom ClassLoader to load (a

Re: Clojure STM and deadlocks

2009-03-17 Thread Rich Hickey
On Mar 17, 3:21 pm, Mark Volkmann wrote: > On Tue, Mar 17, 2009 at 1:41 PM, Rich Hickey wrote: > > > On Mar 17, 2:32 pm, Mark Volkmann wrote: > >> On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim > > >> wrote: > >> > The code isn't too hard to follow, 'cept the barging stuff gets a bit >

Re: Producing HTML

2009-03-17 Thread atreyu
Maybe Clojure-Haml helps you http://github.com/antoniogarrote/clj-haml/tree/master On 17 mar, 14:01, Jeffrey Straszheim wrote: > Is there a good standalone library to create HTML from Clojure, preferably > something like the CL-WHO?  This will be for a standalone application, not > an applicatio

Re: Clojure STM and deadlocks

2009-03-17 Thread Mark Volkmann
On Tue, Mar 17, 2009 at 3:21 PM, Rich Hickey wrote: > > On Mar 17, 3:21 pm, Mark Volkmann wrote: >> On Tue, Mar 17, 2009 at 1:41 PM, Rich Hickey wrote: >> >> > On Mar 17, 2:32 pm, Mark Volkmann wrote: >> >> On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim >> >> >> wrote: >> >> > The code i

Small rand-int suggestion

2009-03-17 Thread James Reeves
A quick suggestion about rand-int. It would be useful if you could supply it with a second argument to give a random integer over a range. For example, (rand-int 5 10) to give a random integer between 5 (inclusive) and 10 (exclusive): ==

Re: Clojure STM and deadlocks

2009-03-17 Thread Luc Prefontaine
Do we have to know how Oracle deals with concurrency issues internally in a specific application transaction when coding a database centric application ?!?!?! Most of the time, you do not really care about these things. You stick to a few minimal rules and that's it. These rules vary a bit dependi

Re: Symbols evaluated at compile time?

2009-03-17 Thread Laurent PETIT
2009/3/17 Stephen C. Gilardi > > On Mar 16, 2009, at 8:25 PM, Laurent PETIT wrote: > > Hi Laurent, > > Your solution is indeed close to what I had in mind in terms of >> requirements. I was currently hacking with clojure java class Compiler to >> enhance Timothy's patch and add a variation on wh

Re: reload modified java class

2009-03-17 Thread Laurent PETIT
If you don't have a preferred environment right now, or if your preferred environment is already Eclipse, you could try installing clojuredev. It provides a REPL on the standard java process console. This console can be started either in "Run" or "Debug" mode, so the reloading of java classes is d

Unit Testing Macros

2009-03-17 Thread Sean
Hey everyone, I'm writing a macro library for myself, and I'm thinking about publishing it. Before I do so, I'd like to write & run some unit tests for it. I was hoping the crowd could chime in on how they test macros. Any links & examples would be great. Thanks! --~--~-~--~--

Re: filter1 interesting?

2009-03-17 Thread Stuart Sierra
On Mar 16, 8:14 am, Rich Hickey wrote: > Did anyone consider ffilter or find-first? I've changed it to find-first in seq-utils. That seems to be the least objectionable name, all things considered, and has the virtue of being easy to remember. -Stuart Sierra --~--~-~--~~---

Re: Symbols evaluated at compile time?

2009-03-17 Thread Stephen C. Gilardi
On Mar 17, 2009, at 5:52 PM, Laurent PETIT wrote: I give up on this one. I've now been half convinced that it's even less an ideal solution than I expected at first, and I prefer use the little free time I have to enhance clojuredev. Sounds good. Thanks for closing the loop on this. --Ste

Re: Clojure STM and deadlocks

2009-03-17 Thread camponoblanco
On 17 mar, 14:04, Mark Volkmann wrote: > Is there a summary somewhere of the steps Clojure STM takes to avoid > deadlocks? I'm just trying to understand the basics of what, if > anything, it does to avoid them. > > -- > R. Mark Volkmann > Object Computing, Inc. Perhaps this can be interesting:

Re: Symbols evaluated at compile time?

2009-03-17 Thread Elena
On 17 Mar, 13:23, Rich Hickey wrote: > I remain opposed, and here are some more reasons: > > when you say > > (def foo [x] >   (bar x 42)) > > you are as likely to be referring to a forgot-to-require bar-lib as > you are to a to-be-defined bar. > > The compiler can only default the latter, by int

Re: Symbols evaluated at compile time?

2009-03-17 Thread Elena
And of course, if somebody agrees that is a worth proposal and could provide some directions, I'm here ready to churn out some code. Here in Italy we say "Help yourself and God will help you along the way" ^_^ Did I mention I'm Italian? I bet you guessed it already since I talk too much for sure

Re: filter1 interesting?

2009-03-17 Thread e
> > > Another way to look at it - people are always asking for sequential > versions of find/contains?, so seq-find, seq-contains? Both would take > predicates instead of keys, and do sequential lookup. > those discussions are what made me think of 'get'. (seq-get ...) or your names is starting t

Re: filter1 interesting?

2009-03-17 Thread Paul Mooser
I think I prefer find-first as well, rather than ffilter. I worry that ffilter isn't clear enough, and reads too similarly to filter. On Mar 16, 7:51 am, Laurent PETIT wrote: > Just to make me more enemies ;-), I would prefer, on the other hand, > find-first over ffirst (I'm not that nostalgic o

Re: Unit Testing Macros

2009-03-17 Thread Cosmin Stejerean
On Tue, Mar 17, 2009 at 5:06 PM, Sean wrote: > > Hey everyone, > I'm writing a macro library for myself, and I'm thinking about > publishing it. Before I do so, I'd like to write & run some unit > tests for it. I was hoping the crowd could chime in on how they test > macros. Any links & ex

Re: filter1 interesting?

2009-03-17 Thread Vagif Verdi
The power of functional programming is in small number of orthogonal functions. I'm afraid all these combination functions will quickly transform clojure into php. Besides it introduces several ways to do the same thing - more confusion (especially to newbies). Instead of littering the language wi