Re: lein appengine-prepare

2011-03-21 Thread Constantine Vetoshev
On Mar 21, 7:05 am, Thorsten Wilms wrote: > nevermind, in the hours it's been since I send this mail, I fixed that > issue (a stray :main in my project file and the need to run "lein clean". > > On 03/21/2011 10:26 AM, Thorsten Wilms wrote: > > > > After working with appengine-magic a bit, I wante

Re: About a networked REPL...

2011-03-21 Thread Martin Blais
Aaaah now we're getting to the core of this discussion... To summarize everyone's points: - Several people consider the "transport" to be orthogonal/separte to the "tooling" or "IDE backend." a) By transport, it refers to a generic ability to transfer key-value pairs, with a 'id' key f

Re: fs - file system utilities for Clojure

2011-03-21 Thread Shantanu Kumar
On Mar 22, 3:29 am, siyu798 wrote: > Miki, > Thanks for the quick response, but I'm not just looking for a fix for the > testcase, I'm looking for the dirname function to return the same output > regardless of the machine that the code is running on, eg > > (dirname "/a/b/c") should return "/a/b

Re: [ANN] fs - file system utilities for Clojure

2011-03-21 Thread Miki
Greetings, (dirname "/a/b/c") should return "/a/b/" on both win and unix > You can use fs/*separator for that: user=> (binding [fs/*separator* ":"] (fs/join "a" "b" "c")) "a:b:c" However users expect the path to be right depending on the OS, meaning \ on windows and / on *nix. HTH, --

Re: About a networked REPL...

2011-03-21 Thread Chas Emerick
On Mar 21, 2011, at 5:57 PM, Kevin Downey wrote: > On Mon, Mar 21, 2011 at 2:15 PM, James Reeves wrote: >> On 21 March 2011 13:14, Chas Emerick wrote: >>> I think we're in violent agreement. Here's a sample nREPL exchange from >>> https://github.com/clojure/tools.nrepl: >> >> Ah, I did look

Re: DDJ for Clojure/Lisp/FP

2011-03-21 Thread defn
#1 in your list of suggestions is a really great idea. The majority of literature on that facet of clojure is severely lacking IMHO. Cheers, Devin On Mar 21, 5:16 pm, Phil Rand wrote: > This sounds like a great idea, Gregg.  Having you and other professionals > involved could make a huge differ

Re: DDJ for Clojure/Lisp/FP

2011-03-21 Thread Andreas Kostler
> 1) A tour of the Java / JVM ecosystem for clojure programmers with little or > no Java background. What are the libraries, frameworks, and tools every > clojure programmer should know about, even if he or she never writes a line > of java? How do we use them from clojure? Actually this mig

Re: [ANN] fs - file system utilities for Clojure

2011-03-21 Thread siyu798
Miki, Thanks for the quick response, but I'm not just looking for a fix for the testcase, I'm looking for the dirname function to return the same output regardless of the machine that the code is running on, eg (dirname "/a/b/c") should return "/a/b/" on both win and unix just like the getFull

Re: DDJ for Clojure/Lisp/FP

2011-03-21 Thread Phil Rand
This sounds like a great idea, Gregg. Having you and other professionals involved could make a huge difference, though I do wonder whether the market is big enough to justify your time. I was about to say it's worth a try, but I can't make that judgement for you. I would certainly be an eager r

Re: About a networked REPL...

2011-03-21 Thread Kevin Downey
On Mon, Mar 21, 2011 at 2:15 PM, James Reeves wrote: > On 21 March 2011 13:14, Chas Emerick wrote: >> I think we're in violent agreement.  Here's a sample nREPL exchange from >> https://github.com/clojure/tools.nrepl: > > Ah, I did look through that REPL exchange, but I misunderstood the > synta

Re: About a networked REPL...

2011-03-21 Thread James Reeves
On 21 March 2011 13:14, Chas Emerick wrote: > I think we're in violent agreement.  Here's a sample nREPL exchange from > https://github.com/clojure/tools.nrepl: Ah, I did look through that REPL exchange, but I misunderstood the syntax the first time I read it. I now realise that the integer at t

Re: [ANN] fs - file system utilities for Clojure

2011-03-21 Thread Miki
I *think* it's fixed, can you test with the latest sources in bitbucket? -- 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 w

Re: About a networked REPL...

2011-03-21 Thread James Reeves
On 21 March 2011 13:10, Meikel Brandmeyer wrote: > Then we need a clear definition of the clojure syntax. Otherwise you > cannot build clients without read-string. True. I guess bencoded data structures, or JSON inside a netstring would perhaps be more cross-platform solutions. - James -- You

Re: Reader macro suggestions

2011-03-21 Thread Stuart Sierra
Not an argument against the request, just a reminder: heredocs are subtly different from quoting. In the traditional shell implementation, a heredoc starts on the line following the "<<", so you can have stuff like this: some_command

Reader macro suggestions

2011-03-21 Thread rob levy
One useful reader macro would be do the analog of a syntax-quote in an ignored sexp ( #- is the analog of ~ ): #_(ignore (continuing to ignore #-"except do not ignore this" and ignore this)) Another language feature that I think many wish for to have some way of specifying a string with

Re: Throwing an Exception with get

2011-03-21 Thread Daniel Werner
On 21 March 2011 15:52, Jonathan Smith wrote: > Here is a way that should work. > > (let [missing (gensym)] >  (defn get-with-exception [map key] >    (let [res (get map key missing)] >      (if (= res missing) >          (throw (new Exception "my-exception")) >        res You may be able to

Re: How to Sum a Sequence?

2011-03-21 Thread Mike Meyer
On Sun, 20 Mar 2011 08:47:30 -0700 (PDT) Christian wrote: > Hello Tassilo! > > I've tested your code and looked at the Clojure Documentation for > 'for'. Given that, I have written > > (reduce +(filter even? (for [fib (fib-seq) :while (< fib 400)] > fib))) > > This gives me the error 'cloj

Re: Throwing an Exception with get

2011-03-21 Thread Jonathan Smith
Ah, interesting. You'll notice that the gensym is created outside the defn and captured, so I'm not sure speed is important. On Mar 21, 11:26 am, Mikhail Kryshen wrote: > On Mon, 21 Mar 2011 07:52:45 -0700 (PDT) > > Jonathan Smith wrote: > > Here is a way that should work. > > > (let [missing (g

Re: About a networked REPL...

2011-03-21 Thread Kevin Downey
I didn't mean to imply that I wanted to replace the number with tags, what I meant to imply is that the number of lines is not any better than START and BEGIN tags, while a fixed width count of bytes (even a number string padded to a constant number of bytes with zeroes) is better. On Mon, Mar 21,

Re: Throwing an Exception with get

2011-03-21 Thread Mikhail Kryshen
On Mon, 21 Mar 2011 07:52:45 -0700 (PDT) Jonathan Smith wrote: > Here is a way that should work. > > (let [missing (gensym)] > (defn get-with-exception [map key] > (let [res (get map key missing)] > (if (= res missing) > (throw (new Exception "my-exception")) > res

Re: Throwing an Exception with get

2011-03-21 Thread Jonathan Smith
Here is a way that should work. (let [missing (gensym)] (defn get-with-exception [map key] (let [res (get map key missing)] (if (= res missing) (throw (new Exception "my-exception")) res Gensyms are unique so you also don't have the problem of 'what happens if I

Re: lein appengine-prepare

2011-03-21 Thread Thorsten Wilms
nevermind, in the hours it's been since I send this mail, I fixed that issue (a stray :main in my project file and the need to run "lein clean". On 03/21/2011 10:26 AM, Thorsten Wilms wrote: Hi! After working with appengine-magic a bit, I wanted to use the datastore viewer to see what's happen

lein appengine-prepare

2011-03-21 Thread Thorsten Wilms
Hi! After working with appengine-magic a bit, I wanted to use the datastore viewer to see what's happening. So I tried "lein appengine-prepare" (is there another way?). From https://github.com/gcv/appengine-magic#readme: Testing with dev_appserver.sh 1. lein appengine-prepare. This AOT-

Re: About a networked REPL...

2011-03-21 Thread Chas Emerick
On Mar 21, 2011, at 8:52 AM, James Reeves wrote: > On 21 March 2011 11:29, Chas Emerick wrote: >> The notion of "passing around Clojure data structures" does get watered down >> because of the non-sexpr-nature of e.g. *out* and *err*, and it's all >> message-oriented so as to support asynchron

Re: About a networked REPL...

2011-03-21 Thread Meikel Brandmeyer
Hi, On 21 Mrz., 13:52, James Reeves wrote: > Then use the Clojure read-string and pr-str functions to encode data. Then we need a clear definition of the clojure syntax. Otherwise you cannot build clients without read-string. By hard-coding this I'm not free to encode things as I want. Eg. with

Re: About a networked REPL...

2011-03-21 Thread James Reeves
On 21 March 2011 11:29, Chas Emerick wrote: > The notion of "passing around Clojure data structures" does get watered down > because of the non-sexpr-nature of e.g. *out* and *err*, and it's all > message-oriented so as to support asynchronous evaluation from the same > client, but that's prett

Re: About a networked REPL...

2011-03-21 Thread George Jahad
On Mar 19, 5:30 pm, Martin Blais wrote: > Hi, > > After Rich's suggestion at the recent NYC meetup, For those of us who weren't there, what exactly did Rich suggest at the NYC meetup? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: About a networked REPL...

2011-03-21 Thread Chas Emerick
On Mar 20, 2011, at 9:13 PM, James Reeves wrote: > On 21 March 2011 00:18, Chas Emerick wrote: >> In any case, my objective with nREPL was to get something working well that >> had what I thought were the right semantics for the use cases I was >> concerned with (i.e. point-to-point Clojure to

Re: About a networked REPL...

2011-03-21 Thread Chas Emerick
On Mar 20, 2011, at 10:48 PM, blais wrote: > On Mar 20, 12:16 pm, Chas Emerick wrote: >> Martin, >> >> Thank you for the pushback. :-) > > I'm not pushing back, I'm really just trying to understand... In any case, I appreciate public thrashing of design and implementation choices (as long a

Re: Dynamic scoping issue

2011-03-21 Thread Tassilo Horn
Ken Wesson writes: Hi Ken, >> Why do I use a dynamic var in the first place?  I want to use the >> simple names in the lexical scope of the `with-schema-imports' block, >> and I used a dynamic var only because the resolution takes place >> somewhere in the function call tree originating from the

Re: About a networked REPL...

2011-03-21 Thread Laurent PETIT
2011/3/21 blais > On Mar 20, 12:16 pm, Chas Emerick wrote: > > Martin, > > > > Thank you for the pushback. :-) > > I'm not pushing back, I'm really just trying to understand... > > > > On Mar 19, 2011, at 8:30 PM, Martin Blais wrote: > > > I think this is wrong, because every single IDE client

Re: Dynamic scoping issue

2011-03-21 Thread Tassilo Horn
Ken Wesson writes: Hi Ken, >>> They're not, but if the LazySeq realization is not happening until >>> after the scope of your with-schema-imports is exited, it would >>> explain a thing or two. You may need to sprinkle some doalls about. >> >> Oh, yes.  That was the exact issue.  But clearly for

Re: Dynamic scoping issue

2011-03-21 Thread Ken Wesson
On Mon, Mar 21, 2011 at 4:03 AM, Tassilo Horn wrote: > Why do I use a dynamic var in the first place?  I want to use the simple > names in the lexical scope of the `with-schema-imports' block, and I > used a dynamic var only because the resolution takes place somewhere in > the function call tree

Re: Dynamic scoping issue

2011-03-21 Thread Tassilo Horn
Meikel Brandmeyer writes: Hi Meikel, >> Oh, yes. That was the exact issue. But clearly forcing realization >> is not a good solution. Is there some better way to do what I want? >> Maybe my macro should expand to something like that? >> >> ((fn [] (binding [...as before...] body))) > > Sham

Re: About a networked REPL...

2011-03-21 Thread Kevin Downey
take it from someone who has been digging through the swank clojure source for the last few days, the protocol is not synchronuous. swank-clojure is completely built around async message passing (to the point where it can be difficult to trace an evaluation request and a response), and it is a mirr

Re: DDJ for Clojure/Lisp/FP

2011-03-21 Thread Gregg Williams
I'm writing again to report on the community's interest in my previous post. Two people expressed an interest in providing modest amounts of time to make a community-supported Clojure magazine (or magazine-like entity) happen; one of them has significant technical editing skills himself. So we've g

Re: About a networked REPL...

2011-03-21 Thread Meikel Brandmeyer
Hi, just to drop some comments from someone who has rather heavy requirements due to the environment he has to live with. But to re- state what I said before: I'm a pretty extreme case and don't want to be an obstacle for nREPL or any similar project. Nevertheless you can learn a lot from VimCloju