Re: about the repl

2010-12-18 Thread Robert McIntyre
Well even if you don't like emacs it still serves as a decent repl :) Also if you don't like emacs you might try the eclipse counterclockwise plugin --- it has a nice repl too. good luck, --Robert McIntyre On Sat, Dec 18, 2010 at 2:56 AM, tor torgau...@gmail.com wrote: Thanks for the quick

Re: currying in clojure for fixed number of arg functions

2010-12-18 Thread Sunil S Nandihalli
very cool implementation .. Something tells me that you didn't leave your python background behind.. :) Sunil. On Sat, Dec 18, 2010 at 12:13 PM, Robert McIntyre r...@mit.edu wrote: I think your work is a wonderful idea. I've been wanting to do this myself for some time. Thanks for actually

Re: about the repl

2010-12-18 Thread Meikel Brandmeyer
Hi, Am 18.12.2010 um 09:00 schrieb Robert McIntyre: Also if you don't like emacs you might try the eclipse counterclockwise plugin --- it has a nice repl too. I think all of the major environments have decent repls. Emacs/swank, Eclipse/ccw, Netbeans/enclojure, Vim/VimClojure. What you are

Re: Waiting for agents

2010-12-18 Thread nicolas.o...@gmail.com
Thank you very much for the explanations. I will go for Fork/join. Anybody is working on a clojure wrapper? On Fri, Dec 17, 2010 at 7:48 PM, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 17 Dec 2010, at 19:47, nicolas.o...@gmail.com wrote: How about futures? They are in clojure.core and

Re: Waiting for agents

2010-12-18 Thread Daniel Werner
On 18 December 2010 10:41, nicolas.o...@gmail.com nicolas.o...@gmail.com wrote: Thank you very much for the explanations. I will go for Fork/join. Anybody is working on a clojure wrapper? Take a look at Clojure's par branch: https://github.com/clojure/clojure/tree/par It has proof-of-concept

Re: about the repl

2010-12-18 Thread .Bill Smith
While this not what tor explicitly asked about, it is worth mentioning that the only way to kill an infinite loop in a Clojure repl is to kill the JVM. I too recommend experimenting with other environments (I use Emacs) -- just don't expect them to deal better with infinite loops than the

Re: Waiting for agents

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 7:52 AM, Daniel Werner daniel.d.wer...@googlemail.com wrote: I seem to recall that Rich was interested in pursuing this avenue again once Java 7 was out, but I could be wrong. Once Java 7 is out is starting to seem like once LaTeX3 is out or once Half-Life 2 Episode 3 is

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 8:23 AM, .Bill Smith wrote: While this not what tor explicitly asked about, it is worth mentioning that the only way to kill an infinite loop in a Clojure repl is to kill the JVM. Is this architecturally necessary, or might someone be able to provide a more flexible

Re: about the repl

2010-12-18 Thread Aaron Cohen
On Sat, Dec 18, 2010 at 10:34 AM, Lee Spector lspec...@hampshire.edu wrote: On Dec 18, 2010, at 8:23 AM, .Bill Smith wrote: While this not what tor explicitly asked about, it is worth mentioning that the only way to kill an infinite loop in a Clojure repl is to kill the JVM. Is this

Re: Waiting for agents

2010-12-18 Thread Daniel Werner
On 18 December 2010 16:29, Ken Wesson kwess...@gmail.com wrote: Once Java 7 is out is starting to seem like once LaTeX3 is out or Oh, you haven't heard the news yet? LaTeX3 has already been superseded anyway: http://river-valley.tv/tug-2010/an-earthshaking-announcement -- You received this

Re: about the repl

2010-12-18 Thread Stuart Sierra
You don't necessarily need to kill the whole JVM. If your REPL implementation runs each command in a new Threadhttp://download.oracle.com/javase/6/docs/api/java/lang/Thread.html(as most of them do, I think) it can just

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 11:25 AM, Aaron Cohen wrote: There already exists clojure.contrib.repl-utils/add-break-thread! which attempts to address this. (http://clojure.github.com/clojure-contrib/repl-utils-api.html#clojure.contrib.repl-utils/add-break-thread!). I'm not sure there's any way to

Re: about the repl

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 11:43 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: You don't necessarily need to kill the whole JVM.  If your REPL implementation runs each command in a new Thread (as most of them do, I think) it can just stop the thread.  That won't work in every situation (for

Re: Waiting for agents

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 11:38 AM, Daniel Werner daniel.d.wer...@googlemail.com wrote: On 18 December 2010 16:29, Ken Wesson kwess...@gmail.com wrote: Once Java 7 is out is starting to seem like once LaTeX3 is out or Oh, you haven't heard the news yet? LaTeX3 has already been superseded anyway:

Re: about the repl

2010-12-18 Thread Lee Spector
On Dec 18, 2010, at 12:14 PM, Ken Wesson wrote: The two commonest causes of repl hangs are * Buggy (loop ... recur) that does not terminate * Repl tries to print an infinite lazy seq Not sure what the OP's interest is but FWIW the cases in which I most often want to break (and look

Re: Waiting for agents

2010-12-18 Thread Robert McIntyre
That's brilliant. Has anyone considered targeting clojure for LaTeX3?Numerical support for one would be simplified, since LaTeX3 just uses actual rational numbers as its default instead longs or ints or whatever. This could be big, guys! --Robert McIntyre On Sat, Dec 18, 2010 at 12:19 PM,

Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Alex Baranosky
Hi guys, I've got a simple toy app I'm writing wrote for fun to help my friend figure out where in the Boston area he should move to. If I was using Rails I could throw it up on Heroku, essentially for free, because I have no plan to ever have any real traffic go there. mostly I just want to

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Laurent PETIT
2010/12/18 Alex Baranosky alexander.barano...@gmail.com Hi guys, I've got a simple toy app I'm writing wrote for fun to help my friend figure out where in the Boston area he should move to. If I was using Rails I could throw it up on Heroku, essentially for free, because I have no plan to

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Sean Corfield
Check out stax.net (now part of CloudBees - it will become their r...@dev product and will continue to offer some free hosting). On Saturday, December 18, 2010, Alex Baranosky alexander.barano...@gmail.com wrote: Hi guys, I've got a simple toy app I'm writing wrote for fun to help my friend

Re: currying in clojure for fixed number of arg functions

2010-12-18 Thread Eric Schulte
Ah, my apologies, Thanks for clarifying, I should have looked more closely at your code before responding. That is indeed a very nice idea (and an aspect of Haskell that I sorely miss in Clojure). I could see myself wanting to use this on a namespace level, e.g. have all functions defined in a

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Tim Robinson
Free for 1 year: http://aws.amazon.com/free/ On Dec 18, 10:55 am, Alex Baranosky alexander.barano...@gmail.com wrote: Hi guys, I've got a simple toy app I'm writing wrote for fun to help my friend figure out where in the Boston area he should move to.  If I was using Rails I could throw it

Re: about the repl

2010-12-18 Thread Mike Meyer
On Fri, 17 Dec 2010 22:45:01 -0800 (PST) tor torgau...@gmail.com wrote: Is there a way to activate word completion in the repl? I find myself hitting tab all the time... Since nobody else mentioned it (or even offered a solution other than Try my environment), you can use rlwrap (should be

HTML5 Validator

2010-12-18 Thread Alyssa Kwan
Hi! I'd like to unit test my html output for well-formedness. What's an easy way to test it for HTML5 validity? Are there good Clojure libs for this? I only need to check for validity, not parse. Thanks! Alyssa -- You received this message because you are subscribed to the Google Groups

Re: about the repl

2010-12-18 Thread Robert McIntyre
The rlwrap method is very cool, but I can't seem to get ctrl-C to work (it still quits to the terminal) any advice? --Robert McIntyre On Sat, Dec 18, 2010 at 3:01 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: On Fri, 17 Dec 2010 22:45:01 -0800 (PST) tor torgau...@gmail.com

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Marc Spitzer
read the fine print on this, free for 750 hours of up time, ~30 days on, then its billed at normal rates. marc On Sat, Dec 18, 2010 at 2:46 PM, Tim Robinson tim.blacks...@gmail.com wrote: Free for 1 year: http://aws.amazon.com/free/ On Dec 18, 10:55 am, Alex Baranosky

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread László Török
speaking of fine print, you probably missed per month... i've using it for 2 months and was charged 9ct once for exceeding traffic volume limit p.s. sorry for the off-topic 2010/12/18 Marc Spitzer mspit...@gmail.com read the fine print on this, free for 750 hours of up time, ~30 days on,

Re: about the repl

2010-12-18 Thread Stuart Halloway
The latter is easy to fix: provide a version of println that wraps an implicit (take n ...) around seq arguments (including when it calls itself on seqs nested within other structures). (*print-length* doesn't seem to work, just causes an infinite seq to print the first n items and then a

Re: about the repl

2010-12-18 Thread Ken Wesson
On Sat, Dec 18, 2010 at 4:18 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: The latter is easy to fix: provide a version of println that wraps an implicit (take n ...) around seq arguments (including when it calls itself on seqs nested within other structures). (*print-length* doesn't

replace first n items in sequence

2010-12-18 Thread Glen Rubin
I am looking for a fn that does the following. Let's say i have sequences A B A: '(1 2 3 4 5 6 7 8 9 10) B '(54 666 23) I want to replace A's first items with B's, so that I get: '(54 666 23 4 5 6 7 8 9 10) Is there a fn to do this? Otherwise, I will write one. Thanks! -- You received

Clojure in Maxine

2010-12-18 Thread jim
Just got a Clojure REPL using the Maxine VM. It worked the first time! Here's the command I used. ~/maxine/bin/max vm -cp clojure-1.2.0/clojure.jar clojure.main http://wikis.sun.com/display/MaxineVM/Home -- You received this message because you are subscribed to the Google Groups Clojure

Re: currying in clojure for fixed number of arg functions

2010-12-18 Thread Benny Tsai
This is very cool! Taken together with the following projects, Clojure now has some of the nicest parts of Haskell/ML, IMHO :) Matchure (pattern matching): http://spin.atomicobject.com/2010/04/25/matchure-serious-clojure-pattern-matching Algebraic Data Types:

Re: replace first n items in sequence

2010-12-18 Thread Glen Rubin
ok that's looks very succinct, I will use it. Just figured I would ask if it exists, b/c always prefer to use a built-in and it sounded basic enough to be. thanks! On Dec 18, 5:15 pm, Benny Tsai benny.t...@gmail.com wrote: I didn't see a built-in fn for this, and couldn't restrain myself from

Re: replace first n items in sequence

2010-12-18 Thread Benny Tsai
No problem :) I prefer built-in's as well, but I couldn't find anything. Maybe someone else will have better luck... On Dec 18, 3:32 pm, Glen Rubin rubing...@gmail.com wrote: ok that's looks very succinct, I will use it.  Just figured I would ask if it exists, b/c always prefer to use a

Dispatch on return type?

2010-12-18 Thread Tim Daly
Is it possible to dispatch based on the return type/value? That is, can I write a multimethods dispatch to distinguish +(float,float) - float +(float,float) - int Tim Daly -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Waiting for agents

2010-12-18 Thread Rosko
You can read a 4 page PDF: tug.org/TUGboat/tb31-2/tb98knut.pdf first thing I would check is the date. I think it might be April 1. On Dec 18, 12:43 pm, Robert McIntyre r...@mit.edu wrote: That's brilliant.   Has anyone considered targeting clojure for LaTeX3?    Numerical support for one would

Re: Dispatch on return type?

2010-12-18 Thread Meikel Brandmeyer
Hi, Am 19.12.2010 um 00:07 schrieb Tim Daly: Is it possible to dispatch based on the return type/value? That is, can I write a multimethods dispatch to distinguish +(float,float) - float +(float,float) - int (defmulti + (fn [x y ret] (vector (type x) (type y) ret)) (defmethod + [Float

Re: about the repl

2010-12-18 Thread Alex Osborne
Stuart Sierra the.stuart.sie...@gmail.com writes: If your REPL implementation runs each command in a new Thread (as most of them do, I think) it can just stop the thread. That won't work in every situation (for example, a thread blocked waiting for I/O) but it will get you out of an infinite

Re: Clojure in Maxine

2010-12-18 Thread George Jahad
what were you thinking of doing with maxine? On Dec 18, 1:46 pm, jim jim.d...@gmail.com wrote: Just got a Clojure REPL using the Maxine VM. It worked the first time! Here's the command I used. ~/maxine/bin/max vm -cp clojure-1.2.0/clojure.jar clojure.main

Re: HTML5 Validator

2010-12-18 Thread Jeff Valk
On Saturday, December 18, 2010 at 02:10 pm, Alyssa Kwan wrote: I'd like to unit test my html output for well-formedness. What's an easy way to test it for HTML5 validity? Are there good Clojure libs for this? I only need to check for validity, not parse. I'm not aware of a native clojure

Re: about the repl

2010-12-18 Thread Robert McIntyre
That's really cool and has been added to my standard system stuff :) --Robert McIntyre On Sat, Dec 18, 2010 at 6:46 PM, Alex Osborne a...@meshy.org wrote: Stuart Sierra the.stuart.sie...@gmail.com writes: If your REPL implementation runs each command in a new Thread (as most of them do, I

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread javajosh
On Dec 18, 9:55 am, Alex Baranosky alexander.barano...@gmail.com wrote: Is there a similar free service to use with Compojure?  If not free, then what are the cheap options? A little googling revealed that Google App Engine will work:

Re: HTML5 Validator

2010-12-18 Thread John Sanda
On Sat, Dec 18, 2010 at 3:10 PM, Alyssa Kwan alyssa.c.k...@gmail.comwrote: Hi! I'd like to unit test my html output for well-formedness. What's an easy way to test it for HTML5 validity? Are there good Clojure libs for this? I only need to check for validity, not parse. Thanks! Alyssa

Re: replace first n items in sequence

2010-12-18 Thread Alan
I feel similarly: always use a built-in if there is one, even for something as simple as this. I couldn't find one either, and my solution is basically the same as Benny's, but there's no particular need to (let) the count, and once that's removed it's so short it almost doesn't merit a defn

Getting body of HTTP POST in Compojure

2010-12-18 Thread Miki
Greetings, I'm trying to get the body of HTTP POST in Compojure (0.5.3). I have the following code: (defn handle-post [body] (log/info (.read body)) OK) (defroutes tropo-routes (GET / [] (welcome-page)) (POST /post {body :body} (handle-post body)) (route/not-found

Re: Getting body of HTTP POST in Compojure

2010-12-18 Thread James Reeves
What's the content-type of the POST? If it's application/x-www-form-urlencoded, then the body stream will be automatically parsed into a map of parameters, thus consuming the stream. - James On 19 December 2010 02:30, Miki miki.teb...@gmail.com wrote: Greetings, I'm trying to get the body of

Re: Getting body of HTTP POST in Compojure

2010-12-18 Thread Miki
What's the content-type of the POST? If it's application/x-www-form-urlencoded, then the body stream will be automatically parsed into a map of parameters, thus consuming the stream. The content-type is application/www-form-urlencoded but the body is not a form, just a JSON object. Is

Re: Getting body of HTTP POST in Compojure

2010-12-18 Thread James Reeves
On 19 December 2010 02:58, Miki miki.teb...@gmail.com wrote: What's the content-type of the POST? If it's application/x-www-form-urlencoded, then the body stream will be automatically parsed into a map of parameters, thus consuming the stream. The content-type is

Re: Clojure in Maxine

2010-12-18 Thread jim
Don't know fully yet. But I've been reading about the C1X compiler. That's the client java compiler and they've ported the C version to java and added a few twists. From reading the papers, it sounds like it would be fun to implement it in Clojure. So I may try to do that. Then see where things

Re: Dispatch on return type?

2010-12-18 Thread Tim Daly
Axiom, a computer algebra system I maintain, can dispatch on return type. I am looking at the things Clojure can do that might support the Spad language (the mathematical language in Axiom). I could not find a way to adjust the multimethod to dispatch on return type. On 12/18/2010 6:41 PM,

defmethod/defmulti should dispatch on the new arguments when we call the recur..?

2010-12-18 Thread Sunil S Nandihalli
Hello everybody, It would be nice if calling recur inside a defmethod redispatched on the new arguments.. I have shown a simple use-case in the following gist. https://gist.github.com/747171 It might be naive .. but I feel IMHO that this should be the default behaviour and not have any