Re: slime warn-on-reflection?

2011-02-25 Thread Takahiro Hozumi
I had same problem. Add following line in your project.cjj. :warn-on-reflection true On Feb 26, 9:11 am, Seth wrote: > Has any gotten the warn-on-reflection to work in slime when compiling > a buffer?  Warning occur when i paste a function into the repl, but no > reflections occur when i compile

Re: easier exit

2011-02-25 Thread Ken Wesson
On Fri, Feb 25, 2011 at 10:04 PM, .Bill Smith wrote: > If you are running any non-daemon threads, even System.exit won't cause the > JVM to shut down. I'm pretty sure it will. Falling off the end of main won't and closing all GUI windows won't, but System/exit is supposed to kill the VM reliably.

Re: easier exit

2011-02-25 Thread Ken Wesson
On Fri, Feb 25, 2011 at 9:39 PM, Alan wrote: > On Feb 25, 6:21 pm, Ken Wesson wrote: >> On Fri, Feb 25, 2011 at 11:21 AM, Michael Wood wrote: >> > Would this help? >> >> > user=> (def exit "Use Ctrl-C to exit") >> > #'user/exit >> > user=> exit >> > "Use Ctrl-C to exit" >> > user=> >> >> Why sto

Re: easier exit

2011-02-25 Thread .Bill Smith
If you are running any non-daemon threads, even System.exit won't cause the JVM to shut down. Whereas as Michael Wood pointed out, there are various control sequences that do the trick reliably. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: easier exit

2011-02-25 Thread Alan
On Feb 25, 6:21 pm, Ken Wesson wrote: > On Fri, Feb 25, 2011 at 11:21 AM, Michael Wood wrote: > > Would this help? > > > user=> (def exit "Use Ctrl-C to exit") > > #'user/exit > > user=> exit > > "Use Ctrl-C to exit" > > user=> > > Why stop there? > > (defn exit [] (System/exit 0)) But then the

Re: type hinting record types?

2011-02-25 Thread Ken Wesson
On Fri, Feb 25, 2011 at 8:26 PM, Seth wrote: > Notice that this occurs even if i dont redefine record A - if i do > (require :reload-all 'my-namespace), any old record object will now > fail with type hinted functions. Reloading replaces A with a new instance of the A class. These are not the sam

Re: easier exit

2011-02-25 Thread Ken Wesson
On Fri, Feb 25, 2011 at 11:21 AM, Michael Wood wrote: > Would this help? > > user=> (def exit "Use Ctrl-C to exit") > #'user/exit > user=> exit > "Use Ctrl-C to exit" > user=> Why stop there? (defn exit [] (System/exit 0)) -- You received this message because you are subscribed to the Google G

Re: Serialising functions...

2011-02-25 Thread Ken Wesson
Embedding literal functions in macros "sorta" works. It behaves glitchy sometimes, especially if the functions are closures. If your set of functions is not open-ended, I'd suggest simply defn'ing all of them at both client and server sides, sticking them in a map, and putting a keyword instead of

Re: type hinting record types?

2011-02-25 Thread Seth
Notice that this occurs even if i dont redefine record A - if i do (require :reload-all 'my-namespace), any old record object will now fail with type hinted functions. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

type hinting record types?

2011-02-25 Thread Seth
Ive recently started type hinting - however, when I have a record of, lets say type A, and then i change the definition of record A, all functions which have type hinted A now fail when i pass in the old A records that i have already defined (cannot cast from type A to type A is the error message

slime warn-on-reflection?

2011-02-25 Thread Seth
Has any gotten the warn-on-reflection to work in slime when compiling a buffer? Warning occur when i paste a function into the repl, but no reflections occur when i compile a buffer or when i load the file. -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: better error messages > smaller stack traces

2011-02-25 Thread Stuart Halloway
> Here's one: > > user=> {:a 1 :b} > # > > Instead how about a parse error exception that specifically says > something like, "Map literal requires an even number of forms." > > Thanks, > Jeff Fixed in master today: http://dev.clojure.org/jira/browse/CLJ-742 Thanks! Stu -- You received this

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread James Reeves
Added Clojush and WabbitMQ. - James -- 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

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread Wilson MacGyver
I like to suggest clj-json https://github.com/mmcgrana/clj-json a fast JSON encoder/decoder that uses jackson. clojuresque https://bitbucket.org/kotarak/clojuresque/src clojure plugin for gradle (a very good build system) clj-time https://github.com/getwoven/clj-time clojure binding for jodatime

Re: assert, illegal arguments, pre-conditions

2011-02-25 Thread Armando Blancas
IMO any decent product should at least fail gracefully and for that you must have some place at the top catching throwables, even if you can't recover. So w.r.t. the javadoc in java.lang.Error where it says "[a] reasonable application should not try to catch." I interpret it as justification for th

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread Avram
> Sure, you just need to point me toward machine learning projects > written in Clojure. Take a look at infer: https://github.com/getwoven/infer -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread James Reeves
On 25 February 2011 19:57, Paul deGrandis wrote: > James, this is awesome stuff! > > I don't want to crowd up the space, but I'd love to see a section for > Machine Learning projects (and perhaps lump nlp and collective > intelligence into that).  I also think screen-scraping would be worth > cons

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread Lee Spector
On Feb 25, 2011, at 2:57 PM, Paul deGrandis wrote: > I don't want to crowd up the space, but I'd love to see a section for > Machine Learning projects (and perhaps lump nlp and collective > intelligence into that). I also think screen-scraping would be worth > considering. If there's a machine l

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread Paul deGrandis
James, this is awesome stuff! I don't want to crowd up the space, but I'd love to see a section for Machine Learning projects (and perhaps lump nlp and collective intelligence into that). I also think screen-scraping would be worth considering. Paul On Feb 25, 10:38 am, Allen Johnson wrote: >

Re: assert, illegal arguments, pre-conditions

2011-02-25 Thread .Bill Smith
In the Java world, examples of an Error classare LinkageError (indicates that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class), NoCl

Re: ANN: Clojure Toolbox (Early Beta)

2011-02-25 Thread Allen Johnson
> I'm sure I've covered only a very small proportion of Clojure > libraries out there, so if you'd like to suggest a project that's not > on there, please do so in this thread, or in an email to me. I'll try > and update the site as quickly as possible. How about: Messaging > WabbitMQ https://git

Re: assert, illegal arguments, pre-conditions

2011-02-25 Thread Fogus
> I want to gather some feedback on how others are dealing with the > issue of pre-conditions raising AssertionError instead of > IllegalArgumentException, whereas the general practice is to catch AssertionError and IllegalArgumentException are meant for entirely different conditions. That is, yo

Re: java.lang.Exception: transaction rolled back: java.lang.InterruptedException

2011-02-25 Thread clj123
If I'm running only one thread in my application, do you know which other thread is trying to interrupt the main thread? On Feb 24, 6:35 pm, Shantanu Kumar wrote: > If it is about Thread/sleep, you can perhaps use something like this: > > (defn sleep >   [n] >   (try (Thread/sleep n) >     (catch

Re: assert, illegal arguments, pre-conditions

2011-02-25 Thread Armando Blancas
I always catch Throwable at any user-facing layer, and don't catch IllegalArgumentException anywhere so it'll get caught and logged as a coding error at the top. I'm not currently using preconditions but either way will work for me. On Feb 25, 4:57 am, Shantanu Kumar wrote: > Hi, > > I want to ga

Re: easier exit

2011-02-25 Thread Stuart Halloway
> Hello all. A bit new to clojure here. Anyway I found it a bit > difficult to exit from a REPL. > Would a patch to make it give instructions (like Python's > > C:\>c:\installs\Python26\python.exe exit > Use exit() or Ctrl-Z plus Return to exit > > ) > > like that have a chance to be

Re: easier exit

2011-02-25 Thread Michael Wood
On 25 February 2011 17:35, Armando Blancas wrote: > Using jline you can exit with ctrl-d. This is from the clojure web > site in Getting Started: > > The REPL has very rudimentary editing. For a better experience, try > running it via the JLine ConsoleRunner: > java -cp jline-0_9_5.jar:clojure.jar

Re: transaction rolled back: java.lang.InterruptedException

2011-02-25 Thread Saul Hazledine
On Feb 25, 12:28 am, clj123 wrote: > I've tried saving a much smaller number of rows and I'm still getting > this exception. > > I also tried processing the rows (without saving to database) and put > a Thread sleep. That also generated this exception. > Here are some more guesses if you haven't

Re: assert, illegal arguments, pre-conditions

2011-02-25 Thread Chas Emerick
On Feb 25, 2011, at 7:57 AM, Shantanu Kumar wrote: > Hi, > > I want to gather some feedback on how others are dealing with the > issue of pre-conditions raising AssertionError instead of > IllegalArgumentException, whereas the general practice is to catch > java.lang.Exception at the user-facing

Serialising functions...

2011-02-25 Thread Jules
Imagine I started with e.g. (defrecord Widget [^Integer id ^Integer version ^Integer amount]) but, whilst using records as my underlying datatype, I needed to hold more metadata than a record definition allows - so I expanded defrecord into e.g.: (deftable;; a table of Widgets widg

Re: easier exit

2011-02-25 Thread Armando Blancas
Using jline you can exit with ctrl-d. This is from the clojure web site in Getting Started: The REPL has very rudimentary editing. For a better experience, try running it via the JLine ConsoleRunner: java -cp jline-0_9_5.jar:clojure.jar jline.ConsoleRunner clojure.main On Feb 24, 4:38 pm, rogerdp

assert, illegal arguments, pre-conditions

2011-02-25 Thread Shantanu Kumar
Hi, I want to gather some feedback on how others are dealing with the issue of pre-conditions raising AssertionError instead of IllegalArgumentException, whereas the general practice is to catch java.lang.Exception at the user-facing web layer. It would be pretty embarrassing for a website to expo