Re: Stepping, debugging in REPL

2010-07-14 Thread Meikel Brandmeyer
Hi, On Jul 13, 10:24 am, Adam Schmideg wrote: > I just made this debugger.  It works but is still a bit rough around > the edges.  I'd be happy to hear your > feedback.http://code.google.com/p/taskberry/wiki/Stepl While the whole idea sounds nice, I have trouble getting it to work. It seems it

Evaluated or not -- unquote in syntax-quote/backquote

2010-07-14 Thread Yang Dong
Hi, all It seems Lisp macro expander will not evalute the argument prefixed by unquote. The following code, written in Common Lisp, is an excerpt from `On Lisp'. This macro implemented `let'. 1. (defmacro our-let (binds &body body) 2. ‘((lambda ,(mapcar #’(lambda (x) 3.

Re: Evaluated or not -- unquote in syntax-quote/backquote

2010-07-14 Thread Meikel Brandmeyer
Hi, On Jul 14, 4:30 am, Yang Dong wrote: > `body' on the 5th line is not evaluted when the macro got expanded, > but the `mapcar' on the 2nd line is evaluated. No. Both are evaluated when the macro is expanded. body evaluates to whatever is bound to the argument. (our-let [...] (this) (is the)

Building mixed clojure and java code

2010-07-14 Thread Martin DeMello
What are people using to build mixed clojure/java code? Currently just using lein {uber,}jar to build and distribute. martin -- 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

Re: ANN: Deview - Better test results

2010-07-14 Thread Paul Stadig
On Wed, Jul 14, 2010 at 2:11 AM, Heinz N. Gies wrote: > > On Jul 14, 2010, at 6:40 , Phil Hagelberg wrote: > > > This is really cool! > > > > Unfortunately since I spend all my time in the terminal, (for remote > > pairing) I can't really use a web-based interface like this for normal > > work. D

Re: Building mixed clojure and java code

2010-07-14 Thread Martin DeMello
On Wed, Jul 14, 2010 at 6:45 PM, Martin DeMello wrote: > What are people using to build mixed clojure/java code? Currently just > using lein {uber,}jar to build and distribute. Hit send too soon - I meant to say, currently my project is just clojure, and lein works very nicely to package it. If I

Re: Building mixed clojure and java code

2010-07-14 Thread Moritz Ulrich
There is lein-javac which integrates javac into the leiningen build-flow: http://github.com/antoniogarrote/lein-javac On Wed, Jul 14, 2010 at 3:16 PM, Martin DeMello wrote: > On Wed, Jul 14, 2010 at 6:45 PM, Martin DeMello > wrote: >> What are people using to build mixed clojure/java code? Curr

Re: Building mixed clojure and java code

2010-07-14 Thread Martin DeMello
On Wed, Jul 14, 2010 at 6:49 PM, Moritz Ulrich wrote: > There is lein-javac which integrates javac into the leiningen > build-flow: http://github.com/antoniogarrote/lein-javac Excellent, thanks :) martin -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Building mixed clojure and java code

2010-07-14 Thread Peter Schuller
> Hit send too soon - I meant to say, currently my project is just > clojure, and lein works very nicely to package it. If I wanted to > include some java sources, what would the easiest way to build the > combined project be? Other than leiningen with lein-javac as mention, there is maven. I am m

Re: Building mixed clojure and java code

2010-07-14 Thread Meikel Brandmeyer
Hi, On Jul 14, 3:16 pm, Martin DeMello wrote: > Hit send too soon - I meant to say, currently my project is just > clojure, and lein works very nicely to package it. If I wanted to > include some java sources, what would the easiest way to build the > combined project be? For the case files: th

ANN: Async Http Client for Clojure aka ahc-clj

2010-07-14 Thread Hubert Iwaniuk
Hi * Just release first version of Async Http Client for Clojure. http://clojars.org/ahc-clj This is async http client that is backed by Async Http Client http://bit.ly/aUctdM which by default runs on top of Netty. General documentation on project is available here: http://neotyk.github.com/ah

Re: Building mixed clojure and java code

2010-07-14 Thread Wilson MacGyver
We use gradle and clojuresque to do this. Our code has java, groovy And clojure. It works very well for us. On Wednesday, July 14, 2010, Martin DeMello wrote: > What are people using to build mixed clojure/java code? Currently just > using lein {uber,}jar to build and distribute. > > martin > > -

Clojure 1.2 Beta 1

2010-07-14 Thread Stuart Halloway
Clojure 1.2 Beta 1 is now available, along with a corresponding Clojure Contrib, at: http://clojure.org/downloads It contains significant new features, as well as many bug fixes and small enhancements. A larger number of contributors than ever before have pitched in. You can see an ove

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Sean Devlin
Congrats! On Jul 14, 11:03 am, Stuart Halloway wrote: > Clojure 1.2 Beta 1 is now available, along with a corresponding Clojure > Contrib, at: > >        http://clojure.org/downloads > > It contains significant new features, as well as many bug fixes and small > enhancements. A larger number of

Re: Clojure 1.2 Beta 1

2010-07-14 Thread David Nolen
Congrats! It's an incredible update. On Wed, Jul 14, 2010 at 11:03 AM, Stuart Halloway wrote: > Clojure 1.2 Beta 1 is now available, along with a corresponding Clojure > Contrib, at: > >http://clojure.org/downloads > > It contains significant new features, as well as many bug fixes and s

Suggestions for a &file and &line implicit argument in macros

2010-07-14 Thread Nicolas Oury
Dear all, I am using a lot of macros with a quite complex syntax and I would like to be able to report error nicely. I haven't been able to find a way to report the file and (most importantly) the line of the macro whose evaluation produce an error. Have I missed some way of doing that? Would tw

Strange Loop conference (now w/ Clojure!)

2010-07-14 Thread Alex Miller
Hello all, I'm the organizer for the Strange Loop conference and also a full-time Clojure programmer. I have just released the full schedule for the 2010 conference which is Oct 14-15th in St. Louis, $150 early bird till Aug 6th. I wanted to drop a special note here as I included many Clojure ta

Clojure REPL prompt Java applet

2010-07-14 Thread Paul Richards
Does there exist a Java applet on the web which just presents an interactive Clojure REPL prompt? It would be a nice way to tinker with Clojure without downloading or installing anything. -- Paul Richards @pauldoo -- You received this message because you are subscribed to the Google Groups "C

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Frederick Polgardy
Awesome! Looks great. What branch/tag of clojure-contrib is the clojure-contrib-1.2.0- beta1.zip download built from? I don't see it under branches, and master builds clojure-contrib-1.2.0-SNAPSHOT.jar. Thanks. On Jul 14, 10:03 am, Stuart Halloway wrote: > Clojure 1.2 Beta 1 is now available, a

clojure.contrib.sql does not protect table names?

2010-07-14 Thread Tim McCormack
It looks like all the clojure.contrib.sql functions that interact with tables fail to wrap table names in backticks. As a result, any table names that are reserved words (like "order") or contain non- alphanumeric characters (like "foo-bar") will cause SQL errors: (require '[clojure.contrib.sql :a

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Peter Schuller
Hugely appreciated! -- / Peter Schuller -- 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 unsubs

Re: Clojure REPL prompt Java applet

2010-07-14 Thread Wilson MacGyver
there is already http://www.try-clojure.org though it's not an applet. On Wed, Jul 14, 2010 at 11:26 AM, Paul Richards wrote: > Does there exist a Java applet on the web which just presents an > interactive Clojure REPL prompt? > > It would be a nice way to tinker with Clojure without downloading

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Stuart Halloway
Just pushed, sorry. > Awesome! Looks great. > > What branch/tag of clojure-contrib is the clojure-contrib-1.2.0- > beta1.zip download built from? I don't see it under branches, and > master builds clojure-contrib-1.2.0-SNAPSHOT.jar. > > Thanks. > > On Jul 14, 10:03 am, Stuart Halloway > wrote:

Re: Clojure-based scientific paper!

2010-07-14 Thread Carson
Congrats! On Jul 13, 11:56 pm, bOR_ wrote: > Hi all, > > My first paper with results based on a clojure-build agent-based model > is in press! If you have academic access to the journal, you can peek > at it here:http://dx.doi.org/10.1016/j.epidem.2010.05.003, but > otherwise it is also available

Re: clojure.contrib.sql does not protect table names?

2010-07-14 Thread Paul Moore
On 14 July 2010 16:21, Tim McCormack wrote: > Is there some kind of JDBC nonsense that I'm not aware of? Are > backticks a special feature of MySQL that can't be read by all JDBC- > compatible RDBMSs? I'm not a database person, but it seems to me that > either backticks should be placed around all

Re: Clojure 1.2 Beta 1

2010-07-14 Thread ngocdaothanh
Report: There is still "call to contains can't be resolved" for defrecord. After googling for this message, I see that it has been discussed (and can be easily fixed?). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: clojure.contrib.sql does not protect table names?

2010-07-14 Thread Michael Wood
On 14 July 2010 17:21, Tim McCormack wrote: > It looks like all the clojure.contrib.sql functions that interact with > tables fail to wrap table names in backticks. As a result, any table > names that are reserved words (like "order") or contain non- > alphanumeric characters (like "foo-bar") will

Re: clojure.contrib.sql does not protect table names?

2010-07-14 Thread Tim McCormack
On Jul 14, 11:56 am, Michael Wood wrote: > AFAIK backticks are MySQL-specific.  PostgreSQL uses double quotes.  I > imagine there is a proper JDBC way of handing this, though. OK, so there is enough variation between RDBMSs that a simple solution won't work. Seems like clojure.contrib.sql's job s

defmulti - defonce semantics?

2010-07-14 Thread Brian Carper
I just noticed this in the 1.2 beta release notes: * defmulti - Enhanced to have defonce semantics I've been bitten by this for a couple months now and I never knew the reason. If (during interactive development) you want to change the dispatch function for a multimethod, what is now the prope

Re: Building mixed clojure and java code

2010-07-14 Thread Shantanu Kumar
lein-javac may be the smoothest option. I have tried both Ant (see here: http://bitbucket.org/kumarshantanu/blogjure/src) and Maven (see here: http://bitbucket.org/kumarshantanu/jettify/src) -- I would say go with Lein. :) Regards, Shantanu On Jul 14, 7:51 pm, Wilson MacGyver wrote: > We use gra

Re: Clojure 1.2 Beta 1

2010-07-14 Thread MarkSwanson
I didn't see mention of the new equals/equiv work. Is this going into a later beta or is this work tentatively going into a later release? -- 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 No

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Stuart Halloway
Later release. > I didn't see mention of the new equals/equiv work. > Is this going into a later beta or is this work tentatively going into > a later release? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send emai

Re: defmulti - defonce semantics?

2010-07-14 Thread Stuart Halloway
There is no easy way to change the dispatch function interactively. Our experience has been that doing this (without the magic to hunt down all the defmethods elsewhere) was causing more harm than good. It's a tradeoff, for sure. Stu > I just noticed this in the 1.2 beta release notes: > > *

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Stuart Halloway
This will be fixed in the next beta. https://www.assembla.com/spaces/clojure/tickets/402-degenerate-defrecords-should-act-like-empty-maps Stu > Report: > There is still "call to contains can't be resolved" for defrecord. > After googling for this message, I see that it has been discussed (and >

Re: faster flatten?

2010-07-14 Thread miner
I think it's worthwhile to have a faster flatten even if it doesn't look as elegant as the current implementation. You could do a bit of refactoring and save yourself a call to sequential? since the recursive calls are guaranteed to have seqs (as a result of next). Also, I'd prefer flatten to ret

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Praki Prakash
I think my number crunching code would benefit immensely from equals/equiv code. When can we hope to see a release containing equals/equiv effort? Thanks On Wed, Jul 14, 2010 at 10:42 AM, Stuart Halloway wrote: > Later release. > >> I didn't see mention of the new equals/equiv work. >> Is this g

Re: Suggestions for a &file and &line implicit argument in macros

2010-07-14 Thread Praki Prakash
I have the same problem and implicit file/line arguments would be very useful to me as well. On Wed, Jul 14, 2010 at 8:21 AM, Nicolas Oury wrote: > Dear all, > I am using a lot of macros with a quite complex syntax and I would like to > be able to report error nicely. > I haven't been able to fi

Re: Clojure 1.2 Beta 1

2010-07-14 Thread Stuart Halloway
It will probably go on master fairly soon, but the community will need some time with it before a release. > I think my number crunching code would benefit immensely from > equals/equiv code. When can we hope to see a release containing > equals/equiv effort? > > Thanks > > On Wed, Jul 14, 2010

Re: Suggestions for a &file and &line implicit argument in macros

2010-07-14 Thread Hugo Duncan
On Wed, 14 Jul 2010 11:21:51 -0400, Nicolas Oury wrote: Would two implicit arguments &file and &line be useful for others, or I am the only one that needs something like that? I would definitely find it useful (e.g. in pallet to tie generated bash script back to clojure source). -- Hu

Re: ANN: Deview - Better test results

2010-07-14 Thread Heinz N. Gies
On Jul 14, 2010, at 15:15 , Paul Stadig wrote: > > Port forwarding would still require switiching back and forth between a > terminal to a browser, no? It would be cool to have difform used in > clojure.test, so that test runs in a terminal could be grasped more > immediately. Ah that is what

Re: faster flatten?

2010-07-14 Thread Cam
I definitely like this version a little better. If you change the else of the if to be just (list), it returns the empty list just as core/ flatten does. Mind if I update the ticket with this patch? On Jul 14, 1:56 pm, miner wrote: > I think it's worthwhile to have a faster flatten even if it doe

Re: Building mixed clojure and java code

2010-07-14 Thread Mike Anderson
Hi Martin, Not sure how it fits with the rest of your environment but I've had good success with just the following: - Eclipse Helios (3.6) - CounterClockwise plugin CounterClockwise integrates well with the Eclipse build system, so I've been able to do most of the stuff I need (e.g. exporting to

Re: defmulti - defonce semantics?

2010-07-14 Thread Michał Marczyk
If you're ok with discarding all your methods for the given multi, you can do (ns-unmap the-ns-of-defmulti name-of-the-multimethod) (I'm not sure if you should also unmap it in namespaces which refer to that Var just now...) Then the entire multifunction will be recreated when you recompile. Si

Re: Building mixed clojure and java code

2010-07-14 Thread Mark McGranaghan
Hi Martin, http://github.com/mmcgrana/clj-json is a simple example of a Clojure +Java library that you could use as a working example. See in particular project.clj the Development section of README.md. Hope this helps, - Mark On Jul 14, 6:16 am, Martin DeMello wrote: > On Wed, Jul 14, 2010 at

Re: clojure.contrib.sql does not protect table names?

2010-07-14 Thread Michael Gardner
On Jul 14, 2010, at 11:41 AM, Tim McCormack wrote: > On Jul 14, 11:56 am, Michael Wood wrote: >> AFAIK backticks are MySQL-specific. PostgreSQL uses double quotes. I >> imagine there is a proper JDBC way of handing this, though. > > OK, so there is enough variation between RDBMSs that a simple

Re: faster flatten?

2010-07-14 Thread Steve Miner
On Jul 14, 2010, at 2:40 PM, Cam wrote: > I definitely like this version a little better. If you change the else > of the if to be just (list), it returns the empty list just as core/ > flatten does. Mind if I update the ticket with this patch? It's all yours. Really, just a slight change from

Re: ANN: Deview - Better test results

2010-07-14 Thread Brenton
On Jul 13, 9:40 pm, Phil Hagelberg wrote: > Unfortunately since I spend all my time in the terminal, (for remote > pairing) I can't really use a web-based interface like this for normal > work. Do you have any plans to create a command-line client? How hard > would it be? > > Alternatively, do you

Re: defmulti - defonce semantics?

2010-07-14 Thread Kevin Downey
if the various pieces of data in a MultiFn were public you could just copy over the bits you wanted... On Wed, Jul 14, 2010 at 12:09 PM, Michał Marczyk wrote: > If you're ok with discarding all your methods for the given multi, you can do > > (ns-unmap the-ns-of-defmulti name-of-the-multimethod)

Re: ANN: Deview - Better test results

2010-07-14 Thread Brian Carper
On Jul 14, 1:05 pm, Brenton wrote: > > I have created a new project named lein-difftest. > > http://github.com/brentonashworth/lein-difftest > This is awesome. I've been hurting for this kind of tool for a long time. For peons like myself who still run tests from a REPL and want to see plaintex

Typed Racket

2010-07-14 Thread ntu...@googlemail.com
For Racket (formely PLT Scheme), there exists a dialect called "Typed Racket" [1], which allows for static type checking. I wonder if it is feasible to port the typechecker to Clojure? Any ideas? - nt - [1] http://docs.racket-lang.org/ts-guide/index.html -- You received this message becaus

Re: Typed Racket

2010-07-14 Thread Mark Engelberg
The nice thing about Racket is the way you can write different parts of your program in different Racket languages. So you can write some pieces in Typed Racket, and others in Lazy Racket, and others in standard Racket. It is my understanding that Typed Racket programs do not run any faster than

Re: Typed Racket

2010-07-14 Thread Raoul Duke
On Wed, Jul 14, 2010 at 3:49 PM, Mark Engelberg wrote: > purely about safety, not about speed.  My guess is that the Clojure > community would have little interest in any version of static typing > that did not provide performance benefits. check out the approach Dialyzer takes for Erlang. would

Re: ANN: Deview - Better test results

2010-07-14 Thread Brenton
On Jul 14, 2:59 pm, Brian Carper wrote: > For peons like myself who still run tests from a REPL and want to see > plaintext diffed output, apparently you can use this library and do > (difftest.core/run-tests 'some-ns) instead of (clojure.test/run-test > 'some-ns) and it seems to work well. > >

Re: ANN: Deview - Better test results

2010-07-14 Thread Brian Carper
On Jul 14, 5:03 pm, Brenton wrote: > I'm not sure what's going on with that error. As you can see from [1], > testing-vars-str takes no args. Also, I don't get an error message > when running as a Leiningen plugin or from the REPL.  Let me know if > you think of anything else that might be causing

Re: ANN: Deview - Better test results

2010-07-14 Thread Brenton
On Jul 14, 5:17 pm, Brian Carper wrote: > I'm looking here:   > http://github.com/clojure/clojure/blob/master/src/clj/clojure/test.cl... > > Looks like that function's signature changed a couple weeks > ago:http://github.com/clojure/clojure/commit/a9d9ddb6ad4f86809d44f8e3370a... > > --Brian Than

Re: defmulti - defonce semantics?

2010-07-14 Thread Michał Marczyk
On 14 July 2010 22:36, Kevin Downey wrote: > if the various pieces of data in a MultiFn were public you could just > copy over the bits you wanted... Actually they are public, there are even documented Clojure wrappers around them, see clojure.core/methods and clojure.core/prefers. Sincerely, Mi

Re: Building mixed clojure and java code

2010-07-14 Thread Seth
It appears that lein-javac is not compatible with Leiningen 1.2.0-RC2: % lein compile-java [...] Exception in thread "main" java.lang.Exception: Unable to resolve symbol: make-path in this context (compile_java.clj:10) On Jul 14, 9:19 am, Moritz Ulrich wrote: > There is lein-javac which integrat

Re: ANN: Deview - Better test results

2010-07-14 Thread Phil Hagelberg
On Tue, Jul 13, 2010 at 10:57 PM, Brenton wrote: > Could you give me a little more detail as to why you can't use it? I > also work from the command line and this works very well for me. I > thought that this would work well for remote pairing. Do you work from > sources on your machine or from a

Re: Typed Racket

2010-07-14 Thread Laurent PETIT
2010/7/15 Mark Engelberg > The nice thing about Racket is the way you can write different parts > of your program in different Racket languages. So you can write some > pieces in Typed Racket, and others in Lazy Racket, and others in > standard Racket. > > It is my understanding that Typed Racke

Re: Typed Racket

2010-07-14 Thread nickikt
Hallo all, Haveing the option of something like that would be nice but atm I think we should not focus on that. Clojure is still a young language and there is enought to do. We should not confuse people with diffrent dialects of clojure allready. On Jul 15, 7:10 am, Laurent PETIT wrote: > 2010